2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
[official-gcc.git] / gcc / ChangeLog
blobef167fe415d937adf0091330a3d785ca322bd0ee
1 2018-08-01 Jan Willem Jagersma  <jwjagersma@gmail.com>
3         PR target/86651
4         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5         mode for COFF targets.
6         * defaults.h (TARGET_COFF): Define.
7         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
8         TARGET_COFF): Define.
9         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
11         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
13 2018-07-31  Alexandre Oliva <oliva@adacore.com>
15         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
16         * gimple-streamer-out.c (output_bb): Save it.
17         * lto-streamer-in.c (input_struct_function_base): Restore
18         instance discriminator if available.  Create map on demand.
19         * lto-streamer-out.c (output_struct_function_base): Save it if
20         available.
21         * final.c (decl_to_instance_map): Document LTO strategy.
23 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
24             Olivier Hainque  <hainque@adacore.com>
26         * debug.h (decl_to_instance_map_t): New type.
27         (decl_to_instance_map): Declare.
28         (maybe_create_decl_to_instance_map): New inline function.
29         * final.c (bb_discriminator, last_bb_discriminator): New statics,
30         to track basic block discriminators.
31         (final_start_function_1): Initialize them.
32         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
33         bb_discriminator.
34         (decl_to_instance_map): New variable.
35         (map_decl_to_instance, maybe_set_discriminator): New functions.
36         (notice_source_line): Set discriminator.
38 2018-07-31  Ian Lance Taylor  <iant@golang.org>
40         * targhooks.c (default_have_speculation_safe_value): Add
41         ATTRIBUTE_UNUSED.
43 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
45         * dump-context.h: Include "pretty-print.h".
46         (dump_context::refresh_dumps_are_enabled): New decl.
47         (dump_context::emit_item): New decl.
48         (class dump_context): Add fields "m_test_pp" and
49         "m_test_pp_flags".
50         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
51         (temp_dump_context::get_dumped_text): New decl.
52         (class temp_dump_context): Add field "m_pp".
53         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
54         (dump_context::refresh_dumps_are_enabled): ...and add a test for
55         m_test_pp.
56         (set_dump_file): Update for above change.
57         (set_alt_dump_file): Likewise.
58         (dump_loc): New overload, taking a pretty_printer *.
59         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
60         to any test pretty-printer.
61         (make_item_for_dump_gimple_stmt): New function, adapted from
62         optinfo::add_gimple_stmt.
63         (dump_context::dump_gimple_stmt): Call it, and use the result,
64         eliminating the direct usage of dump_file and alt_dump_file in
65         favor of indirectly using them via emit_item.
66         (make_item_for_dump_gimple_expr): New function, adapted from
67         optinfo::add_gimple_expr.
68         (dump_context::dump_gimple_expr): Call it, and use the result,
69         eliminating the direct usage of dump_file and alt_dump_file in
70         favor of indirectly using them via emit_item.
71         (make_item_for_dump_generic_expr): New function, adapted from
72         optinfo::add_tree.
73         (dump_context::dump_generic_expr): Call it, and use the result,
74         eliminating the direct usage of dump_file and alt_dump_file in
75         favor of indirectly using them via emit_item.
76         (make_item_for_dump_printf_va): New function, adapted from
77         optinfo::add_printf_va.
78         (make_item_for_dump_printf): New function.
79         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
80         and use the result, eliminating the direct usage of dump_file and
81         alt_dump_file in favor of indirectly using them via emit_item.
82         (make_item_for_dump_dec): New function.
83         (dump_context::dump_dec): Call it, and use the result,
84         eliminating the direct usage of dump_file and alt_dump_file in
85         favor of indirectly using them via emit_item.
86         (make_item_for_dump_symtab_node): New function, adapted from
87         optinfo::add_symtab_node.
88         (dump_context::dump_symtab_node): Call it, and use the result,
89         eliminating the direct usage of dump_file and alt_dump_file in
90         favor of indirectly using them via emit_item.
91         (dump_context::begin_scope): Reimplement, avoiding direct usage
92         of dump_file and alt_dump_file in favor of indirectly using them
93         via emit_item.
94         (dump_context::emit_item): New member function.
95         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
96         Set up test pretty-printer on the underlying context.  Call
97         refresh_dumps_are_enabled.
98         (temp_dump_context::~temp_dump_context): Call
99         refresh_dumps_are_enabled.
100         (temp_dump_context::get_dumped_text): New member function.
101         (selftest::verify_dumped_text): New function.
102         (ASSERT_DUMPED_TEXT_EQ): New macro.
103         (selftest::test_capture_of_dump_calls): Run all tests twice, with
104         and then without optinfo enabled.  Add uses of
105         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
106         * dumpfile.h: Update comment for the dump_* API.
107         * optinfo-emit-json.cc
108         (selftest::test_building_json_from_dump_calls): Update for new
109         param for temp_dump_context ctor.
110         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
111         and "m_owned" field.
112         (optinfo_item::~optinfo_item): Likewise.
113         (optinfo::add_item): New member function.
114         (optinfo::emit): Update comment.
115         (optinfo::add_string): Delete.
116         (optinfo::add_printf): Delete.
117         (optinfo::add_printf_va): Delete.
118         (optinfo::add_gimple_stmt): Delete.
119         (optinfo::add_gimple_expr): Delete.
120         (optinfo::add_tree): Delete.
121         (optinfo::add_symtab_node): Delete.
122         (optinfo::add_dec): Delete.
123         * optinfo.h (class dump_context): New forward decl.
124         (optinfo::add_item): New decl.
125         (optinfo::add_string): Delete.
126         (optinfo::add_printf): Delete.
127         (optinfo::add_printf_va): Delete.
128         (optinfo::add_gimple_stmt): Delete.
129         (optinfo::add_gimple_expr): Delete.
130         (optinfo::add_tree): Delete.
131         (optinfo::add_symtab_node): Delete.
132         (optinfo::add_dec): Delete.
133         (optinfo::add_poly_int): Delete.
134         (optinfo_item::optinfo_item): Remove "owned" param.
135         (class optinfo_item): Remove field "m_owned".
137 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
139         PR middle-end/86705
140         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
141         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
142         requested variable alignment.
143         (expand_one_ssa_partition): Likewise.
144         (expand_one_var): Likewise.
146 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
148         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
149         to speculation_safe_value_not_needed.
151 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
153         * targhooks.h (speculation_safe_value_not_needed): New prototype.
154         * targhooks.c (speculation_safe_value_not_needed): New function.
155         * target.def (have_speculation_safe_value): Update documentation.
156         * doc/tm.texi: Regenerated.
158 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
160         * config/aarch64/iterators.md (ALLI_TI): New iterator.
161         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
162         expand.
163         (despeculate_copy<ALLI:mode>_insn): New insn.
164         (despeculate_copyti_insn): New insn.
165         (despeculate_simple<ALLI:mode>): New insn
166         (despeculate_simpleti): New insn.
167         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
168         function.
169         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
170         aarch64_speculation_safe_value.
171         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
173 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
175         * config/aarch64/aarch64-speculation.cc: New file.
176         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
177         before pass_reorder_blocks.
178         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
179         prototype.
180         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
181         X14 and X15 when tracking speculation.
182         * config/aarch64/aarch64.md (register name constants): Add
183         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
184         (unspec): Add UNSPEC_SPECULATION_TRACKER.
185         (speculation_barrier): New insn attribute.
186         (cmp<mode>): Allow SP in comparisons.
187         (speculation_tracker): New insn.
188         (speculation_barrier): Add speculation_barrier attribute.
189         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
190         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
191         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
193 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
195         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
196         aarch64_track_speculation is true.
197         (tb<optab><mode>1): Likewise.
198         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
199         generate CB[N]Z when tracking speculation.
200         (aarch64_split_compare_and_swap): Likewise.
201         (aarch64_split_atomic_op): Likewise.
203 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
205         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
207 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
209         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
210         (speculation_barrier): New insn.
212 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
214         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
215         * config/arm/arm.md (speculation_barrier): New expand.
216         (speculation_barrier_insn): New pattern.
218 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
220         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
221         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
222         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
223         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
224         list.
225         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
226         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
227         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
228         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
229         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
230         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
231         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
232         * builtins.c (expand_speculation_safe_value): New function.
233         (expand_builtin): Call it.
234         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
235         * doc/extend.texi: Document __builtin_speculation_safe_value.
236         * doc/md.texi: Document "speculation_barrier" pattern.
237         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
238         TARGET_HAVE_SPECULATION_SAFE_VALUE.
239         * doc/tm.texi: Regenerated.
240         * target.def (have_speculation_safe_value, speculation_safe_value): New
241         hooks.
242         * targhooks.c (default_have_speculation_safe_value): New function.
243         (default_speculation_safe_value): New function.
244         * targhooks.h (default_have_speculation_safe_value): Add prototype.
245         (default_speculation_safe_value): Add prototype.
247 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
249         * dump-context.h (dump_context::dump_loc): New decl.
250         * dumpfile.c (dump_context::dump_loc): New member function.
251         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
252         and dump_gimple_stmt.
253         (dump_context::dump_gimple_expr_loc): Likewise, using
254         dump_gimple_expr.
255         (dump_context::dump_generic_expr_loc): Likewise, using
256         dump_generic_expr.
257         (dump_context::dump_printf_loc_va): Likewise, using
258         dump_printf_va.
259         (dump_context::begin_scope): Explicitly using the global function
260         "dump_loc", rather than the member function.
262 2018-07-31  Martin Sebor  <msebor@redhat.com>
264         PR tree-optimization/86741
265         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
267 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
269         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
270         depend on whether prefetch instructions will be emitted or not.
271         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
272         will be emitted or not.
273         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
274         (TARGET_SETMEM_PFD): New macros.
276 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
278         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
279         (NULL_STMT_VEC_INFO): Delete.
280         (stmt_vec_info::operator*): Likewise.
281         (stmt_vec_info::operator gimple *): Likewise.
282         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
283         of NULL_STMT_VEC_INFO.
284         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
285         (vect_reassociating_reduction_p): Likewise.
286         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
287         (vectorizable_store): Likewise.
288         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
289         (vec_info::free_stmt_vec_infos): Likewise.
291 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
293         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
294         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
296 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
298         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
299         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
300         (vec_info::free_stmt_vec_info): New private member functions.
301         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
302         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
303         * tree-parloops.c (gather_scalar_reductions): Remove calls to
304         set_stmt_vec_info_vec and free_stmt_vec_infos.
305         * tree-vect-loop.c (_loop_vec_info): Remove call to
306         set_stmt_vec_info_vec.
307         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
308         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
309         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
310         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
311         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
312         assignments in {vec_info::,}new_stmt_vec_info that are redundant
313         with the clearing in the xcalloc.
314         (stmt_vec_info_vec): Delete.
315         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
316         (vectorize_loops): Likewise.
317         (vec_info::~vec_info): Remove argument from call to
318         free_stmt_vec_infos.
319         (vec_info::add_stmt): Remove vinfo argument from call to
320         new_stmt_vec_info.
322 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
324         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
325         rather than a gimple stmt.
326         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
327         information for pattern statements when passed the original
328         statement; instead wait to be passed the pattern statement itself.
329         Don't call set_vinfo_for_stmt here.
330         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
331         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
332         stmt_vec_infos here.
333         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
334         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
335         stmt_vec_infos entry.
337 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
339         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
340         * tree-vectorizer.c (vec_info::replace_stmt): New function.
341         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
342         * tree-vect-stmts.c (vectorizable_call): Likewise.
343         (vectorizable_simd_clone_call): Likewise.
345 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
347         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
348         * tree-vectorizer.c (vec_info::remove_stmt): New function.
349         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
350         * tree-vect-loop.c (vect_transform_loop): Likewise.
351         * tree-vect-slp.c (vect_schedule_slp): Likewise.
352         * tree-vect-stmts.c (vect_remove_stores): Likewise.
354 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
356         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
357         (vect_dr_stmt): Delete.
358         * tree-vectorizer.c (vec_info::lookup_dr): New function.
359         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
360         of DR_VECT_AUX.
361         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
362         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
363         (vect_verify_datarefs_alignment, vect_peeling_supportable)
364         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
365         (vect_analyze_data_refs): Likewise.
366         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
367         argument.
368         (vect_find_same_alignment_drs): Likewise.
369         (vect_slp_analyze_node_dependences): Update calls accordingly.
370         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
371         instead of DR_VECT_AUX.
372         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
373         of a vector data references.  Use vec_info::lookup_dr instead of
374         DR_VECT_AUX.
375         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
376         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
377         instead of DR_VECT_AUX.
379 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
381         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
382         dr_vec_info.
383         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
384         accordingly.
385         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
386         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
387         (vect_gen_prolog_loop_niters): Likewise.
389 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
391         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
392         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
393         (vect_known_alignment_in_bytes, vect_dr_behavior)
394         (vect_get_scalar_dr_size): Take references as dr_vec_infos
395         instead of data_references.  Update calls to other routines for
396         which the same change has been made.
397         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
398         dr_vec_infos instead of stmt_vec_infos.
399         (vect_analyze_data_ref_dependence): Update call accordingly.
400         (vect_slp_analyze_data_ref_dependence)
401         (vect_record_base_alignments): Use DR_VECT_AUX.
402         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
403         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
404         (vector_alignment_reachable_p, vect_get_data_access_cost)
405         (vect_peeling_supportable, vect_analyze_group_access_1)
406         (vect_analyze_group_access, vect_analyze_data_ref_access)
407         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
408         (vect_compile_time_alias, vect_small_gap_p)
409         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
410         (vect_supportable_dr_alignment): Take references as dr_vec_infos
411         instead of data_references.  Update calls to other routines for
412         which the same change has been made.
413         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
414         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
415         (vect_slp_analyze_and_verify_node_alignment)
416         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
417         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
418         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
419         above changes.
420         (_vect_peel_info::dr): Replace with...
421         (_vect_peel_info::dr_info): ...this new field.
422         (vect_peeling_hash_get_most_frequent)
423         (vect_peeling_hash_choose_best_peeling): Update accordingly.
424         (vect_peeling_hash_get_lowest_cost):
425         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
426         routines for which the same change has been made.
427         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
428         data_reference.
429         * tree-vect-loop-manip.c (get_misalign_in_elems)
430         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
431         above changes.
432         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
433         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
434         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
435         (get_group_load_store_type, get_negative_load_store_type)
436         (vect_get_data_ptr_increment, vectorizable_store)
437         (vectorizable_load): Likewise.
438         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
439         Update calls to other routines for which the same change has been made.
441 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
443         * tree-vectorizer.h (vec_info::move_dr): New member function.
444         (dataref_aux): Rename to...
445         (dr_vec_info): ...this and add "dr" and "stmt" fields.
446         (_stmt_vec_info::dr_aux): Update accordingly.
447         (_stmt_vec_info::data_ref_info): Delete.
448         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
449         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
450         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
451         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
452         of data_ref.
453         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
454         (STMT_VINFO_DR_INFO): New macro.
455         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
456         (set_dr_misalignment): Update after rename of dataref_aux.
457         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
458         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
459         initialization of STMT_VINFO_DATA_REF.
460         * tree-vectorizer.c (vec_info::move_dr): New function.
461         * tree-vect-patterns.c (vect_recog_bool_pattern)
462         (vect_recog_mask_conversion_pattern)
463         (vect_recog_gather_scatter_pattern): Use it.
464         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
465         the "dr" and "stmt" fields of dr_vec_info instead of
466         STMT_VINFO_DATA_REF.
468 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
470         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
471         (is_pattern_stmt_p): Use it.
472         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
473         on pattern statements.
475 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
477         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
478         original stmt as a stmt_vec_info rather than a gimple stmt.
479         (vect_pattern_recog_1): Take the statement directly as a
480         stmt_vec_info, rather than via a gimple_stmt_iterator.
481         Update call to vect_mark_pattern_stmts.
482         (vect_pattern_recog): Update calls accordingly.
484 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
486         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
487         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
488         a vect_def_type for the first argument.
489         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
490         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
491         operand if it isn't defined by a vectorized statement.
492         (vect_build_gather_load_calls): Remove the mask_dt argument and
493         update calls to vect_get_vec_def_for_stmt_copy.
494         (vectorizable_bswap): Likewise the dt argument.
495         (vectorizable_call): Update calls to vectorizable_bswap and
496         vect_get_vec_def_for_stmt_copy.
497         (vectorizable_simd_clone_call, vectorizable_assignment)
498         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
499         (vectorizable_comparison): Update calls to
500         vect_get_vec_def_for_stmt_copy.
501         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
502         vect_is_simple_use.
503         (vect_get_loop_based_defs): Remove dt argument and update call
504         to vect_get_vec_def_for_stmt_copy.
505         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
506         and vect_get_vec_def_for_stmt_copy.
507         (vectorizable_load): Update calls to vect_build_gather_load_calls
508         and vect_get_vec_def_for_stmt_copy.
509         * tree-vect-loop.c (vect_create_epilog_for_reduction)
510         (vectorizable_reduction, vectorizable_live_operation): Update calls
511         to vect_get_vec_def_for_stmt_copy.
513 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
515         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
516         and gimple stmt arguments with a stmt_vec_info.
517         (vect_record_base_alignments): Update calls accordingly.
518         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
519         and gimple stmt arguments with a stmt_vec_info.
520         (vect_build_slp_tree_1): Remove vinfo argument and update call
521         to vect_record_max_nunits.
522         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
523         and vect_record_max_nunits.
525 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
527         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
528         file and take a stmt_vec_info instead of a gimple stmt.
529         (supportable_widening_operation, vect_finish_replace_stmt)
530         (vect_finish_stmt_generation, vect_get_store_rhs)
531         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
532         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
533         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
534         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
535         (vect_create_data_ref_ptr, bump_vector_ptr)
536         (vect_permute_store_chain, vect_setup_realignment)
537         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
538         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
539         (vectorizable_reduction, vectorizable_induction)
540         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
541         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
542         than gimple stmts as arguments.
543         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
544         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
545         (can_group_stmts_p, vect_check_gather_scatter)
546         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
547         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
548         (vect_permute_load_chain, vect_shift_permute_load_chain)
549         (vect_transform_grouped_load)
550         (vect_record_grouped_load_vectors): Likewise.
551         * tree-vect-loop.c (vect_fixup_reduc_chain)
552         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
553         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
554         (vectorizable_reduction, vectorizable_induction)
555         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
556         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
557         (vect_get_load_store_mask): Likewise.
558         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
559         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
560         * tree-vect-stmts.c (vect_mark_relevant)
561         (is_simple_and_all_uses_invariant)
562         (exist_non_indexing_operands_for_use_p, process_use)
563         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
564         (vect_get_vec_def_for_operand, vect_get_vec_defs)
565         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
566         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
567         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
568         (get_negative_load_store_type, get_load_store_type)
569         (vect_check_load_store_mask, vect_check_store_rhs)
570         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
571         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
572         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
573         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
574         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
575         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
576         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
577         (supportable_widening_operation): Likewise.
579 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
581         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
582         a stmt_vec_info instead of a gcall.
583         (vect_check_gather_scatter): Update call accordingly.
584         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
585         of a gphi.
586         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
587         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
588         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
589         instead of a gimple stmt.
590         (vect_transform_loop): Update calls accordingly.
591         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
592         stmt_vec_infos instead of gimple stmts.
593         (vect_analyze_slp_instance): Update use accordingly.
594         * tree-vect-stmts.c (read_vector_array, write_vector_array)
595         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
596         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
597         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
598         (vect_gen_widened_results_half, vect_get_loop_based_defs)
599         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
600         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
601         down to subroutines.
603 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
605         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
606         of the worklist from a vector of gimple stmts to a vector of
607         stmt_vec_infos.
608         * tree-vect-stmts.c (vect_mark_relevant, process_use)
609         (vect_mark_stmts_to_be_vectorized): Likewise
611 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
613         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
614         statement before passing it to vect_analyze_stmt.
615         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
616         the chain of phi vector definitions.  Track the exit phi via its
617         stmt_vec_info.
618         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
619         STMT_VINFO_REDUC_DEF.
620         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
621         stmt_vec_infos to handle the statement chains.
622         (vect_get_slp_defs): Record the first statement in the node
623         using a stmt_vec_info.
624         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
625         statements here and pass their stmt_vec_info down to subroutines.
626         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
627         down to vect_finish_stmt_generation.
628         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
629         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
630         stmt_vec_infos to subroutines.
631         (vect_remove_stores): Use stmt_vec_infos to handle the statement
632         chains.
634 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
636         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
637         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
638         (vect_permute_store_chain, vect_setup_realignment)
639         (vect_permute_load_chain, vect_shift_permute_load_chain)
640         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
641         stmts internally, and when passing values to other vectorizer routines.
642         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
643         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
644         (vect_analyze_loop_operations, get_initial_def_for_reduction)
645         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
646         (vectorizable_reduction, vectorizable_induction)
647         (vectorizable_live_operation, vect_transform_loop_stmt)
648         (vect_transform_loop): Likewise.
649         * tree-vect-patterns.c (vect_reassociating_reduction_p)
650         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
651         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
652         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
653         (vect_slp_analyze_node_operations_1): Likewise.
654         * tree-vect-stmts.c (vect_mark_relevant, process_use)
655         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
656         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
657         (vect_finish_stmt_generation_1, get_group_load_store_type)
658         (get_load_store_type, vect_build_gather_load_calls)
659         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
660         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
661         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
662         (vectorizable_store, vectorizable_load, vectorizable_condition)
663         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
664         (supportable_widening_operation): Likewise.
665         (vect_get_vector_types_for_stmt): Likewise.
666         * tree-vectorizer.h (vect_dr_behavior): Likewise.
668 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
670         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
671         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
672         (vect_permute_store_chain, vect_permute_load_chain)
673         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
674         repeated stmt_vec_info lookups.
675         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
676         (vect_update_ivs_after_vectorizer): Likewise.
677         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
678         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
679         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
680         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
681         (vect_bb_slp_scalar_cost): Likewise.
682         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
684 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
686         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
687         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
688         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
689         to get gassigns and gcalls, rather than operating on generc gimple
690         stmts.
691         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
692         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
693         (vectorizable_load, vect_analyze_stmt): Likewise.
694         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
696 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
698         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
699         return stmt_vec_infos rather than gimple stmts.  Do not accept
700         null arguments.
701         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
702         of a gimple stmt.
703         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
704         Update use of get_later_stmt.
705         (vect_get_constant_vectors): Update call accordingly.
706         (vect_schedule_slp_instance): Likewise
707         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
708         (vect_slp_analyze_instance_dependence): Likewise.
709         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
711 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
713         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
714         (stmt_info_for_cost::stmt_info): ...this new field.
715         (add_stmt_costs): Update accordingly.
716         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
717         (vect_get_known_peeling_cost): Likewise.
718         (vect_estimate_min_profitable_iters): Likewise.
719         * tree-vect-stmts.c (record_stmt_cost): Likewise.
721 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
723         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
724         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
725         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
726         accordingly.
727         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
729 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
731         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
732         a gimple stmt to a stmt_vec_info.
733         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
735 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
737         * tree-vectorizer.h (vec_info::grouped_stores): Change from
738         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
739         (_loop_vec_info::reduction_chains): Likewise.
740         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
741         accordingly.
742         * tree-vect-slp.c (vect_analyze_slp): Likewise.
744 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
746         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
747         a gimple stmt to a stmt_vec_info.
748         (_stmt_vec_info::next_element): Likewise.
749         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
750         (vect_slp_analyze_and_verify_node_alignment)
751         (vect_analyze_group_access_1, vect_analyze_group_access)
752         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
753         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
754         (vect_supportable_dr_alignment): Update accordingly.
755         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
756         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
757         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
758         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
759         * tree-vect-slp.c (vect_build_slp_tree_1)
760         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
761         (vect_split_slp_store_group, vect_analyze_slp_instance)
762         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
763         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
764         (get_group_load_store_type, get_load_store_type)
765         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
766         (vect_transform_stmt, vect_remove_stores): Likewise.
768 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
770         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
771         than a gimple stmt.
772         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
773         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
774         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
775         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
776         (vector_alignment_reachable_p, vect_get_data_access_cost)
777         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
778         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
779         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
780         (vect_analyze_group_access_1, vect_analyze_group_access)
781         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
782         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
783         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
784         result of vect_dr_stmt and use the stmt_vec_info instead of
785         the associated gimple stmt.
786         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
787         (vect_gen_prolog_loop_niters): Likewise.
788         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
790 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
792         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
793         to a vec<stmt_vec_info>.
794         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
795         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
796         vec<stmt_vec_info>.
797         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
798         to a vec<stmt_vec_info>.
799         (bst_traits::value_type, bst_traits::value_type): Likewise.
800         (bst_traits::hash): Update accordingly.
801         (vect_get_and_check_slp_defs): Change the stmts parameter from
802         a vec<gimple *> to a vec<stmt_vec_info>.
803         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
804         (vect_build_slp_tree): Likewise.
805         (vect_build_slp_tree_2): Likewise.  Update uses of
806         SLP_TREE_SCALAR_STMTS.
807         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
808         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
809         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
810         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
811         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
812         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
813         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
814         (vect_get_constant_vectors, vect_get_slp_defs)
815         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
816         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
817         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
818         instead of gimple stmts.
819         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
820         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
821         (vect_slp_analyze_instance_dependence): Update uses of
822         SLP_TREE_SCALAR_STMTS.
823         (vect_slp_analyze_and_verify_node_alignment): Likewise.
824         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
825         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
826         (get_initial_defs_for_reduction): Likewise.
827         (vect_create_epilog_for_reduction): Likewise.
828         (vectorize_fold_left_reduction): Likewise.
829         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
830         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
831         (can_vectorize_live_stmts): Likewise.
833 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
835         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
836         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
837         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
838         than gimple stmts.
839         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
840         of a gimple stmt.
841         (gather_scalar_reductions): Update after above interface changes.
842         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
843         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
844         than gimple stmts.
845         (vect_force_simple_reduction): Likewise.
846         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
847         LOOP_VINFO_REDUCTIONS.
848         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
850 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
852         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
853         a gimple stmt to a stmt_vec_info.
854         * tree-vect-loop.c (vect_active_double_reduction_p)
855         (vect_force_simple_reduction, vectorizable_reduction): Update
856         accordingly.
858 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
860         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
861         vec<gimple *> to a vec<stmt_vec_info>.
862         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
863         the reduction_phis argument from a vec<gimple *> to a
864         vec<stmt_vec_info>.
865         (vectorizable_reduction): Likewise the phis local variable that
866         is passed to vect_create_epilog_for_reduction.  Update for new type
867         of SLP_TREE_VEC_STMTS.
868         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
869         (vectorizable_live_operation): Likewise.
870         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
871         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
873 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
875         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
876         a gimple stmt to a stmt_vec_info.
877         (vectorizable_condition, vectorizable_live_operation)
878         (vectorizable_reduction, vectorizable_induction): Pass back the
879         vectorized statement as a stmt_vec_info.
880         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
881         use of STMT_VINFO_VEC_STMT.
882         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
883         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
884         as stmt_vec_infos rather than gimple stmts.
885         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
886         to a stmt_vec_info.
887         (vectorizable_live_operation): Likewise.
888         (vectorizable_reduction, vectorizable_induction): Likewise,
889         updating use of STMT_VINFO_VEC_STMT.
890         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
891         of STMT_VINFO_VEC_STMT.
892         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
893         (vectorizable_simd_clone_call, vectorizable_conversion)
894         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
895         (vectorizable_store, vectorizable_load, vectorizable_condition)
896         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
897         from a gimple stmt to a stmt_vec_info.
898         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
899         pointer to a stmt_vec_info to the vectorizable_* routines.
901 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
903         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
904         a gimple stmt to a stmt_vec_info.
905         (is_pattern_stmt_p): Update accordingly.
906         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
907         (vect_record_grouped_load_vectors): Likewise.
908         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
909         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
910         (vect_model_reduction_cost): Likewise.
911         (vect_create_epilog_for_reduction): Likewise.
912         (vectorizable_reduction, vectorizable_induction): Likewise.
913         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
914         Return the stmt_vec_info for the pattern statement.
915         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
916         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
917         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
918         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
919         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
920         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
921         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
922         (free_stmt_vec_info, vect_is_simple_use): Likewise.
924 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
926         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
927         (vect_finish_stmt_generation): Likewise.
928         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
929         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
930         (vect_build_gather_load_calls): Use the return value of the above
931         functions instead of a separate call to vinfo_for_stmt.  Use narrow
932         scopes for the input gimple stmt and wider scopes for the associated
933         stmt_vec_info.  Use vec_info::lookup_def when setting these
934         stmt_vec_infos from an SSA_NAME definition.
935         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
936         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
937         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
938         (vectorizable_store, vectorizable_load, vectorizable_condition)
939         (vectorizable_comparison): Likewise.
940         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
941         (vectorizable_reduction): Likewise.
943 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
945         * tree-vectorizer.h (vect_is_simple_use): Add an optional
946         stmt_vec_info * parameter before the optional gimple **.
947         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
948         (process_use, vect_get_vec_def_for_operand_1): Update callers.
949         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
950         * tree-vect-loop.c (vectorizable_reduction): Likewise.
951         (vectorizable_live_operation): Likewise.
952         * tree-vect-patterns.c (type_conversion_p): Likewise.
953         (vect_look_through_possible_promotion): Likewise.
954         (vect_recog_rotate_pattern): Likewise.
955         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
957 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
959         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
960         a typedef to a wrapper class.
961         (NULL_STMT_VEC_INFO): New macro.
962         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
963         (stmt_vec_info::operator*): New function.
964         (stmt_vec_info::operator gimple *): Likewise.
965         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
966         (add_stmt_costs): Likewise.
967         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
968         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
969         (vect_get_known_peeling_cost): Likewise.
970         (vect_estimate_min_profitable_iters): Likewise.
971         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
972         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
973         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
974         (vectorizable_store, free_stmt_vec_infos): Likewise.
975         (new_stmt_vec_info): Change return type of xcalloc to
976         _stmt_vec_info *.
978 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
980         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
981         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
982         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
983         a single_imm_use-based sequence.
984         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
986 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
988         * tree-vectorizer.h (vec_info::lookup_def): Declare.
989         * tree-vectorizer.c (vec_info::lookup_def): New function.
990         * tree-vect-patterns.c (vect_get_internal_def): Use it.
991         (vect_widened_op_tree): Likewise.
992         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
993         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
994         (vectorizable_reduction): Likewise.
995         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
996         of a gimple *.
997         (vect_is_slp_reduction): Update calls accordingly.  Use
998         vec_info::lookup_def.
999         (vect_is_simple_reduction): Likewise
1000         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1002 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1004         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1005         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1006         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1007         of vinfo_for_stmt.
1008         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1009         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1010         (vect_update_vf_for_slp, vect_analyze_loop_operations)
1011         (vect_is_slp_reduction, vectorizable_induction)
1012         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1013         * tree-vect-patterns.c (vect_init_pattern_stmt):
1014         (vect_determine_min_output_precision_1, vect_determine_precisions)
1015         (vect_pattern_recog): Likewise.
1016         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1017         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1018         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1019         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1020         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1021         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
1022         info field from a loop to a loop_vec_info.
1024 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1026         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1027         (vec_info::add_stmt): Declare.
1028         * tree-vectorizer.c (vec_info::add_stmt): New function.
1029         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1030         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1031         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1032         (vectorizable_induction): Likewise.
1033         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1034         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1035         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1036         (vectorizable_load): Likewise.
1037         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1038         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1039         (vect_recog_gather_scatter_pattern): Likewise.
1040         (append_pattern_def_seq): Likewise.  Remove a check that is
1041         performed by add_stmt itself.
1043 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1045         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1046         which make_ssa_name was called with new_stmt before new_stmt
1047         had been created.
1049 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1051         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1052         split out from...
1053         (vect_is_slp_reduction): ...here...
1054         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
1055         that are already known to be false.
1057 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1059         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1060         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
1061         STMT_VINFO_NUM_SLP_USES when it's true.
1062         (vect_free_slp_instance): Add a final_p parameter and pass it to
1063         vect_free_slp_tree.
1064         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1065         (vect_analyze_slp_instance): Likewise.
1066         (vect_slp_analyze_operations): Likewise.
1067         (vect_slp_analyze_bb_1): Likewise.
1068         * tree-vectorizer.c (vec_info): Likewise.
1069         * tree-vect-loop.c (vect_transform_loop): Likewise.
1071 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1073         * tree-vect-loop.c (vectorizable_reduction): Assert that the
1074         function is not called for second and subsequent members of
1075         a reduction group.
1077 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1079         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1080         cases for nested loops from here to ...
1081         (vect_create_epilog_for_reduction): ...here.  Only call
1082         vect_is_simple_use for inner-loop reductions.
1084 2018-07-31  Martin Liska  <mliska@suse.cz>
1086         PR gcov-profile/85338
1087         PR gcov-profile/85350
1088         PR gcov-profile/85372
1089         * profile.c (struct location_triplet): New.
1090         (struct location_triplet_hash): Likewise.
1091         (output_location): Do not output a BB that
1092         is already recorded for a line.
1093         (branch_prob): Use streamed_locations.
1095 2018-07-31  Martin Liska  <mliska@suse.cz>
1097         PR gcov-profile/85370
1098         * coverage.c (coverage_begin_function): Do not mark target
1099         clones as artificial functions.
1101 2018-07-31  Martin Liska  <mliska@suse.cz>
1103         PR gcov-profile/83813
1104         PR gcov-profile/84758
1105         PR gcov-profile/85217
1106         PR gcov-profile/85332
1107         * profile.c (branch_prob): Do not record GOTO expressions
1108         for GIMPLE statements which locations are already streamed.
1110 2018-07-31  Olivier Hainque  <hainque@adacore.com>
1112         * gcc.c (handle_spec_function): Accept a soft_matched_part
1113         argument, as do_spec_1.  Pass it down to ...
1114         (eval_spec_function): Accept a soft_matched_part argument,
1115         and pass it down to ...
1116         (do_spec_2): Accept a soft_matched_part argument, and pass
1117         it down to do_spec_1.
1118         (do_spec_1): Pass soft_matched_part to handle_spec_function.
1119         (handle_braces): Update call to handle_spec_function.
1120         (driver::set_up_specs): Update calls to do_spec_2.
1121         (compare_debug_dump_opt_spec_function): Likewise.
1122         (compare_debug_self_opt_spec_function): Likewise.
1124 2018-07-31  Olivier Hainque  <hainque@adacore.com>
1126         * common.opt (nolibc): New option.
1127         * doc/invoke.texi (Link Options): Document it.
1128         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1129         * config/alpha/linux.h: Likewise.
1130         * config/arc/elf.h: Likewise.
1131         * config/arm/uclinux-elf.h: Likewise.
1132         * config/arm/unknown-elf.h: Likewise.
1133         * config/avr/avrlibc.h: Likewise.
1134         * config/bfin/bfin.h: Likewise.
1135         * config/bfin/linux.h: Likewise.
1136         * config/bfin/uclinux.h: Likewise.
1137         * config/darwin.h: Likewise.
1138         * config/darwin10.h: Likewise.
1139         * config/darwin12.h: Likewise.
1140         * config/gnu-user.h: Likewise.
1141         * config/lm32/uclinux-elf.h: Likewise.
1142         * config/pa/pa-hpux11.h: Likewise.
1143         * config/pa/pa64-hpux.h: Likewise.
1144         * config/sparc/sparc.h: Likewise.
1146 2018-07-31  Olivier Hainque  <hainque@adacore.com>
1148         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1149         undefined variables.
1151 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
1153         PR target/86640
1154         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1155         instead of GEN_INT.
1157 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1159         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1160         terminated string literal.
1162 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
1164         PR rtl-optimization/85160
1165         * combine.c (is_just_move): New function.
1166         (try_combine): Allow combining two instructions into two if neither of
1167         the original instructions was a move.
1169 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
1171         PR target/86673
1172         * doc/extend.texi (Global Register Variables): Discourage use of type
1173         qualifiers.
1174         (Local Register Variables): Likewise.
1176 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
1178         PR tree-optimization/86506
1179         * hwint.h (ceil_log2): Resync with hwint.c implementation.
1181 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
1183         PR target/86547
1184         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1185         hard_regno, make sure no insn between `from` and `to` clobbers it.
1187 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
1188             Tom de Vries  <tdevries@suse.de>
1190         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1191         (PTX_DEFAULT_RUNTIME_DIM): ... this.
1192         (nvptx_goacc_validate_dims): Set default worker and gang dims to
1193         PTX_DEFAULT_RUNTIME_DIM.
1194         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1196 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
1198         * config/pa/pa.c (pa_output_addr_vec): Align address table.
1199         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1200         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1202 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
1204         * config/rs6000/constraints.md (wG constraint): Delete, no longer
1205         used.
1206         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1207         predicate to reflect toc fusion has been deleted.
1208         (toc_fusion_mem_raw): Delete, no longer used.
1209         (toc_fusion_mem_wrapped): Likewise.
1210         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1211         fusion mask bit.
1212         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1213         Delete, no longer used.
1214         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1215         meant to be used for toc fusion.
1216         (rs6000_debug_print_mode): Delete toc fusion debugging.
1217         (rs6000_debug_reg_global): Likewise.
1218         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1219         fusion and secondary reload support that were never used.
1220         (rs6000_option_override_internal): Delete TOC fusion, that was only
1221         partially defined, and it did not work unless you also used the
1222         -mcmodel= switch.
1223         (rs6000_legitimate_address_p): Delete TOC fusion support.
1224         (rs6000_opt_masks): Likewise.
1225         (fusion_wrap_memory_address): Delete function, no longer used.
1226         (fusion_split_address); Delete TOC fusion support.
1227         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1228         longer used with toc fusion being deleted.
1229         (TARGET_TOC_FUSION_FP): Likewise.
1230         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1231         UNSPEC.
1232         (toc fusion spliter): Delete TOC fusion support.
1233         (toc_fusionload_<mode>): Likewise.
1234         (toc_fusionload_di): Likewise.
1235         (fusion_gpr_load_<mode>): Delete generator function, this insn no
1236         longer needs to be named.  Rename predicate to delete TOC fusion.
1237         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1238         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1239         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1240         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1241         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1243 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1245         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1246         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
1247         __int128 in built-in function prototypes.
1248         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1249         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1251 2018-07-27  Martin Sebor  <msebor@redhat.com>
1253         PR tree-optimization/86696
1254         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1255         types, including enums.
1256         (handle_char_store): Be prepared for the above function to fail.
1258 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
1260         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1261         when optimization level is lower than 2 or optimize for size.
1263 2018-07-26  Martin Sebor  <msebor@redhat.com>
1265         PR tree-optimization/86043
1266         PR tree-optimization/86042
1267         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1268         (get_string_cst_length): Rename...
1269         (get_min_string_length): ...to this.  Add argument.
1270         (handle_char_store): Extend to handle multi-character stores by
1271         MEM_REF.
1272         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
1273         * tree.h (initializer_zerop): Add argument.
1275 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
1277         PR middle-end/86660
1278         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1279         declare target to variables if they have always,{to,from,tofrom} map
1280         kinds.
1282 2018-07-26  Martin Liska  <mliska@suse.cz>
1284         PR lto/86548
1285         * lto-wrapper.c: Add linker_output as prefix
1286         for ltrans_output_file.
1288 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
1290         PR rtl-optimization/85805
1291         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1292         value for hard registers if that was written in the same mode.
1294 2018-07-26  Martin Liska  <mliska@suse.cz>
1296         PR gcov-profile/86536
1297         * gcov.c (format_gcov): Use printf format %.*f directly
1298         and do not handle special values.
1300 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1302         * common/config/arc/arc-common.c (arc_option_optimization_table):
1303         Update default optimizations for size.
1305 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1307         * config/arc/arc.md (movsf_insn): Add short instruction selection.
1308         * config/arc/constraints.md (CfZ): New constraint.
1309         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1310         (subsf3_fpu): Likewise.
1311         (cmpsf_fpu): Likewise.
1312         (cmpsf_fpu_uneq): Likewise.
1314 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1316         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1317         accesses as well.
1318         (arc_is_uncached_mem_p): uncached applies to both the variable and
1319         the pointer.
1321 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1323         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1324         register names.
1326 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
1328         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1329         field "m_scopes" from vec to auto_vec.
1331 2018-07-25  Martin Liska  <mliska@suse.cz>
1333         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1334         return type.
1336 2018-07-25  Richard Biener  <rguenther@suse.de>
1338         PR debug/86654
1339         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1340         special wrt context_die late.
1341         (gen_subprogram_die): Re-use DIEs in local scope.
1343 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
1345         PR tree-optimization/86644
1346         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
1348 2018-07-25  Martin Liska  <mliska@suse.cz>
1350         PR middle-end/86645
1351         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1352         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1354 2018-07-25  Martin Liska  <mliska@suse.cz>
1356         PR sanitizer/79635
1357         * params.def: Explain ASan abbreviation and provide
1358         a documentation link.
1360 2018-07-24  Martin Sebor  <msebor@redhat.com>
1362         PR tree-optimization/86622
1363         PR tree-optimization/86532
1364         * builtins.h (string_length): Declare.
1365         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
1366         (check_access): Be prepared for non-constant length ranges.
1367         (string_length): Make extern.
1368         * expr.c (string_constant): Only handle the minor non-constant
1369         array index.  Use string_constant to compute the length of
1370         a generic string constant.
1372 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
1374         PR tree-optimization/86618
1375         * tree-vect-stmts.c (vectorizable_call): Don't take the address
1376         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1378 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
1380         PR tree-optimization/86636
1381         * json.cc (json::object::set): Fix comment.  Add assertions.
1382         (json::array::append): Move here from json.h.  Add comment and an
1383         assertion.
1384         (json::string::string): Likewise.
1385         * json.h (json::array::append): Move to json.cc.
1386         (json::string::string): Likewise.
1387         * optinfo-emit-json.cc
1388         (optrecord_json_writer::impl_location_to_json): Assert that we
1389         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1390         wrapper around it.  Expand the location once, rather than three
1391         times.
1392         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1393         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1394         wrappers.
1395         (optrecord_json_writer::optinfo_to_json): Likewise, in four
1396         places.  Fix some overlong lines.
1398 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
1400         * config/aarch64/aarch64-simd.md
1401         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1402         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1403         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1404         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1405         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1406         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1407         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1408         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1409         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1411 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
1413         PR middle-end/86627
1414         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1415         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
1416         and abs_d == d, do the power of two handling if profitable.
1418 2018-07-24  Richard Biener  <rguenther@suse.de>
1420         * match.pd: Add BIT_FIELD_REF canonicalizations.
1422 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1424         PR c/86617
1425         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1427 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1429         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1430         terminated STRING_CST object.
1432 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1434         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1436 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
1438         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1439         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1440         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1441         the elements into a register.
1442         (rs6000_split_v4si_init_di_reg): Delete.
1443         (rs6000_split_v4si_init): Delete.
1444         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1445         (vsx_init_v4si): Rewrite as a define_expand.
1447 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
1449         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1450         zero_extend argument from memory): New.
1452 2018-07-22  Martin Sebor  <msebor@redhat.com>
1454         PR bootstrap/86621
1455         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1456         diagnosing calls with unknown arguments unless -Walloca-larger-than
1457         is restricted to less than PTRDIFF_MAX bytes.
1459 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
1461         * doc/gcov.texi (Invoking Gcov): Editorial changes.
1463 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
1465         * pretty-print.c (text_info::set_location): Remove redundant
1466         "line_table" parameter from call to rich_location::set_range.
1468 2018-07-20  Martin Sebor  <msebor@redhat.com>
1470         PR middle-end/82063
1471         * builtins.c (expand_builtin_alloca): Adjust.
1472         * calls.c (alloc_max_size): Simplify.
1473         * cgraphunit.c (cgraph_node::expand): Adjust.
1474         * common.opt (larger_than_size, warn_frame_larger_than): Remove
1475         variables.
1476         (frame_larger_than_size): Same.
1477         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1478         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1479         Initialize.
1480         * doc/invoke.texi (GCC Command Options): Document option arguments.
1481         Explain byte-size arguments and suffixes.
1482         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1483         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1484         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1485         * doc/options.texi (UInteger): Expand.
1486         (Host_Wide_Int, ByteSize): Document new properties.
1487         * final.c (final_start_function_1): Include sizes in an error message.
1488         * function.c (frame_offset_overflow): Same.
1489         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1490         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1491         Diagnose unbounded alloca calls only for limits of less than
1492         PTRDIFF_MAX.
1493         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
1494         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
1495         for alloca(0).
1496         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
1497         only for limits of less than PTRDIFF_MAX.
1498         * langhooks-def.h (lhd_handle_option): Change function argument
1499         to HOST_WIDE_INT.
1500         * langhooks.c (lhd_handle_option): Same.
1501         * langhooks.h (handle_option): Same.
1502         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1503         ByteSize flags.
1504         (var_type, var_type_struct): Same.
1505         (var_set): Handle ByteSize flag.
1506         * optc-gen.awk: Add comments to output to ease debugging.  Make
1507         use of HOST_WIDE_INT where appropriate.
1508         * opts-gen-save.awk:  Use %lx to format unsigned long.
1509         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1510         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1511         arguments.  Parse bytes-size suffixes.
1512         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1513         (enum_value_to_arg): Same.
1514         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
1515         (handle_option): Adjust.
1516         (generate_option): Change function argument to HOST_WIDE_INT.
1517         (cmdline_handle_error): Adjust.
1518         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1519         (set_option): Change function argument to HOST_WIDE_INT.
1520         (option_enabled): Handle cl_host_wide_int.
1521         (get_option_state): Handle CLVC_SIZE.
1522         (control_warning_option): Same.
1523         * opts.c (common_handle_option): Change function argument to
1524         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
1525         OPT_Wvla_larger_than_.
1526         * opts.h (enum cl_var_type): Add an enumerator.
1527         * stor-layout.c (layout_decl): Print a more meaningful warning.
1528         * toplev.c (output_stack_usage): Adjust.
1530 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
1532         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1533         call to inline_expand_builtin_string_cmp.
1534         (expand_builtin_strcmp): Likewise.
1535         (expand_builtin_strncmp): Likewise.
1536         (inline_string_cmp): Delete the last parameter, change char_type_node
1537         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1538         two operands.
1539         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1540         the inlining expansion on target where the type of the call has same or 
1541         narrower precision than unsigned char.
1543 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
1545         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1546         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1547         * common.opt (fsave-optimization-record): New option.
1548         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1549         * doc/invoke.texi (-fsave-optimization-record): New option.
1550         * dumpfile.c: Include "optinfo-emit-json.h".
1551         (struct kv_pair): Move to coretypes.h.
1552         (optgroup_options): Make non-static.
1553         (dump_context::end_scope): Call
1554         optimization_records_maybe_pop_dump_scope.
1555         * dumpfile.h (optgroup_options): New decl.
1556         * json.cc: New file.
1557         * json.h: New file.
1558         * optinfo-emit-json.cc: New file.
1559         * optinfo-emit-json.h: New file.
1560         * optinfo.cc: Include "optinfo-emit-json.h".
1561         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1562         (optinfo_enabled_p): Check optimization_records_enabled_p.
1563         (optinfo_wants_inlining_info_p): Likewise.
1564         * optinfo.h: Update comment.
1565         * profile-count.c (profile_quality_as_string): New function.
1566         * profile-count.h (profile_quality_as_string): New decl.
1567         (profile_count::quality): New accessor.
1568         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1569         and optinfo_emit_json_cc_tests.
1570         * selftest.h (selftest::json_cc_tests): New decl.
1571         (selftest::optinfo_emit_json_cc_tests): New decl.
1572         * toplev.c: Include "optinfo-emit-json.h".
1573         (compile_file): Call optimization_records_finish.
1574         (do_compile): Call optimization_records_start.
1575         * tree-ssa-live.c: Include optinfo.h.
1576         (remove_unused_scope_block_p): Retain inlining information if
1577         optinfo_wants_inlining_info_p returns true.
1579 2018-07-20  Richard Biener  <rguenther@suse.de>
1581         PR debug/86585
1582         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1583         to cover -flto-partition=none.
1585 2018-07-20  Martin Liska  <mliska@suse.cz>
1587         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1588         (get_decl_source_range): Remove unused function.
1590 2018-07-20  Richard Biener  <rguenther@suse.de>
1592         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1593         (struct vn_phi_s): Likewise.
1594         (struct vn_reference_s): Likewise.
1595         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1596         for searching the slot of an entry known to be in the hash itself.
1597         (vn_phi_hasher::equal): Likewise.
1598         (vn_reference_hasher::equal): Likewise.
1599         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1600         globals.
1601         (optimistic_info, current_info): Remove, keeping only valid_info.
1602         (vn_reference_lookup_1): Remove fallback lookup.
1603         (vn_reference_lookup_2): Likewise.
1604         (vn_nary_op_lookup_1): Likewise.
1605         (vn_phi_lookup): Likewise.
1606         (vn_nary_build_or_lookup_1): Make sure to not chain the built
1607         hash element.
1608         (vn_reference_insert): Adjust, chain the inserted hash element
1609         at last_inserted_ref.
1610         (vn_reference_insert_pieces): Likewise.
1611         (visit_reference_op_call): Likewise.
1612         (vn_nary_op_insert_into): Chain the inserted hash element at
1613         last_inserted_nary.
1614         (vn_nary_op_insert_pieces): Adjust.
1615         (vn_nary_op_insert): Likewise.
1616         (vn_nary_op_insert_stmt): Likewise.
1617         (vn_phi_insert): Adjust, chain the inserted hash element at
1618         last_inserted_phi.
1619         (process_scc): Remove clearing and copying the optimistic
1620         table.  Instead remove elements inserted during an optimistic
1621         iteration from the single table we maintain.
1622         (init_scc_vn): Adjust.
1623         (free_scc_vn): Likewise.
1624         (sccvn_dom_walker::record_cond): Likewise.
1625         (sccvn_dom_walker::after_dom_children): Likewise.
1627 2018-07-19  Martin Sebor  <msebor@redhat.com>
1629         PR tree-optimization/84047
1630         PR tree-optimization/83776
1631         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1632         (check_array_bounds): Call it.
1634 2018-07-19  Martin Sebor  <msebor@redhat.com>
1636         * align.h (align_flags): Use member initialization.
1638 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
1640         * Makefile.in (OBJS): Add optinfo.o.
1641         * coretypes.h (class symtab_node): New forward decl.
1642         (struct cgraph_node): New forward decl.
1643         (class varpool_node): New forward decl.
1644         * dump-context.h: New file.
1645         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1646         "tree-pass.h".
1647         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1648         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1649         (set_alt_dump_file): Likewise.
1650         (dump_context::~dump_context): New dtor.
1651         (dump_gimple_stmt): Move implementation to...
1652         (dump_context::dump_gimple_stmt): ...this new member function.
1653         Add the stmt to any pending optinfo, creating one if need be.
1654         (dump_gimple_stmt_loc): Move implementation to...
1655         (dump_context::dump_gimple_stmt_loc): ...this new member function.
1656         Start a new optinfo and add the stmt to it.
1657         (dump_gimple_expr): Move implementation to...
1658         (dump_context::dump_gimple_expr): ...this new member function.
1659         Add the stmt to any pending optinfo, creating one if need be.
1660         (dump_gimple_expr_loc): Move implementation to...
1661         (dump_context::dump_gimple_expr_loc): ...this new member function.
1662         Start a new optinfo and add the stmt to it.
1663         (dump_generic_expr): Move implementation to...
1664         (dump_context::dump_generic_expr): ...this new member function.
1665         Add the tree to any pending optinfo, creating one if need be.
1666         (dump_generic_expr_loc): Move implementation to...
1667         (dump_context::dump_generic_expr_loc): ...this new member
1668         function.  Add the tree to any pending optinfo, creating one if
1669         need be.
1670         (dump_printf): Move implementation to...
1671         (dump_context::dump_printf_va): ...this new member function.  Add
1672         the text to any pending optinfo, creating one if need be.
1673         (dump_printf_loc): Move implementation to...
1674         (dump_context::dump_printf_loc_va): ...this new member function.
1675         Start a new optinfo and add the stmt to it.
1676         (dump_dec): Move implementation to...
1677         (dump_context::dump_dec): ...this new member function.  Add the
1678         value to any pending optinfo, creating one if need be.
1679         (dump_context::dump_symtab_node): New member function.
1680         (dump_context::get_scope_depth): New member function.
1681         (dump_context::begin_scope): New member function.
1682         (dump_context::end_scope): New member function.
1683         (dump_context::ensure_pending_optinfo): New member function.
1684         (dump_context::begin_next_optinfo): New member function.
1685         (dump_context::end_any_optinfo): New member function.
1686         (dump_context::s_current): New global.
1687         (dump_context::s_default): New global.
1688         (dump_scope_depth): Delete global.
1689         (dumpfile_ensure_any_optinfo_are_flushed): New function.
1690         (dump_symtab_node): New function.
1691         (get_dump_scope_depth): Reimplement in terms of dump_context.
1692         (dump_begin_scope): Likewise.
1693         (dump_end_scope): Likewise.
1694         (selftest::temp_dump_context::temp_dump_context): New ctor.
1695         (selftest::temp_dump_context::~temp_dump_context): New dtor.
1696         (selftest::verify_item): New function.
1697         (ASSERT_IS_TEXT): New macro.
1698         (ASSERT_IS_TREE): New macro.
1699         (ASSERT_IS_GIMPLE): New macro.
1700         (selftest::test_capture_of_dump_calls): New test.
1701         (selftest::dumpfile_c_tests): Call it.
1702         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1703         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1704         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1705         descriptive comment.
1706         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1707         (dump_node, dump_bb): Move these unrelated decls.
1708         (class dump_manager): Add leading comment.
1709         * optinfo.cc: New file.
1710         * optinfo.h: New file.
1712 2018-07-19  Michael Collison  <michael.collison@arm.com>
1713             Richard Henderson <rth@redhat.com>
1715         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1716         (subti): Handle op1 zero.
1717         (subvti4, usub4ti4): New.
1718         (*sub<GPI>3_compare1_imm): New.
1719         (sub<GPI>3_carryinCV): New.
1720         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1721         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1723 2018-07-19  Michael Collison  <michael.collison@arm.com>
1724             Richard Henderson <rth@redhat.com>
1726         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1727         (addti3): Create simpler code if low part is already known to be 0.
1728         (addvti4, uaddvti4): New.
1729         (*add<GPI>3_compareC_cconly_imm): New.
1730         (*add<GPI>3_compareC_cconly): New.
1731         (*add<GPI>3_compareC_imm): New.
1732         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1733         handle constants within this pattern..
1734         (*add<GPI>3_compareV_cconly_imm): New.
1735         (*add<GPI>3_compareV_cconly): New.
1736         (*add<GPI>3_compareV_imm): New.
1737         (add<GPI>3_compareV): New.
1738         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1739         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1740         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1741         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1742         with 'comparison' operator.
1743         (*add<GPI>3_compareV_cconly_imm): Ditto.
1744         (*add<GPI>3_compareV_cconly): Ditto.
1745         (*add<GPI>3_compareV_imm): Ditto.
1746         (add<GPI>3_compareV): Ditto.
1747         (add<mode>3_carryinC): Ditto.
1748         (*add<mode>3_carryinC_zero): Ditto.
1749         (*add<mode>3_carryinC): Ditto.
1750         (add<mode>3_carryinV): Ditto.
1751         (*add<mode>3_carryinV_zero): Ditto.
1752         (*add<mode>3_carryinV): Ditto.
1754 2018-07-19  Michael Collison  <michael.collison@arm.com>
1755             Richard Henderson <rth@redhat.com>
1757         * config/aarch64/aarch64-modes.def (CC_V): New.
1758         * config/aarch64/aarch64-protos.h
1759         (aarch64_addti_scratch_regs): Declare
1760         (aarch64_subvti_scratch_regs): Declare.
1761         (aarch64_expand_subvti): Declare.
1762         (aarch64_gen_unlikely_cbranch): Declare
1763         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1764         for signed overflow using CC_Vmode.
1765         (aarch64_get_condition_code_1): Handle CC_Vmode.
1766         (aarch64_gen_unlikely_cbranch): New function.
1767         (aarch64_addti_scratch_regs): New function.
1768         (aarch64_subvti_scratch_regs): New function.
1769         (aarch64_expand_subvti): New function.
1771 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1773         * config/aarch64/aarch64-option-extensions.def: New entry for profile
1774         extension.
1775         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1776         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1777         extension.
1779 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1781         PR target/83009
1782         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1783         address check not strict.
1785 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1787         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1788         Umq with Umn.
1789         (store_pair_lanes<mode>): Likewise.
1790         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1791         enum value 'ADDR_QUERY_LDP_STP_N'.
1792         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1793         (aarch64_print_address_internal): Add declaration.
1794         (aarch64_print_ldpstp_address): Remove.
1795         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1796         (aarch64_print_operand): Change printing of 'y'.
1797         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1798         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1799         'true' rather than '1'.
1800         * config/aarch64/constraints.md (Uml): Likewise.
1801         (Uml): Rename to Umn.
1802         (Umq): Remove.
1804 2018-07-19  Richard Biener  <rguenther@suse.de>
1806         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1807         a trailing array.
1808         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1809         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1810         (vn_reference_hasher): Likewise.
1811         (struct vn_tables_s): Remove obstack and alloc-pool members.
1812         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1813         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1814         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1815         (vn_reference_insert_pieces): Likewise.
1816         (alloc_vn_nary_op_noinit): Adjust.
1817         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1818         (vn_phi_eq): Adjust.
1819         (shared_lookup_phiargs): Remove.
1820         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1821         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1822         (visit_reference_op_call): Likewise.
1823         (copy_nary, copy_phi, copy_reference): Remove.
1824         (process_scc): Rewind the obstack when iterating.  Do not
1825         copy the elements to valid_info but just move them from one
1826         hashtable to the other.
1827         (allocate_vn_table): Adjust.
1828         (free_vn_table): Likewise.
1829         (init_scc_vn): Likewise.
1830         (free_scc_vn): Likewise.
1832 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
1834         PR target/86560
1835         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1836         indirect_return as function type attribute.
1837         (ix86_attribute_table): Change indirect_return to function
1838         type attribute.
1839         * doc/extend.texi: Update indirect_return attribute.
1841 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
1843         * wide-int.h (widest2_int): New.
1844         * gimple-fold.c (arith_overflowed_p): Use it.
1845         * tree.h (widest2_int_cst): New.
1846         * tree-vrp.c (wide_int_binop_overflow): Rename from
1847         vrp_int_const_binop.
1848         Rewrite to work on trees.
1849         (extract_range_from_multiplicative_op_1): Abstract code to...
1850         (wide_int_range_min_max): ...here.
1851         (wide_int_range_cross_product): ...and here.
1852         (extract_range_from_binary_expr_1): Abstract overflow code to...
1853         (wide_int_range_mult_wrapping): ...here.
1854         * tree-vrp.h (wide_int_range_cross_product): New.
1855         (wide_int_range_mult_wrapping): New.
1857 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
1858             Julia Koval  <julia.koval@intel.com>
1860         * config/i386/x86-tune-costs.h (skylake_memcpy,
1861         skylake_memset): Replace rep_prefix with unrolling for size 512.
1863 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
1865         PR middle-end/86544
1866         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1867         in last stmt.
1869 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1871         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1872         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1873         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1874         previously known as "PowerPC AltiVec Built-in Functions".  Move
1875         some material to new subsubsections "PowerPC AltiVec Built-in
1876         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1877         ISA 2.07".
1878         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1879         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1880         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1881         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1883 2018-07-18  Richard Biener  <rguenther@suse.de>
1885         PR tree-optimization/86557
1886         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1887         EXACT_DIV_EXPR.
1889 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
1891         * config/s390/s390.c (s390_function_profiler): Generate CFI.
1893 2018-07-17  Jeff Law  <law@redhat.com>
1895         * config/arm/arm.c (get_label_padding): Update for recent
1896         changes to label_to_alignment.
1898         PR tree-optimization/86010
1899         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1901         * config/mips/mips.c (vr4130_align_insns): Update for recent
1902         changes to label_to_alignment.
1904         * config/frv/frv.c (frv_label_align): Update for recent changes
1905         to label_to_alignment.
1907         * config/nios2/nios2.c (nios2_label_align): Update for recent
1908         changes which dropped ALIGN_LABELS_LOG.
1910 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
1912         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1913         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1915 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
1917         * config/arc/arc.c (arc_label_align): Use align_labels instead of
1918         deprecated align_labels_log.
1920 2018-07-17  Richard Biener  <rguenther@suse.de>
1922         PR lto/86456
1923         * dwarf2out.c (init_sections_and_labels): Always generate
1924         a debug_line_str_section for early LTO debug.
1925         (dwarf2out_finish): Reset debug_line_str_hash output early.
1926         Bump counter for extra dwarf5 .debug_loc labels to not conflict
1927         with fat LTO part.
1928         (dwarf2out_early_finish): Output debug_line_str.
1930 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
1932         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1933         index register on z196 or later.
1935 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
1937         * config/s390/s390.c (s390_default_align): Set default function
1938         alignment to 16.
1939         (s390_override_options_after_change): Call s390_default align.
1940         (s390_option_override_internal): Call s390_default_align.
1941         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1943 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
1945         PR middle-end/86542
1946         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1947         to _looptemp_ clauses, other than the first two.
1949 2018-07-17  Martin Liska  <mliska@suse.cz>
1951         * opts.c: Do not enable OPT_falign_* for -Os.
1953 2018-07-17  Martin Liska  <mliska@suse.cz>
1955         * align.h (MAX_CODE_ALIGN): New.
1956         (MAX_CODE_ALIGN_VALUE): New.
1957         * common/config/i386/i386-common.c (ix86_handle_option):
1958         (MAX_CODE_ALIGN): Moved to align.h.
1959         * final.c (MAX_CODE_ALIGN): Likewise.
1960         * opts.c (parse_and_check_align_values):
1961         (MAX_CODE_ALIGN): Likewise.
1962         (MAX_CODE_ALIGN_VALUE): Likewise.
1964 2018-07-17  Martin Liska  <mliska@suse.cz>
1966         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1967         in order to fulfil coding style.
1968         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1969         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1970         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1971         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1972         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1973         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1974         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1975         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1976         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1978 2018-07-17  Martin Liska  <mliska@suse.cz>
1980         * align.h: New file.
1981         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1982         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1983         align_flags of label_to_alignment.
1984         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1985         class.
1986         * config/m68k/m68k.c: Do not use removed align_labels_value and
1987         align_loops_value.
1988         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1989         (LOOP_ALIGN): Likewise.
1990         (LABEL_ALIGN): Likewise.
1991         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1992         Remove not used macro.
1993         (rs6000_loop_align): Change return type to align_flags.
1994         (rs6000_loop_align_max_skip): Remove.
1995         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1996         Change return type to align_flags.
1997         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1998         Remove not used macro.
1999         (rs6000_loop_align):  Change return type to align_flags.
2000         (rs6000_loop_align_max_skip): Remove.
2001         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2002         * config/rx/rx-protos.h (rx_align_for_label): Make it
2003         static function.
2004         * config/rx/rx.c (rx_align_for_label): Change return type
2005         to align_flags.
2006         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2007         macro definitions.
2008         into align_flags class.
2009         (LABEL_ALIGN): Likewise.
2010         (LOOP_ALIGN): Likewise.
2011         * config/s390/s390.c (s390_label_align): Use align_flags
2012         class member.
2013         (s390_asm_output_function_label): Likewise.
2014         * config/sh/sh.c (sh_override_options_after_change):
2015         Use align_flags class directly without macros.
2016         (find_barrier): Likewise.
2017         (barrier_align): Likewise.
2018         (sh_loop_align): Likewise.
2019         * config/spu/spu.c (spu_option_override):
2020         Use align_flags_tuple::get_value instead of removed macros.
2021         (spu_sched_init): Likewise.
2022         * config/spu/spu.h (GTY): Likewise.
2023         * config/visium/visium.c (visium_option_override):
2024         Set "8" as default secondary alignment.
2025         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2026         in order to guarantee secondary alignment of 8.
2027         * coretypes.h: Include align.h header file.
2028         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2029         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2030         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2031         * doc/tm.texi.in: Likewise.
2032         * final.c (struct label_alignment): Remove not used structure.
2033         (LABEL_ALIGN): Change type to align_flags.
2034         (LOOP_ALIGN): Likewise.
2035         (JUMP_ALIGN): Likewise.
2036         (default_loop_align_max_skip): Remove.
2037         (default_label_align_max_skip): Likewise.
2038         (default_jump_align_max_skip): Likewise.
2039         (default_label_align_after_barrier_max_skip):
2040         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2041         (LABEL_TO_MAX_SKIP): Remove.
2042         (label_to_alignment): Return align_flags type instead of integer.
2043         (label_to_max_skip): Remove.
2044         (align_fuzz): Use align_flags type.
2045         (compute_alignments): Use align_flags type and use align_flags::max
2046         to combine multiple alignments.
2047         (grow_label_align): Grow vec instead of C array.
2048         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2049         (shorten_branches):  Use align_flags type and use align_flags::max
2050         to combine multiple alignments.
2051         (final_scan_insn_1): Remove usage of secondary alignment that comes
2052         from label alignment, but instead use proper secondary alignment
2053         which is computed in grow_label_align.
2054         * flags.h (struct align_flags_tuple): Move to align.h.
2055         (struct align_flags): Likewise.
2056         (state_align_loops): Rename to align_loops.
2057         (state_align_jumps): Rename to align_jumps.
2058         (state_align_labels): Rename to align_labels.
2059         (state_align_functions): Rename to align_functions.
2060         (align_loops_log): Remove.
2061         (align_jumps_log): Remove.
2062         (align_labels_log): Remove.
2063         (align_functions_log): Remove.
2064         (align_loops_max_skip): Remove.
2065         (align_jumps_max_skip): Remove.
2066         (align_labels_max_skip): Remove.
2067         (align_functions_max_skip): Remove.
2068         (align_loops_value): Remove.
2069         (align_jumps_value): Remove.
2070         (align_labels_value): Remove.
2071         (align_functions_value): Remove.
2072         * output.h (label_to_alignment): Change return type to align_flags.
2073         (label_to_max_skip): Remove.
2074         * target.def: Remove loop_align_max_skip, label_align_max_skip,
2075         jump_align_max_skip macros.
2076         * targhooks.h (default_loop_align_max_skip): Remove.
2077         (default_label_align_max_skip): Likewise.
2078         (default_jump_align_max_skip): Likewise.
2079         (default_label_align_after_barrier_max_skip): Remove.
2080         * toplev.c (read_log_maxskip): Use ::normalize function.
2081         (parse_N_M): Remove not used argument and also call ::normalize.
2082         (parse_alignment_opts): Do not pass unused arguments.
2083         * varasm.c (assemble_start_function): Use directly align_functions
2084         instead of removed macros.
2085         * system.h: Do not poison removed macros.
2087 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
2089         PR middle-end/86539
2090         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2091         and cond temporaries don't have reference type if iterator has
2092         pointer type.  For init use &for_pre_body instead of pre_p if
2093         for_pre_body is non-empty.
2095 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
2097         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2098         double-double modes to SFmode directly directly.
2099         (trunc<mode>sf2_fprs): Delete.
2101 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
2103         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2104         for conversions between IFmode and the decimal floating point modes.
2105         (init_float128_ieee): Use the correct names for conversions between
2106         KFmode and the decimal floating point modes.
2108 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
2110         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2111         for the conversions between TDmode and IFmode.
2112         (init_float128_ieee): Use more correct names for the conversions
2113         between TDmode and KFmode.
2115 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
2117         PR tree-optimization/86526
2118         * builtins.c (expand_builtin_memcmp): Formatting fixes.
2119         (inline_expand_builtin_string_cmp): Likewise.
2120         (inline_string_cmp): Likewise.  Use c_readstr instead of
2121         builtin_memcpy_read_str.  Add unit_mode temporary.
2123 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2125         PR middle-end/86528
2126         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2127         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2129 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2131         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2132         Alphabetize prototypes of built-in functions, separating out
2133         built-in functions that are listed in this section but should be
2134         described elsewhere.
2136 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
2138         PR target/86511
2139         * expmed.c (emit_store_flag): Do not emit setcc followed by a
2140         conditional move when trapping comparison was split to a
2141         non-trapping one (and vice versa).
2143 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2145         * config/s390/s390.c (s390_function_profiler): Generate nops
2146         instead of profiler call sequences.
2147         * config/s390/s390.opt: Add the new option.
2149 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2151         * config/s390/s390.c (s390_function_profiler): Generate
2152         __mcount_loc section.
2153         * config/s390/s390.opt: Add the new option.
2155 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2157         * common.opt: Add the new warning.
2158         * config/s390/s390.c (s390_function_profiler): Emit "brasl
2159         %r0,__fentry__" when -mfentry is specified.
2160         (s390_option_override_internal): Disallow -mfentry for 31-bit
2161         CPUs.
2162         * config/s390/s390.opt: Add the new option.
2164 2018-07-16  Richard Biener  <rguenther@suse.de>
2166         PR lto/86523
2167         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2168         for function-local FUNCTION_DECL and RESULT_DECL immediately.
2170 2018-07-16  Martin Liska  <mliska@suse.cz>
2172         PR ipa/86529
2173         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2174         to ::get_create.
2176 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
2178         * config/arc/arcHS.md: Update ARCHS scheduling rules.
2180 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
2182         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2183         for ARCHS4x.
2184         * config/arc/arc-cpus.def (hs4x): New cpu.
2185         (hs4xd): Likewise.
2186         * config/arc/arc-tables.opt: Regenerate.
2187         * config/arc/arc.c (arc_sched_issue_rate): New function.
2188         (TARGET_SCHED_ISSUE_RATE): Define.
2189         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2190         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2191         fpu_cvt.
2192         (attr tune): Add ARCHS4x tune values.
2193         (attr tune_dspmpy): Define.
2194         (*tst): Correct instruction type.
2195         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2196         * config/arc/arcHS4x.md: New file.
2197         * config/arc/fpu.md: Update instruction type attributes.
2198         * config/arc/t-multilib: Regenerate.
2200 2018-07-16  Tom de Vries  <tdevries@suse.de>
2202         PR debug/86455
2203         * var-tracking.c (vt_initialize): Fix pre_dec handling.
2205 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2207         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2208         early clobber.
2210 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
2212         PR tree-optimization/86514
2213         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2214         conversion to a boolean type from a type with greater precision.
2216 2018-07-16  Tom de Vries  <tdevries@suse.de>
2218         * var-tracking.c (vt_initialize): Print adjusted insn slim if
2219         dump_flags request TDF_SLIM.
2221 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
2223         * fold-const.c (int_const_binop_1): Abstract...
2224         (wide_int_binop): ...wide int code here.
2225         (poly_int_binop): ...poly int code here.
2226         Abstract the rest of int_const_binop_1 into int_const_binop.
2227         * fold-const.h (wide_int_binop): New.
2228         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2229         Remove useless PLUS/MINUS_EXPR case.
2230         (zero_nonzero_bits_from_vr): Move wide int code...
2231         (zero_nonzero_bits_from_bounds): ...here.
2232         (extract_range_from_binary_expr_1): Move mask optimization code...
2233         (range_easy_mask_min_max): ...here.
2234         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2235         (range_easy_mask_min_max): New.
2237 2018-07-15  Jeff Law  <law@redhat.com>
2239         PR target/85993
2240         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2241         block.
2243 2018-07-14  Jim Wilson  <jimw@sifive.com>
2245         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2247 2018-07-14  Paul Koning  <ni1d@arrl.net>
2249         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2251 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
2253         * lto-streamer-out.c (copy_function_or_variable): Dump info about
2254         copying section.
2256 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
2257             Steve Munroe  <munroesj52@gmail.com>
2259         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2260         (_mm_andnot_si128): Likewise.
2261         (_mm_or_si128): Likewise.
2262         (_mm_xor_si128): Likewise.
2264 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
2266         PR middle-end/78809
2267         * builtins.c (expand_builtin_memcmp): Inline the calls first
2268         when result_eq is false.
2269         (expand_builtin_strcmp): Inline the calls first.
2270         (expand_builtin_strncmp): Likewise.
2271         (inline_string_cmp): New routine. Expand a string compare
2272         call by using a sequence of char comparison.
2273         (inline_expand_builtin_string_cmp): New routine. Inline expansion
2274         a call to str(n)cmp/memcmp.
2275         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2276         New option.
2277         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2279 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
2281         * config/arm/driver-arm.c: Include arm-native.h.
2282         (host_detect_local_cpu): Use auto-generated data tables.
2283         (vendors, arm_cpu_table): Delete.  Move part information to ...
2284         * config/arm/arm-cpus.in: ... here.
2285         * config/arm/parsecpu.awk (gen_native): New function.
2286         (vendor, part): New CPU fields.
2287         (END): Add support for building the native CPU detection tables.
2288         * config/arm/t-arm (arm-native.h): Add build rule.
2289         (driver-arm.o): Add dependency on arm-native.h.
2291 2018-07-13  Richard Biener  <rguenther@suse.de>
2293         PR middle-end/85974
2294         * match.pd (addr1 - addr2): Allow either of the operand to
2295         have a conversion.
2297 2018-07-13  Tom de Vries  <tdevries@suse.de>
2299         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2300         in remap_ssa_name.
2302 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
2304         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2305         arrays instead of numbered variables.
2307 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
2309         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2310         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2312 2018-07-13  Richard Biener  <rguenther@suse.de>
2314         PR debug/86452
2315         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2316         instead of get_context_die.
2318 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
2319             Richard Biener  <rguenther@suse.de>
2321         PR middle-end/86489
2322         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2323         that the loop latch destination where phi is defined.
2325 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
2327         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2328         (riscv_expand_epilogue): Add assertion to check interrupt mode.
2329         (riscv_set_current_function): Extract getting interrupt type to new
2330         function.
2331         (riscv_get_interrupt_type): New function.
2332         (riscv_merge_decl_attributes): New function, checking interrupt type is
2333         same.
2334         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2336 2018-07-12  Paul Koning  <ni1d@arrl.net>
2338         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2339         directive.
2341 2018-07-12  Paul Koning  <ni1d@arrl.net>
2343         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2344         zero reference, add doloop_end instead.
2345         * doc/md.texi (decrement_and_branch_until_zero): Remove.
2346         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
2347         detail for doloop_end.
2349 2018-07-12  Martin Sebor  <msebor@redhat.com>
2351         PR c/86453
2352         * attribs.c (decl_attributes): Reject conflicting attributes before
2353         calling attribute handlers.
2355 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
2357         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2358          parameter.
2359         (gcc::dump_manager::get_dump_file_name): likewise.
2360         (dump_begin): Likewise.
2361         * dumpfile.h (dump_begin): Update prototype.
2362         (gcc::dump_manager::get_dump_file_name,
2363         gcc::dump_manager::get_dump_file_name): Update prototype.
2365 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2367         * internal-fn.h (vectorizable_internal_fn_p): New function.
2368         * tree-vect-slp.c (compatible_calls_p): Likewise.
2369         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
2370         to internal functions.
2371         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2373 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2375         * fold-const.h (inverse_conditions_p): Declare.
2376         * fold-const.c (inverse_conditions_p): New function.
2377         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
2378         that test the inverse condition of a conditional internal function.
2379         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2380         * internal-fn.c (internal_fn_mask_index): Handle conditional
2381         internal functions.
2382         (vectorized_internal_fn_supported_p): New function.
2383         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2384         (any_pred_load_store): Replace with...
2385         (need_to_predicate): ...this new variable.
2386         (redundant_ssa_names): New variable.
2387         (ifcvt_can_use_mask_load_store): Move initial checks to...
2388         (ifcvt_can_predicate): ...this new function.  Handle tree codes
2389         for which a conditional internal function exists.
2390         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2391         instead of ifcvt_can_use_mask_load_store.  Update after variable
2392         name change.
2393         (predicate_load_or_store): New function, split out from
2394         predicate_mem_writes.
2395         (check_redundant_cond_expr): New function.
2396         (value_available_p): Likewise.
2397         (predicate_rhs_code): Likewise.
2398         (predicate_mem_writes): Rename to...
2399         (predicate_statements): ...this.  Use predicate_load_or_store
2400         and predicate_rhs_code.
2401         (combine_blocks, tree_if_conversion): Update after above name changes.
2402         (ifcvt_local_dce): Handle redundant_ssa_names.
2403         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2404         general conditional functions.
2405         * tree-vect-stmts.c (vectorizable_call): Likewise.
2407 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2408             Alan Hayward  <alan.hayward@arm.com>
2409             David Sherwood  <david.sherwood@arm.com>
2411         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2412         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2413         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2414         plus and minus and convert them into IFN_COND_FMA-based sequences.
2415         (convert_mult_to_fma): Handle conditional plus and minus.
2417 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2419         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2420         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2421         (cond_fnms_optab): New optabs.
2422         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2423         internal functions.
2424         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2425         * internal-fn.h (get_conditional_internal_fn): Declare.
2426         (get_unconditional_internal_fn): Likewise.
2427         * internal-fn.c (cond_ternary_direct): New macro.
2428         (expand_cond_ternary_optab_fn): Likewise.
2429         (direct_cond_ternary_optab_supported_p): Likewise.
2430         (FOR_EACH_COND_FN_PAIR): Likewise.
2431         (get_conditional_internal_fn): New function.
2432         (get_unconditional_internal_fn): Likewise.
2433         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2434         (gimple_match_op::gimple_match_op): Add a new overload for 5
2435         operands.
2436         (gimple_match_op::set_op): Likewise.
2437         (gimple_resimplify5): Declare.
2438         * genmatch.c (decision_tree::gen): Generate simplifications for
2439         5 operands.
2440         * gimple-match-head.c (gimple_simplify): Define an overload for
2441         5 operands.  Handle calls with 5 arguments in the top-level overload.
2442         (convert_conditional_op): Handle conversions from unconditional
2443         internal functions to conditional ones.
2444         (gimple_resimplify5): New function.
2445         (build_call_internal): Pass a fifth operand.
2446         (maybe_push_res_to_seq): Likewise.
2447         (try_conditional_simplification): Try converting conditional
2448         internal functions to unconditional internal functions.
2449         Handle 3-operand unconditional forms.
2450         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2451         Define ternary equivalents of the current rules for binary conditional
2452         internal functions.
2453         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2454         ternary operations.
2455         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2456         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2457         (optab): Handle them.
2458         (SVE_COND_FP_TERNARY): New int iterator.
2459         (sve_fmla_op, sve_fmad_op): New int attributes.
2460         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2461         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2462         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2464 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2466         * target.def (preferred_else_value): New target hook.
2467         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2468         * doc/tm.texi: Regenerate.
2469         * targhooks.h (default_preferred_else_value): Declare.
2470         * targhooks.c (default_preferred_else_value): New function.
2471         * internal-fn.h (conditional_internal_fn_code): Declare.
2472         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2473         (get_conditional_internal_fn): Use it.
2474         (conditional_internal_fn_code): New function.
2475         * gimple-match.h (gimple_match_cond): New struct.
2476         (gimple_match_op): Add a cond member function.
2477         (gimple_match_op::gimple_match_op): Update all forms to take a
2478         gimple_match_cond.
2479         * genmatch.c (expr::gen_transform): Use the same condition as res_op
2480         for the suboperation, but don't specify a particular else_value.
2481         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2482         (visit_nary_op, visit_reference_op_load): Pass
2483         gimple_match_cond::UNCOND to the gimple_match_op constructor.
2484         * gimple-match-head.c: Include tree-eh.h
2485         (convert_conditional_op): New function.
2486         (maybe_resimplify_conditional_op): Likewise.
2487         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2488         (gimple_resimplify2): Likewise.
2489         (gimple_resimplify3): Likewise.
2490         (gimple_resimplify4): Likewise.
2491         (maybe_push_res_to_seq): Return null for conditional operations.
2492         (try_conditional_simplification): New function.
2493         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
2494         constructor.
2495         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2496         IFN_COND_* call.
2497         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2498         function.
2499         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2501 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
2503         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2504         DECL_FCONTEXT
2505         (hash_tree): Do not hash DECL_FCONTEXT
2506         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2507         Do not stream DECL_FCONTEXT.
2508         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2509         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2511 2018-07-12  Richard Biener  <rguenther@suse.de>
2513         PR debug/86462
2514         * dwarf2out.c (gen_block_die): Only output blocks when they have
2515         at least one !DECL_IGNORED_P variable.
2517 2018-07-12  Richard Biener  <rguenther@suse.de>
2519         PR target/84829
2520         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2521         Remove -mieee-fp handling.
2523 2018-07-12  Richard Biener  <rguenther@suse.de>
2525         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2526         left-over from last patch.
2528 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
2530         PR tree-optimization/86492
2531         * gimple-ssa-store-merging.c
2532         (imm_store_chain_info::coalesce_immediate_stores): Call
2533         check_no_overlap even for the merge_overlapping case.  Formatting fix.
2535 2018-07-12  Richard Biener  <rguenther@suse.de>
2537         PR middle-end/86479
2538         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2539         move possibly trapping operations into the conditional.
2541 2018-07-12  Richard Biener  <rguenther@suse.de>
2543         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2544         (vn_lookup_simplify_result): Remove recursion limit applied
2545         here.
2546         (vn_nary_build_or_lookup_1): Adjust.
2547         (try_to_simplify): Likewise.
2548         * gimple-match-head.c (gimple_resimplify1): Instead apply one
2549         here.
2550         (gimple_resimplify2): Likewise.
2551         (gimple_resimplify3): Likewise.
2552         (gimple_resimplify4): Likewise.
2554 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
2556         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2557         Use __mmask64 type instead of __mmask8 for __M argument.
2558         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2559         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2560         __U argument.
2561         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2562         __mmask16 for __M argument.
2563         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2564         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2565         to __mmask16 instead of __mmask8.
2566         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2567         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2568         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2569         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2570         instead of __mmask16 for __U argument.
2571         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2572         __mmask16 instead of __mmask8 for __U argument.
2573         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2574         __U argument.
2575         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2576         __mmask16.
2577         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2578         argument.
2579         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2580         __U argument.
2581         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2582         __mmask16.
2583         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2584         of __mmask16.
2585         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2586         __U argument.
2587         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2588         __U argument.
2589         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2590         __U argument.
2591         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2592         __U argument.
2593         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2594         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2595         return type as well as __M argument type and all casts from __mmask8
2596         to __mmask32.
2597         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2598         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2599         return type as well as __M argument type and all casts from __mmask8
2600         to __mmask16.
2601         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2602         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2603         return type as well as __M argument type and all casts from __mmask8
2604         to __mmask32.
2605         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2606         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2607         return type as well as __M argument type and all casts from __mmask8
2608         to __mmask16.
2609         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2610         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2611         __mmask16.
2613 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
2615         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2616         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2617         for __U argument.
2619 2018-07-11  Paul Koning  <ni1d@arrl.net>
2621         * doc/md.texi (define_subst): Document how multiple occurrences of
2622         the same argument in the replacement pattern are handled.
2624 2018-07-11  Paul Koning  <ni1d@arrl.net>
2626         * doc/extend.texi (Common Variable Attributes): Move "mode" into
2627         alphabetical order.
2628         (Common Type Attributes): Add "mode" attribute.
2630 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
2632         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2633         stream DECL_ORIGINAL_TYPE.
2634         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2635         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2636         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2637         Do not walk original type.
2638         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2639         external decls.
2640         (write_ts_decl_non_common_tree_pointers): Do not stream
2641         DECL_ORIGINAL_TYPE
2642         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2643         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2645 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
2647         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2648         thread twice from the same starting edge.
2650 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
2652         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2653         * gimple.c (gimple_call_nonnull_result_p): ...here...
2654         (gimple_call_nonnull_arg): ...and here.
2655         * gimple.h (gimple_call_nonnull_result_p): New.
2656         (gimple_call_nonnull_arg): New.
2658 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
2660         * config/arm/arm-cpus.in: Move information from fpu field of each
2661         cpu definition to the isa field.
2662         * config/arm/parsecpu.awk (fpu): Delete match rule.
2663         (gen_comm_data): Don't add bits from the CPU's FPU entry.
2665 2018-07-11  Richard Biener  <rguenther@suse.de>
2667         PR debug/86457
2668         * dwarf2out.c (init_sections_and_labels): Use
2669         output_asm_line_debug_info consistently.
2670         (dwarf2out_early_finish): Likewise.
2671         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2672         type units.
2674 2018-07-11  Richard Biener  <rguenther@suse.de>
2676         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2677         Rework father_bb setting in a way to avoid propagating constants
2678         multiple times on a loop body.
2680 2018-07-10  Mark Wielaard  <mark@klomp.org>
2682         PR debug/86459
2683         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2685 2018-07-10  Richard Biener  <rguenther@suse.de>
2687         * hash-map.h (hash_map::iterator::operator*): Return
2688         references to key and value.
2690 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
2692         PR c++/86443
2693         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2694         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2695         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2696         (gimplify_omp_for): For composite loops, move outer
2697         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2698         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
2699         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
2700         TREE_LIST for both the original class iterator and the "last" helper
2701         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
2702         loop, remember has_decl_expr from outer composite loops for the
2703         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2705 2018-07-09  Martin Sebor  <msebor@redhat.com>
2707         PR middle-end/77357
2708         PR middle-end/86428
2709         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2710         accessing implicitly initialized array elements.
2711         * expr.c (string_constant): Handle string initializers of
2712         character arrays within aggregates.
2713         * gimple-fold.c (fold_array_ctor_reference): Add argument.
2714         Store element offset.  As a special case, handle zero size.
2715         (fold_nonarray_ctor_reference): Same.
2716         (fold_ctor_reference): Add argument.  Store subobject offset.
2717         * gimple-fold.h (fold_ctor_reference): Add argument.
2719 2018-07-09  Paul Koning  <ni1d@arrl.net>
2721         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2722         (pdp11_insn_cost): New function.
2723         (pdp11_md_asm_adjust): New function.
2724         (TARGET_INVALID_WITHIN_DOLOOP): Define.
2725         (pdp11_rtx_costs): Update to match machine better.
2726         (output_addr_const_pdp11): Correct format mismatch warnings.
2727         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2728         * config/pdp11/pdp11.md: General change to add base_cost and/or
2729         length attributes for use by new pdp11_insn_cost function.
2730         (MIN_BRANCH): Correct definition.
2731         (MIN_SOB): Ditto.
2732         (doloop_end): Use standard pattern name for looping pattern.
2733         (doloop_end_nocc): New.
2734         (movsf): Add another constraint alternative.
2735         (zero_extendqihi2): Add constraint alternatives for not in place
2736         extend.
2737         (zero_extendhisi2): Remove.
2738         (shift patterns): Add CC handling variants.
2739         (bswaphi2): New.
2740         (bswapsi2): New.
2741         (rothi3): New.
2742         (define_peephole2): New peephole to recognize mov that sets CC for
2743         subsequent test.
2745 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2747         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2748         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2749         wi::add.
2751 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
2753         PR c/86420
2754         * real.c (real_nextafter): Return true if result is denormal.
2756 2018-07-09  Martin Liska  <mliska@suse.cz>
2758         * common.opt: Add back wrongly removed attribute.
2760 2018-07-09  Richard Biener  <rguenther@suse.de>
2762         PR debug/86413
2763         * dwarf2out.c (gen_block_die): For an early generated DIE
2764         always output high/low PC attributes.
2766 2018-07-09  Tom de Vries  <tdevries@suse.de>
2768         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2769         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2770         onto VAR_DECL with abstract origin.
2772 2018-07-07  Jim Wilson  <jimw@sifive.com>
2774         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2776 2018-07-07  Tom de Vries  <tdevries@suse.de>
2778         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2780 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
2782         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2783         overflow_type.
2784         (combine_bound): Use wide-int overflow calculation instead of
2785         rolling our own.
2786         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2787         overflow_type.
2788         * fold-const.c (int_const_binop_2): Same.
2789         (extract_muldiv_1): Same.
2790         (fold_div_compare): Same.
2791         (fold_abs_const): Same.
2792         * match.pd: Same.
2793         * poly-int.h (add): Same.
2794         (sub): Same.
2795         (neg): Same.
2796         (mul): Same.
2797         * predict.c (predict_iv_comparison): Same.
2798         * profile-count.c (slow_safe_scale_64bit): Same.
2799         * simplify-rtx.c (simplify_const_binary_operation): Same.
2800         * tree-chrec.c (tree_fold_binomial): Same.
2801         * tree-data-ref.c (split_constant_offset_1): Same.
2802         * tree-if-conv.c (idx_within_array_bound): Same.
2803         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2804         * tree-ssa-phiopt.c (minmax_replacement): Same.
2805         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2806         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2807         * vr-values.c (vr_values::adjust_range_with_scev): Same.
2808         * wide-int.cc (wi::add_large): Same.
2809         (wi::mul_internal): Same.
2810         (wi::sub_large): Same.
2811         (wi::divmod_internal): Same.
2812         * wide-int.h: Change overflow type to overflow_type for neg, add,
2813         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2814         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2815         mul_internal, divmod_internal.
2816         (overflow_type): New enum.
2817         (accumulate_overflow): New.
2819 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
2821         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2822         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2824 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
2826         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2827         argument is checked for zero before entering loop, avoid checking again.
2829 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
2831         * gimplify.h (generic_expr_could_trap_p): Set as global function.
2832         * gimplify.h (generic_expr_could_trap_p): Likwise.
2833         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2835 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
2837         PR tree-optimization/86401
2838         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2839         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2840         (fold_bit_and_mask): ... here.  New helper function for match.pd.
2841         * fold-const.h (fold_bit_and_mask): Declare.
2842         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2844 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
2846         PR target/86324
2847         * target.def (translate_mode_attribute): New hook.
2848         * targhooks.h (default_translate_mode_attribute): Declare.
2849         * targhooks.c (default_translate_mode_attribute): New function.
2850         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2851         * doc/tm.texi: Regenerate.
2852         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2853         (rs6000_translate_mode_attribute): New function.
2855 2018-07-06  Paul Koning  <ni1d@arrl.net>
2857         * doc/md.texi (define_split): Document DONE and FAIL.
2858         (define_peephole2): Ditto.
2860 2018-07-05  Jeff Law  <law@redhat.com>
2862         PR tree-optimization/86010
2863         * tree-ssa-dse.c (compute_trims): More aggressively trim at
2864         both the head and tail of mem* and str* calls.
2866 2018-07-05  Jim Wilson  <jimw@sifive.com>
2868         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2870 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
2872         * config/aarch64/aarch64-simd.md: correct flags text for
2873         MIN_EXPR replacement.
2875 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
2877         * configure: Regenerated.
2879 2018-07-05  Carl Love  <cel@us.ibm.com>
2881         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2882         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2883         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2884         VSX_BUILTIN_DOUBLEL_V4SF.
2886 2018-07-05  Martin Sebor  <msebor@redhat.com>
2888         PR c++/86400
2889         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2890         than its domain to compute its the upper bound of a char array.
2892 2018-07-05  Nathan Sidwell  <nathan@acm.org>
2894         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2895         * doc/cpp.texi: Update comment.
2896         * doc/tm.texi: Rebuilt.
2897         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2898         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2899         * doc/extend.texi (Backwards Compatibility): Clarify it is system
2900         headers affected by extern "C".
2901         * system.h: Poison NO_IMPLICIT_EXTERN_C.
2902         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2903         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2904         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2905         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2906         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2907         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2908         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2909         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2910         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2911         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2912         config/sparc/sp64-elf.h, config/spu/spu.h,
2913         config/stormy16/stormy16.h, config/v850/v850.h,
2914         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2915         define NO_IMPLICIT_EXTERN_C.
2916         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2918 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
2920         PR target/84711
2921         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2922         instead of GET_MODE_SIZE when comparing Units.
2924 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
2926         PR target/84711
2927         * rtlanal.c (set_noop_p): Constrain on mode change,
2928         include hard-reg-set.h
2930 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
2932         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2934 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
2936         Revert
2937         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
2939         PR sanitizer/84250
2940         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2941         libasan.
2942         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2944 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
2946         PR sanitizer/84250
2947         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2948         libasan.
2949         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2951 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
2953         PR middle-end/86380
2954         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2956 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
2958         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2959         neg_*_op* variables.
2961 2018-07-04  Martin Liska  <mliska@suse.cz>
2963         * tree-switch-conversion.c: Define
2964         max_ratio_for_speed and max_ratio_for_size constants.
2966 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
2967             Martin Liska  <mliska@suse.cz>
2969         PR middle-end/66240
2970         PR target/45996
2971         PR c/84100
2972         * common.opt: Rename align options with 'str_' prefix.
2973         * common/config/i386/i386-common.c (set_malign_value): New
2974         function.
2975         (ix86_handle_option): Use it to set -falign-* options/
2976         * config/aarch64/aarch64-protos.h (struct tune_params): Change
2977         type from int to string.
2978         * config/aarch64/aarch64.c: Update default values from int
2979         to string.
2980         * config/alpha/alpha.c (alpha_override_options_after_change):
2981         Likewise.
2982         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2983         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2984         max skip conditionally.
2985         * config/i386/freebsd.h (SUBALIGN_LOG): New.
2986         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2987         max skip conditionally.
2988         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2989         max skip conditionally.
2990         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2991         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2992         max skip conditionally.
2993         * config/i386/i386.c (struct ptt): Change type from int to
2994         string.
2995         (ix86_default_align): Set default values.
2996         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2997         max skip conditionally.
2998         * config/i386/iamcu.h (SUBALIGN_LOG): New.
2999         (ASM_OUTPUT_MAX_SKIP_ALIGN):
3000         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3001         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3002         max skip conditionally.
3003         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3004         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3005         * config/i386/x86-64.h (SUBALIGN_LOG): New.
3006         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3007         max skip conditionally.
3008         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3009         * config/ia64/ia64.c (ia64_option_override): Set default values
3010         for alignment options.
3011         * config/m68k/m68k.c: Handle new str_align_* options.
3012         * config/mips/mips.c (mips_set_compression_mode): Change
3013         type of constants.
3014         (mips_option_override): Set default values for options.
3015         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3016         Likewise.
3017         * config/rs6000/rs6000.c (rs6000_option_override_internal):
3018         Likewise.
3019         * config/rx/rx.c (rx_option_override): Likewise.
3020         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3021         (LABEL_ALIGN): Use align_labels_log.
3022         (LOOP_ALIGN): Use align_loops_align.
3023         * config/s390/s390.c (s390_asm_output_function_label): Use new
3024         macros.
3025         * config/sh/sh.c (sh_override_options_after_change):
3026         Change type of constants.
3027         * config/spu/spu.c (spu_sched_init): Likewise.
3028         * config/sparc/sparc.c (sparc_option_override): Set default
3029         values for options.
3030         * config/visium/visium.c (visium_option_override): Likewise.
3031         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3032         emit p2align format with last argument if it's not needed.
3033         * doc/invoke.texi: Document extended format of -falign-*.
3034         * final.c: Use align_labels alignment.
3035         * flags.h (struct target_flag_state): Change type to use
3036         align_flags.
3037         (struct align_flags_tuple): New.
3038         (struct align_flags): Likewise.
3039         (align_loops_log): Redefine macro to use new types.
3040         (align_loops_max_skip): Redefine macro to use new types.
3041         (align_jumps_log): Redefine macro to use new types.
3042         (align_jumps_max_skip): Redefine macro to use new types.
3043         (align_labels_log): Redefine macro to use new types.
3044         (align_labels_max_skip): Redefine macro to use new types.
3045         (align_functions_log): Redefine macro to use new types.
3046         (align_loops): Redefine macro to use new types.
3047         (align_jumps): Redefine macro to use new types.
3048         (align_labels): Redefine macro to use new types.
3049         (align_functions): Redefine macro to use new types.
3050         (align_functions_max_skip): Redefine macro to use new types.
3051         (align_loops_value): New macro.
3052         (align_jumps_value): New macro.
3053         (align_labels_value): New macro.
3054         (align_functions_value): New macro.
3055         * function.c (invoke_set_current_function_hook): Propagate
3056         alignment values from flags to global variables default in
3057         topleev.h.
3058         * ipa-icf.c (sem_function::equals_wpa): Use
3059         cl_optimization_option_eq instead of memcmp.
3060         * lto-streamer.h (cl_optimization_stream_out): Support streaming
3061         of string types.
3062         (cl_optimization_stream_in): Likewise.
3063         * optc-save-gen.awk: Support strings in cl_optimization.
3064         * opth-gen.awk: Likewise.
3065         * opts.c (finish_options): Remove error checking of invalid
3066         value ranges.
3067         (MAX_CODE_ALIGN): Remove.
3068         (MAX_CODE_ALIGN_VALUE): Likewise.
3069         (parse_and_check_align_values): New function.
3070         (check_alignment_argument): Likewise.
3071         (common_handle_option): Use check_alignment_argument.
3072         * opts.h (parse_and_check_align_values): Declare.
3073         * toplev.c (init_alignments): Remove.
3074         (read_log_maxskip): New.
3075         (parse_N_M): Likewise.
3076         (parse_alignment_opts): Likewise.
3077         (backend_init_target): Remove usage of init_alignments.
3078         * toplev.h (parse_alignment_opts): Declare.
3079         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3080         argument.
3081         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3082         * tree.c (cl_option_hasher::equal): New.
3083         * varasm.c: Use new global macros.
3085 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
3087         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3088         Use a simpler align directive also if MAXSKIP = ALIGN-1.
3089         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3090         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3091         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3092         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3093         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3094         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3095         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3096         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3097         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3098         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3099         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3101 2018-07-04  Martin Liska  <mliska@suse.cz>
3102             Jonathan Wakely  <jwakely@redhat.com>
3104         * coverage.c: Use correct type.
3105         * doc/invoke.texi: Language correction.
3107 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
3109         PR target/85620
3110         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3111         ENDBRANCH for non-tail call which may return via indirect branch.
3112         * doc/extend.texi: Document indirect_return attribute.
3114 2018-07-03  Martin Sebor  <msebor@redhat.com>
3116         PR tree-optimization/86274
3117         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3118         precondition.
3119         (format_floating): Correct handling of infinities and NaNs.
3121 2018-07-03  Martin Sebor  <msebor@redhat.com>
3123         * print-tree.c (print_real_cst): New function.
3124         (print_node_brief): Call it.
3125         (print_node): Ditto.
3127 2018-07-03  Jeff Law  <law@redhat.com>
3129         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3130         into a single pattern.
3132         * config/h8300/h8300.md (ors code_iterator): New.
3133         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3134         a single pattern and single splitter.
3135         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3136         (iorqi3_1, xorqi3_1): Likewise.
3137         (iorqi3, xorqi3 expanders): Similarly.
3139         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3140         (movmd_internal) into a single pattern using the P mode iterator.
3141         (movmd splitters): Similarly.
3142         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3143         (movsd splitters): Similarly.
3145         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3146         ADDB, ADDW and ADDL into a single ADD attribute which selects the
3147         right table based on the size of the operand.
3148         * config/h8300/h8300.md (length_table): Corresponding changes. All
3149         references to "addb", "addw" and "addl" changed to "add".
3150         (btst patterns): Merge two variants into a single pattern.
3151         (tstqi, tsthi): Likewise.
3152         (addhi3_incdec, addsi3_incdec): Likewise.
3153         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3154         (mulhi3, mulsi3): Likewise.
3155         (udivhi3, udivsi3): Likewise.
3156         (divhi3, divsi3): Likewise.
3157         (andorqi3, andorhi3, andorsi3): Likewise.
3159 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
3161         PR target/85694
3162         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3163         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3165 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3167         PR tree-optimization/85694
3168         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3169         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3170         UNSPEC_URHADD.
3171         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3172         (<u>avg<mode>3_ceil): New patterns.
3174 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
3176         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3177         scan-tree-dump directive.
3178         * gcc.dg/vect/slp-perm-2.c: Likewise.
3179         * gcc.dg/vect/slp-perm-3.c: Likewise.
3180         * gcc.dg/vect/slp-perm-5.c: Likewise.
3181         * gcc.dg/vect/slp-perm-6.c: Likewise.
3182         * gcc.dg/vect/slp-perm-7.c: Likewise.
3183         * gcc.dg/vect/slp-perm-8.c: Likewise.
3185 2018-07-03  Marek Polacek  <polacek@redhat.com>
3187         PR middle-end/86202
3188         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3190 2018-07-03  Richard Biener  <rguenther@suse.de>
3192         PR ipa/86389
3193         * tree-ssa-structalias.c (find_func_clobbers): Properly
3194         handle indirect calls.
3196 2018-07-03  Jeff Law  <law@redhat.com>
3198         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3199         (shifts): New code iterator.
3200         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3201         expander.  Fix HImode handling on H8/SX.
3202         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3203         (subqi3, subhi3, subsi3 expanders): Likewise.
3204         (andqi3, andhi3, andsi3 expanders): Likewise.
3205         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3206         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3207         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3208         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3209         (zero_extendqihi2, zero_extendqisi2): Likewise.
3210         (extendqihi2, extendqisi2): Likewise.
3211         (rotlqi3, rotlhi3, rotlsi3): Likewise.
3212         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3213         (rotlqi3_1, rotlhi3_1): Likewise.
3214         (logicalhi3_sn, logicalsi3_sn): Likewise.
3215         (logicalhi3, logicalsi3): Likewise.
3217 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3219         * tree-vect-patterns.c (vect_recog_rotate_pattern)
3220         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3221         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3222         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3223         type to append_pattern_def_seq instead of creating a stmt_vec_info
3224         directly.
3225         (build_mask_conversion): Likewise.  Remove vinfo argument.
3226         (vect_add_conversion_to_patterm): Likewise, renaming to...
3227         (vect_add_conversion_to_pattern): ...this.
3228         (vect_recog_mask_conversion_pattern): Update call to
3229         build_mask_conversion.  Pass the vector type to
3230         append_pattern_def_seq here too.
3231         (vect_recog_gather_scatter_pattern): Update call to
3232         vect_add_conversion_to_pattern.
3234 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3236         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3237         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3238         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3239         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3240         STMT_VINFO_PATTERN_DEF_SEQ to null here.
3241         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3242         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3243         append_pattern_def_seq instead of new_pattern_def_seq.
3244         (vect_recog_divmod_pattern): Do both of the above.
3245         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3246         is null.
3248 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3250         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3251         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3252         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3253         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3254         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3255         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3256         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3257         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3258         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3259         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3260         parameter with a single stmt_vec_info.
3261         (vect_recog_func_ptr): Likewise.
3262         (vect_recog_gather_scatter_pattern): Likewise, folding in...
3263         (vect_try_gather_scatter_pattern): ...this.
3264         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3265         the stmt_vec_info of the statement to be matched.  Don't clear
3266         STMT_VINFO_RELATED_STMT.
3267         (vect_pattern_recog): Update call accordingly.
3269 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3271         PR tree-optimization/85694
3272         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3273         (uavgM3_ceil): Document new optabs.
3274         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3275         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3276         functions.
3277         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3278         (savg_ceil_optab): New optabs.
3279         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3280         (vect_vect_recog_func_ptrs): Add it.
3281         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3282         constant directly from the associated lhs.
3284 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3286         * tree-vect-patterns.c (vect_split_statement): New function.
3287         (vect_convert_input): Use it to try to split an existing cast.
3289 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3291         * poly-int.h (print_hex): New function.
3292         * dumpfile.h (dump_dec, dump_hex): Declare.
3293         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3294         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3295         min_input_precision, operation_precision and operation_sign.
3296         * tree-vect-patterns.c (vect_get_range_info): New function.
3297         (vect_same_loop_or_bb_p, vect_single_imm_use)
3298         (vect_operation_fits_smaller_type): Delete.
3299         (vect_look_through_possible_promotion): Add an optional
3300         single_use_p parameter.
3301         (vect_recog_over_widening_pattern): Rewrite to use new
3302         stmt_vec_info infomration.  Handle one operation at a time.
3303         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3304         (vect_truncatable_operation_p, vect_set_operation_type)
3305         (vect_set_min_input_precision): New functions.
3306         (vect_determine_min_output_precision_1): Likewise.
3307         (vect_determine_min_output_precision): Likewise.
3308         (vect_determine_precisions_from_range): Likewise.
3309         (vect_determine_precisions_from_users): Likewise.
3310         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3311         (vect_vect_recog_func_ptrs): Put over_widening first.
3312         Add cast_forwprop.
3313         (vect_pattern_recog): Call vect_determine_precisions.
3315 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3317         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3318         statements that have been replaced by further pattern statements.
3319         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3321 2018-07-03  Richard Biener  <rguenther@suse.de>
3323         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3324         always set *dt.  Dump vectype in vectype overload.
3325         * dumpfile.h (dump_gimple_expr): New function.
3326         (dump_gimple_expr_loc): Likewise.
3327         * dumpfile.c (dump_gimple_expr): New function.
3328         (dump_gimple_expr_loc): Likewise.
3330 2018-07-02  Jeff Law  <law@redhat.com>
3332         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3333         the H8/300, H8/300H and H8/S variants into a single pattern.
3334         (movhi_h8300, movqi_h8300hs): Similarly.
3335         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3336         (QHI mode iterator): New.
3338         * config/h8300/h8300.md: Remove trailing whitespace.
3340 2018-07-02  Jim Wilson  <jimw@sifive.com>
3342         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3343         instead of emit_insn for interrupt returns.
3344         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3345         (riscv_sret, riscv_uret): Likewise.
3347 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
3349         * pretty-print.c (selftest::test_pp_format): Move save and restore
3350         of quotes to class auto_fix_quotes, and add an instance.
3351         * selftest.c: Include "intl.h".
3352         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3353         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3354         * selftest.h (selftest::auto_fix_quotes): New class.
3356 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
3358         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3359         (aarch64_sve_prepare_conditional_op): Remove.
3360         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3361         Allow aarch64_simd_reg_or_zero as select operand; remove
3362         the aarch64_sve_prepare_conditional_op call.
3363         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3364         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3365         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3366         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3367         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3368         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3369         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3370         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3371         and a splitters to match all of the *_any patterns.
3372         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3374         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3375         (SVE_COND_FP_BINARY_REV): Remove.
3376         (sve_int_op_rev, sve_fp_op_rev): New.
3377         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3378         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3379         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3380         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3381         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3382         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3383         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3384         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3385         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3387         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3388         Remove match_dup 1 from the inner unspec.
3389         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3391         * config/aarch64/aarch64.md (movprfx): New attr.
3392         (length): Default movprfx to 8.
3393         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3394         (*madd<SVE_I>, *msub<SVE_I): Likewise.
3395         (*<su>mul<SVE_I>3_highpart): Likewise.
3396         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3397         (*v<ASHIFT><SVE_I>3): Likewise.
3398         (*<su><MAXMIN><SVE_I>3): Likewise.
3399         (*<su><MAXMIN><SVE_F>3): Likewise.
3400         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3401         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3402         (*div<SVE_F>4): Likewise.
3404 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
3406         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3407         in dump string.
3409 2018-07-02  Richard Biener  <rguenther@suse.de>
3411         PR tree-optimization/86363
3412         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3413         memset argument refers to a non-variable address.
3415 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
3417         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3418         {PLUS,MINUS}_EXPR code to...
3419         (adjust_symbolic_bound): ...here,
3420         (combine_bound): ...here,
3421         (set_value_range_with_overflow): ...and here.
3423 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
3425         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3426         code...
3427         (extract_range_from_abs_expr): ...here.
3429 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
3431         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3432         -fno-omit-frame-pointer when not optimizing.
3434 2018-07-02  Martin Liska  <mliska@suse.cz>
3436         PR ipa/86279
3437         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3438         (propagate_nothrow): Likewise.
3440 2018-07-02  Martin Liska  <mliska@suse.cz>
3442         PR ipa/86323
3443         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3445 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
3447         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3448         function in r262149, changing "loc" param from source_location to
3449         const dump_location_t &.
3450         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3451         declaration, as above.
3453 2018-07-01  Paul Koning  <ni1d@arrl.net>
3455         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3456         -munit-asm, -mgnu-asm, -mdec-asm.
3457         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3458         (pdp11_output_labelref): New.
3459         (pdp11_output_def): New.
3460         (pdp11_output_addr_vec_elt): New.
3461         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
3462         %# and %@ format codes.
3463         (pdp11_option_override): New.
3464         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3465         (pdp11_output_ident): New.
3466         (pdp11_asm_named_section): New.
3467         (pdp11_asm_init_sections): New.
3468         (pdp11_file_start): New.
3469         (pdp11_file_end): New.
3470         (output_ascii): Use .ascii/.asciz for -mdec-asm.
3471         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
3472         %o, like %c but octal.
3473         (pdp11_option_override): New.
3474         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3475         -mdec-asm.
3476         (DATA_SECTION_ASM_OP): Ditto.
3477         (READONLY_DATA_SECTION_ASM_OP): New.
3478         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3479         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3480         (ASM_OUTPUT_LABELREF): Ditto.
3481         (ASM_OUTPUT_DEF): Ditto.
3482         (ASM_OUTPUT_EXTERNAL): New.
3483         (ASM_OUTPUT_SOURCE_FILENAME): New.
3484         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3485         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3486         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
3487         %# and %@ format codes.
3488         * config/pdp11/pdp11.opt (mgnu-asm): New.
3489         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3490         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3491         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3493 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
3495         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3496         dereferencing path[] beyond its length.
3497         (debug_path): New.
3498         (debug_all_paths): New.
3499         (rewire_first_differing_edge): New.
3500         (adjust_paths_after_duplication): New.
3501         (duplicate_thread_path): Call adjust_paths_after_duplication.
3502         Add new argument.
3503         (thread_through_all_blocks): Add new argument to
3504         duplicate_thread_path.
3506 2018-06-30  Jim Wilson  <jimw@sifive.com>
3508         * config/riscv/predicates.md (p2m1_shift_operand): New.
3509         (high_mask_shift_operand): New.
3510         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3511         pattern using p2m1_shift_operand.
3512         (lshsi3_zero_extend_3+2): New combiner pattern using
3513         high_mask_shift_operand.
3515 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3517         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3518         split out from...
3519         (vect_recog_rotate_pattern): ...here.
3520         (vect_convert_input): Try to insert casts of invariants in the
3521         preheader.
3522         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3523         preheader to be empty.
3525 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3527         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3528         vector type.  If given, install it in the new statement's
3529         STMT_VINFO_VECTYPE.
3530         (vect_element_precision): New function.
3531         (vect_unpromoted_value): New struct.
3532         (vect_unpromoted_value::vect_unpromoted_value): New function.
3533         (vect_unpromoted_value::set_op): Likewise.
3534         (vect_look_through_possible_promotion): Likewise.
3535         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3536         (vect_widened_op_tree, vect_convert_input): Likewise.
3537         (vect_convert_inputs, vect_convert_output): Likewise.
3538         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3539         to handle the optional cast of the multiplication result and
3540         vect_widened_op_tree to detect the widened multiplication itself.
3541         Do not require the input and output of promotion casts to have
3542         the same sign, but base the signedness of the operation on the
3543         input rather than the result.  If the pattern includes two
3544         promotions, check that those promotions have the same sign.
3545         Do not restrict the MULT_EXPR handling to a double-width result;
3546         handle quadruple-width results and wider.  Use vect_convert_inputs
3547         to convert the inputs to the common type.
3548         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
3549         to handle the optional cast of the ABS result.  Also allow a sign
3550         change or a sign extension between the ABS and MINUS.
3551         Use vect_widened_op_tree to detect the widened subtraction and use
3552         vect_convert_inputs to convert the inputs to the common type.
3553         (vect_handle_widen_op_by_const): Delete.
3554         (vect_recog_widen_op_pattern): New function.
3555         (vect_recog_widen_mult_pattern): Use it.
3556         (vect_recog_widen_shift_pattern): Likewise.
3557         (vect_recog_widen_sum_pattern): Use
3558         vect_look_through_possible_promotion to handle the promoted
3559         PLUS_EXPR operand.
3561 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3563         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3564         the containing gimple_seq *.
3565         * gimple-iterator.h (gsi_for_stmt): Declare it.
3566         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3567         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3568         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3569         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3570         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3571         checks.
3572         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3573         split out from...
3574         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
3575         statement being replaced is part of an existing pattern
3576         definition sequence, inserting the new pattern statements before
3577         the original one.
3578         (vect_pattern_recog_1): Don't return a bool.  If the statement
3579         is already part of a pattern, instead apply pattern matching
3580         to the pattern definition statements.  Don't clear the
3581         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3582         (vect_pattern_recog): Don't break after the first match;
3583         continue processing the pattern definition statements instead.
3584         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3586 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3588         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3589         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3590         (vect_recog_widen_sum_pattern): Use it.
3592 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3594         * tree-vect-loop.c (vectorizable_reduction): Assert that the
3595         phi is not a pattern statement and has not been replaced by
3596         a pattern statement.
3597         * tree-vect-patterns.c (type_conversion_p): Don't check
3598         STMT_VINFO_IN_PATTERN_P.
3599         (vect_recog_vector_vector_shift_pattern): Likewise.
3600         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3601         the pattern statement rather than the original statement; check
3602         directly for a WIDEN_MULT_EXPR here.
3603         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3604         vect_is_simple_use to return the pattern statement rather
3605         than the original statement; use is_pattern_stmt_p to check
3606         for such a pattern statement.
3607         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3608         to return the pattern statement rather than the original statement;
3609         don't do the same transformation here.
3610         (vect_is_simple_use): If the defining statement has been replaced
3611         by a pattern statement, return the pattern statement instead.
3612         Remove the corresponding (local) transformation from the vectype
3613         overload.
3615 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3617         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3618         end and default to null.
3619         * tree-vect-loop.c (vect_create_epilog_for_reduction)
3620         (vectorizable_reduction): Update calls accordingly, dropping the
3621         gimple ** argument if the passed-back statement isn't needed.
3622         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3623         (vect_recog_rotate_pattern): Likewise.
3624         (vect_recog_mask_conversion_pattern): Likewise.
3625         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3626         (vect_mask_constant_operand_p): Likewise.
3627         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3628         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3629         (get_group_load_store_type, get_load_store_type): Likewise.
3630         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3631         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3632         (vectorizable_conversion, vectorizable_assignment): Likewise.
3633         (vectorizable_shift, vectorizable_operation): Likewise.
3634         (vectorizable_store, vect_is_simple_cond): Likewise.
3635         (vectorizable_condition, vectorizable_comparison): Likewise.
3636         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3637         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3638         and move it to the end.  Cope with null def_stmt_outs.
3640 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3642         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3644 2018-06-29  Jeff Law  <law@redhat.com>
3646         * config/v850/v850.c (v850_legitimate_address_p): Handle large
3647         displacements for TARGET_V850E2V3 and newer.
3648         (TARGET_LRA_P): Remove.  Defaults to LRA now.
3649         * config/v850/v850.md (sign23byte_load): Remove.
3650         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3651         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3653 2018-06-29  Martin Liska  <mliska@suse.cz>
3655         PR lto/85759
3656         * coverage.c (coverage_init): Mangle full path name.
3657         * doc/invoke.texi: Document the change.
3658         * gcov-io.c (mangle_path): New.
3659         * gcov-io.h (mangle_path): Likewise.
3660         * gcov.c (mangle_name): Use mangle_path for path mangling.
3662 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3664         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3665         if starting source register is not even.
3667 2018-06-29  Martin Liska  <mliska@suse.cz>
3669         PR tree-optimization/86263
3670         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3671         Make edge redirection.
3673 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
3675         * dumpfile.c (dump_loc): Add indentation based on scope depth.
3676         (dump_scope_depth): New variable.
3677         (get_dump_scope_depth): New function.
3678         (dump_begin_scope): New function.
3679         (dump_end_scope): New function.
3680         * dumpfile.h (get_dump_scope_depth): New declaration.
3681         (dump_begin_scope): New declaration.
3682         (dump_end_scope): New declaration.
3683         (class auto_dump_scope): New class.
3684         (AUTO_DUMP_SCOPE): New macro.
3685         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3686         AUTO_DUMP_SCOPE.
3688 2018-06-29  Richard Biener  <rguenther@suse.de>
3690         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3691         compute_all_dependences succeeds.
3692         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3693         exceed --param loop-max-datarefs-for-datadeps.
3695 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
3697         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3699 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
3701         PR target/86348
3702         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3703         alternative 0 in preferred_for_speed attribute.
3705 2018-06-28  Paul Koning  <ni1d@arrl.net>
3707         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3708         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3709         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3710         * config/pdp11/pdp11.md: Correct "length" attribute calculation
3711         for shift insn patterns.
3713 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
3715         * cgraph.c (cgraph_node::get_body): Replace assignments to
3716         "dump_file" with calls to set_dump_file.
3717         * dumpfile.c (alt_dump_file): Make static, and group with...
3718         (alt_flags): ...this definition.
3719         (dumps_are_enabled): New variable.
3720         (refresh_dumps_are_enabled): New function.
3721         (set_dump_file): New function.
3722         (set_alt_dump_file): New function.
3723         (gcc::dump_manager::dump_start): Replace assignments to
3724         "dump_file" and "alt_dump_file" with calls to set_dump_file and
3725         set_alt_dump_file.
3726         (gcc::dump_manager::dump_finish): Likewise.
3727         * dumpfile.h (alt_dump_file): Delete decl.
3728         (dumps_are_enabled): New variable decl.
3729         (set_dump_file): New function decl.
3730         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3731         global.
3732         * tree-nested.c (lower_nested_functions): Replace assignments to
3733         "dump_file" with calls to set_dump_file.
3735 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
3737         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3738         goto_locus of each outgoing edge of each basic block.
3740 2018-06-28  Richard Biener  <rguenther@suse.de>
3742         * dwarf2out.c (decl_scope_table): Remove.
3743         (push_decl_scope): Likewise.
3744         (pop_decl_scope): Likewise.
3745         (gen_type_die_for_member): Do not call push/pop_decl_scope.
3746         (gen_struct_or_union_type_die): Likewise.
3747         (gen_tagged_type_die): Likewise.
3748         (dwarf2out_init): Do not initialize decl_scope_table.
3749         (dwarf2out_c_finalize): Do not free it.
3751 2018-06-28  Richard Biener  <rguenther@suse.de>
3753         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3754         deciding whether to not re-use a DIE.
3756 2018-06-28  Richard Biener  <rguenther@suse.de>
3758         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3759         DW_AT_abstract_origin attribute.
3761 2018-06-28  Martin Liska  <mliska@suse.cz>
3763         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3764         Use newly introduced constants.
3765         * tree-switch-conversion.h (struct jump_table_cluster):
3766         Define max_ratio_for_size and max_ratio_for_speed.
3768 2018-06-28  Martin Liska  <mliska@suse.cz>
3770         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3771         Add new checking assert to catch invalid state.
3772         (jump_table_cluster::can_be_handled): Handle single case
3773         clusters.
3774         (jump_table_cluster::is_beneficial): Bail out for such case.
3775         (bit_test_cluster::find_bit_tests):
3776         Add new checking assert to catch invalid state.
3777         (bit_test_cluster::can_be_handled): Handle single case
3778         clusters.
3779         (bit_test_cluster::is_beneficial): Bail out for such case.
3780         (switch_decision_tree::analyze_switch_statement):
3781         Fix comment.
3783 2018-06-28  Martin Liska  <mliska@suse.cz>
3785         * common.opt: Introduce -completion option.
3786         * gcc.c (driver_handle_option): Handle it.
3787         (driver::main): Print completions if completion
3788         is set.
3789         * opt-suggestions.c (option_proposer::get_completions):
3790         New function.
3791         (option_proposer::suggest_completion): Likewise.
3792         (option_proposer::find_param_completions): Likewise.
3793         (verify_autocompletions): Likewise.
3794         (test_completion_valid_options): Likewise.
3795         (test_completion_valid_params): Likewise.
3796         (in_completion_p): Likewise.
3797         (empty_completion_p): Likewise.
3798         (test_completion_partial_match): Likewise.
3799         (test_completion_garbage): Likewise.
3800         (opt_proposer_c_tests): Likewise.
3801         * opt-suggestions.h: Declare new functions.
3802         * opts.c (common_handle_option): Handle OPT__completion_.
3803         * selftest-run-tests.c (selftest::run_tests): Add
3804         opt_proposer_c_tests.
3805         * selftest.c (assert_str_startswith): New.
3806         * selftest.h (assert_str_startswith): Likewise.
3807         (opt_proposer_c_tests): New.
3808         (ASSERT_STR_STARTSWITH): Likewise.
3810 2018-06-28  Martin Liska  <mliska@suse.cz>
3812         * Makefile.in: Add opt-suggestions.o.
3813         * gcc-main.c: Include opt-suggestions.h.
3814         * gcc.c (driver::driver): Likewise.
3815         (driver::~driver): Remove m_option_suggestions.
3816         (driver::build_option_suggestions): Moved to option_proposer.
3817         (driver::suggest_option): Likewise.
3818         (driver::handle_unrecognized_options): Use option_proposer.
3819         * gcc.h (class driver): Add new memver m_option_proposer.
3820         * opt-suggestions.c: New file.
3821         * opt-suggestions.h: New file.
3823 2018-06-28  Martin Liska  <mliska@suse.cz>
3825         * vec.h (class auto_string_vec): New (moved from auto_argvec).
3826         (auto_string_vec::~auto_string_vec): Likewise.
3828 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
3830         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3831         prevent_decl_creation_for_types fields up and add reset_location field.
3832         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3833         statement if id->reset_location is true.
3834         (copy_edges_for_bb): Do not set goto_locus on the new edges if
3835         id->reset_location is true.
3836         (copy_phis_for_bb): Force input_location on the arguments if
3837         id->reset_location is true.
3838         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3839         is set on the function to be inlined.
3841 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
3843         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3845 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
3847         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3848         registers for Pmode.
3849         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3850         hard registers for the clobbered pseudo.
3852 2018-06-27  Paul Koning  <ni1d@arrl.net>
3854         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3855         mutually exclusive options.
3856         * config/pdp11/constraints.md (h): New constraint.
3857         (O): Update definition to match shift code generation.
3858         (D): New constraint.
3859         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3860         (CCFP): Remove.
3861         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3862         function.
3863         (output_jump): Change arguments.
3864         (pdp11_fixed_cc_regs): New function.
3865         (pdp11_cc_mode): Ditto.
3866         (pdp11_expand_shift): Ditto.
3867         (pdp11_assemble_shift): Ditto.
3868         (pdp11_small_shift): Ditto.
3869         (pdp11_branch_cost): Remove.
3870         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3871         from output.
3872         (pdp11_register_move_cost): Update for CC registers.
3873         (pdp11_rtx_costs): Add case for LSHIFTRT.
3874         (pdp11_output_jump): Add CCNZ mode conditional branches.
3875         (notice_update_cc_on_set): Remove.
3876         (pdp11_cc_mode): New function.
3877         (simple_memory_operand): Correct pre/post decrement case.
3878         (no_side_effect_operand): New function.
3879         (pdp11_regno_reg_class): Add CC_REGS class.
3880         (pdp11_fixed_cc_regs): New function.
3881         (pdp11_small_shift): New function.
3882         (pdp11_expand_shift): New function to expand shift insns.
3883         (pdp11_assemble_shift): New function to output shifts.
3884         (pdp11_branch_cost): Remove.
3885         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3886         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3887         (WCHAR_TYPE): Ditto.
3888         (PTRDIFF_TYPE): Ditto.
3889         (ADJUST_INSN_LENGTH): New macro.
3890         (FIXED_REGISTERS): Add CC registers.
3891         (CALL_USED_REGISTERS): Ditto.
3892         (reg_class): Ditto.
3893         (REG_CLASS_NAMES): Ditto.
3894         (REG_CLASS_CONTENTS): Ditto.
3895         (SELECT_CC_MODE): Use new function.
3896         (TARGET_FLAGS_REGNUM): New macro.
3897         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3898         (cc0_reg_rtx): Remove.
3899         (CC_STATUS_MDEP): Remove.
3900         (CC_STATUS_MDEFP_INIT): Remove.
3901         (CC_IN_FPU): Remove.
3902         (NOTICE_UPDATE_CC): Remove.
3903         (REGISTER_NAMES): Add CC registers.
3904         (BRANCH_COST): Change to constant 1.
3905         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3906         handling.
3907         * config/pdp11/pdp11.opt (mbcopy): Remove.
3908         (mbcopy-builtin): Remove.
3909         (mbranch-cheap): Remove.
3910         (mbranch-expensive): Remove.
3911         * config/pdp11/predicates.md (expand_shift_operand): Update to
3912         match shift code generation.
3913         (ccnz_operator): New predicate.
3914         * doc/invoke.texi (PDP-11 Options): Remove deleted options
3915         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3916         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
3917         exclusive options.
3918         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
3919         description of O constraint.
3921 2018-06-27  Jeff Law  <law@redhat.com>
3922             Austin Law  <austinklaw@gmail.com>
3924         * config/v850/v850.md (addsi3_set_flags): New pattern.
3925         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3926         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3927         (zero_extendhisi2_v850_set_flags): Likewise.
3928         (zero_extendqisi2_v850_set_flags): Likewise.
3929         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3930         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3931         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3933         * config/v850/v850-protos.h (notice_update_cc): Remove.
3934         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3935         (v850_print_operand): Handle 'D' and "d".
3936         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3937         Add handling of arithmetic/logical operations compared against zero.
3938         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3939         Do not look at v850_compare_op, instead get mode from last argument.
3940         (v850_gen_compare): Remove
3941         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3942         after reload for prologue insns.
3943         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3944         patterns.
3945         (construct_save_jarl): Likewise.
3946         (TARGET_FLAGS_REGNUM): Define.
3947         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3948         (NOTICE_UPDATE_CC): Remove.
3949         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3950         than cc0.  Conditionalize on reload_completed.
3951         (cmpsi_insn, setfcc_insn): Likewise.
3952         (tst1 splitter): Turn into define_and_split which sets the flags
3953         after reload.
3954         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3955         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3956         (cstoresf4, cstoredf4): Clobber the flags.
3957         (cmpsi, cmpsf, cmpdf): Remove expanders.
3958         (setf_insn): Remove pattern.
3959         (addsi3): Turn into define_and_split which clobbers the flags after
3960         reload and a suitable pattern (addsi3_clobber_flags) for use after
3961         reload.
3962         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3963         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3964         (ashrsi3, ashrsi3_v850e2): Likewise.
3965         (bins): Clobber the flags.
3966         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3967         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3968         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3969         (call_value_internal_short, call_value_internal_long): Likewise.
3970         (callt_save_interrupt, callt_return_interrupt): Likewise.
3971         (save_interrupt, return_interrupt): Likewise.
3972         (callt_save_all_interrupt, save_all_interrupt): Likewise.
3973         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3974         (restore_all_interrupt, _restore_all_interrupt): Likewise.
3975         (All FP comparisons): Only allow after reload has completed.
3976         (trfsr): Likewise.
3977         (divh, divhu): Tweak output template.
3978         (branch_z_normal, branch_z_invert): Remove
3979         (branch_nz_normal, branch_nz_invert): Likewise.
3980         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3982         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3983         * config/v850/v850.c (notice_update_cc): Remove.
3984         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
3985         (CC_NO_CARRY): Likewise.
3986         (NOTICE_UPDATE_CC): Define to nothing.
3987         * config/v850/v850.md: Remove block comment on cc0 handling
3988         Remove "cc" attribute from all patterns.  Remove cc_status handling
3989         from all patterns.  Minor formatting fixes.
3991 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3993         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3994         (cortex-a76.cortex-a55): Likewise.
3995         * config/aarch64/aarch64-tune.md: Regenerate.
3996         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3997         cortex-a76.cortex-a55.
3999 2018-06-27  Jeff Law  <law@redhat.com>
4001         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4002         (MULTILIB_DIRNAMES): Similarly.
4004 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
4006         * gimple.h (gimple_return_retbnd): Delete.
4007         (gimple_return_set_retbnd): Likewise.
4008         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4009         gimple_return_set_retbnd.
4010         * gimple-pretty-print.c (dump_gimple_return): Remove call to
4011         gimple_return_retbnd and adjust.
4012         * tree-inline.h (struct copy_body_data): Remove retbnd field.
4013         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4014         Explicitly return NULL in a couple more cases.  Move assertion
4015         on debug statements and remove unreachable code.
4016         (reset_debug_binding): Do not test id->retbnd.
4017         (expand_call_inline): Do not set it.
4019 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4021         * configure.ac: Add --disable-gcov option.
4022         * configure: Regenerate.
4023         * Makefile.in: Honour @enable_gcov@.
4024         * doc/install.texi: Document --disable-gcov.
4026 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4028         * config/arm/arm-cpus.in (cortex-a76): New entry.
4029         (cortex-a76.cortex-a55): Likewise.
4030         * config/arm/arm-tables.opt: Regenerate.
4031         * config/arm/arm-tune.md: Likewise.
4032         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4033         * doc/invoke.texi (ARM Options): Document cortex-a76 and
4034         cortex-a76.cortex-a55.
4036 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
4038         PR target/85769
4039         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4041 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4043         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4044         comment.
4045         (EPILOGUE_USES): Likewise.
4047 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
4049         * tree-inline.c (remap_location): New function extracted from...
4050         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
4051         (copy_phis_for_bb): ...here.  Call remap_location.
4052         (copy_cfg_body): Adjust call to copy_edges_for_bb.
4054 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
4056         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4057         unaligned vsx for 16B memset.
4059 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
4061         PR target/86285
4062         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4063         ieee128_float_type_node to long_double_type_node unless
4064         TARGET_LONG_DOUBLE_128 is set.
4066 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
4068         * cfgloop.c (get_loop_location): Convert return type from
4069         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4070         by implicit construction from rtx_insn *, and using
4071         dump_user_location_t::from_function_decl for the fallback case.
4072         * cfgloop.h (get_loop_location): Convert return type from
4073         location_t to dump_user_location_t.
4074         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4075         dump_printf_loc to pass in a dump_location_t rather than a
4076         location_t, via the gimple stmt.
4077         * coverage.c (get_coverage_counts): Update calls to
4078         dump_printf_loc to pass in dump_location_t rather than a
4079         location_t.
4080         * doc/optinfo.texi (Dump types): Convert example of
4081         dump_printf_loc from taking "locus" to taking "insn".  Update
4082         description of the "_loc" calls to cover dump_location_t.
4083         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4084         "selftest.h".
4085         (dump_user_location_t::dump_user_location_t): New constructors,
4086         from gimple *stmt and rtx_insn *.
4087         (dump_user_location_t::from_function_decl): New function.
4088         (dump_loc): Make static.
4089         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4090         const dump_location_t &.
4091         (dump_generic_expr_loc): Delete.
4092         (dump_printf_loc): Convert param "loc" from location_t to
4093         const dump_location_t &.
4094         (selftest::test_impl_location): New function.
4095         (selftest::dumpfile_c_tests): New function.
4096         * dumpfile.h: Include "profile-count.h".
4097         (class dump_user_location_t): New class.
4098         (struct dump_impl_location_t): New struct.
4099         (class dump_location_t): New class.
4100         (dump_printf_loc): Convert 2nd param from source_location to
4101         const dump_location_t &.
4102         (dump_generic_expr_loc): Delete.
4103         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4104         const dump_location_t &.
4105         * gimple-fold.c (fold_gimple_assign): Update call to
4106         dump_printf_loc to pass in a dump_location_t rather than a
4107         location_t, via the gimple stmt.
4108         (gimple_fold_call): Likewise.
4109         * gimple-loop-interchange.cc
4110         (loop_cand::analyze_iloop_reduction_var): Update for change to
4111         check_reduction_path.
4112         (tree_loop_interchange::interchange): Update for change to
4113         find_loop_location.
4114         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4115         change in return-type of find_loop_location.
4116         (graphite_regenerate_ast_isl): Likewise.
4117         * graphite-optimize-isl.c (optimize_isl): Likewise.
4118         * graphite.c (graphite_transform_loops): Likewise.
4119         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4120         pass in a dump_location_t rather than a location_t, via the
4121         gimple stmt.
4122         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4123         * ipa.c (walk_polymorphic_call_targets): Likewise.
4124         * loop-unroll.c (report_unroll): Convert "locus" param from
4125         location_t to dump_location_t.
4126         (decide_unrolling): Update for change to get_loop_location's
4127         return type.
4128         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4129         location_t to dump_user_location_t.
4130         (grid_find_single_omp_among_assignments_1): Updates calls to
4131         dump_printf_loc to pass in a dump_location_t rather than a
4132         location_t, via the gimple stmt.
4133         (grid_parallel_clauses_gridifiable): Convert "tloc" from
4134         location_t to dump_location_t.  Updates calls to dump_printf_loc
4135         to pass in a dump_location_t rather than a location_t, via the
4136         gimple stmt.
4137         (grid_inner_loop_gridifiable_p): Likewise.
4138         (grid_dist_follows_simple_pattern): Likewise.
4139         (grid_gfor_follows_tiling_pattern): Likewise.
4140         (grid_target_follows_gridifiable_pattern): Likewise.
4141         (grid_attempt_target_gridification): Convert initialization
4142         of local "grid" from memset to zero-initialization; FIXME: does
4143         this require C++11?  Update call to dump_printf_loc to pass in a
4144         optinfo_location rather than a location_t, via the gimple stmt.
4145         * profile.c (read_profile_edge_counts): Updates call to
4146         dump_printf_loc to pass in a dump_location_t rather than a
4147         location_t
4148         (compute_branch_probabilities): Likewise.
4149         * selftest-run-tests.c (selftest::run_tests): Call
4150         dumpfile_c_tests.
4151         * selftest.h (dumpfile_c_tests): New decl.
4152         * tree-loop-distribution.c (pass_loop_distribution::execute):
4153         Update for change in return type of find_loop_location.
4154         * tree-parloops.c (parallelize_loops): Likewise.
4155         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4156         "locus" from location_t to dump_user_location_t.
4157         (canonicalize_loop_induction_variables): Likewise.
4158         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4159         for change in return type of find_loop_location.
4160         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4161         to dump_printf_loc to pass in a dump_location_t rather than a
4162         location_t, via the stmt.
4163         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4164         Likewise.
4165         * tree-vect-loop-manip.c (find_loop_location): Convert return
4166         type from source_location to dump_user_location_t.
4167         (vect_do_peeling): Update for above change.
4168         (vect_loop_versioning): Update for change in type of
4169         vect_location.
4170         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4171         from location_t to dump_user_location_t.
4172         (vect_estimate_min_profitable_iters): Update for change in type
4173         of vect_location.
4174         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4175         location_t to dump_location_t.
4176         (vect_slp_bb): Update for change in type of vect_location.
4177         * tree-vectorizer.c (vect_location): Convert from source_location
4178         to dump_user_location_t.
4179         (try_vectorize_loop_1): Update for change in vect_location's type.
4180         (vectorize_loops): Likewise.
4181         (increase_alignment): Likewise.
4182         * tree-vectorizer.h (vect_location): Convert from source_location
4183         to dump_user_location_t.
4184         (find_loop_location): Convert return type from source_location to
4185         dump_user_location_t.
4186         (check_reduction_path): Convert 1st param from location_t to
4187         dump_user_location_t.
4188         * value-prof.c (check_counter): Update call to dump_printf_loc to
4189         pass in a dump_user_location_t rather than a location_t; update
4190         call to error_at for change in type of "locus".
4191         (check_ic_target): Update call to dump_printf_loc to
4192         pass in a dump_user_location_t rather than a location_t, via the
4193         call_stmt.
4195 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
4197         * config/s390/s390.h (enum processor_flags): Do not use
4198         default tune parameter when -march was specified.
4200 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
4202         PR target/86314
4203         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4204         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4205         operands.
4207 2018-06-26  Richard Biener  <rguenther@suse.de>
4209         PR tree-optimization/86287
4210         PR bootstrap/86316
4211         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4212         (vect_analyze_loop): Initialize n_stmts.
4214 2018-06-26  Richard Biener  <rguenther@suse.de>
4216         PR middle-end/86271
4217         * fold-const.c (fold_convertible_p): Pointer extension
4218         isn't valid.
4220 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
4222         PR debug/86064
4223         * dwarf2out.c (loc_list_has_views): Adjust comments.
4224         (dw_loc_list): Split single cross-partition range with
4225         nonzero locview.
4227 2018-06-25  Jeff Law  <law@redhat.com>
4229         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4230         on -mbig-switch by default.
4232         * config/v850/predicates.md (const_float_1_operand): Fix match_code
4233         test.
4234         (const_float_0_operand): Remove unused predicate.
4235         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4236         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4237         (recipsf2): New expander.  Original pattern now called
4238         (recipsf2_insn).
4239         (recipdf2, recipdf2_insn): Similarly.
4240         (rsqrtsf2, rsqrtsf2_insn): Similarly
4241         (rsqrtdf2, rsqrtdf2_insn): Similarly
4243 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
4245         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4246         Simplify logic for FreeBSD (twice).
4248 2018-06-25  Martin Sebor  <msebor@redhat.com>
4250         PR tree-optimization/86204
4251         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4252         a strnlen result if it's less than the length of the string.
4254 2018-06-25  Martin Sebor  <msebor@redhat.com>
4256         PR tree-optimization/85700
4257         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4258         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4259         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4261 2018-06-25  Martin Sebor  <msebor@redhat.com>
4263         * doc/extend.texi (Zero-length arrays): Update and clarify.
4265 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
4267         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4268         added IEEE/IBM long double multilib support on PowerPC little
4269         endian Linux systems.
4270         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4271         (MULTILIB_DEFAULTS): Likewise.
4272         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4273         Likewise.
4274         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4275         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4276         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4278 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
4280         PR middle-end/86311
4281         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4282         (REORDER_45): Likewise.
4284 2018-06-25  Jeff Law  <law@redhat.com>
4286         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4287         dividend to 32 bits.  Adjust length.
4288         (udivmodhi4): Cleanup output template.  Fix length.
4290 2018-06-25  Carl Love  <cel@us.ibm.com>
4292         * config/rs6000/vsx.md: Change word selector to prefered location.
4294 2018-06-25  Richard Biener  <rguenther@suse.de>
4296         PR tree-optimization/86304
4297         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4298         epilogue-if-converted loops as well.
4300 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
4302         * lto-section-out.c (lto_begin_section): Do not print section
4303         name for noaddr and unnumbered dumps.
4305 2018-06-25  Richard Biener  <rguenther@suse.de>
4307         * tree-vectorizer.h (struct vec_info_shared): New structure
4308         with parts split out from struct vec_info and loop_nest from
4309         struct _loop_vec_info.
4310         (struct vec_info): Adjust accordingly.
4311         (struct _loop_vec_info): Likewise.
4312         (LOOP_VINFO_LOOP_NEST): Adjust.
4313         (LOOP_VINFO_DATAREFS): Likewise.
4314         (LOOP_VINFO_DDRS): Likewise.
4315         (struct _bb_vec_info): Likewise.
4316         (BB_VINFO_DATAREFS): Likewise.
4317         (BB_VINFO_DDRS): Likewise.
4318         (struct _stmt_vec_info): Add dr_aux member.
4319         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4320         (DR_MISALIGNMENT_UNINITIALIZED): New.
4321         (set_dr_misalignment): Adjust.
4322         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4323         (vect_analyze_loop): Adjust prototype.
4324         (vect_analyze_loop_form): Likewise.
4325         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4326         Compute dependences lazily.
4327         (vect_record_base_alignments): Use shared datarefs/ddrs.
4328         (vect_verify_datarefs_alignment): Likewise.
4329         (vect_analyze_data_refs_alignment): Likewise.
4330         (vect_analyze_data_ref_accesses): Likewise.
4331         (vect_analyze_data_refs): Likewise.
4332         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4333         constructor parameter for shared part.
4334         (vect_analyze_loop_form): Pass in shared part and adjust.
4335         (vect_analyze_loop_2): Pass in storage for the number of
4336         stmts.  Move loop nest finding to the caller.  Compute
4337         datarefs lazily.
4338         (vect_analyze_loop): Pass in shared part.
4339         (vect_transform_loop): Verify shared datarefs are unchanged.
4340         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4341         constructor parameter for shared part.
4342         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4343         (vect_slp_bb): Verify shared datarefs are unchanged before
4344         transform.
4345         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4346         change.
4347         (new_stmt_vec_info): Initialize DR_AUX misalignment to
4348         DR_MISALIGNMENT_UNINITIALIZED.
4349         * tree-vectorizer.c (vec_info::vec_info): Add constructor
4350         parameter for shared part.
4351         (vec_info::~vec_info): Adjust.
4352         (vec_info_shared::vec_info_shared): New.
4353         (vec_info_shared::~vec_info_shared): Likewise.
4354         (vec_info_shared::save_datarefs): Likewise.
4355         (vec_info_shared::check_datarefs): Likewise.
4356         (try_vectorize_loop_1): Construct shared part live for analyses
4357         of a single loop for multiple vector sizes.
4358         * tree-parloops.c (gather_scalar_reductions): Adjust.
4360 2018-06-25  Richard Biener  <rguenther@suse.de>
4362         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4363         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4364         (vect_analyze_data_refs): Remove similar code from here and
4365         simplify accordingly.
4367 2018-06-25  Richard Biener  <rguenther@suse.de>
4369         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4370         for reverse storage order accesses rather than asserting
4371         they cannot happen here.
4373 2018-06-25  Tom de Vries  <tdevries@suse.de>
4375         PR debug/86257
4376         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4377         Use data16 instead of .byte for insn prefix.
4379 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
4381         PR C++/86082
4382         * parser.c (make_char_string_pack): Pass this literal chars
4383         through cpp_interpret_string.
4384         (cp_parser_userdef_numeric_literal): Check the result of
4385         make_char_string_pack.
4387 2018-06-24  Maya Rashish  <coypu@sdf.org>
4389         * ginclude/stddef.h: Simplify conditions around avoiding
4390         re-definition of __size_t.
4392 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
4394         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4395         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4397 2018-06-22  Maya Rashish  <coypu@sdf.org>
4399         * doc/invoke.texi (mno-fancy-math-387): Update for changes
4400         made to OpenBSD and NetBSD through the years.
4402 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4404         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4405         behavior of vec_pack (vector double, vector double) to match
4406         behavior of vec_float2 (vector double, vector double).
4408 2018-06-22  Olivier Hainque  <hainque@adacore.com>
4410         * gimplify.c (gimplify_function_tree): Prevent creation
4411         of a trampoline for the address of the current function
4412         passed to entry/exit instrumentation hooks.
4414 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
4416         PR target/86222
4417         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4418         correctly.
4420 2018-06-22  Martin Liska  <mliska@suse.cz>
4422         PR tree-optimization/86263
4423         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4424         Bail out if is_enabled is false.
4425         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4426         New declaration.
4427         (jump_table_cluster::is_enabled): New function.
4429 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
4431         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4432         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4433         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4434         (lto_input_ts_binfo_tree_pointers): Likewise.
4435         * tree-streamer-out.c (streamer_write_tree_bitfields,
4436         write_ts_binfo_tree_pointers): Likewise.
4437         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4439 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
4441         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4443 2018-06-22  Martin Liska  <mliska@suse.cz>
4445         * symbol-summary.h (get): Make it pure and inline move
4446         functionality from ::get function.
4447         (get): Remove and inline into ::get and ::get_create.
4448         (get_create): Move code from ::get function.
4450 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4452         PR target/85994
4453         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4454         -x assembler-with-cpp.
4456 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4458         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4459         _FILE_OFFSET_BITS=64 for C++.
4461 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
4463         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4464         conversion insn that shows up when pr85657-3.c is compiled using
4465         IEEE 128-bit long double.
4466         (neg<mode>2_internal): Use the correct mode to check whether the
4467         mode is IBM extended.
4468         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4469         multiply and divide external functions from being created more
4470         than once.
4472 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4474         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4475         functions.
4476         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
4477         the edge can be forwarded.
4478         (cfg_layout_merge_blocks): Likewise.
4480 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4482         * except.c (finish_eh_generation): Commit edge insertions only after
4483         the EH edges have been redirected from post-landing to landing pads.
4485 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4487         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4488         create_tmp_var_for to create the FRAME decl.
4489         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4491 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4493         * tree-inline.c (copy_edges_for_bb): Minor tweak.
4494         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4495         debug statement when resetting its value.
4496         (expand_call_inline): Copy the locus of the call onto the assignment
4497         of the return value, if any.  Use local variable in more cases.
4499 2018-06-21  Martin Liska  <mliska@suse.cz>
4501         * ipa-pure-const.c (propagate_nothrow): Use
4502         funct_state_summaries->get.
4503         (dump_malloc_lattice): Likewise.
4504         (propagate_malloc): Likewise.
4506 2018-06-21  Richard Biener  <rguenther@suse.de>
4508         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4509         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4510         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4511         comment.
4512         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4513         BLOCK_ABSTRACT_ORIGIN unconditionally.
4515 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
4517         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4518         deleting it.
4519         * ipa-reference.c (ipa_reference_c_finalize): Delete
4520         ipa_ref_opt_sum_summaries and set it to NULL.
4522 2018-06-21  Tom de Vries  <tdevries@suse.de>
4524         PR tree-optimization/85859
4525         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4526         test with comment from bb_no_side_effects_p.
4528 2018-06-21  Richard Biener  <rguenther@suse.de>
4530         PR tree-optimization/86232
4531         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4532         max for constant niter.
4534 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4536         * config/aarch64/aarch64-simd.md
4537         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4539 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4541         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4542         Make opernads of the unspec commutative.
4544 2018-06-21  Richard Biener  <rguenther@suse.de>
4546         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4547         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4548         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4549         (vect_analyze_data_ref_dependence): Re-order checks to deal with
4550         NULL DR_STEP.
4551         (vect_record_base_alignments): Do not record base alignment
4552         for gathers or scatters.
4553         (vect_compute_data_ref_alignment): Drop return value that is always
4554         true.  Bail out early for gathers or scatters.
4555         (vect_enhance_data_refs_alignment): Bail out early for gathers
4556         or scatters.
4557         (vect_find_same_alignment_drs): Likewise.
4558         (vect_analyze_data_refs_alignment): Remove dead code.
4559         (vect_slp_analyze_and_verify_node_alignment): Likewise.
4560         (vect_analyze_data_refs): For possible gathers or scatters do
4561         not create an alternate DR, just check their possible validity
4562         and mark them.  Adjust DECL_NONALIASED handling to not rely
4563         on DR_BASE_ADDRESS.
4564         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4565         update inits of gathers or scatters.
4566         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4567         Also copy gather/scatter flag to pattern vinfo.
4569 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4571         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4572         behavior of vec_packsu (vector unsigned long long, vector unsigned
4573         long long) to match behavior of vec_packs with same signature.
4575 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
4576             Thomas Schwinge <thomas@codesourcery.com>
4577             Cesar Philippidis  <cesar@codesourcery.com>
4579         * gimplify.c (gimplify_scan_omp_clauses): Add support for
4580         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4581         (gimplify_adjust_omp_clauses): Likewise.
4582         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4583         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4584         (gimplify_omp_target_update): Update handling of acc update and
4585         enter/exit data.
4586         * omp-low.c (install_var_field): Remove unused parameter
4587         base_pointers_restrict.
4588         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4589         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4590         FINALIZE}
4591         (omp_target_base_pointers_restrict_p): Delete.
4592         (scan_omp_target): Update call to scan_sharing_clauses.
4593         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4594         FINALIZE}.
4595         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4596         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4597         (convert_local_omp_clauses): Likewise.
4598         * tree-pretty-print.c (dump_omp_clause): Likewise.
4599         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
4600         FINALIZE}.
4601         (omp_clause_code_name): Likewise.
4603 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
4605         PR debug/86194
4606         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4607         be narrowed.
4609         PR tree-optimization/86231
4610         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
4611         anti-range don't overwrite *vr0min before using it to compute *vr0max.
4613 2018-06-20  Tom de Vries  <tdevries@suse.de>
4615         PR tree-optimization/86097
4616         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4617         iv type if signedness of iv type is not the same as that of *nit.
4619 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
4621         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
4622         EDGE_EH edges, verify they are all EDGE_EH.
4624 2018-06-20  Maya Rashish  <coypu@sdf.org>
4626         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4628 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4630         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4631         * config/aarch64/aarch64.c (xgene1_tunings): Add
4632         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4633         (aarch64_mode_valid_for_sched_fusion_p):
4634         Allow 16-byte modes.
4635         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4636         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4637         128-bit modes.
4638         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4639         New pattern.
4640         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4641         * config/aarch64/iterators.md (VQ2): New mode iterator.
4643 2018-06-20  Martin Liska  <mliska@suse.cz>
4645         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4646         Change default ratio from 10 to 8.
4648 2018-06-20  Martin Liska  <mliska@suse.cz>
4650         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4651         New.
4652         (bit_test_cluster::find_bit_tests): Likewise.
4653         (switch_decision_tree::analyze_switch_statement): Find clusters.
4654         * tree-switch-conversion.h (struct jump_table_cluster): Document
4655         hierarchy.
4657 2018-06-20  Martin Liska  <mliska@suse.cz>
4659         * tree-switch-conversion.c (switch_conversion::collect):
4660         Record m_uniq property.
4661         (switch_conversion::expand): Bail out for special conditions.
4662         (group_cluster::~group_cluster): New.
4663         (group_cluster::group_cluster): Likewise.
4664         (group_cluster::dump): Likewise.
4665         (jump_table_cluster::emit): New.
4666         (switch_decision_tree::fix_phi_operands_for_edges): New.
4667         (struct case_node): Remove struct.
4668         (jump_table_cluster::can_be_handled): New.
4669         (case_values_threshold): Moved to header.
4670         (reset_out_edges_aux): Likewise.
4671         (jump_table_cluster::is_beneficial): New.
4672         (bit_test_cluster::can_be_handled): Likewise.
4673         (add_case_node): Remove.
4674         (bit_test_cluster::is_beneficial): New.
4675         (case_bit_test::cmp): New.
4676         (bit_test_cluster::emit): New.
4677         (expand_switch_as_decision_tree_p): Remove.
4678         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4679         (fix_phi_operands_for_edge): Likewise.
4680         (switch_decision_tree::analyze_switch_statement): New.
4681         (compute_cases_per_edge): Move ...
4682         (switch_decision_tree::compute_cases_per_edge): ... here.
4683         (try_switch_expansion): Likewise.
4684         (switch_decision_tree::try_switch_expansion): Likewise.
4685         (record_phi_operand_mapping): Likewise.
4686         (switch_decision_tree::record_phi_operand_mapping): Likewise.
4687         (emit_case_decision_tree): Likewise.
4688         (switch_decision_tree::emit): Likewise.
4689         (balance_case_nodes): Likewise.
4690         (switch_decision_tree::balance_case_nodes): Likewise.
4691         (dump_case_nodes): Likewise.
4692         (switch_decision_tree::dump_case_nodes): Likewise.
4693         (emit_jump): Likewise.
4694         (switch_decision_tree::emit_jump): Likewise.
4695         (emit_cmp_and_jump_insns): Likewise.
4696         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4697         (emit_case_nodes): Likewise.
4698         (switch_decision_tree::emit_case_nodes): Likewise.
4699         (conditional_probability): Remove.
4700         * tree-switch-conversion.h (enum cluster_type): New.
4701         (PRINT_CASE): New.
4702         (struct cluster): Likewise.
4703         (cluster::cluster): Likewise.
4704         (struct simple_cluster): Likewise.
4705         (simple_cluster::simple_cluster): Likewise.
4706         (struct group_cluster): Likewise.
4707         (struct jump_table_cluster): Likewise.
4708         (struct bit_test_cluster): Likewise.
4709         (struct min_cluster_item): Likewise.
4710         (struct case_tree_node): Likewise.
4711         (case_tree_node::case_tree_node): Likewise.
4712         (jump_table_cluster::case_values_threshold): Likewise.
4713         (struct case_bit_test): Likewise.
4714         (struct switch_decision_tree): Likewise.
4715         (struct switch_conversion): Likewise.
4716         (switch_decision_tree::reset_out_edges_aux): Likewise.
4718 2018-06-20  Martin Liska  <mliska@suse.cz>
4720         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4721         (hoist_edge_and_branch_if_true): Likewise.
4722         (expand_switch_using_bit_tests_p): Likewise.
4723         (struct case_bit_test): Likewise.
4724         (case_bit_test_cmp): Likewise.
4725         (emit_case_bit_tests): Likewise.
4726         (switch_conversion::switch_conversion): New class.
4727         (struct switch_conv_info): Remove old struct.
4728         (collect_switch_conv_info): More to ...
4729         (switch_conversion::collect): ... this.
4730         (check_range): Likewise.
4731         (switch_conversion::check_range): Likewise.
4732         (check_all_empty_except_final): Likewise.
4733         (switch_conversion::check_all_empty_except_final): Likewise.
4734         (check_final_bb): Likewise.
4735         (switch_conversion::check_final_bb): Likewise.
4736         (create_temp_arrays): Likewise.
4737         (switch_conversion::create_temp_arrays): Likewise.
4738         (free_temp_arrays): Likewise.
4739         (gather_default_values): Likewise.
4740         (switch_conversion::gather_default_values): Likewise.
4741         (build_constructors): Likewise.
4742         (switch_conversion::build_constructors): Likewise.
4743         (constructor_contains_same_values_p): Likewise.
4744         (switch_conversion::contains_same_values_p): Likewise.
4745         (array_value_type): Likewise.
4746         (switch_conversion::array_value_type): Likewise.
4747         (build_one_array): Likewise.
4748         (switch_conversion::build_one_array): Likewise.
4749         (build_arrays): Likewise.
4750         (switch_conversion::build_arrays): Likewise.
4751         (gen_def_assigns): Likewise.
4752         (switch_conversion::gen_def_assigns): Likewise.
4753         (prune_bbs): Likewise.
4754         (switch_conversion::prune_bbs): Likewise.
4755         (fix_phi_nodes): Likewise.
4756         (switch_conversion::fix_phi_nodes): Likewise.
4757         (gen_inbound_check): Likewise.
4758         (switch_conversion::gen_inbound_check): Likewise.
4759         (process_switch): Use the newly created class.
4760         (switch_conversion::expand): New.
4761         (switch_conversion::~switch_conversion): New.
4762         * tree-switch-conversion.h: New file.
4764 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4766         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4767         tree-vect-patterns.c.
4768         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4769         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
4770         (vect_recog_sad_pattern): Likewise.
4771         (vect_recog_widen_sum_pattern): Likewise.
4772         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
4773         (vect_recog_widen_shift_pattern): Remove the type_in argument.
4774         (vect_recog_rotate_pattern): Likewise.
4775         (vect_recog_mult_pattern): Likewise.
4776         (vect_recog_vector_vector_shift_pattern): Likewise.
4777         (vect_recog_divmod_pattern): Likewise.
4778         (vect_recog_mixed_size_cond_pattern): Likewise.
4779         (vect_recog_bool_pattern): Likewise.
4780         (vect_recog_mask_conversion_pattern): Likewise.
4781         (vect_try_gather_scatter_pattern): Likewise.
4782         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
4783         (vect_recog_over_widening_pattern): Likewise.
4784         (vect_recog_gather_scatter_pattern): Likewise.
4785         (vect_recog_func_ptr): Move from tree-vectorizer.h
4786         (vect_vect_recog_func_ptrs): Move further down the file.
4787         (vect_recog_func): Likewise.  Remove the third argument.
4788         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4789         (vect_pattern_recog_1): Expect the pattern function to do any
4790         necessary target tests.  Also expect it to provide a vector type.
4791         Remove the type_in handling.
4793 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4795         * tree-vect-patterns.c (vect_pattern_detected): New function.
4796         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4797         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4798         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4799         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4800         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4801         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4802         (vect_recog_mask_conversion_pattern)
4803         (vect_try_gather_scatter_pattern): Likewise.
4805 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4807         * tree-vect-patterns.c (vect_get_internal_def): New function.
4808         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4809         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4810         (search_type_for_mask_1): Use it.
4812 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4814         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4815         redundant WIDEN_SUM_EXPR handling.
4816         (vect_recog_sad_pattern): Likewise.
4818 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4820         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4821         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4822         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4823         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4824         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4826 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4828         * tree-vect-stmts.c (vectorizable_call): Make sure that we
4829         use the stmt_vec_info of the original bb statement for the
4830         new zero assignment, even if the call is part of a pattern.
4832 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4834         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4835         that the sequence is attached to the original statement rather
4836         than the pattern statement.
4837         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4838         PATTERN_DEF_SEQ from the original statement rather than
4839         the main pattern statement.
4840         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4841         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4842         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4844 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4846         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4847         definition statements before the early exit for statements that aren't
4848         live or relevant.
4849         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4850         split out from...
4851         (vect_transform_loop): ...here.  Process pattern definition
4852         statements without first checking whether the main pattern
4853         statement is live or relevant.
4855 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
4857         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4858         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4860 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
4862         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4863         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4864         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4865         (expand_block_compare): Change select_block_compare_mode call.
4866         (expand_strncmp_align_check): Use new functions, fix comment.
4867         (emit_final_str_compare_gpr): New function.
4868         (expand_strn_compare): Refactor and clean up code.
4869         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4871 2018-06-19  Tony Reix  <tony.reix@atos.com>
4872             Damien Bergamini  <damien.bergamini@atos.com>
4873             David Edelsohn  <dje.gcc@gmail.com>
4875         * collect2.c (static_obj): New variable.
4876         (static_libs): New variable.
4877         (is_in_list): Uncomment declaration.
4878         (main): Track AIX libraries linked statically.
4879         (is_in_list): Uncomment definition.
4880         (scan_prog_file): Don't add AIX shared libraries initializer
4881         to constructor list if linking statically.
4883 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
4885         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4886         constant.
4887         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4889 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
4891         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4892         blocks.
4894 2018-06-19  Martin Liska  <mliska@suse.cz>
4896         * config/i386/i386.c (ix86_can_inline_p): Do not use
4897         ipa_fn_summaries::get_create.
4898         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4899         get.
4900         (devirtualization_time_bonus): Likewise.
4901         (ipcp_propagate_stage): Likewise.
4902         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4903         (edge_set_predicate): Likewise.
4904         (evaluate_conditions_for_known_args): Likewise.
4905         (evaluate_properties_for_edge): Likewise.
4906         (ipa_call_summary::reset): Tranform to ...
4907         (ipa_call_summary::~ipa_call_summary): ... this.
4908         (ipa_fn_summary::reset): Transform to ...
4909         (ipa_fn_summary::~ipa_fn_summary): ... this.
4910         (ipa_fn_summary_t::remove): Rename to ...
4911         (ipa_fn_summary_t::remove_callees): ... this.
4912         (ipa_fn_summary_t::duplicate): Use placement new
4913         instead of memory copy.
4914         (ipa_call_summary_t::duplicate): Likewise.
4915         (ipa_call_summary_t::remove): Remove.
4916         (dump_ipa_call_summary): Change get_create to get.
4917         (ipa_dump_fn_summary): Dump only when summary exists.
4918         (analyze_function_body): Use symbol_summary::get instead
4919         of get_create.
4920         (compute_fn_summary): Likewise.
4921         (estimate_edge_devirt_benefit): Likewise.
4922         (estimate_edge_size_and_time): Likewise.
4923         (inline_update_callee_summaries): Likewise.
4924         (remap_edge_change_prob): Likewise.
4925         (remap_edge_summaries): Likewise.
4926         (ipa_merge_fn_summary_after_inlining): Likewise.
4927         (write_ipa_call_summary): Likewise.
4928         (ipa_fn_summary_write): Likewise.
4929         (ipa_free_fn_summary): Likewise.
4930         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4931         (struct ipa_call_summary): Likewise.
4932         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4933         of get_create.
4934         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4935         (estimate_size_after_inlining): Likewise.
4936         (estimate_growth): Likewise.
4937         (growth_likely_positive): Likewise.
4938         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4939         (inline_call): Likewise.
4940         * ipa-inline.c (caller_growth_limits): Likewise.
4941         (can_inline_edge_p): Likewise.
4942         (can_inline_edge_by_limits_p): Likewise.
4943         (compute_uninlined_call_time): Likewise.
4944         (compute_inlined_call_time): Likewise.
4945         (want_inline_small_function_p): Likewise.
4946         (edge_badness): Likewise.
4947         (update_caller_keys): Likewise.
4948         (update_callee_keys): Likewise.
4949         (inline_small_functions): Likewise.
4950         (inline_to_all_callers_1): Likewise.
4951         (dump_overall_stats): Likewise.
4952         (early_inline_small_functions): Likewise.
4953         (early_inliner): Likewise.
4954         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4955         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4956         * ipa-pure-const.c (malloc_candidate_p): Likewise.
4957         * ipa-split.c (execute_split_functions): Likewise.
4958         * symbol-summary.h: Likewise.
4959         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4961 2018-06-19  Richard Biener  <rguenther@suse.de>
4963         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4964         (vectorize_loops): ... here.  Fix dbgcnt handling.
4965         (try_vectorize_loop): Wrap try_vectorize_loop_1.
4967 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
4969         PR target/86197
4970         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4971         ieee128 argument takes up only one (vector) register, not two (floating
4972         point) registers.
4974 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
4976         * gimplify.c (gimplify_init_constructor): Really never clear for an
4977         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4979 2018-06-19  Richard Biener  <rguenther@suse.de>
4981         PR tree-optimization/86179
4982         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4983         after failed recognition.
4985 2018-06-18  Martin Sebor  <msebor@redhat.com>
4987         PR middle-end/85602
4988         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4989         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4990         Handle integer subtraction.
4991         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4992         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4994 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
4996         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4997         param from rtx to rtx_insn *.
4998         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4999         param.
5000         (frv_ifcvt_modify_insn): Likwise.
5001         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5002         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
5003         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5004         as_a <rtx_insn *> cast to local "unprotected_region" once
5005         it's been established that it's not NULL or pc_rtx.
5006         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5007         param "sethi" from rtx to rtx_insn *.
5008         (nds32_group_float_insns): Likewise for param "insn".
5009         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5010         param.
5011         (vax_output_int_subtract): Likewise.
5012         * config/vax/vax.c (vax_output_int_add): Likewise for param
5013         "insn".
5014         (vax_output_int_subtract): Likewise.
5015         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5016         (emit_pattern_after): Likewise for param "after".
5017         (emit_insn_after): Likewise.
5018         (emit_jump_insn_after): Likewise.
5019         (emit_call_insn_after): Likewise.
5020         (emit_debug_insn_after): Likewise.
5021         (emit_pattern_before): Likewise for param "before".
5022         (emit_insn_before): Likewise.
5023         (emit_jump_insn_before): Likewise.
5024         * final.c (get_insn_template): Likewise for param "insn", removing
5025         a cast.
5026         * output.h (get_insn_template): Likewise for 2nd param.
5027         * rtl.h (emit_insn_before): Likewise.
5028         (emit_jump_insn_before): Likewise.
5029         (emit_debug_insn_before_noloc): Likewise.
5030         (emit_insn_after): Likewise.
5031         (emit_jump_insn_after): Likewise.
5032         (emit_call_insn_after): Likewise.
5033         (emit_debug_insn_after): Likewise.
5034         (set_insn_deleted): Likewise for param.
5036 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
5038         PR target/85358
5039         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5040         floating point modes, so that IFmode is numerically greater than
5041         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5042         to declare the ordering.  This prevents IFmode from being
5043         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5044         machine.  Include rs6000-modes.h to share the fractional values
5045         between genmodes* and the rest of the compiler.
5046         (IFmode): Likewise.
5047         (KFmode): Likewise.
5048         (TFmode): Likewise.
5049         * config/rs6000/rs6000-modes.h: New file.
5050         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5051         meaning of rs6000_long_double_size so that 126..128 selects an
5052         appropriate 128-bit floating point type.
5053         (rs6000_option_override_internal): Likewise.
5054         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5055         (TARGET_LONG_DOUBLE_128): Change the meaning of
5056         rs6000_long_double_size so that 126..128 selects an appropriate
5057         128-bit floating point type.
5058         (LONG_DOUBLE_TYPE_SIZE): Update comment.
5059         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5060         source and destination to match the standard usage.
5061         (truncifkf2): Likewise.
5062         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5063         ISA 2.07 to use an explicit clobber, instead of passing in a
5064         temporary.
5065         (copysign<mode>3_soft): Likewise.
5067 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
5069         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5070         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5071         (vect_slp_analyze_instance_dependence): Likewise.
5072         (vect_enhance_data_refs_alignment): Likewise.
5073         (vect_analyze_data_refs_alignment): Likewise.
5074         (vect_slp_analyze_and_verify_instance_alignment
5075         (vect_analyze_data_ref_accesses): Likewise.
5076         (vect_prune_runtime_alias_test_list): Likewise.
5077         (vect_analyze_data_refs): Likewise.
5078         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5079         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5080         (vect_analyze_scalar_cycles_1): Likewise.
5081         (vect_get_loop_niters): Likewise.
5082         (vect_analyze_loop_form_1): Likewise.
5083         (vect_update_vf_for_slp): Likewise.
5084         (vect_analyze_loop_operations): Likewise.
5085         (vect_analyze_loop): Likewise.
5086         (vectorizable_induction): Likewise.
5087         (vect_transform_loop): Likewise.
5088         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5089         * tree-vect-slp.c (vect_analyze_slp): Likewise.
5090         (vect_make_slp_decision): Likewise.
5091         (vect_detect_hybrid_slp): Likewise.
5092         (vect_slp_analyze_operations): Likewise.
5093         (vect_slp_bb): Likewise.
5094         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5095         (vectorizable_bswap): Likewise.
5096         (vectorizable_call): Likewise.
5097         (vectorizable_simd_clone_call): Likewise.
5098         (vectorizable_conversion): Likewise.
5099         (vectorizable_assignment): Likewise.
5100         (vectorizable_shift): Likewise.
5101         (vectorizable_operation): Likewise.
5102         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5104 2018-06-18  Martin Sebor  <msebor@redhat.com>
5106         PR tree-optimization/81384
5107         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5108         * builtins.c (expand_builtin_strnlen): New function.
5109         (expand_builtin): Call it.
5110         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5111         * builtins.def (BUILT_IN_STRNLEN): New.
5112         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5113         Warn for bounds in excess of maximum object size.
5114         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5115         single-value ranges.  Handle strnlen.
5116         (handle_builtin_strlen): Handle strnlen.
5117         (strlen_check_and_optimize_stmt): Same.
5118         * doc/extend.texi (Other Builtins): Document strnlen.
5120 2018-06-18  Maya Rashish  <coypu@sdf.org>
5122         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5123         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5124         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5126         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5127         here to ...
5128         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5130 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5132         * tree.c (escaped_string::escape): Replace cast to char * by
5133         const_cast<char *> (unescaped).
5135 2018-06-18  Nick Clifton  <nickc@redhat.com>
5137         PR 84195
5138         * tree.c (escaped_string): New class.  Converts an unescaped
5139         string into its escaped equivalent.
5140         (warn_deprecated_use): Use the new class to convert the
5141         deprecation message, if present.
5142         (test_escaped_strings): New self test.
5143         (test_c_tests): Add test_escaped_strings.
5144         * doc/extend.texi (deprecated): Add a note that the
5145         deprecation message is affected by the -fmessage-length
5146         option, and that control characters will be escaped.
5147         (#pragma GCC error): Document this pragma.
5148         (#pragma GCC warning): Likewise.
5149         * doc/invoke.texi (-fmessage-length): Document this option's
5150         effect on the #warning and #error preprocessor directives and
5151         the deprecated attribute.
5153 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
5155         * tree.c (decl_value_expr_lookup): Revert latest change.
5156         (decl_value_expr_insert): Likewise.
5158 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
5160         * gimplify.c (nonlocal_vlas): Delete.
5161         (nonlocal_vla_vars): Likewise.
5162         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5163         referenced VLAs.
5164         (gimplify_body): Do not create and destroy nonlocal_vlas.
5165         * tree-nested.c: Include diagnostic.h.
5166         (use_pointer_in_frame): Tweak.
5167         (lookup_field_for_decl): Add assertion and declare the transformation.
5168         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5169         internal error when the reference is in a wrong context.  Do not
5170         create a debug decl by default.
5171         (note_nonlocal_block_vlas): Delete.
5172         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5173         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
5174         create a debug decl by default.
5175         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5176         call is in a wrong context.
5177         (fixup_vla_decls): New function.
5178         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
5179         debug variables were created.
5180         * tree.c (decl_value_expr_lookup): Add checking assertion.
5181         (decl_value_expr_insert): Likewise.
5183 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
5185         PR middle-end/82479
5186         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5187         * tree-scalar-evolution.c (interpret_expr): Likewise.
5188         (expression_expensive_p): Likewise.
5189         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5190         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5191         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5192         (ssa_defined_by_minus_one_stmt_p): New.
5194 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
5196         PR middle-end/64946
5197         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5198         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5199         * dojump.c (do_jump): Likewise.
5200         * expr.c (expand_expr_real_2): Check operand type's sign.
5201         * fold-const.c (const_unop): Handle ABSU_EXPR.
5202         (fold_abs_const): Likewise.
5203         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5204         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5205         (strip_sign_op_1): Likesise.
5206         * match.pd: Add new pattern to generate ABSU_EXPR.
5207         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5208         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5209         * tree-eh.c (operation_could_trap_helper_p): Likewise.
5210         * tree-inline.c (estimate_operator_cost): Likewise.
5211         * tree-pretty-print.c (dump_generic_node): Likewise.
5212         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5213         * tree.def (ABSU_EXPR): New.
5215 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
5217         PR middle-end/86095
5218         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5219         documented as preserved for backward compatibility only.
5220         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5222         PR rtl-optimization/86108
5223         * bb-reorder.c (create_forwarder_block): Renamed to ...
5224         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
5225         jump from new landing pad to the second part.
5226         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5227         Adjust callers.
5229 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
5231         PR middle-end/85878
5232         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5233         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5234         Only call store_expr for halves if the mode is the same.
5236         PR middle-end/86123
5237         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5238         Fix up comment formatting.
5240 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5242         * typed-splay-tree.h (typed_splay_tree::remove): New function.
5243         (typed_splay_tree::closure,
5244         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5245         (typed_splay_tree::typed_splay_tree,
5246         typed_splay_tree::operator =): Declared private.
5247         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5248         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5249         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5250         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5251         typed_splay_tree::splay_tree_splay,
5252         typed_splay_tree::splay_tree_foreach_helper,
5253         typed_splay_tree::splay_tree_insert,
5254         typed_splay_tree::splay_tree_remove,
5255         typed_splay_tree::splay_tree_lookup,
5256         typed_splay_tree::splay_tree_predecessor,
5257         typed_splay_tree::splay_tree_successor,
5258         typed_splay_tree::splay_tree_min,
5259         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5260         (typed_splay_tree::root, typed_splay_tree::comp,
5261         typed_splay_tree::delete_key,
5262         typed_splay_tree::delete_value): New data members.
5263         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5264         typed_splay_tree::remove.
5266 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
5268         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5269         -mginv and -mno-ginv to the assembler.
5270         * config/mips/mips.opt (-mcrc): New option.
5271         (-mginv): Likewise.
5272         * doc/invoke.text (-mcrc): Document.
5273         (-mginv): Likewise.
5275 2018-06-15  Nick Clifton  <nickc@redhat.com>
5277         PR 84195
5278         * tree.c (escaped_string): New class.  Converts an unescaped
5279         string into its escaped equivalent.
5280         (warn_deprecated_use): Use the new class to convert the
5281         deprecation message, if present.
5282         (test_escaped_strings): New self test.
5283         (test_c_tests): Add test_escaped_strings.
5284         * doc/extend.texi (deprecated): Add a note that the
5285         deprecation message is affected by the -fmessage-length
5286         option, and that control characters will be escaped.
5287         (#pragma GCC error): Document this pragma.
5288         (#pragma GCC warning): Likewise.
5289         * doc/invoke.texi (-fmessage-length): Document this option's
5290         effect on the #warning and #error preprocessor directives and
5291         the deprecated attribute.
5293 2018-06-15  Richard Biener  <rguenther@suse.de>
5295         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5296         here, also noting vector size used.
5297         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
5298         size used in MSG_OPTIMIZED_LOCATIONS dump.
5299         (pass_slp_vectorize::execute): Adjust.
5301 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
5303         PR target/85968
5304         * config/arc/arc.c (arc_return_address_register): Fix
5305         if-condition.
5307 2018-06-15  Richard Biener  <rguenther@suse.de>
5309         PR middle-end/86159
5310         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5311         leave useless conversion stripping to force_gimple_operand_gsi.
5312         (gimplify_build2): Likewise.
5313         (gimplify_build1): Likewise.
5315 2018-06-15  Richard Biener  <rguenther@suse.de>
5317         PR middle-end/86076
5318         * tree-cfg.c (move_stmt_op): unshare invariant addresses
5319         before adjusting their block.
5321 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5323         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5324         multilibs for *-*-rtems*.
5325         * config/riscv/t-rtems: New file.
5327 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
5329         PR middle-end/86122
5330         * match.pd ((A +- CST1) +- CST2): Punt if last resort
5331         unsigned_type_for returns NULL.
5333         PR target/85945
5334         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5335         subregs of multi-word pseudos unless the float mode has word size.
5337 2018-06-14  Richard Biener  <rguenther@suse.de>
5339         PR middle-end/86139
5340         * tree-vect-generic.c (build_word_mode_vector_type): Remove
5341         duplicate and harmful type_hash_canon.
5342         * tree.c (type_hash_canon): Assert we didn't find ourselves.
5344 2018-06-14  Richard Biener  <rguenther@suse.de>
5346         PR ipa/86124
5347         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5348         NULL cgraph_node.
5350 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5352         * config/rtems.h (STDINT_LONG32): Define.
5354 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
5355             Prachi Godbole  <prachi.godbole@imgtec.com>
5357         * config/mips/mips-cpus.def: Define P6600.
5358         * config/mips/mips-tables.opt: Regenerate.
5359         * config/mips/mips.c (mips_ucbranch_type): New enum.
5360         (mips_rtx_cost_data): Add support for P6600.
5361         (mips_issue_rate): Likewise.
5362         (mips_multipass_dfa_lookahead): Likewise.
5363         (mips_avoid_hazard): Likewise.
5364         (mips_reorg_process_insns): Likewise.
5365         (mips_classify_branch_p6600): New function.
5366         * config/mips/mips.h (TUNE_P6600): New define.
5367         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5368         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5369         * config/mips/mips.md: Include p6600.md.
5370         (processor): Add p6600.
5371         * config/mips/p6600.md: New file.
5372         * doc/invoke.texi: Add p6600 to supported architectures.
5374 2018-06-13  Martin Sebor  <msebor@redhat.com>
5376         PR tree-optimization/86114
5377         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5378         of integer types.
5379         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5381 2018-06-13  Richard Biener  <rguenther@suse.de>
5383         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5384         Properly set vector type of the intermediate stmt.
5385         * tree-vect-stmts.c (vectorizable_operation): The destination
5386         var always has vectype_out type.
5388 2018-06-13  Jeff Law  <law@redhat.com>
5390         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5391         integer 0 for argument to print_rtl_with_bb.
5392         (rl78_reorg): Likewise.
5394 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
5396         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5397         from rtx to rtx_insn *.
5398         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5399         "label".
5400         (add_sched_insns_for_speculation): Likewise for local "target",
5401         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5402         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5403         from rtx_insn ** to rtx_code_label **.
5404         (reorg_emit_nops): Likewise.
5405         (c6x_reorg): Likewise for local "call_labels".
5406         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5407         rtx to rtx_insn *.
5408         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5409         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5410         the loops over LABEL_REFS.
5411         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5412         braf_label.
5413         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5414         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5415         (split_branches): Strengthen local "olabel" from rtx to
5416         rtx_insn *, adding a safe_as_a cast.
5417         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5418         to "rtx_insn *".
5419         (add_insn_after): Likewise for first two params.
5420         (add_insn_before): Likewise.
5421         (remove_insn): Likewise for param.
5422         (emit_pattern_before_noloc): Likewise for second and third params.
5423         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5424         (emit_call_insn_before_noloc): Likewise.
5425         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5426         to "rtx_insn *".
5427         (emit_barrier_before): Likewise.
5428         (emit_label_before): Strengthen "label" param from "rtx" to
5429         "rtx_code_label *".  Strengthen "before" param from "rtx" to
5430         "rtx_insn *".
5431         (emit_insn_after_1): Strengthen "after" param from "rtx" to
5432         "rtx_insn *".
5433         (emit_pattern_after_noloc): Likewise.
5434         (emit_insn_after_noloc): Likewise.
5435         (emit_jump_insn_after_noloc): Likewise.
5436         (emit_call_insn_after_noloc): Likewise.
5437         (emit_debug_insn_after_noloc): Likewise.
5438         (emit_barrier_after): Likewise.
5439         (emit_label_after): Likewise for both params.
5440         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
5441         "loc" param from "int" to "location_t".
5442         (emit_insn_after_setloc): Likewise.
5443         (emit_jump_insn_after_setloc): Likewise.
5444         (emit_call_insn_after_setloc): Likewise.
5445         (emit_debug_insn_after_setloc): Likewise.
5446         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
5447         "loc" param from "int" to "location_t".
5448         (emit_pattern_before): Convert NULL_RTX to NULL.
5449         (emit_insn_before_setloc): Convert "loc" param from "int" to
5450         "location_t".
5451         (emit_jump_insn_before_setloc): Likewise.
5452         (emit_call_insn_before_setloc): Likewise.
5453         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5454         rtx_insn *.  Convert "loc" param from "int" to "location_t".
5455         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5456         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5457         Convert 3rd param from "int" to "location_t".
5458         (emit_barrier_before, emit_barrier_after, next_real_insn):
5459         Strengthen param from rtx to rtx_insn *.
5460         (emit_label_before): Strengthen 1st param from "rtx" to
5461         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
5462         "rtx_insn *".
5463         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5464         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5465         Strengthen 2nd param from "rtx" to "rtx_insn *".
5466         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5467         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5468         Likewise. Convert 3rd param from "int" to "location_t".
5469         (emit_label_after): Strengthen 1st param from "rtx" to
5470         "rtx_code_label *".
5471         (next_real_insn, remove_insn): Strengthen param from "rtx" to
5472         "rtx_insn *".
5473         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5474         from "rtx" to "rtx_insn *".
5476 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
5478         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5479         bodies streamed in with -Q.
5480         * dumpfile.c (dump_files): Add lto-stream-out dump file.
5481         * dumpfile.h (tree_dump_index): Add lto_stream_out.
5482         * gimple-streamer-out.c: Include gimple-pretty-print.h
5483         (output_bb): Dump stmts streamed.
5484         * lto-section-out.c: Include print-tree.h
5485         (lto_begin_section): Dump sections created.
5486         (lto_output_decl_index): Dump decl encoded.
5487         * lto-streamer-out.c: Include print-tree.h
5488         (create_output_block): Dump output block created.
5489         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5490         (output_function): Dump function output.
5491         (output_constructor): Dump constructor streamed.
5492         (write_global_stream): Output indexes encoded.
5493         (produce_asm_for_decls): Dump streams encoded.
5494         * lto-streamer.c (streamer_dump_file): New global var.
5495         * lto-streamer.h (streamer_dump_file): Declare.
5496         * passes.c (ipa_write_summaries): Initialize streamer dump.
5497         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5498         in.
5500 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
5502         PR target/86048
5503         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5504         offsets for register save directives.  Emit a second batch of save
5505         directives, if need be, when the function accesses prior frames.
5507 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5509         * config/arc/fpu.md (fmasf4): Force operand to register.
5510         (fnmasf4): Likewise.
5512 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5514         * config/arc/arc-protos.h (arc_pad_return): Remove.
5515         * config/arc/arc.c (machine_function): Remove force_short_suffix
5516         and size_reason.
5517         (arc_print_operand): Adjust printing of '&'.
5518         (arc_verify_short): Remove conditional printing of short suffix.
5519         (arc_final_prescan_insn): Remove reference to size_reason.
5520         (pad_return): New function.
5521         (arc_reorg): Call pad_return.
5522         (arc_pad_return): Remove.
5523         (arc_init_machine_status): Remove reference to force_short_suffix.
5524         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5525         (attr length): When attribute iscompact is true force to 2
5526         regardless; in the case of maybe check if we want to force the
5527         instruction to have 4 bytes length.
5528         (nopv): Change it to generate 4 byte long nop as well.
5529         (blockage): New pattern.
5530         (simple_return): Remove call to arc_pad_return.
5531         (p_return_i): Likewise.
5533 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5535         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5537 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5539         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5540         ARC cores.
5542 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5544         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5545         for ARC700 and ARCv2.
5547 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
5549         PR target/86076
5550         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5551         operands[2] instead of operands[1].
5554 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
5556         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5557         case, check whether the outer register overlaps an unallocatable
5558         register, not just whether it fits the required class.
5560 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
5562         * poly-int.h (can_div_trunc_p): Add new overload in which all values
5563         are poly_ints.
5564         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5565         (memrefs_conflict_p): Likewise.
5566         (init_alias_analysis): Likewise.
5567         * cfgexpand.c (expand_debug_expr): Likewise.
5568         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5569         * cse.c (fold_rtx): Likewise.
5570         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5571         * expr.c (emit_block_move_hints): Likewise.
5572         (clear_storage_hints, push_block, emit_push_insn): Likewise.
5573         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5574         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5575         (emit_group_store): Likewise.
5576         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
5577         to read the PRE/POST_MODIFY increment.
5578         * calls.c (store_one_arg): Use strip_offset.
5579         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5580         poly_int_rtx_p.
5581         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5582         by a VEC_SELECT.
5583         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5584         (simplify_binary_operation_1): Extend CONST_INT handling to
5585         poly_int_rtx_p.
5586         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5587         than a HOST_WIDE_INT.
5588         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5589         poly_int64.
5590         (adjust_mems, add_stores): Update accodingly.
5591         (vt_canonicalize_addr): Track polynomial offsets.
5592         (emit_note_insn_var_location): Likewise.
5593         (vt_add_function_parameter): Likewise.
5594         (vt_initialize): Likewise.
5596 2018-06-12  Jeff Law  <law@redhat.com>
5598         * config.gcc (alpha*-*-freebsd*): Remove.
5599         * config/alpha/freebsd.h: Remove.
5601 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
5603         PR other/69968
5604         * spellcheck-tree.c (levenshtein_distance): Rename to...
5605         (get_edit_distance): ...this, and update for underlying renaming.
5606         * spellcheck-tree.h (levenshtein_distance): Rename to...
5607         (get_edit_distance): ...this.
5608         * spellcheck.c (levenshtein_distance): Rename to...
5609         (get_edit_distance): ...this.  Convert from Levenshtein distance
5610         to Damerau-Levenshtein distance by supporting transpositions of
5611         adjacent characters.  Rename "v1" to "v_next" and "v0" to
5612         "v_one_ago".
5613         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5614         (selftest::test_edit_distance_unit_test_oneway): ...this, and
5615         update for underlying renaming.
5616         (selftest::levenshtein_distance_unit_test): Rename to...
5617         (selftest::test_get_edit_distance_unit): ...this, and update for
5618         underlying renaming.
5619         (selftest::test_find_closest_string): Add example from PR 69968
5620         where transposition helps
5621         (selftest::test_metric_conditions): Update for renaming.
5622         (selftest::test_metric_conditions): Likewise.
5623         (selftest::spellcheck_c_tests): Likewise.
5624         * spellcheck.h (levenshtein_distance): Rename both overloads to...
5625         (get_edit_distance): ...this.
5626         (best_match::consider): Update for renaming.
5628 2018-06-12  Martin Sebor  <msebor@redhat.com>
5630         PR tree-optimization/85259
5631         * builtins.c (compute_objsize): Handle constant offsets.
5632         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5633         true iff a warning has been issued.
5634         * gimple.h (gimple_nonartificial_location): New function.
5635         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5636         gimple_nonartificial_location and handle -Wno-system-headers.
5637         (handle_builtin_stxncpy): Same.
5639 2018-06-12  Martin Sebor  <msebor@redhat.com>
5641         PR c/85931
5642         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5644 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
5646         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5647         BUILTIN_VEC_XST entries for pointer to double and long long.
5649 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
5651         PR target/85990
5652         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5653         Update comments.
5654         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5655         Likewise.
5657 2018-06-12  Martin Liska  <mliska@suse.cz>
5659         * doc/options.texi: Document IntegerRange.
5661 2018-06-12  Martin Liska  <mliska@suse.cz>
5663         * config/i386/i386.opt: Make MPX-related options as Deprecated.
5664         * opt-functions.awk: Handle Deprecated flag.
5665         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5666         and report error.
5667         (read_cmdline_option): Report warning for a deprecated option.
5668         * opts.h (struct cl_option): Add new field cl_deprecated.
5669         (CL_ERR_DEPRECATED): New.
5671 2018-06-12  Martin Liska  <mliska@suse.cz>
5673         * doc/options.texi: Document Deprecated option flag.
5675 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5677         * config/arc/arc-arch.h (arc_extras): New enum.
5678         (arc_cpu_t):Add field extra.
5679         (arc_cpu_types): Consider the extras.
5680         * config/arc/arc-cpus.def: Add extras info.
5681         * config/arc/arc-opts.h (processor_type): Consider extra field.
5682         * config/arc/arc.c (arc_override_options): Handle extra field.
5684 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5686         * config/arc/arc-arch.h: Update ARC_OPTX macro.
5687         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5688         field.
5689         * config/arc/arc.c (arc_init): Update pic warning.
5690         (irq_range): Update irq range parsing warnings.
5691         (arc_override_options): Update various warning messages.
5692         (arc_handle_aux_attribute): Likewise.
5694 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
5696         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5698 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5700         * doc/sourcebuild.texi: Document usage of line number 0 in verify
5701         compiler messages directives.
5703 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
5705         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5706         * config/mips/mips-tables.opt: Regenerate.
5707         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5708         mips64r6.
5709         * doc/invoke.texi: Document -march=i6500.
5711 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
5713         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5714         (i6400_gpmul): Add cpu_unit.
5715         (i6400_gpdiv): Likewise.
5716         (i6400_msa_add_d): Update reservations.
5717         (i6400_msa_int_add) Likewise.
5718         (i6400_msa_short_logic3) Likewise.
5719         (i6400_msa_short_logic2) Likewise.
5720         (i6400_msa_short_logic) Likewise.
5721         (i6400_msa_move) Likewise.
5722         (i6400_msa_cmp) Likewise.
5723         (i6400_msa_short_float2) Likewise.
5724         (i6400_msa_div_d) Likewise.
5725         (i6400_msa_long_logic1) Likewise.
5726         (i6400_msa_long_logic2) Likewise.
5727         (i6400_msa_mult) Likewise.
5728         (i6400_msa_long_float2) Likewise.
5729         (i6400_msa_long_float4) Likewise.
5730         (i6400_msa_long_float5) Likewise.
5731         (i6400_msa_long_float8) Likewise.
5732         (i6400_fpu_fadd): Include frint type.
5733         (i6400_fpu_store): New define_insn_reservation.
5734         (i6400_fpu_load): Likewise.
5735         (i6400_fpu_move): Likewise.
5736         (i6400_fpu_fcmp): Likewise.
5737         (i6400_fpu_fmadd): Likewise.
5738         (i6400_int_mult): Include imul3nc type and update reservation.
5739         (i6400_int_div): Include idiv3 type and update reservation.
5740         (i6400_int_load): Update to check type not move_type.
5741         (i6400_int_store): Likewise.
5742         (i6400_int_prefetch): Set zero latency.
5744 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5746         * gcc.c: Document new %@{...} sequence.
5747         (LINK_COMMAND_SPEC): Use it for the -L switches.
5748         (cpp_unique_options): Use it for the -I switches.
5749         (at_file_argbuf): New global variable.
5750         (in_at_file): Likewise.
5751         (alloc_args): Create at_file_argbuf.
5752         (clear_args): Truncate at_file_argbuf.
5753         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5754         (open_at_file): New function.
5755         (close_at_file): Likewise.
5756         (create_at_file): Delete.
5757         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5758         <'o'>: Likewise.
5759         <'@'>: New case.
5760         (validate_switches_from_spec): Deal with %@{...} sequence.
5761         (validate_switches): Likewise.
5762         (driver::finalize): Call clear_args.
5764 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
5766         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5768 2018-06-11  Martin Sebor  <msebor@redhat.com>
5770         * doc/invoke.texi (-Wall): List -Wc++17-compat.
5771         (Wno-class-memaccess): Add @opindex.
5772         (Wno-templates, Wno-multiple-inheritance): Same.
5773         (Wno-virtual-inheritance, Wno-namespaces): Same.
5774         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5775         (Wno-format-overflow, Wno-format-truncation): Same.
5776         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5777         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5778         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5779         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5780         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5781         (Wno-misspelled-isr): Same.
5783 2018-06-11  Martin Sebor  <msebor@redhat.com>
5785         * PR tree-optimization/86083
5786         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5788 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5790         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5792 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
5794         PR target/85755
5795         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5796         on the correct operand.
5797         (*movdi_internal64): Ditto.
5799 2018-06-11  Martin Liska  <mliska@suse.cz>
5801         PR tree-optimization/86089
5802         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5804 2018-06-11  Julia Koval  <julia.koval@intel.com>
5806         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5807         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5808         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5810 2018-06-11  Olivier Hainque  <hainque@adacore.com>
5812         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5813         for Ada with strict dwarf2.
5815 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
5817         PR target/85755
5818         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5819         addresses.
5821 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
5823         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5825 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
5827         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5828         TARGET_ELF.
5830 2018-06-08  Martin Liska  <mliska@suse.cz>
5832         * tree-cfg.h (debug_function): Fix argument type to match
5833         implementation.
5835 2018-06-08  Martin Liska  <mliska@suse.cz>
5837         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5838         Remove usage of MPX-related (and removed) fields.
5839         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5841 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
5843         * cfg.c (debug): Use TDF_NONE rather than 0.
5844         * cfghooks.c (debug): Likewise.
5845         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5846         (struct dump_option_value_info): Convert to...
5847         (struct kv_pair): ...this template type.
5848         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5849         rather than 0.
5850         (optinfo_verbosity_options): Likewise.
5851         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5852         OPTGROUP_NONE.
5853         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5854         than int for "optgroup_flags" param.
5855         (dump_generic_expr_loc): Use dump_flags_t rather than int for
5856         "dump_kind" param.
5857         (dump_dec): Likewise.
5858         (dump_finish): Use TDF_NONE rather than 0.
5859         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5860         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
5861         than 0.  Update for change to option_ptr.
5862         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5863         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
5864         0.  Update for changes to optinfo_verbosity_options and
5865         optgroup_options.
5866         (opt_info_switch_p): Convert optgroup_flags from int to
5867         optgroup_flags_t.
5868         (dump_basic_block): Use dump_flags_t rather than int
5869         for "dump_kind" param.
5870         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5871         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5872         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5873         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5874         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5875         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5876         TDF_NONE): Convert from macros to...
5877         (enum dump_flag): ...this new enum.
5878         (dump_flags_t): Update to use enum.
5879         (operator|, operator&, operator~, operator|=, operator&=):
5880         Implement for dump_flags_t.
5881         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5882         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5883         Convert from macros to...
5884         (enum optgroup_flag): ...this new enum.
5885         (optgroup_flags_t): New typedef.
5886         (operator|, operator|=): Implement for optgroup_flags_t.
5887         (struct dump_file_info): Convert field "alt_flags" to
5888         dump_flags_t.  Convert field "optgroup_flags" to
5889         optgroup_flags_t.
5890         (dump_basic_block): Use dump_flags_t rather than int for param.
5891         (dump_generic_expr_loc): Likewise.
5892         (dump_dec): Likewise.
5893         (dump_register): Convert param "optgroup_flags" to
5894         optgroup_flags_t.
5895         (opt_info_enable_passes): Likewise.
5896         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5897         than 0.
5898         * gimple-pretty-print.c (debug): Likewise.
5899         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5900         (merged_store_group::apply_stores): Likewise.
5901         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5902         * gimple.c (verify_gimple_pp): Likewise.
5903         * graphite-poly.c (print_pbb_body): Likewise.
5904         * passes.c (pass_manager::register_one_dump_file): Convert
5905         local "optgroup_flags" to optgroup_flags_t.
5906         * print-tree.c (print_node): Use TDF_NONE rather than 0.
5907         (debug): Likewise.
5908         (debug_body): Likewise.
5909         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5910         to optgroup_flags_t.
5911         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5912         than 0.
5913         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5914         (convert_mult_to_fma): Likewise.
5915         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5916         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5917         * tree-vect-data-refs.c (dump_lower_bound): Convert param
5918         "dump_kind" to dump_flags_t.
5920 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
5922         * config/rs6000/rs6000.c (min, max): Delete.
5924 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
5926         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5927         -mabi=spe and -mabi=no-spe.
5929 2018-06-08  Martin Liska  <mliska@suse.cz>
5931         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5932         where we expect an existing summary.
5934 2018-06-08  Martin Liska  <mliska@suse.cz>
5936         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5937         * ipa-inline.h (estimate_edge_growth): Likewise.
5939 2018-06-08  Martin Liska  <mliska@suse.cz>
5941         * cgraph.c (function_version_hasher::hash): Use
5942         cgraph_node::get_uid ().
5943         (function_version_hasher::equal):
5944         * cgraph.h (cgraph_node::get_uid): New method.
5945         * ipa-inline.c (update_caller_keys): Use
5946         cgraph_node::get_uid ().
5947         (update_callee_keys): Likewise.
5948         * ipa-utils.c (searchc): Likewise.
5949         (ipa_reduced_postorder): Likewise.
5950         * lto-cgraph.c (input_node): Likewise.
5951         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5952         * symbol-summary.h (symtab_insertion): Likewise.
5953         (symtab_removal): Likewise.
5954         (symtab_duplication): Likewise.
5955         * tree-pretty-print.c (dump_function_header): Likewise.
5956         * tree-sra.c (convert_callers_for_node): Likewise.
5958 2018-06-08  Martin Liska  <mliska@suse.cz>
5960         * cgraph.c (symbol_table::create_edge): Always assign a new
5961         unique number.
5962         (symbol_table::free_edge): Do not recycle numbers.
5963         * cgraph.h (cgraph_edge::get): New method.
5964         * symbol-summary.h (symtab_removal): Use it.
5965         (symtab_duplication): Likewise.
5966         (call_summary::hashable_uid): Remove.
5968 2018-06-08  Martin Liska  <mliska@suse.cz>
5970         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5971         (initialize_growth_caches): Remove.
5972         (free_growth_caches): Likewise.
5973         (do_estimate_edge_time): Use edge_growth_cache.
5974         (do_estimate_edge_size): Likewise.
5975         (do_estimate_edge_hints): Likewise.
5976         * ipa-inline.c (reset_edge_caches): Likewise.
5977         (recursive_inlining): Likewise.
5978         (inline_small_functions): Likewise.
5979         * ipa-inline.h (initialize_growth_caches): Remove.
5980         (estimate_edge_size): Likewise.
5981         (estimate_edge_time): Likewise.
5982         (estimate_edge_hints): Likewise.
5983         (reset_edge_growth_cache): Likewise.
5984         * symbol-summary.h (call_summary::remove): New method.
5986 2018-06-08  Martin Liska  <mliska@suse.cz>
5988         * ipa-cp.c (class edge_clone_summary): New summary.
5989         (grow_edge_clone_vectors): Remove.
5990         (ipcp_edge_duplication_hook): Remove.
5991         (class edge_clone_summary_t): New call_summary class.
5992         (ipcp_edge_removal_hook): Remove.
5993         (edge_clone_summary_t::duplicate): New function.
5994         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5995         (create_specialized_node): Likewise.
5996         (ipcp_driver): Initialize edge_clone_summaries and do not
5997         register hooks.
5999 2018-06-08  Martin Liska  <mliska@suse.cz>
6001         * symbol-summary.h (get): New function.
6002         (call_summary::m_initialize_when_cloning): New class member.
6004 2018-06-08  Martin Liska  <mliska@suse.cz>
6006         * cgraph.c (cgraph_node::remove): Do not recycle uid.
6007         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6008         (symbol_table::allocate_cgraph_symbol): Do not set uid.
6009         * passes.c (uid_hash_t): Record removed_nodes by their uids.
6010         (remove_cgraph_node_from_order): Use the removed_nodes set.
6011         (do_per_function_toporder): Likwise.
6012         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6013         instead of summary_uid.
6014         (symtab_removal): Likewise.
6015         (symtab_duplication): Likewise.
6017 2018-06-08  Martin Liska  <mliska@suse.cz>
6019         * ipa-cp.c (ipcp_store_bits_results): Use
6020         ipcp_transformation_sum.
6021         (ipcp_store_vr_results): Likewise.
6022         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6023         to ...
6024         (ipcp_transformation_initialize): ... this.
6025         (ipa_set_node_agg_value_chain):
6026         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6027         (write_ipcp_transformation_info): Likewise.
6028         (read_ipcp_transformation_info): Likewise.
6029         (ipcp_update_bits): Likewise.
6030         (ipcp_update_vr): Likewise.
6031         (ipcp_transform_function): Likewise.
6032         * ipa-prop.h: Rename ipcp_transformation_summary to
6033         ipcp_transformation.
6034         (class ipcp_transformation_t): New function summary.
6035         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6036         (ipa_get_agg_replacements_for_node): Likewise.
6038 2018-06-08  Martin Liska  <mliska@suse.cz>
6040         * ipa-pure-const.c (struct funct_state_d): Do it class instead
6041         of struct.
6042         (class funct_state_summary_t): New function_summary class.
6043         (has_function_state): Remove.
6044         (get_function_state): Likewise.
6045         (set_function_state): Likewise.
6046         (add_new_function): Likewise.
6047         (funct_state_summary_t::insert): New function.
6048         (duplicate_node_data): Remove.
6049         (remove_node_data): Remove.
6050         (funct_state_summary_t::duplicate): New function.
6051         (register_hooks): Create new funct_state_summaries.
6052         (pure_const_generate_summary): Use it.
6053         (pure_const_write_summary): Likewise.
6054         (pure_const_read_summary): Likewise.
6055         (propagate_pure_const): Likewise.
6056         (propagate_nothrow): Likewise.
6057         (dump_malloc_lattice): Likewise.
6058         (propagate_malloc): Likewise.
6059         (execute): Do not register hooks, just remove summary
6060         instead.
6061         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6062         constructor.
6064 2018-06-08  Martin Liska  <mliska@suse.cz>
6066         * ipa-reference.c (remove_node_data): Remove.
6067         (duplicate_node_data): Likewise.
6068         (class ipa_ref_var_info_summary_t): New class.
6069         (class ipa_ref_opt_summary_t): Likewise.
6070         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6071         (get_reference_optimization_summary): Use
6072         ipa_ref_opt_sum_summaries.
6073         (set_reference_vars_info): Remove.
6074         (set_reference_optimization_summary): Likewise.
6075         (ipa_init): Create summaries.
6076         (init_function_info): Use function summary.
6077         (ipa_ref_opt_summary_t::duplicate): New function.
6078         (ipa_ref_opt_summary_t::remove): New function.
6079         (get_read_write_all_from_node): Fix GNU coding style.
6080         (propagate): Use function summary.
6081         (write_node_summary_p): Fix GNU coding style.
6082         (stream_out_bitmap): Likewise.
6083         (ipa_reference_read_optimization_summary): Use function summary.
6084         (ipa_reference_c_finalize): Do not release hooks.
6086 2018-06-08  Martin Liska  <mliska@suse.cz>
6088         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6089         (analyze_function_body): Extract multiple calls of get_create.
6090         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6091         * ipa-inline.c (recursive_inlining): Use ::get method.
6092         * ipa-inline.h (estimate_edge_growth): Likewise.
6094 2018-06-08  Martin Liska  <mliska@suse.cz>
6096         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6097         HSA_INVALID.
6098         (hsa_function_summary::hsa_function_summary): Use the new enum
6099         value.
6100         (hsa_gpu_implementation_p): Use hsa_summaries::get.
6101         * hsa-gen.c (hsa_get_host_function): Likewise.
6102         (get_brig_function_name): Likewise.
6103         * ipa-hsa.c (process_hsa_functions): Likewise.
6104         (ipa_hsa_write_summary): Likewise.
6105         * symbol-summary.h (symtab_duplication): Use ::get function/
6106         (get): New function.
6108 2018-06-08  Martin Liska  <mliska@suse.cz>
6110         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6111         of get.
6112         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6113         (hsa_register_kernel): Likewise.
6114         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6115         * hsa-gen.c (hsa_get_host_function): Likewise.
6116         (get_brig_function_name): Likewise.
6117         (generate_hsa): Likewise.
6118         (pass_gen_hsail::execute): Likewise.
6119         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6120         (devirtualization_time_bonus): Likewise.
6121         (ipcp_propagate_stage): Likewise.
6122         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6123         (edge_set_predicate): Likewise.
6124         (evaluate_conditions_for_known_args): Likewise.
6125         (evaluate_properties_for_edge): Likewise.
6126         (ipa_fn_summary::reset): Likewise.
6127         (ipa_fn_summary_t::duplicate): Likewise.
6128         (dump_ipa_call_summary): Likewise.
6129         (ipa_dump_fn_summary): Likewise.
6130         (analyze_function_body): Likewise.
6131         (compute_fn_summary): Likewise.
6132         (estimate_edge_devirt_benefit): Likewise.
6133         (estimate_edge_size_and_time): Likewise.
6134         (estimate_calls_size_and_time): Likewise.
6135         (estimate_node_size_and_time): Likewise.
6136         (inline_update_callee_summaries): Likewise.
6137         (remap_edge_change_prob): Likewise.
6138         (remap_edge_summaries): Likewise.
6139         (ipa_merge_fn_summary_after_inlining): Likewise.
6140         (ipa_update_overall_fn_summary): Likewise.
6141         (read_ipa_call_summary): Likewise.
6142         (inline_read_section): Likewise.
6143         (write_ipa_call_summary): Likewise.
6144         (ipa_fn_summary_write): Likewise.
6145         (ipa_free_fn_summary): Likewise.
6146         * ipa-hsa.c (process_hsa_functions): Likewise.
6147         (ipa_hsa_write_summary): Likewise.
6148         (ipa_hsa_read_section): Likewise.
6149         * ipa-icf.c (sem_function::merge): Likewise.
6150         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6151         (do_estimate_edge_time): Likewise.
6152         (estimate_size_after_inlining): Likewise.
6153         (estimate_growth): Likewise.
6154         (growth_likely_positive): Likewise.
6155         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6156         (inline_call): Likewise.
6157         * ipa-inline.c (caller_growth_limits): Likewise.
6158         (can_inline_edge_p): Likewise.
6159         (can_inline_edge_by_limits_p): Likewise.
6160         (compute_uninlined_call_time): Likewise.
6161         (compute_inlined_call_time): Likewise.
6162         (want_inline_small_function_p): Likewise.
6163         (edge_badness): Likewise.
6164         (update_caller_keys): Likewise.
6165         (update_callee_keys): Likewise.
6166         (recursive_inlining): Likewise.
6167         (inline_small_functions): Likewise.
6168         (inline_to_all_callers_1): Likewise.
6169         (dump_overall_stats): Likewise.
6170         (early_inline_small_functions): Likewise.
6171         (early_inliner): Likewise.
6172         * ipa-inline.h (estimate_edge_growth): Likewise.
6173         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6174         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6175         * ipa-prop.h (IPA_NODE_REF): Likewise.
6176         (IPA_EDGE_REF): Likewise.
6177         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6178         (propagate_malloc): Likewise.
6179         * ipa-split.c (execute_split_functions): Likewise.
6180         * symbol-summary.h: Rename get to get_create.
6181         (get): Likewise.
6182         (get_create): Likewise.
6183         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6185 2018-06-08  Martin Liska  <mliska@suse.cz>
6187         * symbol-summary.h (release): Move definition out of class
6188         declaration.
6189         (symtab_removal): Likewise.
6190         (symtab_duplication): Likewise.
6192 2018-06-08  Martin Liska  <mliska@suse.cz>
6194         * symbol-summary.h (function_summary): Move constructor
6195         implementation out of class declaration.
6196         (release): Likewise.
6197         (symtab_insertion): Likewise.
6198         (symtab_removal): Likewise.
6199         (symtab_duplication): Likewise.
6200         (get): Likewise.
6202 2018-06-08  Martin Liska  <mliska@suse.cz>
6204         * Makefile.in: Remove support for MPX (macros, related functions,
6205         fields in cgraph_node, ...).
6206         * builtin-types.def (BT_BND): Likewise.
6207         (BT_FN_BND_CONST_PTR): Likewise.
6208         (BT_FN_CONST_PTR_BND): Likewise.
6209         (BT_FN_VOID_PTR_BND): Likewise.
6210         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6211         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6212         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6213         (expand_builtin_mempcpy_with_bounds): Likewise.
6214         (expand_builtin_memset_with_bounds): Likewise.
6215         (expand_builtin_memset_args): Likewise.
6216         (std_expand_builtin_va_start): Likewise.
6217         (expand_builtin): Likewise.
6218         (expand_builtin_with_bounds): Likewise.
6219         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6220         (DEF_LIB_BUILTIN_CHKP): Likewise.
6221         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6222         (DEF_CHKP_BUILTIN): Likewise.
6223         (BUILT_IN_MEMCPY): Likewise.
6224         (BUILT_IN_MEMMOVE): Likewise.
6225         (BUILT_IN_MEMPCPY): Likewise.
6226         (BUILT_IN_MEMSET): Likewise.
6227         (BUILT_IN_STPCPY): Likewise.
6228         (BUILT_IN_STRCAT): Likewise.
6229         (BUILT_IN_STRCHR): Likewise.
6230         (BUILT_IN_STRCPY): Likewise.
6231         (BUILT_IN_STRLEN): Likewise.
6232         (BUILT_IN_MEMCPY_CHK): Likewise.
6233         (BUILT_IN_MEMMOVE_CHK): Likewise.
6234         (BUILT_IN_MEMPCPY_CHK): Likewise.
6235         (BUILT_IN_MEMSET_CHK): Likewise.
6236         (BUILT_IN_STPCPY_CHK): Likewise.
6237         (BUILT_IN_STRCAT_CHK): Likewise.
6238         (BUILT_IN_STRCPY_CHK): Likewise.
6239         * calls.c (store_bounds): Likewise.
6240         (emit_call_1): Likewise.
6241         (special_function_p): Likewise.
6242         (maybe_warn_nonstring_arg): Likewise.
6243         (initialize_argument_information): Likewise.
6244         (finalize_must_preallocate): Likewise.
6245         (compute_argument_addresses): Likewise.
6246         (expand_call): Likewise.
6247         * cfgexpand.c (expand_call_stmt): Likewise.
6248         (expand_return): Likewise.
6249         (expand_gimple_stmt_1): Likewise.
6250         (pass_expand::execute): Likewise.
6251         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6252         (cgraph_node::remove): Likewise.
6253         (cgraph_node::dump): Likewise.
6254         (cgraph_node::verify_node): Likewise.
6255         * cgraph.h (chkp_function_instrumented_p): Likewise.
6256         (symtab_node::get_alias_target): Likewise.
6257         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6258         (cgraph_local_p): Likewise.
6259         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6260         (cgraph_edge::rebuild_references): Likewise.
6261         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6262         (walk_polymorphic_call_targets): Likewise.
6263         (cgraph_node::expand_thunk): Likewise.
6264         (symbol_table::output_weakrefs): Likewise.
6265         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6266         (ix86_handle_option): Likewise.
6267         * config/i386/constraints.md: Likewise.
6268         * config/i386/i386-builtin-types.def (BND): Likewise.
6269         (VOID): Likewise.
6270         (PVOID): Likewise.
6271         (ULONG): Likewise.
6272         * config/i386/i386-builtin.def (BDESC_END): Likewise.
6273         (BDESC_FIRST): Likewise.
6274         (BDESC): Likewise.
6275         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6276         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6277         * config/i386/i386.c (enum reg_class): Likewise.
6278         (ix86_target_string): Likewise.
6279         (ix86_option_override_internal): Likewise.
6280         (ix86_conditional_register_usage): Likewise.
6281         (ix86_valid_target_attribute_inner_p): Likewise.
6282         (ix86_set_indirect_branch_type): Likewise.
6283         (ix86_set_current_function): Likewise.
6284         (ix86_function_arg_regno_p): Likewise.
6285         (init_cumulative_args): Likewise.
6286         (ix86_function_arg_advance): Likewise.
6287         (ix86_function_arg): Likewise.
6288         (ix86_pass_by_reference): Likewise.
6289         (ix86_function_value_regno_p): Likewise.
6290         (ix86_function_value_1): Likewise.
6291         (ix86_function_value_bounds): Likewise.
6292         (ix86_return_in_memory): Likewise.
6293         (ix86_setup_incoming_vararg_bounds): Likewise.
6294         (ix86_va_start): Likewise.
6295         (indirect_thunk_need_prefix): Likewise.
6296         (print_reg): Likewise.
6297         (ix86_print_operand): Likewise.
6298         (ix86_expand_call): Likewise.
6299         (ix86_output_function_return): Likewise.
6300         (reg_encoded_number): Likewise.
6301         (BDESC_VERIFYS): Likewise.
6302         (ix86_init_mpx_builtins): Likewise.
6303         (ix86_init_builtins): Likewise.
6304         (ix86_emit_cmove): Likewise.
6305         (ix86_emit_move_max): Likewise.
6306         (ix86_expand_builtin): Likewise.
6307         (ix86_builtin_mpx_function): Likewise.
6308         (ix86_get_arg_address_for_bt): Likewise.
6309         (ix86_load_bounds): Likewise.
6310         (ix86_store_bounds): Likewise.
6311         (ix86_load_returned_bounds): Likewise.
6312         (ix86_store_returned_bounds): Likewise.
6313         (ix86_class_likely_spilled_p): Likewise.
6314         (ix86_hard_regno_mode_ok): Likewise.
6315         (x86_order_regs_for_local_alloc): Likewise.
6316         (ix86_mitigate_rop): Likewise.
6317         (ix86_bnd_prefixed_insn_p): Likewise.
6318         (ix86_mpx_bound_mode): Likewise.
6319         (ix86_make_bounds_constant): Likewise.
6320         (ix86_initialize_bounds): Likewise.
6321         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6322         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6323         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6324         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6325         (TARGET_CHKP_BOUND_MODE): Likewise.
6326         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6327         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6328         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6329         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6330         * config/i386/i386.h (TARGET_MPX): Likewise.
6331         (TARGET_MPX_P): Likewise.
6332         (VALID_BND_REG_MODE): Likewise.
6333         (FIRST_BND_REG): Likewise.
6334         (LAST_BND_REG): Likewise.
6335         (enum reg_class): Likewise.
6336         (BND_REG_P): Likewise.
6337         (BND_REGNO_P): Likewise.
6338         (BNDmode): Likewise.
6339         (ADJUST_INSN_LENGTH): Likewise.
6340         * config/i386/i386.md: Likewise.
6341         * config/i386/i386.opt: Likewise.
6342         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6343         (defined): Likewise.
6344         (LINK_MPX): Likewise.
6345         (MPX_SPEC): Likewise.
6346         (LIBMPX_SPEC): Likewise.
6347         (LIBMPXWRAPPERS_SPEC): Likewise.
6348         (CHKP_SPEC): Likewise.
6349         * config/i386/predicates.md: Likewise.
6350         * dbxout.c (dbxout_type): Likewise.
6351         * doc/extend.texi: Likewise.
6352         * doc/invoke.texi: Likewise.
6353         * doc/md.texi: Likewise.
6354         * doc/tm.texi: Likewise.
6355         * doc/tm.texi.in: Likewise.
6356         * dwarf2out.c (is_base_type): Likewise.
6357         (gen_formal_types_die): Likewise.
6358         (gen_subprogram_die): Likewise.
6359         (gen_type_die_with_usage): Likewise.
6360         (gen_decl_die): Likewise.
6361         (dwarf2out_late_global_decl): Likewise.
6362         * expr.c (expand_assignment): Likewise.
6363         (emit_storent_insn): Likewise.
6364         (store_expr_with_bounds): Likewise.
6365         (store_expr): Likewise.
6366         (expand_expr_real_1): Likewise.
6367         * expr.h (store_expr_with_bounds): Likewise.
6368         * function.c (use_register_for_decl): Likewise.
6369         (struct bounds_parm_data): Likewise.
6370         (assign_parms_augmented_arg_list): Likewise.
6371         (assign_parm_find_entry_rtl): Likewise.
6372         (assign_parm_is_stack_parm): Likewise.
6373         (assign_parm_load_bounds): Likewise.
6374         (assign_bounds): Likewise.
6375         (assign_parms): Likewise.
6376         (expand_function_start): Likewise.
6377         * gcc.c (CHKP_SPEC): Likewise.
6378         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6379         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6380         (wrestrict_dom_walker::check_call): Likewise.
6381         * gimple.c (gimple_build_call_from_tree): Likewise.
6382         * gimple.h (enum gf_mask): Likewise.
6383         (gimple_call_with_bounds_p): Likewise.
6384         (gimple_call_set_with_bounds): Likewise.
6385         * gimplify.c (gimplify_init_constructor): Likewise.
6386         * ipa-cp.c (initialize_node_lattices): Likewise.
6387         (propagate_constants_across_call): Likewise.
6388         (find_more_scalar_values_for_callers_subset): Likewise.
6389         * ipa-hsa.c (process_hsa_functions): Likewise.
6390         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6391         * ipa-icf.c (sem_function::merge): Likewise.
6392         * ipa-inline.c (early_inliner): Likewise.
6393         * ipa-pure-const.c (warn_function_noreturn): Likewise.
6394         (warn_function_cold): Likewise.
6395         (propagate_pure_const): Likewise.
6396         * ipa-ref.h (enum GTY): Likewise.
6397         * ipa-split.c (find_retbnd): Likewise.
6398         (consider_split): Likewise.
6399         (split_function): Likewise.
6400         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6401         * ipa.c (walk_polymorphic_call_targets): Likewise.
6402         (symbol_table::remove_unreachable_nodes): Likewise.
6403         (process_references): Likewise.
6404         (cgraph_build_static_cdtor_1): Likewise.
6405         * lto-cgraph.c (lto_output_node): Likewise.
6406         (output_refs): Likewise.
6407         (compute_ltrans_boundary): Likewise.
6408         (input_overwrite_node): Likewise.
6409         (input_node): Likewise.
6410         (input_cgraph_1): Likewise.
6411         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6412         * passes.c (pass_manager::execute_early_local_passes): Likewise.
6413         (class pass_chkp_instrumentation_passes): Likewise.
6414         (make_pass_chkp_instrumentation_passes): Likewise.
6415         * passes.def: Likewise.
6416         * rtl.h (struct GTY): Likewise.
6417         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6418         * stor-layout.c (layout_type): Likewise.
6419         * symtab.c: Likewise.
6420         * target.def: Likewise.
6421         * targhooks.c (default_chkp_bound_type): Likewise.
6422         (default_chkp_bound_mode): Likewise.
6423         (default_builtin_chkp_function): Likewise.
6424         (default_chkp_function_value_bounds): Likewise.
6425         (default_chkp_make_bounds_constant): Likewise.
6426         (default_chkp_initialize_bounds): Likewise.
6427         * targhooks.h (default_chkp_bound_type): Likewise.
6428         (default_chkp_bound_mode): Likewise.
6429         (default_builtin_chkp_function): Likewise.
6430         (default_chkp_function_value_bounds): Likewise.
6431         (default_chkp_make_bounds_constant): Likewise.
6432         (default_chkp_initialize_bounds): Likewise.
6433         * toplev.c (compile_file): Likewise.
6434         (process_options): Likewise.
6435         * tree-core.h (DEF_BUILTIN): Likewise.
6436         (DEF_BUILTIN_CHKP): Likewise.
6437         * tree-inline.c (declare_return_variable): Likewise.
6438         (remap_gimple_stmt): Likewise.
6439         (copy_bb): Likewise.
6440         (initialize_inlined_parameters): Likewise.
6441         (expand_call_inline): Likewise.
6442         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6443         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6444         (make_pass_ipa_chkp_produce_thunks): Likewise.
6445         (make_pass_chkp): Likewise.
6446         (make_pass_chkp_opt): Likewise.
6447         (make_pass_chkp_instrumentation_passes): Likewise.
6448         * tree-pretty-print.c (dump_generic_node): Likewise.
6449         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6450         * tree-ssa-dce.c (propagate_necessity): Likewise.
6451         (eliminate_unnecessary_stmts): Likewise.
6452         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6453         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6454         * tree-ssa-sccvn.h: Likewise.
6455         * tree-ssa-strlen.c (get_string_length): Likewise.
6456         (valid_builtin_call): Likewise.
6457         (adjust_last_stmt): Likewise.
6458         (handle_builtin_strchr): Likewise.
6459         (handle_builtin_strcpy): Likewise.
6460         (handle_builtin_stxncpy): Likewise.
6461         (handle_builtin_memcpy): Likewise.
6462         (handle_builtin_strcat): Likewise.
6463         (strlen_check_and_optimize_stmt): Likewise.
6464         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6465         * tree-streamer-in.c: Likewise.
6466         * tree-streamer.c (record_common_node): Likewise.
6467         * tree.c (tree_code_size): Likewise.
6468         (wide_int_to_tree_1): Likewise.
6469         (type_contains_placeholder_1): Likewise.
6470         (build_common_tree_nodes): Likewise.
6471         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6472         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6473         (POINTER_BOUNDS_P): Likewise.
6474         (BOUNDED_TYPE_P): Likewise.
6475         (BOUNDED_P): Likewise.
6476         (CALL_WITH_BOUNDS_P): Likewise.
6477         (pointer_bounds_type_node): Likewise.
6478         * value-prof.c (gimple_ic): Likewise.
6479         * var-tracking.c (vt_add_function_parameters): Likewise.
6480         * varasm.c (make_decl_rtl): Likewise.
6481         (assemble_start_function): Likewise.
6482         (output_constant): Likewise.
6483         (maybe_assemble_visibility): Likewise.
6484         * varpool.c (ctor_for_folding): Likewise.
6485         * chkp-builtins.def: Remove.
6486         * ipa-chkp.c: Remove.
6487         * ipa-chkp.h: Remove.
6488         * rtl-chkp.c: Remove.
6489         * rtl-chkp.h: Remove.
6490         * tree-chkp-opt.c: Remove.
6491         * tree-chkp.c: Remove.
6492         * tree-chkp.h: Remove.
6494 2018-06-07  Carl Love  <cel@us.ibm.com>
6496         * config/rs6000/vsx.md (vextract_fp_from_shorth,
6497         vextract_fp_from_shortl): Add BE support.
6499 2018-06-07  Paul Koning  <ni1d@arrl.net>
6501         * compare-elim.c (try_merge_compare): Don't merge compare if
6502         address contains a side effect.
6503         (try_eliminate_compare): Likewise.
6505 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
6507         * config.gcc: Support "tremont".
6508         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6509         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6510         PROCESSOR_TREMONT.
6511         * config/i386/i386.c (m_TREMONT): Define.
6512         (processor_target_table): Add "tremont".
6513         (PTA_TREMONT): Define.
6514         (ix86_lea_outperforms): Add TARGET_TREMONT.
6515         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6516         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6517         and M_INTEL_GOLDMONT_PLUS.
6518         (fold_builtin_cpu): Add "tremont".
6519         (ix86_add_stmt_cost): Add TARGET_TREMONT.
6520         (ix86_option_override_internal): Add "tremont".
6521         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6522         (processor_type): Add PROCESSOR_TREMONT.
6523         * config/i386/x86-tune.def: Add m_TREMONT.
6524         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6526 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6528         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6529         symbol defined for msp430i* devices to be lower case.
6531 2018-06-07  Richard Biener  <rguenther@suse.de>
6533         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6534         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
6535         Properly wrap signed arithmetic if overflow wraps.
6537 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
6539         PR tree-optimization/69615
6540         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6541         of a cast from a same precision integral SSA_NAME in a bb dominated
6542         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
6543         cast to utype if rhs2 has already a compatible type.
6545 2018-06-07  Richard Biener  <rguenther@suse.de>
6547         PR tree-optimization/85935
6548         * graphite-scop-detection.c (find_params_in_bb): Analyze
6549         condition operands with respect to the correct loop.  Assert
6550         the analysis doesn't fail.
6552 2018-06-04  Carl Love  <cel@us.ibm.com>
6554         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6555         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
6556         as it is slightly cheaper.
6557         (first_match_or_eos_index_<mode>):
6558         Calculate index using natural element order.
6559         (first_match_index_<mode>):
6560         Calculate index using natural element order.
6561         (first_match_or_eos_index_<mode>):
6562         Calculate index using natural order.
6563         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6564         for BE and LE modes.
6565         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6566         P9V_BUILTIN_VCLZLSBB_V16QI.
6567         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6568         specific.
6570 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6572         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6573         indentation and line wrap for many prototypes.  Add missing
6574         @smallexample directives around block of prototypes for vec_xl and
6575         vec_xst.
6577 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
6579         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6580         track if we pass or return IEEE 128-bit floating point.
6581         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6582         C++ mangling that is compatible with GCC 8.1.
6583         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6584         (init_cumulative_args): Note if we pass or return IEEE 128-bit
6585         floating point types.
6586         (rs6000_function_arg_advance_1): Likewise.
6587         (rs6000_mangle_type): Optionally generate mangled names that match
6588         what GCC 8.1 generated for IEEE 128-bit floating point types.
6589         (rs6000_globalize_decl_name): If we have an external function that
6590         passes or returns IEEE 128-bit types, generate a weak reference
6591         from the mangled name used in GCC 8.1 to the current mangled
6592         name.
6593         (rs6000_init_builtins): Make __ibm128 use the long double type if
6594         long double is IBM extended double.  Make __float128 use the long
6595         double type if long double is IEEE 128-bit.
6597         PR target/85657
6598         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6599         macro for __ibm128 built-in functions.
6600         (PACK_IF): Add __ibm128 pack/unpack functions.
6601         (UNPACK_IF): Likewise.
6602         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6603         enable long double built-in functions if long double is IEEE
6604         128-bit floating point.
6605         (rs6000_invalid_builtin): Update long double built-in function
6606         error message.
6607         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6608         functions, adjust the built-in function to use the long double
6609         built-in function if __ibm128 and long double are the same type.
6610         * doc/extend.texi (PowerPC builtins): Update documention for
6611         __builtin_{,un}pack_longdouble.  Add documentation for
6612         __builtin_{,un}pack_ibm128.
6614 2018-06-06  Jim Wilson  <jimw@sifive.com>
6616         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6617         (struct machine_function): New field interrupt_mode.
6618         (riscv_handle_type_attribute): New function.  Add forward declaration.
6619         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6620         (riscv_expand_epilogue): Check interrupt_mode field.
6621         (riscv_set_current_function): Check interrupt attribute args and
6622         set interrupt_mode field.
6623         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6624         (riscv_sret, riscv_uret): New.
6625         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6626         new arguments to interrupt attribute.
6628 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
6630         PR target/63177
6631         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6632         Don't handle -mcpu=power8 if -mpower9-vector is also used.
6634 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6636         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6637         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6638         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6639         several redundant entries.
6641 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
6643         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6644         type from "rtx" to "rtx_insn *".
6645         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6646         for local "call_insn", removing cast.
6647         (ix86_expand_call): Likewise, introducing a "call_insn" local.
6649 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6651         PR tree-optimization/86066
6652         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6653         for BIT_INSERT_EXPR stores.
6655 2018-06-06  Richard Biener  <rguenther@suse.de>
6657         PR tree-optimization/86062
6658         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6659         component refs ontop
6660         of to be offsetted base.
6662 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6664         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6665         to be static and remove check on interrupt attribute name.
6667 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6669         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6670         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6672 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
6674         PR target/79924
6675         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6676         second argument.
6677         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6678         Remove second argument, change how error is called.
6679         (aarch64_layout_arg): Remove second argument from
6680         aarch64_err_no_fpadvsimd call.
6681         (aarch64_init_cumulative_args): Ditto.
6682         (aarch64_gimplify_va_arg_expr): Ditto.
6683         * config/aarch64/aarch64.md (mov<mode>): Ditto.
6685 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
6687         * config/i386/i386.md (simple_return_indirect_internal): New expander.
6688         (*simple_return_indirect_internal<mode>): Rename from
6689         simple_return_indirect_internal.  Use W mode iterator.
6690         (rstorssp): New expander.
6691         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
6692         (clrssbsy): New expander.
6693         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
6695 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6697         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6698         __typeof__.
6699         (cmse_check_pointed_object): Likewise.
6701 2018-06-05  Martin Liska  <mliska@suse.cz>
6703         PR gcov-profile/47618
6704         * doc/invoke.texi: Document how -fprofile-dir format
6705         is extended.
6707 2018-06-05  Richard Biener  <rguenther@suse.de>
6709         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6710         removal pretend DOM info isn't available so we do not update
6711         it and only remove edges, not dominated blocks.  Actually free
6712         DOM info in case we removed something.  Remove unreachable blocks.
6713         (mfb_keep_latches): Work with either DOM info or marked backedges.
6714         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6715         first.  Mark backedges if DOM info isn't available.
6716         (Re-)compute DOM info after cleanup_control_flow_pre.
6718 2018-06-05  Richard Biener  <rguenther@suse.de>
6720         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6721         (locus_discrim_hasher::hash): Adjust.
6722         (locus_discrim_hasher::equal): Likewise.
6723         (next_discriminator_for_locus): Work on line directly.
6724         (same_line_p): Pass in expanded locus1 as well.
6725         (assign_discriminators): Avoid redundant location expansions.
6727 2018-06-05  Richard Biener  <rguenther@suse.de>
6729         PR tree-optimization/86046
6730         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6731         if required after clearing TREE_ADDRESSABLE.
6733 2018-06-05  Richard Biener  <rguenther@suse.de>
6735         PR tree-optimization/86047
6736         * tree-ssa-loop.c (for_each_index): Glob handling of all
6737         decls and constants and really handle all of them.
6739 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6741         PR target/81497
6742         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6743         qualifier_void_pointer and qualifier_const_void_pointer.
6744         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6745         (arm_init_builtins): Handle the above.
6746         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6747         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6748         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6749         void intrinsics.
6751 2018-06-05  Martin Liska  <mliska@suse.cz>
6753         * auto-profile.c (read_autofdo_file): Do not use
6754         gcov_ctr_summary struct.
6755         (afdo_callsite_hot_enough_for_early_inline): Likewise.
6756         * coverage.c (struct counts_entry): Likewise.
6757         (read_counts_file): Read just single summary entry.
6758         (get_coverage_counts): Use gcov_summary struct.
6759         * coverage.h (get_coverage_counts): Likewise.
6760         * gcov-dump.c (dump_working_sets): Likewise.
6761         (tag_summary): Dump just single summary.
6762         * gcov-io.c (gcov_write_summary): Write just histogram
6763         summary.
6764         (gcov_read_summary): Read just single summary.
6765         (compute_working_sets): Use gcov_summary struct.
6766         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6767         of GCOV_COUNTERS_SUMMABLE.
6768         (GCOV_COUNTERS_SUMMABLE): Remove.
6769         (GCOV_FIRST_VALUE_COUNTER): Replace with
6770         GCOV_COUNTER_V_INTERVAL.
6771         (struct gcov_ctr_summary): Remove.
6772         (struct gcov_summary): Directly use fields of former
6773         gcov_ctr_summary.
6774         (compute_working_sets): Use gcov_summary struct.
6775         * gcov.c (read_count_file): Do not use ctrs fields.
6776         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6777         struct.
6778         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6779         struct.
6780         * profile.c: Likewise.
6781         * profile.h: Likewise.
6783 2018-06-05  Martin Liska  <mliska@suse.cz>
6785         PR gcov-profile/84846
6786         * gcov.c (output_lines): Print working directory only
6787         in intermediate format.
6789 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
6791         * config/s390/s390-builtin-types.def: Add void function type.
6792         * config/s390/s390-builtins.def: Use the function type for the
6793         tbeginc builtin.
6795 2018-06-04  Jim Wilson  <jimw@sifive.com>
6797         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6798         to int.
6799         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6800         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
6801         handle EH_RETURN_DATA_REGNO registers properly.
6802         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6803         (riscv_expand_epilogue): Update comment.  Change argument name and
6804         type.  Update code to use new name and type.  Pass new args to
6805         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
6806         EXCEPTION_RETURN.
6807         * config/riscv/riscv.md (NORMAL_RETURN): New.
6808         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6809         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6810         (eh_return): Call gen_eh_return_internal and emit barrier.
6811         (eh_return_internal): Call riscv_expand_epilogue.
6813 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
6815         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6816         bit_insertion field and declare can_be_merged_into method.
6817         (merged_store_group::can_be_merged_into): New method.
6818         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6819         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
6820         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6822 2018-06-04  Richard Biener  <rguenther@suse.de>
6824         PR tree-optimization/85955
6825         * builtins.c (fold_builtin_sincos): Convert pointers to
6826         destination to appropriate type before dereferencing.
6828 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
6830         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6832 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
6834         * expr.c (expand_expr_real_1): Force the operand into memory if
6835         its TYPE_MODE is BLKmode and if there is no integer mode for
6836         the number of bits being extracted.
6838 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
6840         PR target/85832
6841         PR target/86036
6842         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6843         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6845 2018-06-04  Richard Biener  <rguenther@suse.de>
6847         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6848         (cleanup_tree_cfg_noloop): ... single caller.  Do
6849         start_recording_case_labels later.
6851 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
6853         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6854         to _IMMINTRIN_H_INCLUDED.
6855         * config/i386/pconfigintrin.h: Ditto.
6856         * config/i386/waitpkgintrin.h: Ditto.
6857         * config/i386/immintrin.h: Add includes for sgxintrin.h,
6858         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6859         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6860         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6861         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6862         waitpkgintrin.h and cldemoteintrin.h.
6864 2018-06-04  Richard Biener  <rguenther@suse.de>
6866         PR tree-optimization/86038
6867         * tracer.c (find_best_successor): Check probability for
6868         being initialized, bail out if not.
6870 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
6872         PR target/86003
6873         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6874         of bits to ignore when comparing architectures.
6876 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
6878         PR tree-optimization/69615
6879         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6880         maximum or minimum of the type, try to merge it also as if
6881         range1 is + [-, x - 1] or + [x + 1, -].
6883         PR c++/86025
6884         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6886 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
6888         PR tree-optimization/86034
6889         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6890         the unsigned bitfield type in a bit insertion sequence if it does not
6891         have a larger precision than the bitfield size.
6892         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6894 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
6896         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6898 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6900         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6901         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6902         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6903         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6905 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6907         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6908         Disable -fdelete-null-pointer-checks for ELF toolchain.
6910 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
6911             Kito Cheng  <kito.cheng@gmail.com>
6913         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6914         (nds32le-*-*, nds32be-*-*): Integrate checking process.
6915         (nds32*-*-*): Add glibc and uclibc conditions.
6916         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6917         (TARGET_EXCEPT_UNWIND_INFO): Define.
6918         * config/nds32/elf.h: New file.
6919         * config/nds32/linux.h: New file.
6920         * config/nds32/nds32-elf.opt: New file.
6921         * config/nds32/nds32-linux.opt: New file.
6922         * config/nds32/nds32-fp-as-gp.c
6923         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6924         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6925         TARGET_LINUX_ABI.
6926         (nds32_asm_file_end): Ditto.
6927         (nds32_print_operand): Ditto.
6928         (nds32_insert_attributes): Ditto.
6929         (nds32_init_libfuncs): New function.
6930         (TARGET_HAVE_TLS): Define.
6931         (TARGET_INIT_LIBFUNCS): Define.
6932         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6933         spec content.
6934         (TARGET_ELF): Apply different mcmodel setting.
6935         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6936         been migrated into elf.h and linux.h files.
6937         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6938         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6939         (mcmodel): The content has been migrated into nds32-elf.opt and
6940         nds32-linux.opt files.
6941         * config/nds32/t-elf: New file.
6942         * config/nds32/t-linux: New file.
6944 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
6945             Shiva Chen  <shiva0217@gmail.com>
6947         * config/nds32/constants.md (unspec_volatile_element): Add
6948         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6949         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6950         optimization.
6951         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6952         (make_pass_nds32_fp_as_gp): Declare.
6953         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6954         optmization pass.
6955         (nds32_asm_function_end_prologue): Remove unused asm output.
6956         (nds32_asm_function_begin_epilogue): Remove unused asm output.
6957         (nds32_asm_file_start): Output necessary fp_as_gp information.
6958         (nds32_option_override): Adjust register usage.
6959         (nds32_expand_prologue): Consider fp_as_gp situation.
6960         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6961         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6962         (epilogue): Ditto.
6963         (return): Ditto.
6964         (simple_return): Ditto.
6965         (omit_fp_begin): Output special directive for fp_as_gp.
6966         (omit_fp_end): Output special directive for fp_as_gp.
6967         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6968         mforbid-fp-as-gp): New options.
6970 2018-06-01  Mark Wielaard  <mark@klomp.org>
6972         * dwarf2out.c (dwarf2out_finish): Remove generation of
6973         DW_AT_loclists_base.
6975 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
6977         * gimple-ssa-store-merging.c: Include gimple-fold.h.
6978         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6979         (struct merged_store_group): Add bit_insertion field.
6980         (dump_char_array): Use standard hexadecimal format.
6981         (merged_store_group::merged_store_group): Set bit_insertion to false.
6982         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
6983         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
6984         also print the mask in the dump file.
6985         (pass_store_merging::gate): Minor tweak.
6986         (imm_store_chain_info::coalesce_immediate): Fix wrong association
6987         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
6988         stores with INTEGER_CST stores.
6989         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6990         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6991         and use it throughout.  Generate bit insertion sequences if need be.
6992         (pass_store_merging::process_store): Remove redundant condition.
6993         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6995 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
6997         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6998         the 128-bit floating point types.  Fix function comment.
7000 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7002         * config/aarch64/aarch64-simd.md
7003         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7004         mnemonics.
7005         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7006         mnemonics.
7008 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
7010         PR tree-optimization/85989
7011         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7012         variable.
7013         (backprop::intersect_uses): Check it when deciding whether this
7014         is a backedge reference.
7015         (backprop::process_block): Add each phi to m_visited_phis
7016         after visiting it, then clear it at the end.
7018 2018-06-01  Richard Biener  <rguenther@suse.de>
7020         * tree-vectorizer.h (vect_dr_stmt): New function.
7021         (vect_get_load_cost): Adjust.
7022         (vect_get_store_cost): Likewise.
7023         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7024         Use vect_dr_stmt instead of DR_SMTT.
7025         (vect_record_base_alignments): Likewise.
7026         (vect_calculate_target_alignment): Likewise.
7027         (vect_compute_data_ref_alignment): Likewise and make static.
7028         (vect_update_misalignment_for_peel): Likewise.
7029         (vect_verify_datarefs_alignment): Likewise.
7030         (vector_alignment_reachable_p): Likewise.
7031         (vect_get_data_access_cost): Likewise.  Pass down
7032         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7033         (vect_get_peeling_costs_all_drs): Likewise.
7034         (vect_peeling_hash_get_lowest_cost): Likewise.
7035         (vect_enhance_data_refs_alignment): Likewise.
7036         (vect_find_same_alignment_drs): Likewise.
7037         (vect_analyze_data_refs_alignment): Likewise.
7038         (vect_analyze_group_access_1): Likewise.
7039         (vect_analyze_group_access): Likewise.
7040         (vect_analyze_data_ref_access): Likewise.
7041         (vect_analyze_data_ref_accesses): Likewise.
7042         (vect_vfa_segment_size): Likewise.
7043         (vect_small_gap_p): Likewise.
7044         (vectorizable_with_step_bound_p): Likewise.
7045         (vect_prune_runtime_alias_test_list): Likewise.
7046         (vect_analyze_data_refs): Likewise.
7047         (vect_supportable_dr_alignment): Likewise.
7048         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7049         (vect_gen_prolog_loop_niters): Likewise.
7050         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7051         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7052         modify DR_STMT.
7053         (vect_recog_mask_conversion_pattern): Likewise.
7054         (vect_try_gather_scatter_pattern): Likewise.
7055         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7056         to vect_get_store_cost.
7057         (vect_get_store_cost): Get stmt_info instead of DR.
7058         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7059         (vect_get_load_cost): Get stmt_info instead of DR.
7061 2018-06-01  Richard Biener  <rguenther@suse.de>
7063         PR middle-end/86017
7064         * gimple-fold.c (var_decl_component_p): Also allow offsetted
7065         vars wrapped in MEM_REFs.
7067 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
7069         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7070         Fix subreg tests so that we only return a choice between
7071         GENERAL_REGS and FP_REGS if the original classes included both.
7073 2018-06-01  Richard Biener  <rguenther@suse.de>
7075         PR ipa/85960
7076         * tree-ssa-structalias.c (get_function_part_constraint):
7077         Handle NULL fi->decl.
7078         (find_func_aliases_for_call): Properly handle indirect
7079         fi from direct call.
7080         (find_func_clobbers): Likewise.
7081         (ipa_pta_execute): Likewise.
7082         (create_variable_info_for): For functions that are ifunc_resolver
7083         resolve to a varinfo that contains the result of the resolver call.
7084         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7085         aliases.
7087 2018-05-31  Michael Collison  <michael.collison@arm.com>
7089         * config/aarch64/aarch64.md:
7090         (*fix_to_zero_extenddfdi2): New pattern.
7091         * gcc.target/aarch64/fix_extend1.c: New testcase.
7093 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
7095         PR middle-end/78809
7096         PR middle-end/83026
7097         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7098         and BUILT_IN_STRNCMP_EQ.
7099         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7100         BUILT_IN_STRNCMP_EQ.
7101         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7102         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7103         (gimple_fold_builtin): Likewise.
7104         * tree-ssa-strlen.c (compute_string_length): New function.
7105         (determine_min_obsize): New function.
7106         (handle_builtin_string_cmp): New function to handle calls to
7107         string compare functions.
7108         (strlen_optimize_stmt): Add handling to builtin string compare
7109         calls.
7110         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7111         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7112         * tree.c (build_common_builtin_nodes): Add new defines of
7113         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7115 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
7117         PR target/85984
7118         * bb-reorder.c (pass_partition_blocks::gate): Return false for
7119         functions with naked attribute.
7121 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7123         * config/i386/sse.md (avx_vec_concat<mode>):
7124         Substitute concat_tg_mode mode attribute with xtg_mode.
7125         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7126         (concat_tg_mode): Remove mode attribute.
7128 2018-05-31  Martin Sebor  <msebor@redhat.com>
7130         PR c/82063
7131         * calls.c (alloc_max_size): Correct a logic error/typo.
7132         Treat excessive arguments as infinite.  Warn for invalid arguments.
7133         * doc/invoke.texi (-Walloc-size-larger-than): Update.
7135 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
7137         PR target/85829
7138         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7139         and movx for Haswell.
7141 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
7142             Cesar Philippidis  <cesar@codesourcery.com>
7144         PR middle-end/85879
7145         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7146         when emitting error on private/firstprivate reductions.
7147         * omp-low.c (lower_omp_target): Avoid reference-type processing
7148         on pointers for firstprivate clause.
7150 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7152         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7153         (st1x2): Likewise.
7154         (st1x3): Likewise.
7155         * config/aarch64/aarch64-simd.md
7156         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7157         (aarch64_ld1_x3_<mode>): Likewise
7158         (aarch64_st1x2<VALLDIF:mode>): Likewise
7159         (aarch64_st1_x2_<mode>): Likewise
7160         (aarch64_st1x3<VALLDIF:mode>): Likewise
7161         (aarch64_st1_x3_<mode>): Likewise
7162         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7163         (vld1_s8_x3): Likewise.
7164         (vld1_u16_x3): Likewise.
7165         (vld1_s16_x3): Likewise.
7166         (vld1_u32_x3): Likewise.
7167         (vld1_s32_x3): Likewise.
7168         (vld1_u64_x3): Likewise.
7169         (vld1_s64_x3): Likewise.
7170         (vld1_f16_x3): Likewise.
7171         (vld1_f32_x3): Likewise.
7172         (vld1_f64_x3): Likewise.
7173         (vld1_p8_x3): Likewise.
7174         (vld1_p16_x3): Likewise.
7175         (vld1_p64_x3): Likewise.
7176         (vld1q_u8_x3): Likewise.
7177         (vld1q_s8_x3): Likewise.
7178         (vld1q_u16_x3): Likewise.
7179         (vld1q_s16_x3): Likewise.
7180         (vld1q_u32_x3): Likewise.
7181         (vld1q_s32_x3): Likewise.
7182         (vld1q_u64_x3): Likewise.
7183         (vld1q_s64_x3): Likewise.
7184         (vld1q_f16_x3): Likewise.
7185         (vld1q_f32_x3): Likewise.
7186         (vld1q_f64_x3): Likewise.
7187         (vld1q_p8_x3): Likewise.
7188         (vld1q_p16_x3): Likewise.
7189         (vld1q_p64_x3): Likewise.
7190         (vst1_s64_x2): Likewise.
7191         (vst1_u64_x2): Likewise.
7192         (vst1_f64_x2): Likewise.
7193         (vst1_s8_x2): Likewise.
7194         (vst1_p8_x2): Likewise.
7195         (vst1_s16_x2): Likewise.
7196         (vst1_p16_x2): Likewise.
7197         (vst1_s32_x2): Likewise.
7198         (vst1_u8_x2): Likewise.
7199         (vst1_u16_x2): Likewise.
7200         (vst1_u32_x2): Likewise.
7201         (vst1_f16_x2): Likewise.
7202         (vst1_f32_x2): Likewise.
7203         (vst1_p64_x2): Likewise.
7204         (vst1q_s8_x2): Likewise.
7205         (vst1q_p8_x2): Likewise.
7206         (vst1q_s16_x2): Likewise.
7207         (vst1q_p16_x2): Likewise.
7208         (vst1q_s32_x2): Likewise.
7209         (vst1q_s64_x2): Likewise.
7210         (vst1q_u8_x2): Likewise.
7211         (vst1q_u16_x2): Likewise.
7212         (vst1q_u32_x2): Likewise.
7213         (vst1q_u64_x2): Likewise.
7214         (vst1q_f16_x2): Likewise.
7215         (vst1q_f32_x2): Likewise.
7216         (vst1q_f64_x2): Likewise.
7217         (vst1q_p64_x2): Likewise.
7218         (vst1_s64_x3): Likewise.
7219         (vst1_u64_x3): Likewise.
7220         (vst1_f64_x3): Likewise.
7221         (vst1_s8_x3): Likewise.
7222         (vst1_p8_x3): Likewise.
7223         (vst1_s16_x3): Likewise.
7224         (vst1_p16_x3): Likewise.
7225         (vst1_s32_x3): Likewise.
7226         (vst1_u8_x3): Likewise.
7227         (vst1_u16_x3): Likewise.
7228         (vst1_u32_x3): Likewise.
7229         (vst1_f16_x3): Likewise.
7230         (vst1_f32_x3): Likewise.
7231         (vst1_p64_x3): Likewise.
7232         (vst1q_s8_x3): Likewise.
7233         (vst1q_p8_x3): Likewise.
7234         (vst1q_s16_x3): Likewise.
7235         (vst1q_p16_x3): Likewise.
7236         (vst1q_s32_x3): Likewise.
7237         (vst1q_s64_x3): Likewise.
7238         (vst1q_u8_x3): Likewise.
7239         (vst1q_u16_x3): Likewise.
7240         (vst1q_u32_x3): Likewise.
7241         (vst1q_u64_x3): Likewise.
7242         (vst1q_f16_x3): Likewise.
7243         (vst1q_f32_x3): Likewise.
7244         (vst1q_f64_x3): Likewise.
7245         (vst1q_p64_x3): Likewise.
7247 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7249         * config/msp430/msp430.c (msp430_output_labelref): Prepend
7250         user_label_prefix to name.
7252         * tree-core.h: Update comment about the format of NAME string
7253         passed to handler in attribute_spec.
7255         * config/msp430/msp430.md: Remove erroneous subreg expression from
7256         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7257         zero_extend{q,h}isi2.
7259 2018-05-30  Borislav Petkov  <bp@suse.de>
7261         * doc/extend.texi: Document some architecture specific
7262         constraints and sort entries.
7264 2018-05-30  Martin Sebor  <msebor@redhat.com>
7266         PR middle-end/85369
7267         * builtins.c (expand_builtin_stpcpy_1): New function.
7268         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7269         only if the former succeeds.
7271 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7273         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7274         in saphira.
7276 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7278         * doc/invoke.texi (-flinker-output): Document
7280 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7282         * passes.c (ipa_write_summaries): Only modify statements if body
7283         is in memory.
7284         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7285         incrementally linking.
7286         (ipa_passes): Likewise.
7287         * lto-cgraph.c (lto_output_node): When incrementally linking do not
7288         pass down resolution info.
7289         * common.opt (flag_incremental_link): Update info.
7290         * gcc.c (plugin specs): Turn flinker-output=* to
7291         -plugin-opt=-linker-output-known
7292         * toplev.c (compile_file): Also cut compilation when doing incremental
7293         link.
7294         * flag-types. (enum lto_partition_model): Add
7295         LTO_LINKER_OUTPUT_NOLTOREL.
7296         (invoke.texi): Add -flinker-output docs.
7297         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7298         link same way as WPA; do not stream in dead initializers.
7300         * dwarf2out.c (dwarf2out_die_ref_for_decl,
7301         darf2out_register_external_decl): Support incremental link.
7303 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7305         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7307 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7309         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7310         it down to simple_object_copy_lto_debug_sections.
7311         (run_gcc): Determine incremental LTO link time and configure
7312         lto1 into non-wpa mode, disable renaming of debug sections.
7314 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7316         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7317         descriptions of various incorrectly documented functions.
7319 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7321         Revert:
7322         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7323         address check not strict.
7325 2018-05-30  Richard Biener  <rguenther@suse.de>
7327         PR tree-optimization/85964
7328         * tracer.c (better_p): Drop initialized count check, we only
7329         call the function with initialized counts now.
7330         (find_best_successor): Do find a best edge if one
7331         has uninitialized count.
7332         (find_best_predecessor): Likewise.  Do BB frequency check only
7333         if count is initialized.
7335 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
7337         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7338         (aarch64_ldrstr_offset_compare): New.
7339         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7340         load/store orderings.
7341         (aarch64_gen_adjusted_ldpstp): Likewise.
7343 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
7345         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7346         Check for subset of GENERAL_REGS and FP_REGS.
7347         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7348         r=w alternative.
7350 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
7352         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7353         and wi::to_poly_offset.  Add the current offset and then check
7354         whether the sum fits, rather than using an unchecked addition of
7355         a checked term.  Check for a shwi rather than a uhwi.
7356         * expr.c (get_bit_range): Use tree_to_poly_uint64.
7357         (store_constructor): Use poly_int_tree_p.
7358         (expand_expr_real_1): Likewise.
7359         * function.c (assign_temp): Likewise.
7360         * fold-const.c (const_binop): Use poly_int_tree_p and
7361         wi::to_poly_offset.
7362         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
7363         division.
7364         * ipa-icf-gimple.c (func_checker::compare_operand): Use
7365         to_poly_offset for MEM offsets.
7366         * ipa-icf.c (sem_variable::equals): Likewise.
7367         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7368         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7369         wi::to_poly_offset for BIT_FIELD_REF offsets.
7370         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7371         wi::to_poly_offset.
7372         * var-tracking.c (emit_note_insn_var_location): Use
7373         tree_to_poly_uint64.
7375 2018-05-29  Jim Wilson  <jimw@sifive.com>
7377         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7379 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
7381         PR target/85950
7382         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7383         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7384         sequence.
7385         (sse4_1_round<mode>2): Use nonimmediate_operand
7386         for operand 1 predicate.
7388 2018-05-29  Martin Sebor  <msebor@redhat.com>
7389             Richard Biener  <rguenther@suse.de>
7391         PR testsuite/85888
7392         * calls.c (get_size_range): Call determine_value_range instead
7393         of get_value_range..
7394         * tree-vrp.h (determine_value_range): Declared new function.
7395         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7397 2018-05-29  Richard Biener  <rguenther@suse.de>
7399         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7400         sure to use non-pattern stmts for get_earlier_stmt arguments.
7401         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7402         called on pattern stmts.
7403         (get_later_stmt): Likewise.
7405 2018-05-29  Martin Liska  <mliska@suse.cz>
7407         PR gcov-profile/85759
7408         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7409         env variables.
7411 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
7413         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7414         VEC_UNPACK_*_EXPR.
7415         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7416         VEC_PACK_*_EXPR.
7418         PR target/85918
7419         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7420         VEC_PACK_FLOAT_EXPR): New tree codes.
7421         * tree-pretty-print.c (op_code_prio): Handle
7422         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7423         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7424         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7425         * tree-inline.c (estimate_operator_cost): Likewise.
7426         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7427         * fold-const.c (const_binop): Likewise.
7428         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7429         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7430         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7431         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7432         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7433         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7434         * expr.c (expand_expr_real_2): Likewise.
7435         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7436         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7437         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7438         optabs.
7439         * optabs.c (expand_widen_pattern_expr): For
7440         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7441         sign from result type rather than operand's type.
7442         (expand_binop_directly): For vec_packu_float_optab and
7443         vec_packs_float_optab allow result type to be different from operand's
7444         type.
7445         * optabs-tree.c (optab_for_tree_code): Handle
7446         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7447         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
7448         * tree-vect-generic.c (expand_vector_operations_1):  Handle
7449         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7450         VEC_PACK_FLOAT_EXPR.
7451         * tree-vect-stmts.c (supportable_widening_operation): Handle
7452         FIX_TRUNC_EXPR.
7453         (supportable_narrowing_operation): Handle FLOAT_EXPR.
7454         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7455         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7456         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
7457         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7458         mode attributes.
7459         (vec_pack<floatprefix>_float_<mode>): New expander.
7460         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7461         attributes.
7462         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7463         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7464         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7465         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7466         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7467         Document.
7468         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7469         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7470         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7471         VEC_PACK_FLOAT_EXPR): Document.
7473 2018-05-29  Richard Biener  <rguenther@suse.de>
7475         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7476         member.
7477         (stmt_vec_info_vec): Make pointer.
7478         (init_stmt_vec_info_vec): Remove.
7479         (free_stmt_vec_info_vec): Likewise.
7480         (set_stmt_vec_info_vec): New function.
7481         (free_stmt_vec_infos): Likewise.
7482         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7483         (set_vinfo_for_stmt): Likewise.
7484         (get_earlier_stmt): Likewise.
7485         (get_later_stmt): Likewise.
7486         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7487         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7488         (vec_info::~vec_info): Free stmt_vec_infos.
7489         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7490         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7491         (pass_slp_vectorize::execute): Likewise.
7492         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7493         (free_stmt_vec_info_vec): Likewise.
7494         (set_stmt_vec_info_vec): New function.
7495         (free_stmt_vec_infos): Likewise.
7496         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7497         the global stmt_vec_info_vec.
7498         * tree-parloops.c (gather_scalar_reductions): Use
7499         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7500         vector.
7502 2018-05-29  Richard Biener  <rguenther@suse.de>
7504         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7506 2018-05-29  Martin Liska  <mliska@suse.cz>
7507             David Malcolm  <dmalcolm@redhat.com>
7509         * vec.c (test_reverse): New.
7510         (vec_c_tests): Add new test.
7511         * vec.h (vl_ptr>::reverse): New function.
7513 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
7515         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7517         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7518         and later.
7520 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7522         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7524 2018-05-28  Richard Biener  <rguenther@suse.de>
7526         PR tree-optimization/85933
7527         * tree-vect-data-refs.c (vect_record_base_alignments): Only
7528         look at stmts marked as vectorizable.
7530 2018-05-28  Richard Biener  <rguenther@suse.de>
7532         PR tree-optimization/85934
7533         * tree-vect-generic.c (expand_vector_operations_1): Hoist
7534         vector boolean check before scalar optimization.
7536 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
7538         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7539         for armv5te.
7541 2018-05-28  Mark Wielaard  <mark@klomp.org>
7543         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7544         if it is an expression containing a minus sign.
7546 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
7548         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7550 2018-05-27  Paul Koning  <ni1d@arrl.net>
7552         * config/pdp11/pdp11.md (truncsihi2): Remove.
7554 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
7555             Chung-Ju Wu  <jasonwucj@gmail.com>
7557         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7558         implementation.
7559         (unaligned_store_dw): Ditto.
7560         * config/nds32/nds32-memory-manipulation.c
7561         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7562         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7563         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7564         (emit_setmem_word_loop): Rename to ...
7565         (emit_setmem_doubleword_loop): ... this.
7566         (nds32_gen_dup_4_byte_to_word_value): New function.
7567         (nds32_gen_dup_8_byte_to_double_word_value): New function.
7568         (nds32_expand_setmem_loop): Refine implementation.
7569         (nds32_expand_setmem_loop_v3m): Ditto.
7570         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7571         pattern.
7573 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
7575         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7577 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
7579         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7580         (nds32_init_machine_status): Initialize machine->attr_naked_p and
7581         machine->attr_no_prologue_p.
7582         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7583         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7584         (nds32_expand_epilogue): Consider attr_naked_p.
7585         (nds32_expand_epilogue_v3pop): Likewise.
7586         (nds32_can_use_return_insn): Likewise.
7587         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7588         attr_no_prologue_p fields.
7589         * config/nds32/nds32.opt (mret-in-naked-func): New option.
7591 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
7593         PR target/85918
7594         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7595         attributes.
7596         * config/i386/sse.md
7597         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7598         Rename to ...
7599         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7600         ... this.
7601         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7602         Rename to ...
7603         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7604         ... this.
7605         (*<floatsuffix>floatv2div2sf2): Rename to ...
7606         (*float<floatunssuffix>v2div2sf2): ... this.
7607         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7608         (float<floatunssuffix>v2div2sf2_mask): ... this.
7609         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7610         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7611         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7612         to ...
7613         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7614         ... this.
7615         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7616         Rename to ...
7617         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7618         ... this.
7619         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7620         Rename to ...
7621         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7622         ... this.
7623         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7624         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7625         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7626         gen_ufix_truncv8dfv8si2.
7627         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7628         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7629         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7630         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7631         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7632         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7633         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7634         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7636 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
7638         PR target/85900
7639         PR target/85345
7640         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7642 2018-05-25  Jim Wilson  <jimw@sifive.com>
7644         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7645         * config/riscv/riscv.c (struct machine_function): Add
7646         interrupt_handler_p and attribute_checked_p fields.
7647         (riscv_attribute_table): Add interrupt.
7648         (riscv_interrupt_type_p): New.
7649         (riscv_save_reg_p): Save extra regs for interrupt handler.
7650         (riscv_use_save_libcall): Return false  for interrupt handler.
7651         (riscv_first_stack_step): Add forward declaration.
7652         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
7653         for interrupt handler with large frame.  Use it for saved reg list.
7654         (riscv_expand_prologue): Move flag_stack_usage_info support to
7655         eliminate duplication.
7656         (riscv_expand_epilogue): Generate mret for interrupt handler.
7657         (riscv_epilogue_uses): New.
7658         (riscv_can_use_return_insn): Return false for interrupt handler.
7659         (riscv_function_ok_for_sibcall): Likewise.
7660         (riscv_set_current_function): Add interrupt handler support.
7661         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7662         * config/riscv/riscv.md (UNSPECV_MRET): New.
7663         (GP_REGNUM): New.
7664         (riscv_frflags, riscv_fsflags): Use tab after opcode.
7665         (riscv_mret): New.
7666         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7668 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
7670         PR tree-optimization/85712
7671         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7672         this candidate has already been replaced in-situ by a copy.
7674 2018-05-25  Jason Merrill  <jason@redhat.com>
7676         PR c++/80485 - inline function non-zero address.
7677         * symtab.c (nonzero_address): Check DECL_COMDAT.
7679 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
7681         PR target/83628
7682         * config/alpha/alpha.md (ashlsi3): New insn pattern.
7683         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
7684         extension of SImode operation.  Use const123_operand predicate.
7685         (*saddsi_1): Remove.
7686         (*saddl_se_1): Ditto.
7687         (*ssubsi_1): Ditto.
7688         (*ssubl_se_1): Ditto.
7689         * config/alpha/predicates.md (const123_operand): New predicate.
7690         * config/alpha/constraints.md (P): Use IN_RANGE.
7692 2018-05-25  Richard Biener  <rguenther@suse.de>
7694         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7695         defaulted to true.
7696         (ref_maybe_used_by_stmt_p): Likewise.
7697         (stmt_may_clobber_ref_p): Likewise.
7698         (stmt_may_clobber_ref_p_1): Likewise.
7699         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7700         and pass it along.
7701         (ref_maybe_used_by_stmt_p): Likewise.
7702         (stmt_may_clobber_ref_p): Likewise.
7703         (stmt_may_clobber_ref_p_1): Likewise.
7704         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7705         the alias oracle to disambiguate DRs with stmts DR analysis
7706         couldn't handle.
7707         (vect_analyze_data_refs): Do not give up on not analyzable
7708         DRs for BB vectorization.  Remove code truncating the dataref
7709         vector.
7711 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
7713         PR target/85832
7714         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7715         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
7716         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7718 2018-05-25  Richard Biener  <rguenther@suse.de>
7720         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7721         function, combining stmt data ref gathering and fatal analysis
7722         parts.
7723         (vect_analyze_data_refs): Remove now redudnant code and simplify.
7724         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7725         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7726         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7727         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7729 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7731         PR tree-optimization/85720
7732         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7733         SCC if all partitions are builtins.
7734         (version_loop_by_alias_check): New parameter.  Generate cancelable
7735         runtime alias check if all partitions are builtins.
7736         (distribute_loop): Update call to above function.
7738 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7740         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7741         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7742         (parm_default_def_partition_arg): Ditto.
7743         (set_parm_default_def_partition): Ditto.
7744         (get_parm_default_def_partitions): Ditto and make it static.
7745         (get_undefined_value_partitions): Ditto and make it static.
7746         (remove_ssa_form): Refactor call to init_var_map here.
7747         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7748         computation for loop region.
7749         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7750         (register_default_def): Delete.
7751         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7752         (parm_default_def_partition_arg): Ditto.
7753         (set_parm_default_def_partition): Ditto.
7754         (get_parm_default_def_partitions): Ditto and make it static.
7755         (get_undefined_value_partitions): Ditto and make it static.
7756         (coalesce_with_default, coalesce_with_default): Update comment.
7757         (create_coalesce_list_for_region): New func factored out from
7758         create_outofssa_var_map.
7759         (populate_coalesce_list_for_outofssa): New func factored out from
7760         create_outofssa_var_map and coalesce_ssa_name.
7761         (create_outofssa_var_map): Delete.
7762         (coalesce_ssa_name): Refactor to support live range computation.
7763         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7764         (get_parm_default_def_partitions): Delete.
7765         (get_undefined_value_partitions): Ditto.
7766         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7767         computation for loop region.
7768         (new_tree_live_info, loe_visit_block): Ditto.
7769         (live_worklist, set_var_live_on_entry): Ditto.
7770         (calculate_live_on_exit, verify_live_on_entry): Ditto.
7771         * tree-ssa-live.h (struct _var_map): New fields.
7772         (init_var_map): Change decl.
7773         (region_contains_p): New.
7775 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7777         * tree-ssa-live.h (live_merge_and_clear): Delete.
7779 2018-05-25  Richard Biener  <rguenther@suse.de>
7781         PR c++/85912
7782         * tree-dump.c (dequeue_and_dump): Remove access to removed
7783         operand 2 of a SWITCH_EXPR.
7785 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7787         * doc/sourcebuild.texi (vect_double_cond_arith): Include
7788         multiplication and division.
7789         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7790         (cond_udiv@var{m}, cond_umod@var{m}): Document.
7791         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7792         (cond_udiv_optab, cond_umod_optab): New optabs.
7793         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7794         (IFN_COND_RDIV): New internal functions.
7795         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7796         TRUNC_MOD_EXPR and RDIV_EXPR.
7797         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7798         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7799         New unspecs.
7800         (SVE_INT_BINARY): Include mult.
7801         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7802         (optab, sve_int_op): Handle mult.
7803         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7804         UNSPEC_COND_DIV.
7805         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7806         for SVE_INT_BINARY_SD.
7808 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7810         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7811         (optab, sve_int_op): Handle div and udiv.
7812         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7813         for SVE_INT_BINARY_SD.
7814         (*<optab><mode>3): New insn for the same.
7816 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7818         * tree-vect-patterns.c: Include predict.h.
7819         (vect_recog_divmod_pattern): Restrict check for division support
7820         to when optimizing for size.
7822 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7824         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7825         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7826         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7827         (gimple_match_op::set_op): Likewise.
7828         (gimple_resimplify4): Declare.
7829         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7830         (expr::gen_transform): Likewise.
7831         (decision_tree::gen): Generate a simplification routine for 4 operands.
7832         * gimple-match-head.c (gimple_simplify): Add an overload for
7833         4 operands.  In the top-level function, handle up to 4 call
7834         arguments and call gimple_resimplify4.
7835         (gimple_resimplify4): New function.
7836         (build_call_internal): Pass a fourth operand.
7837         (maybe_push_to_seq): Likewise.
7838         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7839         Fold VEC_COND_EXPRs of an operation and a default value into
7840         an IFN_COND_* function if possible.
7841         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7842         New unspecs.
7843         (SVE_COND_FP_BINARY): Include them.
7844         (optab, sve_fp_op): Handle them.
7845         (SVE_INT_BINARY_REV): New code iterator.
7846         (SVE_COND_FP_BINARY_REV): New int iterator.
7847         (commutative): New int attribute.
7848         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7849         Declare.
7850         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7851         function.
7852         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7853         (*cond_<optab><mode>): New patterns for reversed operands.
7855 2018-05-25  Richard Biener  <rguenther@suse.de>
7857         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7858         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7859         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7860         (STMT_VINFO_GROUPED_ACCESS): Adjust.
7861         * tree-vect-data-refs.c (everywhere): Adjust users.
7862         * tree-vect-loop.c (everywhere): Likewise.
7863         * tree-vect-slp.c (everywhere): Likewise.
7864         * tree-vect-stmts.c (everywhere): Likewise.
7865         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7867 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7869         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7870         Rename to...
7871         (gcc_cv_as_section_exclude): ... this.
7872         Try Solaris as #exclude syntax.
7873         * configure: Regenerate.
7874         * config.in: Regenerate.
7875         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7876         SECTION_EXCLUDE.
7877         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7878         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7880         * varasm.c (default_elf_asm_named_section): Don't check if
7881         HAVE_GAS_SECTION_EXCLUDE is defined.
7883 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7885         * doc/md.texi: Update the documentation of the cond_* optabs
7886         to mention the new final operand.  Fix GET_MODE_NUNITS call.
7887         Describe the scalar case too.
7888         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7889         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7890         instead of 2.
7891         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7892         (get_conditional_internal_fn): Update comment.
7893         * tree-vect-loop.c (vectorizable_reduction): Pass the original
7894         accumulator value as a final argument to conditional functions.
7895         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7896         a define_expand and add an "else" operand.  Assert for now that
7897         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
7898         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7899         (*cond_<optab><mode>): New patterns.
7900         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7901         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7902         (UNSPEC_COND_EOR): Delete.
7903         (optab): Remove associated mappings.
7904         (SVE_INT_BINARY): New code iterator.
7905         (sve_int_op): Remove int attribute and add "minus" to the code
7906         attribute.
7907         (SVE_COND_INT_OP): Delete.
7908         (SVE_COND_FP_OP): Rename to...
7909         (SVE_COND_FP_BINARY): ...this.
7911 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7913         * optabs.c (can_reuse_operands_p): New function.
7914         (maybe_legitimize_operands): Try to reuse the results for
7915         earlier operands.
7917 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
7919         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7920         Add {q} suffix to insn mnemonic.
7922 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7924         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7925         (msp430_warn_func_return): New.
7927 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
7929         * fold-const.c (tree_nonzero_bits): New function.
7930         * fold-const.h (tree_nonzero_bits): Likewise.
7931         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7932         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7934 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
7936         PR target/85900
7937         PR target/85345
7938         * varasm.c (assemble_alias): Check ifunc_resolver only on
7939         FUNCTION_DECL.
7941 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
7943         PR target/85903
7944         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7945         when memory input operand is handled.
7947 2018-05-24  Luis Machado  <luis.machado@linaro.org>
7949         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7950         global.
7951         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7953 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
7955         * match.pd: Delay FMA folds until after vectorization.
7957 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7959         PR target/83009
7960         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7961         address check not strict.
7963 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
7965         * gimple-match.h (gimple_match_op): New class.
7966         (mprts_hook): Replace parameters with a gimple_match_op *.
7967         (maybe_build_generic_op): Likewise.
7968         (gimple_simplified_result_is_gimple_val): Replace parameters with
7969         a const gimple_match_op *.
7970         (gimple_simplify): Replace code_helper * and tree * parameters with
7971         a gimple_match_op * parameter.
7972         (gimple_resimplify1): Replace code_helper *, tree and tree *
7973         parameters with a gimple_match_op * parameter.
7974         (gimple_resimplify2): Likewise.
7975         (gimple_resimplify3): Likewise.
7976         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7977         parameters with a gimple_match_op * parameter.
7978         * gimple-match-head.c (gimple_simplify): Change prototypes of
7979         auto-generated functions to take a gimple_match_op * instead of
7980         separate code_helper * and tree * parameters.  Make the same
7981         change in the top-level overload and update calls to the
7982         gimple_resimplify routines.  Update calls to the auto-generated
7983         functions and to maybe_push_res_to_seq in the publicly-facing
7984         operation-specific gimple_simplify overloads.
7985         (gimple_match_op::MAX_NUM_OPS): Define.
7986         (gimple_resimplify1): Replace rcode and ops with a single res_op
7987         parameter.  Update call to gimple_simplify.
7988         (gimple_resimplify2): Likewise.
7989         (gimple_resimplify3): Likewise.
7990         (mprts_hook): Replace parameters with a gimple_match_op *.
7991         (maybe_build_generic_op): Likewise.
7992         (build_call_internal): Replace type, nargs and ops with
7993         a gimple_match_op *.
7994         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7995         with a single gimple_match_op *.  Update calls to mprts_hook,
7996         build_call_internal and gimple_simplified_result_is_gimple_val.
7997         Factor out code that is common to the tree_code and combined_fn cases.
7998         * genmatch.c (expr::gen_transform): Replace tem_code and
7999         tem_ops with a gimple_match_op called tem_op.  Update calls
8000         to the gimple_resimplify functions and maybe_push_res_to_seq.
8001         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8002         res_ops.  Update call to the gimple_resimplify functions.
8003         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8004         (decision_tree::gen): Make the functions take a gimple_match_op *
8005         called res_op instead of separate res_code and res_ops parameters.
8006         Update call accordingly.
8007         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8008         and ops with a single res_op parameter.  Update calls to
8009         maybe_build_generic_op and maybe_push_res_to_seq.
8010         (fold_stmt_1): Update calls to gimple_simplify and
8011         replace_stmt_with_simplification.
8012         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8013         and gimple_simplified_result_is_gimple_val.
8014         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8015         gimple_simplify.
8016         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8017         with a gimple_match_op *.
8018         (vn_nary_build_or_lookup): Likewise.  Update call to
8019         vn_nary_build_or_lookup_1.
8020         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8021         gimple_match_op *.  Update calls to the gimple_resimplify routines
8022         and to gimple_simplified_result_is_gimple_val.
8023         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8024         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8025         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8026         (visit_nary_op): Likewise.
8027         (visit_reference_op_load): Likewise.
8029 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8031         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8032         modifier for printing the step amount.
8034 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
8036         PR target/78849
8037         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8038         types.
8040 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
8042         * doc/sourcebuild.texi (Endianness): New subsubsection.
8044 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8046         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8047         <prefetch_dynamic_strides>: New const bool field.
8048         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8049         prefetch_dynamic_strides.
8050         (exynosm1_prefetch_tune): Likewise.
8051         (thunderxt88_prefetch_tune): Likewise.
8052         (thunderx_prefetch_tune): Likewise.
8053         (thunderx2t99_prefetch_tune): Likewise.
8054         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8055         false.
8056         (aarch64_override_options_internal): Update to set
8057         PARAM_PREFETCH_DYNAMIC_STRIDES.
8058         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8059         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8060         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8061         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8062         prefetch-dynamic-strides setting.
8064 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8066         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8067         <minimum_stride>: New const int field.
8068         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8069         minimum_stride field defaulting to -1.
8070         (exynosm1_prefetch_tune): Likewise.
8071         (thunderxt88_prefetch_tune): Likewise.
8072         (thunderx_prefetch_tune): Likewise.
8073         (thunderx2t99_prefetch_tune): Likewise.
8074         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8075         <default_opt_level>: Set to 3.
8076         (aarch64_override_options_internal): Update to set
8077         PARAM_PREFETCH_MINIMUM_STRIDE.
8078         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8079         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8080         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8081         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8082         stride is constant and is below the minimum stride threshold.
8084 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8086         * config/arm/arm-cpus.in (mode26): Delete.
8087         (armv4): Delete mode26 reference.
8088         * config/arm/arm.c (arm_configure_build_target): Delete use of
8089         isa_bit_mode26.
8091 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
8093         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8094         New insn pattern.
8095         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8096         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
8097         for non-SSE modes.
8098         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
8099         (floatunsdidf2): Ditto.
8101 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
8103         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8104         (fixuns_trunc<mode>si2_avx512f): Ditto.
8105         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8106         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8107         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8109 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
8111         PR rtl-optimization/79985
8112         * df-scan.c (df_insn_refs_collect): Remove special case for
8113         global registers and asm statements.
8115 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
8117         * extend.texi (Global Register Variables): Rewrite the bullet list.
8118         Note that the register is available for allocation. Note that access
8119         via inline asm must use constraints. Add note about async-signal
8120         handlers. Remove paragraph about automagic register selection.
8122 2018-05-23  Richard Biener  <rguenther@suse.de>
8124         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8125         of fixed offset from memset VN.
8127 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
8129         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8130         first_interp field.
8131         (alloc_cand_and_find_basis): Initialize first_interp field.
8132         (slsr_process_mul): Modify first_interp field.
8133         (slsr_process_add): Likewise.
8134         (slsr_process_cast): Modify first_interp field for each new
8135         interpretation.
8136         (slsr_process_copy): Likewise.
8137         (dump_candidate): Dump first_interp field.
8138         (replace_mult_candidate): Process all interpretations, not just
8139         subsequent ones.
8140         (replace_rhs_if_not_dup): Likewise.
8141         (replace_one_candidate): Likewise.
8143 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
8145         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8146         Add new boolean.
8147         (aarch64_needs_frame_chain): New function.
8148         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8150 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
8152         PR target/84882
8153         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8154         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8155         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8156         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8157         as true for strict-align.
8158         (aarch64_can_inline_p): Perform checks even when callee has no
8159         attributes to check for strict alignment.
8160         * doc/extend.texi (AArch64 Function Attributes): Document
8161         no-strict-align.
8162         * doc/invoke.texi: (AArch64 Options): Likewise.
8164 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
8166         PR tree-optimization/85853
8167         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8168         the handling of the root of the node to...
8169         (vect_slp_analyze_node_operations_1): ...this new function,
8170         and run the whole thing with the child nodes' def types
8171         set according to their SLP node's def type.
8173 2018-05-23  Richard Biener  <rguenther@suse.de>
8175         PR middle-end/85874
8176         * tree-data-ref.c (create_runtime_alias_checks): Defer
8177         and ignore overflow warnings.
8179 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
8181         PR tree-optimization/85822
8182         * tree-vrp.c (is_masked_range_test): Fix handling of negative
8183         constants.
8185 2018-05-23  Richard Biener  <rguenther@suse.de>
8187         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8188         memset constants via native_interpret_expr.
8190 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
8192         PR target/85345
8193         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8194         attribute.
8195         (cgraph_node::create_alias): Likewise.
8196         (cgraph_node::get_availability): Check ifunc_resolver instead
8197         of looking up ifunc attribute.
8198         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8199         * varasm.c (do_assemble_alias): Likewise.
8200         (assemble_alias): Likewise.
8201         (default_binds_local_p_3): Likewise.
8202         * cgraph.h (cgraph_node): Add ifunc_resolver.
8203         (cgraph_node::only_called_directly_or_aliased_p): Return false
8204         for IFUNC resolver.
8205         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8206         attribute.
8207         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8208         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8209         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8210         instead of looking up ifunc attribute.
8212 2018-05-22  Luis Machado  <luis.machado@linaro.org>
8214         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8216 2018-05-22  Martin Sebor  <msebor@redhat.com>
8218         PR middle-end/85359
8219         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8220         only when expasion succeeds.
8221         (expand_builtin_strcmp): Same.
8222         (expand_builtin_strncmp): Same.
8224 2018-05-22  Martin Sebor  <msebor@redhat.com>
8226         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8228 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
8229             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8231         * config/aarch64/aarch64-ldpstp.md: Replace uses of
8232         aarch64_mem_pair_operand with memory_operand and delete operand swapping
8233         code.
8234         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8235         Add check for legitimate_address.
8236         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8237         (aarch64_swap_ldrstr_operands): New.
8238         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8239         Define prototype.
8241 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
8242             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8244         * config/aarch64/aarch64.md: New patterns to generate stp
8245         and ldp.
8246         (store_pair_sw, store_pair_dw): New patterns to generate stp for
8247         single words and double words.
8248         (load_pair_sw, load_pair_dw): Likewise.
8249         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8250         Delete.
8251         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8252         Delete.
8253         * config/aarch64/aarch64-ldpstp.md: Modify peephole
8254         for different mode ldpstp and add peephole for merged zero stores.
8255         Likewise for loads.
8256         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8257         Add size check.
8258         (aarch64_gen_store_pair): Rename calls to match new patterns.
8259         (aarch64_gen_load_pair): Rename calls to match new patterns.
8260         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8261         (load_pair<DREG:mode><DREG2:mode>): ... This.
8262         (store_pair<mode>): Rename to...
8263         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8264         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8265         New mode iterators.
8266         (V_INT_EQUIV): Handle SImode.
8267         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8268         New predicate.
8270 2018-05-22  Martin Sebor  <msebor@redhat.com>
8272         PR c/85623
8273         * calls.c (maybe_warn_nonstring_arg): Use string length to set
8274         or ajust the presumed bound on an operation to avoid unnecessary
8275         warnings.
8277 2018-05-22  Martin Sebor  <msebor@redhat.com>
8279         PR tree-optimization/85826
8280         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8281         assuming that a DECL necesarily has a constant size.
8283 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
8285         PR middle-end/85862
8286         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8288 2018-05-22  Richard Biener  <rguenther@suse.de>
8290         PR tree-optimization/85834
8291         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8292         non-constant and non-zero memset arguments.
8294 2018-05-22  Martin Liska  <mliska@suse.cz>
8296         PR ipa/85607
8297         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8299 2018-05-22  Richard Biener  <rguenther@suse.de>
8301         PR tree-optimization/85863
8302         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8303         comparisons when vectype is specified.
8304         (vectorizable_condition): Do not specify vectype for
8305         vect_is_simple_cond when SLP vectorizing.
8307 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
8309         PR target/85657
8310         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8311         define __ibm128 as long double.
8312         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8313         as a distinct type when IEEE 128-bit support is enabled.
8314         (init_float128_ieee): Fix up conversions between IFmode and IEEE
8315         128-bit types to use the correct functions.
8316         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8317         convert between 128-bit floating point types that have different
8318         modes but the same representation, instead of using gen_lowpart to
8319         makean alias.
8320         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8321         KFmode.
8322         (IFKF_reg): New attributes to give the register constraints for
8323         IFmode and KFmode.
8324         (extend<mode>tf2_internal): New insns to mark an explicit
8325         conversion between 128-bit floating point types that have a
8326         different mode but share the same representation.
8328 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
8330         PR tree-optimization/85814
8331         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8332         a null return from get_strinfo when unsharing the next
8333         strinfo in the chain.
8335 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8337         PR gcc/84923
8338         * varasm.c (weak_finish): Clean up weak_decls.
8340 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8342         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8343         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8344         UNSPEC_UADALP values.
8345         * config/aarch64/iterators.md (ABAL): New int iterator.
8346         (ABDL2): Likewise.
8347         (ADALP): Likewise.
8348         (sur): Add mappings for the above.
8349         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8350         New define_insn.
8351         (aarch64_<sur>abal<mode>_4): Likewise.
8352         (aarch64_<sur>adalp<mode>_3): Likewise.
8353         (<sur>sadv16qi): New define_expand.
8355 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
8357         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8358         (*movdf_internal): Ditto.
8359         (*rcpsf2_sse): Ditto.
8360         (*rsqrtsf2_sse): Ditto.
8361         (*sqrt<mode>2_sse): Ditto.
8363 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
8365         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8366         eor3q<mode>4.
8367         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8368         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8369         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8370         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8371         vbcaxq_s64): New.
8372         * config/aarch64/arm_neon.h: Likewise.
8373         * config/aarch64/iterators.md (VQ_I): New.
8375 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
8377         * config.gcc: Add arc/t-multilib-linux to tmake_file for
8378         arc*-*-linux*.
8379         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8380         MULTILIB_DIRNAMES
8382 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
8384         * config/nds32/constraints.md (S): New constraint.
8385         * config/nds32/nds32.md (call_internal): Use constraint S.
8386         (call_value_internal): Likewise.
8387         (sibcall_internal): Likewise.
8388         (sibcall_value_internal): Likewise.
8390 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
8391             Chung-Ju Wu  <jasonwucj@gmail.com>
8393         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8394         into consideration.
8396 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
8397             Chung-Ju Wu  <jasonwucj@gmail.com>
8399         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8400         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8401         (nds32_rtx_costs_impl): Simplify.
8402         (nds32_address_cost_impl): Simplify.
8403         (nds32_init_rtx_costs): New function.
8404         (nds32_rtx_costs_speed_prefer): Likewise.
8405         (nds32_rtx_costs_size_prefer): Likewise.
8406         (nds32_address_cost_speed_prefer): Likewise.
8407         (nds32_address_cost_speed_fwprop): Likewise.
8408         (nds32_address_cost_size_prefer): Likewise.
8409         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8410         * config/nds32/nds32.c (nds32_option_override): Use
8411         nds32_init_rtx_costs function.
8413 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
8415         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8416         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8417         (TARGET_PIPELINE_N8): Likewise.
8418         (TARGET_PIPELINE_N10): Likewise.
8419         (TARGET_PIPELINE_N13): Likewise.
8420         (TARGET_PIPELINE_GRAYWOLF): Likewise.
8422 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
8424         * config/nds32/nds32-fpu.md: Update copyright year.
8426 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8428         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8430 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8432         * config/nds32/nds32.c
8433         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8434         * config/nds32/nds32.opt (minline-asm-r15): New option.
8436 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8438         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8439         MASK_HW_ABS.
8440         * config/nds32/nds32.md (abssi2): New pattern.
8442 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
8444         * config/i386/i386.md (rex64namesuffix): New mode attribute.
8445         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8446         Merge insn pattern from sse_cvtsi2ss<round_name> and
8447         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8448         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8449         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8450         using SWI48 mode iterator.
8451         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8452         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8453         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8454         pattern from sse_cvttss2si<round_saeonly_name>
8455         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8456         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8457         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8458         using SWI48 mode iterator.
8459         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8460         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8461         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8462         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8463         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8464         using SWI48 mode iterator.
8465         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8466         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8467         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8468         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8469         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8470         SWI48 mode iterator.
8471         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8472         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8473         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8474         pattern from sse_cvttsd2si<round_saeonly_name>
8475         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8477 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8479         * config/nds32/nds32-md-auxiliary.c
8480         (nds32_valid_smw_lwm_base_p): Refine.
8481         (nds32_output_smw_single_word): Refine.
8482         (nds32_output_smw_double_word): New.
8483         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8485 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8487         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8488         (nds32_output_stack_pop): Refine.
8489         (nds32_expand_unaligned_load): Refine.
8490         (nds32_expand_unaligned_store): Refine.
8492 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
8493             Chung-Ju Wu  <jasonwucj@gmail.com>
8495         * config/nds32/constants.md: Add TP_REGNUM constant.
8496         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8497         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8498         UNSPEC_ADD32.
8499         * config/nds32/nds32-doubleword.md: Consider flag_pic.
8500         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8501         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8502         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8503         and PIC code generation.
8504         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8505         code generation.
8506         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8507         optimization.
8508         * config/nds32/nds32.md: Support TLS and PIC.
8509         * config/nds32/nds32.c: Support TLS and PIC.
8510         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8511         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8512         predicate.
8514 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8516         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8517         mode with E_ prefix.
8519 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
8520             Chung-Ju Wu  <jasonwucj@gmail.com>
8522         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8523         * config/nds32/nds32-md-auxiliary.c
8524         (symbolic_reference_mentioned_p): New.
8525         (nds32_legitimize_ict_address): New.
8526         (nds32_expand_ict_move): New.
8527         (nds32_indirect_call_referenced_p): New.
8528         (nds32_symbol_binds_local_p): Delete.
8529         (nds32_long_call_p): Modify.
8530         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8531         * config/nds32/nds32-protos.h
8532         (symbolic_reference_mentioned_p): Declare.
8533         (nds32_legitimize_ict_address): Declare.
8534         (nds32_expand_ict_move): Declare.
8535         (nds32_indirect_call_referenced_p): Declare.
8536         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8537         (nds32_relax_group): Use nds32_ict_const_p as condition.
8538         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8539         (nds32_asm_file_start): Output ict_model directive in asm code.
8540         (nds32_legitimate_address_p): Consider indirect call.
8541         (nds32_print_operand): Consider indirect call.
8542         (nds32_print_operand_address): Consider indirect call.
8543         (nds32_insert_attributes): Handle "indirect_call" attribute.
8544         (TARGET_LEGITIMATE_ADDRESS_P): Define.
8545         (TARGET_LEGITIMATE_CONSTANT_P): Define.
8546         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8547         (TARGET_DELEGITIMIZE_ADDRESS): Define.
8548         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8549         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8550         (TARGET_ICT_MODEL_SMALL): Define.
8551         (TARGET_ICT_MODEL_LARGE): Define.
8552         * config/nds32/nds32.md (movsi): Consider ict model.
8553         (call, call_value): Consider ict model.
8554         (sibcall, sibcall_value): Consider ict model.
8555         * config/nds32/nds32.opt (mict-model): New option.
8556         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8557         model.
8559 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
8560             Monk Chiang  <sh.chiang04@gmail.com>
8561             Jim Wilson <jimw@sifive.com>
8563         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8564         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
8565         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8566         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8567         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
8568         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8569         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8570         compute save_libcall_adjustment properly.
8571         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8572         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8573         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8574         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8575         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8576         (ABI_SPEC): Handle mabi=ilp32e.
8577         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8578         (RVE): Add RVE mask.
8579         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8580         <-march>: Add rv32e as an example.
8582 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
8584         PR c++/82899
8585         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8586         (intra_create_variable_infos): Handle C++ constructors.
8588 2018-05-18  Martin Liska  <mliska@suse.cz>
8590         * passes.def: Remove a redundant pass.
8592 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8594         PR bootstrap/85838
8595         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8597 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8599         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8600         (ARMv4): Update.
8601         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8602         (ARMv6m): Update.
8603         (armv2, armv2a, armv3, armv3m): Delete architectures.
8604         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8605         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8606         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8607         Delete cpus.
8608         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8609         (*mulsidi3adddi): Likewise.
8610         (mulsidi3): Likewise.
8611         (*mulsidi3_nov6): Likewise.
8612         (umulsidi3): Likewise.
8613         (umulsidi3_nov6): Likewise.
8614         (umaddsidi4): Likewise.
8615         (*umulsidi3adddi): Likewise.
8616         (smulsi3_highpart): Likewise.
8617         (*smulsi3_highpart_nov6): Likewise.
8618         (umulsi3_highpart): Likewise.
8619         (*umulsi3_highpart_nov6): Likewise.
8620         * config/arm/arm.h (arm_arch3m): Delete.
8621         * config/arm/arm.c (arm_arch3m): Delete.
8622         (arm_option_override_internal): Update armv3-related comment.
8623         (arm_configure_build_target): Delete use of isa_bit_mode32.
8624         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8625         (arm_rtx_costs_internal): Delete check of arm_arch3m.
8626         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8627         (mulsa3): Likewise.
8628         (mulusa3): Likewise.
8629         * config/arm/arm-protos.h (arm_arch3m): Delete.
8630         * config/arm/arm-tables.opt: Regenerate.
8631         * config/arm/arm-tune.md: Likewise.
8632         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8633         deleted architectures.
8635 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8637         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8638         (armv5t, armv5te): New features.
8639         (ARMv5, ARMv5e): Delete fgroups.
8640         (ARMv5t, ARMv5te): Adjust for above changes.
8641         (ARMv6m): Likewise.
8642         (armv5, armv5e): Delete arches.
8643         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8644         arm_arch5.
8645         (*call_reg_arm): Likewise.
8646         (*call_value_reg_armv5): Likewise.
8647         (*call_value_reg_arm): Likewise.
8648         (*call_symbol): Likewise.
8649         (*call_value_symbol): Likewise.
8650         (*sibcall_insn): Likewise.
8651         (*sibcall_value_insn): Likewise.
8652         (clzsi2): Likewise.
8653         (prefetch): Likewise.
8654         (define_split and define_peephole2 dependent on arm_arch5):
8655         Likewise.
8656         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8657         arm_arch5e.
8658         (TARGET_ARM_QBIT): Likewise.
8659         (TARGET_DSP_MULTIPLY): Likewise.
8660         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8661         (arm_arch5, arm_arch5e): Delete.
8662         (arm_arch5t, arm_arch5te): Declare.
8663         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8664         (arm_arch5t): Declare.
8665         (arm_option_reconfigure_globals): Update for the above.
8666         (arm_options_perform_arch_sanity_checks): Update comment, replace
8667         use of arm_arch5 with arm_arch5t.
8668         (use_return_insn): Likewise.
8669         (arm_emit_call_insn): Likewise.
8670         (output_return_instruction): Likewise.
8671         (arm_final_prescan_insn): Likewise.
8672         (arm_coproc_builtin_available): Likewise.
8673         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8674         arm_arch5e with arm_arch5t and arm_arch5te.
8675         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8676         (arm_arch5t, arm_arch5te): Declare.
8677         * config/arm/arm-tables.opt: Regenerate.
8678         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8679         * config/arm/t-multilib: Likewise.
8680         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8681         instead of arm_arch5.
8682         (*call_reg_thumb1): Likewise.
8683         (*call_value_reg_thumb1_v5): Likewise.
8684         (*call_value_reg_thumb1): Likewise.
8685         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8686         unreachable path.
8687         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8689 2018-05-18  Martin Liska  <mliska@suse.cz>
8691         PR gcov-profile/84846
8692         * doc/gcov.texi: Document -t option of gcov tool.
8694 2018-05-18  Martin Liska  <mliska@suse.cz>
8696         PR gcov-profile/84846
8697         * gcov.c (print_usage): Add new -t option.
8698         (process_args): Handle the option.
8699         (generate_results): Use stdout as output when requested by
8700         the option.
8702 2018-05-18  Martin Liska  <mliska@suse.cz>
8704         PR gcov-profile/84846
8705         * coverage.c (coverage_init): Write PWD to .gcno file.
8706         * doc/gcov.texi: Document how working directory is printed.
8707         * gcov-dump.c (dump_gcov_file): Print PWD.
8708         * gcov.c (output_intermediate_file): Likewise.
8709         (read_graph_file): Read PWD string.
8710         (output_lines): Print PWD.
8712 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8714         PR middle-end/85817
8715         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8716         for retval and return false if all args to phi are zero.
8718 2018-05-18  Richard Biener  <rguenther@suse.de>
8720         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8721         method.
8722         (evrp_dom_walker::before_dom_children): Call it.
8724 2018-05-18  Richard Biener  <rguenther@suse.de>
8726         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8727         results when processing array refs with variable index.
8729 2018-05-18  Toon Moene  <toon@moene.org>
8731         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8732         directly after that of -floop-interchange. Indicate that both
8733         options are enabled by default when specifying -O3.
8735 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8737         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8738         iterator.  Delete separate integer-mode vec_set<mode> expander.
8739         (aarch64_simd_vec_setv2di): Delete.
8740         (vec_setv2di): Delete.
8741         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8742         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
8743         the "w, r" alternative.
8745 2018-05-18  Martin Liska  <mliska@suse.cz>
8747         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8748         * tree-pass.h (make_pass_lower_switch_O0): New function.
8749         * tree-switch-conversion.c (node_has_low_bound): Remove.
8750         (node_has_high_bound): Likewise.
8751         (node_is_bounded): Likewise.
8752         (class pass_lower_switch): Make it a template type and create
8753         two instances.
8754         (pass_lower_switch::execute): Add template argument.
8755         (make_pass_lower_switch): New function.
8756         (make_pass_lower_switch_O0): New function.
8757         (do_jump_if_equal): Remove.
8758         (emit_case_nodes): Simplify to just handle all 3 cases and leave
8759         all the hard work to tree optimization passes.
8761 2018-05-18  Martin Liska  <mliska@suse.cz>
8763         * dbgcnt.c (limit_low): Renamed from limit.
8764         (limit_high): New variable.
8765         (dbg_cnt_is_enabled): Check for upper limit.
8766         (dbg_cnt): Adjust dumping.
8767         (dbg_cnt_set_limit_by_index): Add new argument for high
8768         value.
8769         (dbg_cnt_set_limit_by_name): Likewise.
8770         (dbg_cnt_process_single_pair): Parse new format.
8771         (dbg_cnt_process_opt): Use strtok.
8772         (dbg_cnt_list_all_counters): Remove 'value' and add
8773         'limit_high'.
8774         * doc/invoke.texi: Document changes.
8776 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
8778         * doc/sourcebuild.texi (scalar_all_fma): Document.
8779         * tree.def (FMA_EXPR): Delete.
8780         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8781         * internal-fn.c (ternary_direct): New macro.
8782         (expand_ternary_optab_fn): Likewise.
8783         (direct_ternary_optab_supported_p): Likewise.
8784         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8785         * builtins.c (fold_builtin_fma): Delete.
8786         (fold_builtin_3): Don't call it.
8787         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8788         * expr.c (expand_expr_real_2): Likewise.
8789         * fold-const.c (operand_equal_p): Likewise.
8790         (fold_ternary_loc): Likewise.
8791         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8792         * gimple.c (DEFTREECODE): Likewise.
8793         * gimplify.c (gimplify_expr): Likewise.
8794         * optabs-tree.c (optab_for_tree_code): Likewise.
8795         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8796         * tree-eh.c (operation_could_trap_p): Likewise.
8797         (stmt_could_throw_1_p): Likewise.
8798         * tree-inline.c (estimate_operator_cost): Likewise.
8799         * tree-pretty-print.c (dump_generic_node): Likewise.
8800         (op_code_prio): Likewise.
8801         * tree-ssa-loop-im.c (stmt_cost): Likewise.
8802         * tree-ssa-operands.c (get_expr_operands): Likewise.
8803         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8804         * fold-const-call.h (fold_fma): Delete.
8805         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8806         CFN_FNMA and CFN_FNMS.
8807         (fold_fma): Delete.
8808         * genmatch.c (combined_fn): New enum.
8809         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8810         (commutative_op): New function.
8811         (commutate): Use it.  Handle more than 2 operands.
8812         (dt_operand::gen_gimple_expr): Use commutative_op.
8813         (parser::parse_expr): Allow :c to be used with non-binary
8814         operators if the commutative operand is known.
8815         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8816         CFN_FMS, CFN_FNMA and CFN_FNMS.
8817         (backprop::process_assign_use): Remove FMA_EXPR handling.
8818         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8819         (gen_hsa_fma): New function.
8820         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8821         IFN_FNMA and IFN_FNMS.
8822         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8823         * gimple-fold.h (follow_all_ssa_edges): Declare.
8824         * gimple-fold.c (follow_all_ssa_edges): New function.
8825         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8826         gimple_build interface and use follow_all_ssa_edges to fold the result.
8827         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8828         instead of checking for optabs directly.
8829         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8830         rather than FMA_EXPRs.
8831         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8832         call to IFN_FMA instead of an FMA_EXPR.
8834 2018-05-17  Jim Wilson  <jimw@sifive.com>
8836         * expr.c (do_tablejump): When converting index to Pmode, if we have a
8837         sign extended promoted subreg, and the range does not have the sign bit
8838         set, then do a sign extend.
8840         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8841         test, check for sign extended subreg and/or constant operands, and
8842         do a sign extend in that case.
8844 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
8846         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8847         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8848         Add untyped.
8849         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8850         Change logics_shift_reg to logics_shift_imm.
8851         (thunderx2t99_fp_loadpair_basic): Delete.
8852         (thunderx2t99_fp_storepair_basic): Delete.
8853         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8854         (thunderx2t99_asimd_polynomial): Delete.
8855         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8856         and neon_fp_mul_d_scalar_q.
8857         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8858         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8859         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8860         (thunderx2t99_asimd_lut): Add missing tbl types.
8861         (thunderx2t99_asimd_ext): Delete.
8862         (thunderx2t99_asimd_load1_1_mult): Delete.
8863         (thunderx2t99_asimd_load1_2_mult): Delete.
8864         (thunderx2t99_asimd_load1_ldp): New.
8865         (thunderx2t99_asimd_load1): New.
8866         (thunderx2t99_asimd_load2): Add missing *load2* types.
8867         (thunderx2t99_asimd_load3): New.
8868         (thunderx2t99_asimd_load4): New.
8869         (thunderx2t99_asimd_store1_1_mult): Delete.
8870         (thunderx2t99_asimd_store1_2_mult): Delete.
8871         (thunderx2t99_asimd_store2_mult): Delete.
8872         (thunderx2t99_asimd_store2_onelane): Delete.
8873         (thunderx2t99_asimd_store_stp): New.
8874         (thunderx2t99_asimd_store1): New.
8875         (thunderx2t99_asimd_store2): New.
8876         (thunderx2t99_asimd_store3): New.
8877         (thunderx2t99_asimd_store4): New.
8879 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
8881         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8882         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
8884 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
8885             Segher Boessenkool  <segher@kernel.crashing.org>
8887         PR target/85698
8888         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8889         operand.
8891 2018-05-17  Richard Biener  <rguenther@suse.de>
8893         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8894         for pruning loop and prune defs feeding only already visited PHIs.
8896 2018-05-17  Richard Biener  <rguenther@suse.de>
8898         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8900 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
8901             Richard Biener  <rguenther@suse.de>
8903         PR tree-optimization/85793
8904         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8905         for VMAT_ELEMENTWISE.
8907 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
8909         * internal-fn.h (lookup_internal_fn): Declare
8910         * internal-fn.c (lookup_internal_fn): New function.
8911         * gimple.c (gimple_build_call_from_tree): Handle calls to
8912         internal functions.
8913         * gimple-pretty-print.c (dump_gimple_call): Print "." before
8914         internal function names.
8915         * tree-pretty-print.c (dump_generic_node): Likewise.
8916         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8918 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
8920         * gimple-fold.h (gimple_build): Make the function forms take
8921         combined_fn rather than built_in_function.
8922         (gimple_simplify): Likewise.
8923         * gimple-match-head.c (gimple_simplify): Likewise.
8924         * gimple-fold.c (gimple_build): Likewise.
8925         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8926         rather than gimple_build_call_internal.
8927         (get_initial_defs_for_reduction): Likewise.
8928         (vect_create_epilog_for_reduction): Likewise.
8929         (vectorizable_live_operation): Likewise.
8931 2018-05-17  Martin Liska  <mliska@suse.cz>
8933         * gimple-ssa-sprintf.c (format_directive): Do not use
8934         space in between 'G_' and '('.
8936 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
8938         PR target/85323
8939         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8940         even if the mask is not all ones.
8942         PR target/85323
8943         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8944         vector.
8945         (ix86_gimple_fold_builtin): Likewise.
8947         PR target/85323
8948         * config/i386/i386.c: Include tree-vector-builder.h.
8949         (ix86_vector_shift_count): New function.
8950         (ix86_fold_builtin): Fold shift builtins by scalar count.
8951         (ix86_gimple_fold_builtin): Likewise.
8953         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8954         _mm512_setzero): New intrinsics.
8956 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
8957             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8959         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8960         code generation for cases where splatting a value is not useful.
8961         * simplify-rtx.c (simplify_ternary_operation): Simplify
8962         vec_merge across a vec_duplicate and a paradoxical subreg forming
8963         a vector mode to a vec_concat.
8965 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
8967         * config.gcc: Support "goldmont-plus".
8968         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8969         "goldmont-plus".
8970         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8971         PROCESSOR_GOLDMONT_PLUS.
8972         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8973         (processor_target_table): Add "goldmont-plus".
8974         (PTA_GOLDMONT_PLUS): Define.
8975         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8976         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8977         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8978         (fold_builtin_cpu): Add "goldmont-plus".
8979         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8980         (ix86_option_override_internal): Add "goldmont-plus".
8981         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8982         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8983         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8984         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8986 2018-05-17  Richard Biener  <rguenther@suse.de>
8988         PR tree-optimization/85757
8989         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8990         remove defs that only feed that PHI from further processing.
8992 2018-05-16  Jim Wilson  <jimw@sifive.com>
8994         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8995         asterisk to name.
8996         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8998 2018-05-16  Mark Wielaard  <mark@klomp.org>
9000         * dwarf2out.c (count_index_strings): New function.
9001         (output_indirect_strings): Call count_index_strings and generate
9002         header for dwarf_version >= 5.
9004 2018-05-16  Mark Wielaard  <mark@klomp.org>
9006         * dwarf2out.c (dwarf_FORM): New function.
9007         (set_indirect_string): Use dwarf_FORM.
9008         (reset_indirect_string): Likewise.
9009         (size_of_die): Likewise.
9010         (value_format): Likewise.
9011         (output_die): Likewise.
9012         (add_skeleton_AT_string): Likewise.
9013         (output_macinfo_op): Likewise.
9014         (index_string): Likewise.
9015         (output_index_string_offset): Likewise.
9016         (output_index_string): Likewise.
9017         (count_index_strings): Likewise.
9019 2018-05-16  Carl Love  <cel@us.ibm.com>
9021         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9022         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9024 2018-05-16  Martin Jambor  <mjambor@suse.cz>
9026         * ipa-prop.c (ipa_free_all_edge_args): Remove.
9027         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9029 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
9031         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9032         (fnma<mode>4): Likewise.
9033         (fms<mode>4): Likewise.
9034         (fnms<mode>4): Likewise.
9035         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9036         (aarch64_fnma<mode>4): Likewise.
9037         (aarch64_fms<mode>4): Likewise.
9038         (aarch64_fnms<mode>4): Likewise.
9039         (aarch64_fnmadd<mode>4): Likewise.
9041 2018-05-16  Jason Merrill  <jason@redhat.com>
9043         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
9045 2018-05-16  Richard Biener  <rguenther@suse.de>
9047         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9048         (dump_stmt_cost): Declare.
9049         (add_stmt_cost): Dump cost we add.
9050         (add_stmt_costs): New function.
9051         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9052         No longer exported.
9053         (vect_analyze_stmt): Adjust prototype.
9054         (vectorizable_condition): Likewise.
9055         (vectorizable_live_operation): Likewise.
9056         (vectorizable_reduction): Likewise.
9057         (vectorizable_induction): Likewise.
9058         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9059         cost vector to pass to vectorizable_ and record afterwards.
9060         (vect_model_reduction_cost): Take cost vector argument and adjust.
9061         (vect_model_induction_cost): Likewise.
9062         (vectorizable_reduction): Likewise.
9063         (vectorizable_induction): Likewise.
9064         (vectorizable_live_operation): Likewise.
9065         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9066         SLP_TREE_NUMBER_OF_VEC_STMTS.
9067         (vect_analyze_slp_cost_1): Remove.
9068         (vect_analyze_slp_cost): Likewise.
9069         (vect_slp_analyze_node_operations): Take visited args and
9070         a target cost vector.  Avoid processing already visited stmt sets.
9071         (vect_slp_analyze_operations): Use a local cost vector to gather
9072         costs and register those of non-discarded instances.
9073         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9074         (vect_schedule_slp_instance): Remove copying of
9075         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
9076         zero.
9077         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9078         adding cost.  Record cost entry location.
9079         (vect_prologue_cost_for_slp_op): Function to compute cost of
9080         a constant or invariant generated for SLP vect in the prologue,
9081         split out from vect_analyze_slp_cost_1.
9082         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
9083         (vect_model_promotion_demotion_cost): Likewise.
9084         (vect_model_store_cost): Likewise, make static.
9085         (vect_model_load_cost): Likewise.
9086         (vectorizable_bswap): Add cost vector arg and adjust.
9087         (vectorizable_call): Likewise.
9088         (vectorizable_simd_clone_call): Likewise.
9089         (vectorizable_conversion): Likewise.
9090         (vectorizable_assignment): Likewise.
9091         (vectorizable_shift): Likewise.
9092         (vectorizable_operation): Likewise.
9093         (vectorizable_store): Likewise.
9094         (vectorizable_load): Likewise.
9095         (vectorizable_condition): Likewise.
9096         (vectorizable_comparison): Likewise.
9097         (can_vectorize_live_stmts): Likewise.
9098         (vect_analyze_stmt): Likewise.
9099         (vect_transform_stmt): Adjust calls to vectorizable_*.
9100         * tree-vectorizer.c: Include gimple-pretty-print.h.
9101         (dump_stmt_cost): New function.
9103 2018-05-16  Richard Biener  <rguenther@suse.de>
9105         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9106         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9107         * tree-ssa-dse.c: Include tree-ssa-loop.h.
9108         (check_name): New callback.
9109         (dse_classify_store): Track cycles via a visited bitmap of PHI
9110         defs and simplify handling of in-loop and across loop dead stores
9111         and properly fail for loop-variant refs.  Handle byte-tracking with
9112         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9113         limiting the walk.
9115 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
9117         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9118         (vect_get_mask_type_for_stmt): Likewise.
9119         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9120         split out from...
9121         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
9122         to determine the statement's vector type and the vector type that
9123         should be used for calculating nunits.  Deal with cases in which
9124         the type has to be deferred.
9125         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9126         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9127         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9128         (vect_determine_vf_for_stmt): New functions, split out from...
9129         (vect_determine_vectorization_factor): ...here.
9130         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9131         (vect_get_mask_type_for_stmt): New functions, split out from
9132         vect_determine_vectorization_factor.
9134 2018-05-16  Richard Biener  <rguenther@suse.de>
9136         * tree-cfg.c (verify_gimple_assign_ternary): Properly
9137         verify the [VEC_]COND_EXPR embedded comparison.
9139 2018-05-15  Martin Sebor  <msebor@redhat.com>
9141         PR tree-optimization/85753
9142         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9143         RECORD_TYPE in addition to ARRAY_TYPE.
9145 2018-05-15  Martin Sebor  <msebor@redhat.com>
9147         PR middle-end/85643
9148         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9150 2018-05-15  Richard Biener  <rguenther@suse.de>
9152         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9153         add by_clobber_p one.  Change algorithm to collect all defs
9154         representing uses we need to walk and try reducing them to
9155         a single one before failing.
9156         (dse_dom_walker::dse_optimize_stmt): Adjust.
9158 2018-05-13  Mark Wielaard  <mark@klomp.org>
9160         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9161         (size_of_loc_descr): Likewise.
9162         (output_loc_operands): Likewise.
9163         (output_loc_operands_raw): Likewise.
9164         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9165         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9166         (hash_loc_operands): Likewise.
9167         (compare_loc_operands): Likewise.
9169 2018-05-14  Mark Wielaard  <mark@klomp.org>
9171         * dwarf2out.c (count_index_addrs): New function.
9172         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9174 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9176         PR tree-optimization/83648
9177         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9178         return value as malloc candidate.
9180 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9182         PR ipa/85734
9183         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9184         param as true in call to suggest_attribute.
9186 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
9188         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9189         -mreadonly-in-sdata.
9191 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9193         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9194         New pattern.
9195         (aarch64_crypto_aesd_fused): Likewise.
9197 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
9199         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9200         (movsi_aarch64): Likewise.
9201         (load_pairsi): Likewise.
9202         (load_pairdi): Likewise.
9203         (store_pairsi): Likewise.
9204         (store_pairdi): Likewise.
9205         (load_pairsf): Likewise.
9206         (load_pairdf): Likewise.
9207         (store_pairsf): Likewise.
9208         (store_pairdf): Likewise.
9209         (zero_extend): Likewise.
9210         (trunc): Swap alternatives.
9211         (fcvt_target): Add '?' to prefer w over r.
9213 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
9215         PR target/85756
9216         * config/i386/i386.md: Disallow non-commutative arithmetics in
9217         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9218         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
9219         in the peephole2 before it.
9221 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
9223         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9224         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9225         (ix86_handle_option): Handle -mcldemote.
9226         * config.gcc: New header.
9227         * config/i386/cldemoteintrin.h: New file.
9228         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9229         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9230         -mcldemote.
9231         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9232         OPTION_MASK_ISA_CLDEMOTE.
9233         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9234         (ix86_valid_target_attribute_inner_p): Ditto.
9235         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9236         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9237         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9238         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9239         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9240         (cldemote): New.
9241         * config/i386/i386.opt: Add -mcldemote.
9242         * config/i386/x86intrin.h: New header.
9243         * doc/invoke.texi: Add -mcldemote.
9245 2018-05-14  Richard Biener  <rguenther@suse.de>
9247         * doc/match-and-simplify.texi: Adjust :s documentation.
9249 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
9251         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9252         intended memcpy size.
9253         (REORDER_45): Likewise.
9255 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
9257         * sort.cc: New file.
9258         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9259         * vec.c (qsort_chk): Use gcc_qsort.
9260         * Makefile.in (OBJS-libcommon): Add sort.o.
9261         (build/sort.o): New target.  Use it...
9262         (BUILD_RTL): ... here, and...
9263         (build/gencfn-macros): ... here, and...
9264         (build/genmatch): ... here.
9266 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
9267             Chung-Ju Wu  <jasonwucj@gmail.com>
9269         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9270         * config/nds32/nds32-graywolf.md: New file.
9271         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9272         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9273         pipeline.
9274         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9275         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9276         * config/nds32/nds32.md (pipeline_model): Add graywolf.
9277         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9278         * config/nds32/pipelines.md: Include n15 settings.
9280 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
9281             Chung-Ju Wu  <jasonwucj@gmail.com>
9283         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9284         * config/nds32/nds32-n13.md: New file.
9285         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9286         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9287         pipeline.
9288         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9289         * config/nds32/nds32.md (pipeline_model): Add n13.
9290         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9291         * config/nds32/pipelines.md: Include n13 settings.
9293 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
9294             Chung-Ju Wu  <jasonwucj@gmail.com>
9296         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9297         * config/nds32/nds32-n10.md: New file.
9298         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9299         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9300         pipeline.
9301         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9302         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9303         * config/nds32/nds32.md (pipeline_model): Add n10.
9304         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9305         * config/nds32/pipelines.md: Include n10 settings.
9307 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
9308             Kito Cheng  <kito.cheng@gmail.com>
9309             Chung-Ju Wu  <jasonwucj@gmail.com>
9311         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9312         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9313         Add enum values for DSP extension instructions.
9314         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9315         New constraints.
9316         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9317         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9318         New code iterators.
9319         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9320         * config/nds32/nds32-dspext.md: New file for DSP implementation.
9321         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9322         * config/nds32/nds32-intrinsic.md: Likewise.
9323         * config/nds32/nds32_intrinsic.h: Likewise.
9324         * config/nds32/nds32-md-auxiliary.c: Likewise.
9325         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9326         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9327         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9328         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9329         * config/nds32/nds32-protos.h: New declarations for DSP extension.
9330         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9331         TYPE_DMAC in switch statement.
9332         * config/nds32/nds32.c: New checking and implementation for DSP
9333         extension instructions.
9334         * config/nds32/nds32.h: Likewise.
9335         * config/nds32/nds32.md: Likewise.
9336         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9337         * config/nds32/predicates.md: Implement new predicates for DSP
9338         extension.
9340 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
9342         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9343         Reformat alternatives and attributes so it is easier to identify
9344         which constraints/attributes go with which instruction.
9345         (mov<mode>_hardfloat32, FMOVE64): Likewise.
9346         (mov<mode>_softfloat32, FMOVE64): Likewise.
9347         (mov<mode>_hardfloat64, FMOVE64): Likewise.
9348         (mov<mode>_softfloat64, FMOVE64): Likewise.
9350 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9352         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9353         subsection.
9354         (Basic PowerPC Built-in Functions): The new name of the
9355         subsection previously known as "PowerPC Built-in Functions".
9356         (Basic PowerPC Built-in Functions Available on all Configurations):
9357         New subsubsection.
9358         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9359         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9360         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9361         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9363 2018-05-11  Martin Jambor  <mjambor@suse.cz>
9365         PR ipa/85655
9366         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9367         single const.
9369 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
9371         PR target/85733
9372         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9374 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
9376         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9377         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9378         (ix86_handle_option): Handle -mwaitpkg.
9379         * config.gcc: New header.
9380         * config/i386/cpuid.h (bit_WAITPKG): New bit.
9381         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9382         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9383         function type.
9384         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9385         OPTION_MASK_ISA_WAITPKG.
9386         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9387         (ix86_option_override_internal): Add PTA_WAITPKG.
9388         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9389         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9390         IX86_BUILTIN_TPAUSE.
9391         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9392         __builtin_ia32_umwait and __builtin_ia32_tpause.
9393         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9394         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9395         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9396         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9397         UNSPECV_TPAUSE): New.
9398         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9399         * config/i386/i386.opt: Add -mwaitpkg.
9400         * config/i386/waitpkgintrin.h: New file.
9401         * config/i386/x86intrin.h: New header.
9402         * doc/invoke.texi: Add -mwaitpkg.
9404 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
9406         PR target/85606
9407         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9408         equivalent.
9409         (cortex-m0): Use armv6s-m isa.
9410         (cortex-m0plus): Likewise.
9411         (cortex-m1): Likewise.
9412         (cortex-m0.small-multiply): Likewise.
9413         (cortex-m0plus.small-multiply): Likewise.
9414         (cortex-m1.small-multiply): Likewise.
9416 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
9417             Jakub Jelinek  <jakub@redhat.com>
9419         PR tree-optimization/85692
9420         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9421         source permute as well.
9423 2018-05-11  Martin Liska  <mliska@suse.cz>
9425         PR sanitizer/85556
9426         * doc/extend.texi: Document LLVM style format for no_sanitize
9427         attribute.
9429 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
9431         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9432         mode_supports_vsx_dform_quad to mode_supports_dq_form.
9433         (mode_supports_vsx_dform_quad): Likewise.
9434         (mode_supports_vmx_dform): Move these functions to be next to the
9435         other mode_supports functions.
9436         (mode_supports_dq_form): Likewise.
9437         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9438         mode_supports_dq_form.
9439         (reg_offset_addressing_ok_p): Likewise.
9440         (offsettable_ok_by_alignment): Likewise.
9441         (rs6000_legitimate_offset_address_p): Likewise.
9442         (legitimate_lo_sum_address_p): Likewise.
9443         (rs6000_legitimize_address): Likewise.
9444         (rs6000_legitimize_reload_address): Likewise.
9445         (rs6000_secondary_reload_inner): Likewise.
9446         (rs6000_preferred_reload_class): Likewise.
9447         (rs6000_output_move_128bit): Likewise.
9449 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
9451         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9452         Generate SImode target register for null target.
9453         <case IX86_BUILTIN_XGETBV>: Ditto.
9454         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9455         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9457 2018-05-10  Carl Love  <cel@us.ibm.com>
9459         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9460         dcbtt and dcbtstt if operands[2] is 0.
9462 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
9464         PR target/85693
9465         * config/i386/sse.md (usadv64qi): New expander.
9467 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
9469         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9470         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9471         -maltivec=be support.
9472         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9473         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9474         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9475         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9476         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9477         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9478         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9479         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9480         altivec_vsumsws): Adjust.
9481         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9482         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9483         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9484         support.
9485         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9486         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9487         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9488         (altivec_lve<VI_char>x): Delete expand.
9489         (*altivec_lve<VI_char>x_internal): Rename to...
9490         (altivec_lve<VI_char>x): ... this.
9491         (altivec_lvxl_<mode>): Delete expand.
9492         (*altivec_lvxl_<mode>_internal): Rename to ...
9493         (altivec_lvxl_<mode>): ... this.
9494         (altivec_stvxl_<mode>): Delete expand.
9495         (*altivec_stvxl_<mode>_internal): Rename to ...
9496         (altivec_stvxl_<mode>): ... this.
9497         (altivec_stve<VI_char>x): Delete expand.
9498         (*altivec_stve<VI_char>x_internal): Rename to ...
9499         (altivec_stve<VI_char>x): ... this.
9500         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9501         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9502         reduc_plus_scal_<mode>): Adjust.
9503         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9504         comment.
9505         (rs6000_cpu_cpp_builtins): Adjust.
9506         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9507         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9508         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9509         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9510         -maltivec=be support.
9511         (rs6000_split_vec_extract_var): Adjust.
9512         (rs6000_split_v4si_init): Adjust.
9513         (swap_selector_for_mode): Delete.
9514         (altivec_expand_lvx_be, altivec_expand_stvx_be,
9515         altivec_expand_stvex_be): Delete.
9516         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9517         -maltivec=be support.
9518         (rs6000_gimple_fold_builtin): Ditto.
9519         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9520         Adjust.
9521         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9522         (TARGET_DIRECT_MOVE_64BIT): Adjust.
9523         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9524         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9525         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9526         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9527         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9528         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9529         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9530         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9531         anonymous split): Adjust.
9532         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9533         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9535 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
9537         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9538         when --with-gxx-include-dir is also specified.
9539         * configure: Regenerate.
9541 2018-05-09  Jim Wilson  <jimw@sifive.com>
9543         PR target/84797
9544         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9545         * config/riscv/t-withmultilib: New.
9546         * config/riscv/withmultilib.h: New.
9547         * doc/install.texi: Document RISC-V --with-multilib-list support.
9549 2018-05-09  Richard Biener  <rguenther@suse.de>
9551         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9552         vector.
9553         (vect_bb_vectorization_profitable_p): Adjust.  Compute
9554         actual scalar cost using the cost vector and the add_stmt_cost
9555         machinery.
9557 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9559         PR rtl-optimization/85645
9560         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9561         in the REG_CFA_REGISTER note for LR, don't leave it empty.
9563 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9565         PR rtl-optimization/85645
9566         * shrink-wrap.c (spread_components): Return a boolean saying if
9567         anything was changed.
9568         (try_shrink_wrapping_separate): Iterate spread_components until
9569         nothing changes anymore.
9571 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9573         PR rtl-optimization/85645
9574         * regrename.c (build_def_use): Also kill the chains that include the
9575         destination of a REG_CFA_REGISTER note.
9577 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9579         PR rtl-optimization/85645
9580         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9581         insn that has a REG_CFA_REGISTER note.
9583 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
9585         * cfgexpand.c (expand_clobber): New function.
9586         (expand_gimple_stmt_1): Use it.
9587         * tree-vect-stmts.c (vect_clobber_variable): New function,
9588         split out from...
9589         (vectorizable_simd_clone_call): ...here.
9590         (vectorizable_store): Emit a clobber either side of an
9591         IFN_STORE_LANES sequence.
9592         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9594 2018-05-09  Tom de Vries  <tom@codesourcery.com>
9596         PR target/85626
9597         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9598         (define_insn "trap_if_false"): Add exit after trap.
9600 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
9602         PR rtl-optimization/85638
9603         * bb-reorder.c: Include common/common-target.h.
9604         (create_forwarder_block): New function extracted from...
9605         (fix_up_crossing_landing_pad): ...here.  Rename into...
9606         (dw2_fix_up_crossing_landing_pad): ...this.
9607         (sjlj_fix_up_crossing_landing_pad): New function.
9608         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9609         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9610         from both partitions and exit the loop after one iteration.
9612 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9614         Revert:
9615         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9616         subsection.
9617         (Basic PowerPC Built-in Functions): The new name of the
9618         subsection previously known as "PowerPC Built-in Functions".
9619         (Basic PowerPC Built-in Functions Available on all Configurations):
9620         New subsubsection.
9621         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9622         subsubsection.
9623         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9624         subsubsection.
9625         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9626         subsubsection.
9627         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9628         subsubsection.
9630 2018-05-08  Jim Wilson  <jimw@sifive.com>
9632         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9633         (LD_EMUL_SUFFIX): New.
9634         (LINK_SPEC): Use it.
9636 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9638         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9639         subsection.
9640         (Basic PowerPC Built-in Functions): The new name of the
9641         subsection previously known as "PowerPC Built-in Functions".
9642         (Basic PowerPC Built-in Functions Available on all Configurations):
9643         New subsubsection.
9644         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9645         subsubsection.
9646         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9647         subsubsection.
9648         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9649         subsubsection.
9650         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9651         subsubsection.
9653 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
9655         PR target/85683
9656         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9657         after cmpelim optimization.
9659 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
9661         * config.gcc: Support "goldmont".
9662         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9663         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9664         PROCESSOR_GOLDMONT.
9665         * config/i386/i386.c (m_GOLDMONT): Define.
9666         (processor_target_table): Add "goldmont".
9667         (PTA_GOLDMONT): Define.
9668         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9669         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9670         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9671         (fold_builtin_cpu): Add "goldmont".
9672         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9673         (ix86_option_override_internal): Add "goldmont".
9674         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9675         (processor_type): Add PROCESSOR_GOLDMONT.
9676         * config/i386/i386.md: Add CPU "glm".
9677         * config/i386/glm.md: New file.
9678         * config/i386/x86-tune.def: Add m_GOLDMONT.
9679         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9681 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
9683         PR target/85572
9684         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9685         E_V4DImode.
9686         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9687         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
9688         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
9690         PR target/85317
9691         * config/i386/i386.c (ix86_fold_builtin): Handle
9692         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9694         PR target/85480
9695         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9696         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9698 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
9700         PR target/85658
9701         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9702         (check_arch): Likewise.
9703         (check_fpu): Return the result rather than printing it.
9704         (end arch): Fix operator precedence.
9705         (end cpu): Likewise.
9706         (END): Print the result from check_fpu.
9708 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
9709             Alan Hayward  <alan.hayward@arm.com>
9710             David Sherwood  <david.sherwood@arm.com>
9712         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9713         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9714         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9715         (*fcmuo<mode>_and): New patterns.
9717 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
9719         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9720         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9721         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9722         (cmp_op, sve_imm_con): New code attributes.
9723         (SVE_COND_INT_CMP, imm_con): Delete.
9724         (cmp_op): Remove above unspecs from int attribute.
9725         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9726         to...
9727         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
9728         comparison-specific unspecs.
9729         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9730         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9731         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9732         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9733         (*vec_fcm<cmp_op><mode>): Rename to...
9734         (*fcm<cmp_op><mode>): ...this and adjust likewise.
9735         (*vec_fcmuo<mode>): Rename to...
9736         (*fcmuo<mode>): ...this and adjust likewise.
9737         (*pred_fcm<cmp_op><mode>): New pattern.
9738         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9739         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9740         functions.
9741         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9742         and UNORDERED.
9743         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9744         (aarch64_emit_sve_predicated_cond): New function.
9745         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9746         (aarch64_emit_unspec_cond_or): Replace with...
9747         (aarch64_emit_sve_or_conds): ...this new function.  Use
9748         aarch64_emit_sve_ptrue_op for the individual comparisons and
9749         aarch64_emit_binop to OR them together.
9750         (aarch64_emit_inverted_unspec_cond): Replace with...
9751         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
9752         aarch64_emit_sve_ptrue_op for the comparison and
9753         aarch64_emit_unop to invert the result.
9754         (aarch64_expand_sve_vec_cmp_float): Update after the above
9755         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
9757 2018-05-07  Nathan Sidwell  <nathan@acm.org>
9759         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9760         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9761         (Backwards Compatibility): Likewise.
9763 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9765         PR bootstrap/85681
9766         Revert:
9767         2018-05-07  Luis Machado  <luis.machado@linaro.org>
9769         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9770         <prefetch_dynamic_strides>: New const bool field.
9771         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9772         prefetch_dynamic_strides.
9773         (exynosm1_prefetch_tune): Likewise.
9774         (thunderxt88_prefetch_tune): Likewise.
9775         (thunderx_prefetch_tune): Likewise.
9776         (thunderx2t99_prefetch_tune): Likewise.
9777         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9778         to false.
9779         (aarch64_override_options_internal): Update to set
9780         PARAM_PREFETCH_DYNAMIC_STRIDES.
9781         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9782         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9783         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9784         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9785         prefetch-dynamic-strides setting.
9787         2018-05-07  Luis Machado  <luis.machado@linaro.org>
9789         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9790         <minimum_stride>: New const int field.
9791         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9792         minimum_stride field.
9793         (exynosm1_prefetch_tune): Likewise.
9794         (thunderxt88_prefetch_tune): Likewise.
9795         (thunderx_prefetch_tune): Likewise.
9796         (thunderx2t99_prefetch_tune): Likewise.
9797         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9798         (aarch64_override_options_internal): Update to set
9799         PARAM_PREFETCH_MINIMUM_STRIDE.
9800         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9801         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9802         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9803         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9804         stride is constant and is below the minimum stride threshold.
9806 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9808         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9809         to 512.
9811 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9813         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9814         <prefetch_dynamic_strides>: New const bool field.
9815         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9816         prefetch_dynamic_strides.
9817         (exynosm1_prefetch_tune): Likewise.
9818         (thunderxt88_prefetch_tune): Likewise.
9819         (thunderx_prefetch_tune): Likewise.
9820         (thunderx2t99_prefetch_tune): Likewise.
9821         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9822         to false.
9823         (aarch64_override_options_internal): Update to set
9824         PARAM_PREFETCH_DYNAMIC_STRIDES.
9825         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9826         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9827         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9828         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9829         prefetch-dynamic-strides setting.
9831 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9833         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9834         <minimum_stride>: New const int field.
9835         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9836         minimum_stride field.
9837         (exynosm1_prefetch_tune): Likewise.
9838         (thunderxt88_prefetch_tune): Likewise.
9839         (thunderx_prefetch_tune): Likewise.
9840         (thunderx2t99_prefetch_tune): Likewise.
9841         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9842         (aarch64_override_options_internal): Update to set
9843         PARAM_PREFETCH_MINIMUM_STRIDE.
9844         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9845         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9846         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9847         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9848         stride is constant and is below the minimum stride threshold.
9850 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
9852         PR c++/85659
9853         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9854         the type is addressable.  Don't force op into register if it has
9855         BLKmode.
9857 2018-05-05  Roland McGrath  <mcgrathr@google.com>
9859         PR other/77609
9860         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9861         any section for which we don't know a specific type it should have,
9862         regardless of name.  Previously this was done only for the exact
9863         names ".init_array", ".fini_array", and ".preinit_array".
9864         (default_elf_asm_named_section): Add comment about
9865         relationship with default_section_type_flags and SECTION_NOTYPE.
9866         (get_section): Don't consider it a type conflict if one side has
9867         SECTION_NOTYPE and the other doesn't, as long as neither has the
9868         SECTION_BSS et al used in the default_section_type_flags logic.
9870 2018-05-05  Tom de Vries  <tom@codesourcery.com>
9872         PR target/85653
9873         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9874         (workaround_barsyncs): New function.
9875         (nvptx_reorg): Use workaround_barsyncs.
9876         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9877         (define_expand "nvptx_membar_cta"): New define_expand.
9878         (define_insn "*nvptx_membar_cta"): New insn.
9880 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
9882         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9883         To improve optimization opportunities.
9884         * builtin-types.def: The new needed builtin types for the above.
9886 2018-05-04  Richard Biener  <rguenther@suse.de>
9888         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9889         * gimple-ssa-store-merging.c
9890         (imm_store_chain_info::output_merged_store): Remove redundant create,
9891         release split_store vector contents on failure.
9892         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9893         scalar stmt vector on cache hit.
9895 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
9897         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9898         Xilinx FP support.
9899         * config.gcc (powerpc-xilinx-eabi*): Remove.
9900         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9901         support.
9902         (fusion_addis_mem_combo_load): Ditto.
9903         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9904         FP support.
9905         (rs6000_cpu_cpp_builtins): Ditto.
9906         * config/rs6000/rs6000-linux.c
9907         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9908         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9909         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9910         support.
9911         (rs6000_setup_reg_addr_masks): Ditto.
9912         (rs6000_init_hard_regno_mode_ok): Ditto.
9913         (rs6000_option_override_internal): Ditto.
9914         (legitimate_lo_sum_address_p): Ditto.
9915         (rs6000_legitimize_address): Ditto.
9916         (rs6000_legitimize_reload_address): Ditto.
9917         (rs6000_legitimate_address_p): Ditto.
9918         (abi_v4_pass_in_fpr): Ditto.
9919         (setup_incoming_varargs): Ditto.
9920         (rs6000_gimplify_va_arg): Ditto.
9921         (rs6000_split_multireg_move): Ditto.
9922         (rs6000_savres_strategy): Ditto.
9923         (rs6000_emit_prologue_components): Ditto.
9924         (rs6000_emit_epilogue_components): Ditto.
9925         (rs6000_emit_prologue): Ditto.
9926         (rs6000_emit_epilogue): Ditto.
9927         (rs6000_elf_file_end): Ditto.
9928         (rs6000_function_value): Ditto.
9929         (rs6000_libcall_value): Ditto.
9930         * config/rs6000/rs6000.h: Ditto.
9931         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9932         (TARGET_MINMAX): ... this.  New.
9933         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9934         * config/rs6000/rs6000.md: Remove Xilinx FP support.
9935         (*movsi_internal1_single): Delete.
9936         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9937         mfpu=, mxilinx-fpu): Delete.
9938         * config/rs6000/singlefp.h: Delete.
9939         * config/rs6000/sysv4.h: Remove Xilinx FP support.
9940         * config/rs6000/t-rs6000: Ditto.
9941         * config/rs6000/t-xilinx: Delete.
9942         * config/rs6000/titan.md: Adjust for fp_type removal.
9943         * config/rs6000/vsx.md: Remove Xilinx FP support.
9944         (VStype_simple): Delete.
9945         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9946         * config/rs6000/xfpu.h: Delete.
9947         * config/rs6000/xfpu.md: Delete.
9948         * config/rs6000/xilinx.h: Delete.
9949         * config/rs6000/xilinx.opt: Delete.
9950         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9951         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9953 2018-05-04  Tom de Vries  <tom@codesourcery.com>
9955         PR libgomp/85639
9956         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9957         if ignore == 0.
9959 2018-05-04  Richard Biener  <rguenther@suse.de>
9961         PR middle-end/85627
9962         * tree-complex.c (update_complex_assignment): We are always in SSA form.
9963         (expand_complex_div_wide): Likewise.
9964         (expand_complex_operations_1): Likewise.
9965         (expand_complex_libcall): Preserve EH info of the original stmt.
9966         (tree_lower_complex): Handle removed blocks.
9967         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9968         on complex multiplication and division libcall builtins.
9970 2018-05-04  Richard Biener  <rguenther@suse.de>
9972         PR middle-end/85574
9973         * fold-const.c (negate_expr_p): Restrict negation of operand
9974         zero of a division to when we know that can happen without
9975         overflow.
9976         (fold_negate_expr_1): Likewise.
9978 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
9980         PR libstdc++/85466
9981         * real.h (real_nextafter): Declare.
9982         * real.c (real_nextafter): New function.
9983         * fold-const-call.c (fold_const_nextafter): New function.
9984         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9985         CASE_CFN_NEXTTOWARD.
9986         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9987         even when arg1_mode is different from arg0_mode.
9989 2018-05-03  Nathan Sidwell  <nathan@acm.org>
9991         * doc/extend.texi (Deprecated Features): Remove
9992         -ffriend-injection.
9993         (Backwards Compatibility): Likewise.
9994         * doc/invoke.texi (C++ Language Options): Likewise.
9995         (C++ Dialect Options): Likewise.
9997 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
9999         PR target/85530
10000         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10001         _mm512_mask_mullox_epi64): New intrinsics.
10003 2018-05-03  Tom de Vries  <tom@codesourcery.com>
10005         PR testsuite/85106
10006         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10007         dump files): Add offload-tree.
10009 2018-05-03  Richard Biener  <rguenther@suse.de>
10011         PR tree-optimization/85615
10012         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10013         to loops not nested in BBs loop father to avoid creating multi-entry
10014         loops.
10016 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10018         PR tree-optimization/70291
10019         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10020         arguments.  Change return type to tree.  Emit libcall as a new
10021         statement rather than replacing existing one when inplace_p is true.
10022         (expand_complex_multiplication_components): New function.
10023         (expand_complex_multiplication): Expand floating-point complex
10024         multiplication using the above.
10025         (expand_complex_division): Rename inner_type parameter to type.
10026         Update expand_complex_libcall call-site.
10027         (expand_complex_operations_1): Update expand_complex_multiplication
10028         and expand_complex_division call-sites.
10030 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
10032         PR target/85582
10033         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10034         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10035         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10036         the highest significant bit of the shift count mask is clear.  In
10037         check whether and[sq]i3 is needed verify that all significant bits
10038         of the shift count other than the highest are set.
10040 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10042         PR libgomp/82428
10043         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10044         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10045         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10046         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10047         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10048         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10049         __builtin_goacc_parlevel_size.
10051 2018-05-02  Richard Biener  <rguenther@suse.de>
10053         PR tree-optimization/85597
10054         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10055         do not use split vect_get_vec_defs call but call vect_get_slp_defs
10056         directly.
10058 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10060         PR testsuite/85106
10061         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10062         dump files): Add ltrans-tree.
10064 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10066         PR testsuite/85106
10067         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10068         dump files): Add wpa-ipa.
10070 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
10072         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
10073         powerpc*-*-linux*paired* target.
10074         * config/rs6000/750cl.h: Delete.
10075         * config/rs6000/paired.h: Delete.
10076         * config/rs6000/paired.md: Delete.
10077         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10078         float support.
10079         * config/rs6000/rs6000-builtin.def: Remove paired float support.
10080         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10081         comment.  Remove paired float support.
10082         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10083         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10084         VECTOR_PAIRED.
10085         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10086         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10087         declarations.
10088         * config/rs6000/rs6000.c: Remove paired float support.
10089         (paired_expand_vector_init, paired_expand_vector_move,
10090         paired_emit_vector_compare, paired_emit_vector_cond_expr,
10091         (paired_expand_lv_builtin, paired_expand_stv_builtin,
10092         paired_expand_builtin, paired_expand_predicate_builtin,
10093         paired_init_builtins): Delete.
10094         * config/rs6000/rs6000.h: Remove paired float support.
10095         * config/rs6000/rs6000.md: Remove paired float support.
10096         (move_from_CR_ov_bit): Delete.
10097         * config/rs6000/rs6000.opt (mpaired): Delete.
10098         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10099         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10101 2018-05-02  Richard Biener  <rguenther@suse.de>
10103         PR middle-end/85567
10104         * gimplify.c (gimplify_save_expr): When in SSA form allow
10105         SAVE_EXPRs to compute to SSA vars.
10107 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
10109         PR target/85582
10110         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10111         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10112         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10113         clobber operands[2], instead use a new pseudo.  Formatting fixes.
10115 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
10117         PR tree-optimization/85586
10118         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10119         exit early for statements in the same group if the accesses are
10120         not strided.
10122 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10124         PR lto/85451
10125         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10126         error message.
10128 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
10130         PR tree-optimization/85143
10131         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10133 2018-05-01  Tom de Vries  <tom@codesourcery.com>
10135         PR lto/85451
10136         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10137         not found" error message.
10139 2018-05-01  Tom de Vries  <tom@codesourcery.com>
10141         PR other/83786
10142         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10143         * vec.c (test_ordered_remove_if): New function.
10144         (vec_c_tests): Call test_ordered_remove_if.
10145         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10146         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10147         * tree-vect-patterns.c (vect_pattern_recog_1): Use
10148         VEC_ORDERED_REMOVE_IF.
10150 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10152         PR tree-optimization/82665
10153         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10154         pointer subtraction where arguments come from a memchr call.
10156 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
10158         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10159         --push-state --as-needed and --pop-state instead of --as-needed and
10160         --no-as-needed if ld supports it.
10161         * configure: Regenerated.
10163         PR web/85578
10164         * doc/install.texi2html: Replace _002d with - and _002a with * in
10165         generated html files using sed.
10167 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10169         PR c++/85523
10170         * gcc-rich-location.c (blank_line_before_p): New function.
10171         (use_new_line): New function.
10172         (gcc_rich_location::add_fixit_insert_formatted): New function.
10173         * gcc-rich-location.h
10174         (gcc_rich_location::add_fixit_insert_formatted): New function.
10176 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10178         * selftest.c (assert_streq): Rename "expected" and "actual" to
10179         "val1" and "val2".  Extend NULL-handling to cover both inputs
10180         symmetrically, while still requiring both to be non-NULL for a pass.
10181         * selftest.h (assert_streq): Rename "expected" and "actual" to
10182         "val1" and "val2".
10183         (ASSERT_EQ): Likewise.
10184         (ASSERT_EQ_AT): Likewise.
10185         (ASSERT_KNOWN_EQ): Likewise.
10186         (ASSERT_KNOWN_EQ_AT): Likewise.
10187         (ASSERT_NE): Likewise.
10188         (ASSERT_MAYBE_NE): Likewise.
10189         (ASSERT_MAYBE_NE_AT): Likewise.
10190         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
10191         the assertion to pass.
10192         (ASSERT_STREQ_AT): Likewise.
10194 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
10196         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10197         interaction with -pie.
10199 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10201         * selftest.h: Fix alphabetization of per-source-file selftest
10202         declarations.
10204 2018-04-30  Jason Merrill  <jason@redhat.com>
10206         PR c++/61982 - dead stores to destroyed objects.
10207         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10208         of clobber.
10210 2018-04-30  Jason Merrill  <jason@redhat.com>
10212         * tree.c (build_clobber): New.
10213         * tree.h: Declare it.
10214         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10216 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10218         * diagnostic-show-locus.c (layout::layout): Update for
10219         location_get_source_line returning a char_span.
10220         (struct char_span): Move to input.h.
10221         (struct correction): Update for fields in char_span becoming
10222         private.
10223         (struct source_line): Update for location_get_source_line
10224         returning a char_span.
10225         (layout::print_line): Likewise.
10226         * edit-context.c (edited_file::print_content): Likewise.
10227         (edited_file::print_diff_hunk): Likewise.
10228         (edited_file::print_run_of_changed_lines): Likewise.
10229         (edited_file::get_num_lines): Likewise.
10230         (edited_line::edited_line): Likewise.
10231         * final.c (asm_show_source): Likewise.
10232         * input.c (location_get_source_line): Convert return type
10233         from const char * to char_span, losing the final "line_len"
10234         param.
10235         (dump_location_info): Update for the above.
10236         (get_substring_ranges_for_loc): Likewise.  Use a char_span
10237         when handling the literal within the line.
10238         (test_reading_source_line): Update for location_get_source_line
10239         returning a char_span.
10240         * input.h (class char_span): Move here from
10241         diagnostic-show-locus.c, converting from a struct to a class.
10242         Make data members private.
10243         (char_span::operator bool): New.
10244         (char_span::length): New.
10245         (char_span::get_buffer): New.
10246         (char_span::operator[]): New.
10247         (char_span::subspan): Make const.
10248         (char_span::xstrdup): New.
10249         (location_get_source_line): Convert return type from const char *
10250         to char_span, losing the final "line_size" param.
10252 2018-04-30  Jan Hubicka  <jh@suse.cz>
10254         * lto-wrapper.c (ltrans_priorities): New static var.
10255         (cmp_priority): New.
10256         (run_gcc): Read priorities and if doing parallel build order
10257         the Makefile by them.
10259 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10261         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10263 2018-04-30  Richard Biener  <rguenther@suse.de>
10265         * tree-cfg.c (verify_address): Remove base argument, add
10266         flag whether to check TREE_ADDRESSABLE and do that.
10267         (verify_expr): Remove.
10268         (verify_types_in_gimple_reference): Add pieces from verify_expr.
10269         (verify_gimple_assign_single): Likewise.
10270         (verify_gimple_switch): Likewise.
10271         (verify_expr_location_1): Dereference tp once.  Add (disabled)
10272         piece from verify_expr.
10273         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10275 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
10277         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10279 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
10281         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10282         (small_data_pattern): Likewise.
10283         (arc_rewrite_small_data): Likewise.
10284         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10285         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10286         (get_symbol_alignment): New function.
10287         (legitimate_small_data_address_p): Likewise.
10288         (legitimate_scaled_address): Update, call
10289         legitimate_small_data_address_p.
10290         (output_sdata): New static variable.
10291         (arc_print_operand): Update how we handle small data operands.
10292         (arc_print_operand_address): Likewise.
10293         (arc_legitimate_address_p): Update, use
10294         legitimate_small_data_address_p.
10295         (arc_rewrite_small_data_p): Remove.
10296         (arc_rewrite_small_data_1): Likewise.
10297         (arc_rewrite_small_data): Likewise.
10298         (small_data_pattern): Likewise.
10299         (compact_sda_memory_operand): Update to use
10300         legitimate_small_data_address_p and get_symbol_alignment.
10301         (prepare_move_operands): Don't rewite sdata pattern.
10302         (prepare_extend_operands): Remove.
10303         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10304         pattern.
10305         (zero_extendqisi2): Likewise.
10306         (zero_extendhisi2): Likewise.
10307         (extendqihi2): Likewise.
10308         (extendqisi2): Likewise.
10309         (extendhisi2): Likewise.
10310         (addsi3): Likewise.
10311         (subsi3): Likewise.
10312         (andsi3): Likewise.
10313         * config/arc/constraints.md (Usd): Change it to memory constraint.
10315 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
10317         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10318         as source of std instructions.
10319         * config/arc/arc.md (movsi_insn): Update pattern predicate to
10320         allow 6-bit constants as source for store instructions.
10321         (movdi_insn): Update instruction pattern to allow 6-bit constants
10322         as source for store instructions.
10324 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
10326         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10328 2018-04-30  Nathan Sidwell  <nathan@acm.org>
10329             Sandra Loosemore <sandra@codesourcery.com>
10331         * dumpfile.c (dump_open): Allow '-' for stdout.
10332         * doc/invoke.texi (Developer Options): Document dump filename
10333         determination early.  Document stdin/stdout selection.
10335 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
10337         Microblaze Target: PIC data text relative
10339         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10340         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10341         Add declaration.
10342         * config/microblaze/microblaze.h (microblaze_constant_address_p):
10343         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10344         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10345         New addressing mode for data-text relative position indepenedent code.
10346         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10347         'ADDRESS_SYMBOLIC_TXT_REL'.
10348         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10349         (microblaze_legitimate_pic_operand): Exclude function calls from
10350         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10351         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10352         addresses cases.
10353         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10354         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10355         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10356         for 'address + offset'.
10357         (microblaze_expand_prologue): Add new function prologue call for
10358         'r20' assignation.
10359         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10360         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10361         table in case of TARGET_PIC_DATA_TEXT_REL.
10362         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10363         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10364         Add new macros 'UNSPEC_TEXT',
10365         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10366         + exclude function calls from 'UNSPEC_PLT' in case of data text
10367         relative mode.
10368         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10369         new target hook for generating address diff vector tables in case of
10370         flag_pic.
10371         * doc/tm.texi : Regenerate.
10372         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10373         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10374         of addr diff vector generation.
10375         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10376         target hook definition.
10377         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10378         Add default function for generate_pic_addr_diff_vec -> flag_pic.
10379         * doc/invoke.texi (Add new pic option): Add new microblaze pic
10380         option for data text relative.
10382 2018-04-30  Richard Biener  <rguenther@suse.de>
10384         * tree-chrec.h (evolution_function_is_constant_p): Remove
10385         redundant check.
10386         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10388 2018-04-30  Richard Biener  <rguenther@suse.de>
10390         PR bootstrap/85571
10391         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10393 2018-04-30  Richard Biener  <rguenther@suse.de>
10395         PR tree-optimization/28364
10396         PR tree-optimization/85275
10397         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10398         copying first exit test.
10400 2018-04-28  Mark Wielaard  <mark@klomp.org>
10402         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10403         dwarf_version >= 5.
10404         (dwarf_AT): Handle DW_AT_addr_base.
10405         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10407 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
10409         PR target/84431
10410         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10411         (*ashl<dwi>3_doubleword_mask_1): Ditto.
10412         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10413         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10415 2018-04-28  Richard Biener  <rguenther@suse.de>
10417         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10418         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10419         to reflect use.  Only add interesting stmts.
10421 2018-04-27  Martin Jambor  <mjambor@suse.cz>
10423         PR ipa/85549
10424         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10425         the jump function allows for passing through aggregate values.
10427 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
10429         * input.h (in_system_header_at): Convert from macro to inline
10430         function.
10431         (from_macro_expansion_at): Likewise.
10432         (from_macro_definition_at): Likewise.
10434 2018-04-27  Jeff Law  <law@redhat.com>
10436         * config.gcc: Mark tile* targets as deprecated/obsolete.
10438 2018-04-27  Richard Biener  <rguenther@suse.de>
10440         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10441         fix for ILP32.
10443 2018-04-27  Richard Biener  <rguenther@suse.de>
10445         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10447 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
10449         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10450         with Yd constraint. Set "preferred_for_speed" attribute from
10451         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10452         with Yd constraint.
10453         (*movdi_internal): Ditto.
10454         (movti_interunit splitters): Remove
10455         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10456         (movdi_interunit splitters): Ditto.
10457         * config/i386/constraints.md (Ye): Remove.
10458         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10460 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10462         PR target/85512
10463         * config/aarch64/constraints.md (Usg): Limit to 31.
10464         (Usj): Limit to 63.
10466 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
10468         PR tree-optimization/85529
10469         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10470         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10471         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10472         zero extension or masking of the MSB bit.
10473         (optimize_range_tests): Add FIRST_BB argument, pass it through
10474         to optimize_range_tests_var_bound.
10475         (maybe_optimize_range_tests, reassociate_bb): Adjust
10476         optimize_range_tests callers.
10478 2018-04-26  Richard Biener  <rguenther@suse.de>
10479             Jakub Jelinek  <jakub@redhat.com>
10481         * cgraph.h (symbol_table): Just declare debug method here.
10482         * symtab.c (symbol_table::debug): Define.
10484 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
10486         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10488 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
10490         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10491         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10492         (*movdi_internal): Substitute Yi and Yj constraint with x
10493         and Ym and Yn constraint with y constraint.  Update "isa"
10494         attribute and set "preferred_for_speed" attribute from
10495         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10496         (*movsi_internal): Ditto.
10497         (*movdf_internal): Ditto.
10498         (*movsf_internal): Ditto.
10499         (*zero_extendsidi2): Ditto.
10500         * config/i386/sse.md (vec_set<mode>_0): Ditto.
10501         (sse2_loadld): Ditto.
10502         (*vec_extract<ssevecmodelower>_0): Ditto.
10503         (*vec_extractv4si_0_zext_sse4): Ditto.
10504         (vec_concatv2di): Ditto.
10505         (*vec_dup<mode>): Ditto.
10506         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10507         * config/i386/constraints.md (Yi): Remove.
10508         (Yj): Remove.
10509         (Ym): Remove.
10510         (Yn): Remove.
10512 2018-04-26  Nathan Sidwell  <nathan@acm.org>
10514         * dumpfile.c (dump_open): New.
10515         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10516         (dump_finish): Detect stdio/stderr by value not name.
10518 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
10520         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10522 2018-04-26  Tom de Vries  <tom@codesourcery.com>
10524         PR target/84952
10525         * config/nvptx/nvptx.c (verify_neutering_jumps)
10526         (verify_neutering_labels): New function
10527         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10529 2018-04-26  Tom de Vries  <tom@codesourcery.com>
10531         PR target/84025
10532         * config/nvptx/nvptx.c (needs_neutering_p): New function.
10533         (nvptx_single): Use needs_neutering_p to skip over insns that do not
10534         need neutering.
10536 2018-04-26  Richard Biener <rguenther@suse.de>
10537             Tom de Vries  <tom@codesourcery.com>
10539         PR lto/85422
10540         * lto-streamer-out.c (output_function): Fixup loops if required to match
10541         discovery done in the reader.
10543 2018-04-26  Richard Biener  <rguenther@suse.de>
10545         PR tree-optimization/85116
10546         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10547         have a loop exit from the single latch predecessor.  Remove
10548         case of header with just condition.
10549         (ch_base::copy_headers): Exclude infinite loops from any
10550         processing.
10551         (pass_ch::execute): Record exits.
10553 2018-04-26  Richard Biener  <rguenther@suse.de>
10555         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10556         prologue cost vector and pass it to vect_get_load_cost.
10557         (vect_get_peeling_costs_all_drs): Likewise.
10558         (vect_peeling_hash_get_lowest_cost): Likewise.
10559         (vect_enhance_data_refs_alignment): Likewise.
10561 2018-04-26  Richard Biener  <rguenther@suse.de>
10563         PR middle-end/85450
10564         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10565         checking of integer<->pointer conversions.
10566         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10567         sign-/zero-extending pointer types.
10568         (expand_omp_for_static_chunk): Likewise.
10570 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
10571             Jean Lee  <xiaoyur347@gmail.com>
10573         * config/mips/mips.c (mips_asan_shadow_offset): New function.
10574         (TARGET_ASAN_SHADOW_OFFSET): Define.
10575         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10576         true for -fsanitize=address.
10578 2018-04-25  Mark Wielaard  <mark@klomp.org>
10580         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10581         shorter ones.
10583 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
10585         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10586         than "alu", remove explicit "memory" and "imm_disp" attributes.
10587         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10589         PR middle-end/85414
10590         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10591         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10592         gen_lowpart_no_emit.
10594 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
10596         PR target/85473
10597         * config/i386/i386.c (ix86_expand_builtin): Change memory
10598         operand to XI, extend p0 to Pmode.
10599         * config/i386/i386.md: Change unspec volatile and operand
10600         1 mode to XI, change operand 0 mode to P.
10602 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10604         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10605         GET_MODE_MASK before any checking.
10606         (nds32_can_use_bset_p): Likewise.
10607         (nds32_can_use_btgl_p): Likewise.
10609 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10611         * config/nds32/nds32-doubleword.md: New define_split pattern for
10612         illegal register number.
10614 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10616         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10618 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10620         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10622 2018-04-25  Richard Biener  <rguenther@suse.de>
10624         * lto-streamer.h (LTO_major_version): Bump to 8.
10626 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
10628         * BASE-VER: Set to 9.0.0.
10630 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
10632         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10633         in __abskf2 and __powikf2.
10635 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10637         PR target/85512
10638         * config/aarch64/constraints.md (Usg, Usj): New constraints.
10639         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10640         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10641         Use the above on operand 2.  Reindent.
10642         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10644 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
10646         PR target/85485
10647         * common/config/i386/i386-common.c (ix86_handle_option): Don't
10648         handle OPT_mcet.
10649         * config/i386/i386.opt (mcet): Removed.
10650         * doc/install.texi: Remove -mcet documentation.
10651         * doc/invoke.texi: Likewise.
10653 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
10655         PR target/85485
10656         * doc/install.texi: Remove -mcet from bootstrap-cet.
10658 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
10660         PR target/85511
10661         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10662         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10663         if TARGET_64BIT.
10665         PR target/85503
10666         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10667         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10668         containing a CONST_VECTOR.
10670 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
10672         * doc/install.texi: Update newlib dependency for nvptx.
10674 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
10676         PR target/85508
10677         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10678         instead of INTVAL when shifting x left.
10680 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
10682         PR tree-optimization/85478
10683         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10684         vect_grouped_store_supported for single element vectors.
10686 2018-04-24  Richard Biener  <rguenther@suse.de>
10688         PR target/85491
10689         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10690         load cost increase to the case of non-constant step.
10692 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
10694         PR target/84828
10695         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10696         destination if any_malformed_asm.
10698 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
10700         PR middle-end/85496
10701         * expr.c (store_field): In the bitfield case, if the value comes from
10702         a function call and is returned in registers by means of a PARALLEL,
10703         do not change the mode of the temporary unless BLKmode and VOIDmode.
10705 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
10707         PR rtl-optimization/85423
10708         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10709         dependencies to debug insns when the previous insn is non-debug.
10711 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
10713         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10714         enums into a single definition.
10715         (fls): Fix predicates and printing.
10716         (seti): Likewise.
10718 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
10720         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10721         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10722         and short u6 immediate.
10723         (check_if_valid_sleep_operand): Remove.
10724         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10726 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10728         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10729         flag_always_save_lp condition.
10730         * config/nds32/nds32.opt (malways-save-lp): New option.
10732 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10734         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10735         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10736         * config/nds32/nds32.h
10737         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10738         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10740 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10742         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10743         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10745 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10746             Chung-Ju Wu  <jasonwucj@gmail.com>
10748         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10749         Declare.
10750         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10751         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10753 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10755         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10757 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10759         * config/nds32/nds32-protos.h (nds32_data_alignment,
10760         nds32_local_alignment): Declare.
10761         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10762         nds32_local_alignment): New functions.
10763         (TARGET_CONSTANT_ALIGNMENT): Define.
10764         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10766 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10768         * config/nds32/nds32.c
10769         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10770         (TARGET_MODES_TIEABLE_P): Likewise.
10772 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10774         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10775         level Ofast and Og.
10777 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
10778             Chung-Ju Wu  <jasonwucj@gmail.com>
10780         * config/nds32/constants.md (unspec_volatile_element): Add enum values
10781         for unaligned access.
10782         * config/nds32/nds32-intrinsic.c: Implementation of expanding
10783         unaligned access.
10784         * config/nds32/nds32-intrinsic.md: Likewise.
10785         * config/nds32/nds32_intrinsic.h: Likewise.
10786         * config/nds32/nds32.h (nds32_builtins): Likewise.
10787         * config/nds32/nds32.opt (munaligned-access): New option.
10788         * config/nds32/nds32.c (nds32_asm_file_start): Display
10789         flag_unaligned_access status.
10791 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
10793         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10794         -mno-relax is present.
10795         * config/riscv/linux.h (LINK_SPEC): Ditto.
10797 2018-04-20  Martin Sebor  <msebor@redhat.com>
10799         PR c/85365
10800         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10801         for null pointers.
10802         (gimple_fold_builtin_stxcpy_chk): Same.
10803         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10805 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
10807         PR target/85456
10808         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10809         __powikf2 when long double is IEEE 128-bit.
10811 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
10813         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10814         step to make sure stack always aligned.
10816 2018-04-20  Carl Love  <cel@us.ibm.com>
10818         PR target/83402
10819         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10820         size check for arg0.
10822 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
10823             Tom de Vries  <tom@codesourcery.com>
10825         PR target/85445
10826         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10827         Emit insns for calls too.
10828         (nvptx_find_par): Always look for worker-level predecessor insn.
10829         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
10830         calls.
10831         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10832         (nvptx_process_pars): Propagate frames for calls.
10834 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
10836         PR target/85469
10837         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10838         Removed.
10839         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10840         (ix86_handle_option): Don't handle OPT_mibt.
10841         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10842         __SHSTK__.
10843         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10844         has_ibt and ibt.
10845         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10846         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10847         (ix86_target_macros): Define __CET__ with flag_cf_protection
10848         for -fcf-protection.
10849         * config/i386/i386.c (isa2_opts): Remove -mibt.
10850         * config/i386/i386.h (TARGET_IBT): Removed.
10851         (TARGET_IBT_P): Likewise.
10852         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10853         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10854         * config/i386/i386.opt (mcet): Update help message.
10855         (mshstk): Likewise.
10856         (mibt): Removed.
10857         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
10858         -mcet as an alias for -mshstk.
10860 2018-04-20  Richard Biener <rguenther@suse.de>
10862         PR middle-end/85475
10863         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10864         complexity by forcing a single use of the multiply operand.
10866 2018-04-20  Martin Jambor  <mjambor@suse.cz>
10868         ipa/85449
10869         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10870         recursion dependency to only apply to non-clones.
10872 2018-04-20  Martin Jambor  <mjambor@suse.cz>
10874         ipa/85447
10875         * ipa-cp.c (create_specialized_node): Check that clones of
10876         self-recursive edges exist during IPA-CP.
10878 2018-04-19  Toon Moene  <toon@moene.org>
10880         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10881         by -O3.
10883 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
10885         PR tree-optimization/85467
10886         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10887         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
10888         VECTOR_CST element to type.
10890 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10892         PR target/85397
10893         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10894         * config/i386/i386.md (builtin_setjmp_setup): Removed.
10895         (builtin_longjmp): Likewise.
10896         (save_stack_nonlocal): New pattern.
10897         (restore_stack_nonlocal): Likewise.
10899 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10901         PR target/85404
10902         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10903         Replace ASM_OUTPUT_LABEL with fprintf.
10905 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10907         PR target/85417
10908         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10909         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10910         * config/i386/i386-c.c (ix86_target_macros_internal): Also
10911         define __IBT__ and __SHSTK__ for -fcf-protection.
10912         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10913         TARGET_IBT.
10914         (ix86_trampoline_init): Likewise.
10915         (x86_output_mi_thunk): Likewise.
10916         (ix86_notrack_prefixed_insn_p): Likewise.
10917         (ix86_option_override_internal): Don't disallow -fcf-protection.
10918         * config/i386/i386.md (rdssp<mode>): Also enable for
10919         -fcf-protection.
10920         (incssp<mode>): Likewise.
10921         (nop_endbr): Likewise.
10922         * config/i386/i386.opt (mcet): Change help message to built-in
10923         functions only.
10924         (mibt): Likewise.
10925         (mshstk): Likewise.
10926         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10927         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
10928         enable CET built-in functions.
10930 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
10932         * common/config/i386/i386-common.c
10933         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10934         OPTION_MASK_ISA_MOVDIRI_UNSET,
10935         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10936         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10937         * config.gcc (movdirintrin.h): New header.
10938         * config/i386/cpuid.h (bit_MOVDIRI,
10939         bit_MOVDIR64B): New bits.
10940         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10941         and -mmvodir64b.
10942         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10943         (VOID, PVOID, PCVOID)): New function types.
10944         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10945         __builtin_ia32_directstoreu_u64,
10946         __builtin_ia32_movdir64b): New builtins.
10947         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10948         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10949         and -mmovdiri.
10950         (ix86_valid_target_attribute_inner_p): Ditto.
10951         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10952         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10953         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10954         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10955         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10956         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10957         (movdiri<mode>, movdir64b_<mode>): New.
10958         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10959         * config/i386/immintrin.h: Include movdirintrin.h.
10960         * config/i386/movdirintrin.h: New file.
10961         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10963 2018-04-19  Richard Biener  <rguenther@suse.de>
10965         PR middle-end/85455
10966         * cfg.c (clear_bb_flags): When loop state says we have
10967         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10969 2018-04-19  Richard Biener  <rguenther@suse.de>
10971         PR tree-optimization/84737
10972         * tree-vect-data-refs.c (vect_copy_ref_info): New function
10973         copying restrict info.
10974         (vect_setup_realignment): Use it.
10975         * tree-vectorizer.h (vect_copy_ref_info): Declare.
10976         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10977         the first DR to all generated stores.
10978         (vectorizable_load): Likewise for loads.
10980 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
10982         PR tree-optimization/85446
10983         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10984         the integral and pointer types to have the same precision.
10986         * doc/install.texi: Document --disable-cet being the default and
10987         --enable-cet=auto.
10989 2018-04-18  Martin Liska  <mliska@suse.cz>
10991         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10992         style.
10994 2018-04-18  Martin Liska  <mliska@suse.cz>
10996         Revert
10997         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
10999         PR ipa/83983
11000         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11001         arguments if they are comparable.
11003 2018-04-18  Martin Liska  <mliska@suse.cz>
11005         Revert
11006         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
11008         PR lto/84805
11009         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11010         incomplete types.
11012 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
11014         PR target/85388
11015         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11016         ENDBR after calling __morestack.
11018 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
11020         PR jit/85384
11021         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11022         by using gcc_base_ver to generate a gcc_driver_version, and use
11023         it when generating GCC_DRIVER_NAME.
11024         * configure: Regenerate.
11026 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
11028         PR target/81084
11029         * config.gcc: Obsolete powerpc*-*-*spe*.
11031 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11033         PR debug/84637
11034         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11035         (stabstr_D): Change type of unum from unsigned int to
11036         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
11037         type.
11039 2018-04-17  Jim Wilson  <jimw@sifive.com>
11041         PR 84856
11042         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11043         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11044         Set arg_pointer_offset after using pretend_args_size.
11046 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11048         PR rtl-optimization/85431
11049         * dse.c (record_store): Ignore zero width stores.
11051         PR sanitizer/85230
11052         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
11053         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11054         __builtin_stack_restore rather than after it.
11055         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11056         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11057         argument instead of virtual_dynamic_stack_rtx.
11059 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11061         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11062         New prototype.
11063         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11064         Add note to error message to explain internal mapping of overloaded
11065         built-in function name to non-overloaded built-in function name.
11066         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11067         function.
11069 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
11071         PR target/85424
11072         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11073         where the inputs overlap with the output.
11075 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11077         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11078         (=v, v) alternative and explicit "memory" attribute.
11079         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
11080         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11081         attributes.
11082         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11083         "sselog1" type instead of "sselog".
11084         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11085         "sselog".  Remove explicit "memory" attribute.
11086         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11087         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11088         attributes.
11089         (vec_extract_hi_v32hi): Merge all alternatives into one, use
11090         "sselog1" type instead of "sselog".  Remove explicit "memory"
11091         attribute.
11092         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11093         use "sselog1" type instead of "sselog".  Remove explicit "memory"
11094         attribute.
11095         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11096         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11097         attributes.
11098         (vec_extract_hi_v64qi): Merge all alternatives into one, use
11099         "sselog1" type instead of "sselog".  Remove explicit "memory"
11100         attribute.
11101         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11102         use "sselog1" type instead of "sselog".  Remove explicit "memory"
11103         attribute.
11105         PR target/85430
11106         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11108         PR middle-end/85414
11109         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11110         on a SUBREG.
11112 2018-04-17  Martin Jambor  <mjambor@suse.cz>
11114         PR ipa/85421
11115         * ipa-cp.c (create_specialized_node): Call
11116         expand_all_artificial_thunks if necessary.
11118 2018-04-17  Martin Liska  <mliska@suse.cz>
11120         PR lto/85405
11121         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11122         in message, remote space in between '_G' and '('.
11124 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11126         PR target/85281
11127         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11128         avx512f_vmcmp<mode>3<round_saeonly_name>,
11129         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11130         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11131         avx512f_rndscale<mode><round_saeonly_name>,
11132         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11133         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11134         Use %<iptr>2 instead of %2 for -masm=intel.
11135         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11136         avx512f_vcvttss2usi<round_saeonly_name>,
11137         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11138         -masm=intel.
11139         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11140         avx512f_vcvttsd2usi<round_saeonly_name>,
11141         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11142         Use %q1 instead of %1 for -masm=intel.
11143         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11144         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11145         of %3 for -masm=intel.
11146         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11147         -masm=intel.
11148         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11149         -masm=intel.
11150         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11151         -masm=intel.
11152         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11153         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11154         %g1.
11155         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11156         -masm=intel.
11157         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11158         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11159         %g1 and one with %0 and %1.
11160         (avx512er_vmrcp28<mode><round_saeonly_name>,
11161         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11162         %1 for -masm=intel.
11163         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11164         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11165         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11166         of %0 and %{%4%} for -masm=intel.
11167         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11168         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11169         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11170         order of %0 and %{%5%}%{z%} for -masm=intel.
11172 2018-04-17  Jan Hubicka  <jh@suse.cz>
11174         PR lto/85405
11175         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11177 2018-04-17  Martin Liska  <mliska@suse.cz>
11179         PR ipa/85329
11180         * multiple_target.c (create_dispatcher_calls): Set apostrophes
11181         for target_clone error message.  Make default implementation
11182         clone to be a local declaration.
11183         (separate_attrs): Add new argument and check for an empty
11184         string.
11185         (expand_target_clones): Handle it.
11186         (ipa_target_clone): Make redirection just for target_clones
11187         functions.
11189 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
11190             Tom de Vries  <tom@codesourcery.com>
11192         PR middle-end/84955
11193         * omp-expand.c (expand_oacc_for): Add dummy false branch for
11194         tiled basic blocks without omp continue statements.
11196 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
11198         PR target/83660
11199         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11200         vec_extract expression as having side effects to make sure it gets
11201         a cleanup point.
11203 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
11205         PR target/85403
11206         * config/i386/i386.c (get_builtin_code_for_version): Check
11207         error_mark_node.
11209 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
11211         PR target/84331
11212         * config.gcc: Support "skylake".
11213         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11214         PROCESSOR_SKYLAKE.
11215         * config/i386/i386.c (m_SKYLAKE): Define.
11216         (processor_target_table): Add "skylake".
11217         (ix86_option_override_internal): Add "skylake".
11218         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11219         PROCESSOR_CANNONLAKE.
11220         (get_builtin_code_for_version): Fix priority for
11221         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11222         PROCESSOR_SKYLAKE-AVX512.
11223         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11224         (processor_type): Add PROCESSOR_SKYLAKE.
11226 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
11227             Jason Merrill  <jason@redhat.com>
11229         PR c++/85112
11230         * convert.c (convert_to_integer_1): Use direct recursion for
11231         enumeral types and types with a precision less than the number
11232         of bits in their mode.
11234 2018-04-16  Julia Koval  <julia.koval@intel.com>
11236         PR target/84413
11237         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11238         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11240 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
11242         PR target/85293
11243         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11244         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11245         and -mno-direct-move.
11247 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
11249         PR target/83402
11250         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11251         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11252         Ensure negative shifts result in {0}.
11254 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
11256         PR rtl-optimization/79916
11257         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11258         regs (if any) to define how to gnerate SD moves when LRA is in
11259         progress.
11261 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
11263         PR rtl-optimization/85393
11264         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11265         * except.c (expand_dw2_landing_pad_for_region): Make static.
11266         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11267         a label and unconditional jump to old_bb, rather than
11268         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11269         basic block.
11271         PR rtl-optimization/85376
11272         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11273         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11274         instead of a specific value.
11276 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
11277             Bin Cheng  <bin.cheng@arm.com>
11279         PR tree-optimization/82965
11280         PR tree-optimization/83991
11281         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11282         by_profile_only parameter.
11283         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11284         information if the loop was predicted to iterate too many times.
11285         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11287 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
11289         PR lto/71991
11290         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11291         always inline.
11293 2018-04-13  Martin Liska  <mliska@suse.cz>
11294             Jakub Jelinek  <jakub@redhat.com>
11296         PR middle-end/81657
11297         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11298         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11299         * builtins.c (expand_builtin_memory_copy_args): Use
11300         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11301         handle dest_addr == pc_rtx.
11303 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
11305         PR target/85291
11306         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11307         asked to not generate direct moves.
11308         (fix_trunc<mode>si2_stfiwx): Similar.
11309         (fix_trunc<mode>si2_internal): Similar.
11311 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
11313         PR debug/83157
11314         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11315         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11316         lookup if dest in some wider mode is known to be const0_rtx and
11317         if so, record permanent equivalence for it to be ZERO_EXTEND of
11318         the narrower mode destination.
11320 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
11322         * lto-streamer-out.c (output_function): Revert 259346.
11323         * omp-expand.c (expand_oacc_for): Likewise.
11325 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
11327         PR rtl-optimization/85354
11328         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11329         * sel-sched.c (sel_global_init): ... here.
11331 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
11333         PR target/85238
11334         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11335         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11336         mode for PE-COFF targets.
11337         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11338         (i386_pe_asm_lto_end): Likewise.
11339         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11340         (TARGET_ASM_LTO_END): Likewise.
11341         * config/i386/winnt.c (saved_debug_info_level): New static variable.
11342         (i386_pe_asm_lto_start): New function.
11343         (i386_pe_asm_lto_end): Likewise.
11345 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
11346             Richard Biener  <rguenther@suse.de>
11348         PR middle-end/84955
11349         * lto-streamer-out.c (output_function): Fix CFG loop state before
11350         streaming out.
11351         * omp-expand.c (expand_oacc_for): Handle calls to internal
11352         functions like regular functions.
11354 2018-04-12  Richard Biener  <rguenther@suse.de>
11356         PR lto/85371
11357         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11358         for the early LTO debug to properly generate references to it
11359         during DIE emission.  Do not re-use that for the skeleton for
11360         split-dwarf.
11361         (dwarf2out_early_finish): Likewise.
11363 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
11365         PR target/85328
11366         * config/i386/sse.md
11367         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11368         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11369         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11370         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11371         and output is a reg, avoid creating invalid lowpart subreg, but
11372         instead split into a 512-bit move.  Don't split if not AVX512VL,
11373         input is xmm16+ reg and output is a mem.
11374         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11375         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11376         xmm16+ reg and output is a mem.
11378 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11380         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11381         also for flag_dwarf2_cfi_asm.
11383 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
11385         PR rtl-optimization/85342
11386         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11387         a bool scalar var inside of the loop instead.  Don't try to update
11388         recog_data.operand after failed apply_change_group.
11390 2018-04-12  Tom de Vries  <tom@codesourcery.com>
11392         PR target/85296
11393         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11394         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
11395         array with flexible array member as array without given dimension.
11396         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11397         argument for undefined param to true.
11399 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
11401         PR target/85321
11402         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11403         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11404         from PowerPC section.
11405         * config/rs6000/sysv4.opt (mcall-): Improve help text.
11406         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11407         help text that is too long.
11408         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11409         help text that is too long.
11410         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11411         help text that is too long.
11413 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
11415         * config/alpha/alpha.md (stack_probe_internal): Rename
11416         from "probe_stack".  Update all callers.
11418 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
11420         PR rtl-optimization/84566
11421         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11422         sched_macro_fuse_insns.
11424 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
11426         PR target/84301
11427         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11428         (compute_block_dependences): ... from here.
11430 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
11432         PR tree-optimization/85331
11433         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11434         from int to HOST_WIDE_INT.
11436 2018-04-11  Martin Jambor  <mjambor@suse.cz>
11438         PR ipa/84149
11439         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11440         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11441         not the same as the source val.
11442         (cgraph_edge_brings_value_p): New parameter.
11443         (gather_edges_for_value): Pass destination value to
11444         cgraph_edge_brings_value_p.
11445         (perhaps_add_new_callers): Likewise.
11446         (get_info_about_necessary_edges): Likewise and exclude values brought
11447         only by self-recursive edges.
11448         (create_specialized_node): Redirect only clones of self-calling edges.
11449         (+self_recursive_pass_through_p): New function.
11450         (find_more_scalar_values_for_callers_subset): Use it.
11451         (find_aggregate_values_for_callers_subset): Likewise.
11452         (known_aggs_to_agg_replacement_list): Removed.
11453         (decide_whether_version_node): Re-calculate known constants for all
11454         remaining context clones.
11456 2018-04-11  Richard Biener  <rguenther@suse.de>
11458         PR lto/85339
11459         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11460         from early DWARF output.
11461         (dwarf2out_early_finish): Output line info unconditionally into
11462         early DWARF and add reference to it.
11464 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
11466         PR target/85281
11467         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11468         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11469         other than V2DFmode using iptr mode attribute.
11470         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11472 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
11474         PR rtl-optimization/84659
11475         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11477 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
11479         PR debug/85302
11480         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11481         SIZEP is NULL.
11482         (output_loc_list): Pass address of a dummy size variable even in the
11483         locview handling loop.
11484         (index_location_lists): Add comment on why skip_loc_list_entry can't
11485         call size_of_locs.
11487 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11489         PR target/85261
11490         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11491         into register.
11493 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
11495         PR target/85321
11496         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11497         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11498         and -mstring-compare-inline-limit.
11500 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
11502         PR target/85287
11503         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11504         for stack clash protection in a register whenever we need it to be in
11505         a register.
11507 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
11509         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11510         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11512 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
11514         PR target/85321
11515         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11516         the help text.
11517         (mlong-double-): Ditto.
11518         * config/rs6000/sysv4.opt (msdata=): Ditto.
11519         (mtls-size=): Ditto.
11521 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11523         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11524         erroneous entries for
11525         "vector int vec_ldl (int, long int *)", and
11526         "vector unsigned int vec_ldl (int, unsigned long int *)".
11527         Add comments and entries for
11528         "vector bool char vec_ldl (int, bool char *)",
11529         "vector bool short vec_ldl (int, bool short *)",
11530         "vector bool int vec_ldl (int, bool int *)",
11531         "vector bool long long vec_ldl (int, bool long long *)",
11532         "vector pixel vec_ldl (int, pixel *)",
11533         "vector long long vec_ldl (int, long long *)",
11534         "vector unsigned long long vec_ldl (int, unsigned long long *)".
11535         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11536         type tree bool_long_long_type_node and correct definition of
11537         bool_V2DI_type_node to make reference to this new type tree.
11538         (rs6000_mangle_type): Replace erroneous reference to
11539         bool_long_type_node with bool_long_long_type_node.
11540         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11541         comments to emphasize sign distinctions for char and int types and
11542         replace RS6000_BTI_bool_long constant with
11543         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
11544         use of RS6000_BTI_pixel.
11545         (bool_long_type_node): Remove this macro definition.
11546         (bool_long_long_type_node): New macro definition
11548 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
11550         PR rtl-optimization/85300
11551         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11552         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11553         simplify_unary_operation fails.
11555 2018-04-10  Martin Liska  <mliska@suse.cz>
11557         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11558         cgraph_edge and ipa_ref.
11560 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
11562         PR target/85177
11563         PR target/85255
11564         * config/i386/sse.md
11565         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11566         computation of the VEC_MERGE selector from mask.
11567         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11568         Fix decoding of the VEC_MERGE selector into mask.
11570 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
11572         PR tree-optimization/85286
11573         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11575 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
11577         * final.c (final_1): Set insn_last_address as well as
11578         insn_current_address.
11580 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11582         PR target/85173
11583         * explow.c (emit_stack_probe): Call validize_mem on memory location
11584         before passing it to gen_probe_stack.  Create address operand and
11585         legitimize it for the probe_stack_address case.
11587 2018-04-09  Jan Hubicka  <jh@suse.cz>
11589         PR lto/85078
11590         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11591         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11592         * tree.c (free_lang_data_in_type): Fix handling of binfos;
11593         walk basetypes.
11594         (free_lang_data): Rebuild type inheritance graph.
11596 2018-04-09  Martin Sebor  <msebor@redhat.com>
11598         * invoke.texi (-finline-small-functions): Mention other optimization
11599         options.
11600         (-findirect-inlining, -fpartial-inlining): Same.
11601         (-finline-functions-called-once): Same.
11602         (-freorder-blocks-and-partition): Same.
11604 2018-04-09  Jan Hubicka  <jh@suse.cz>
11606         PR rtl/84058
11607         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11608         jumps; choose last target that matches the criteria (i.e.
11609         no partition changes for non-crossing jumps).
11610         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11611         support for redirecting crossing jumps to non-crossing.
11613 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
11615         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11616         also for naked functions.
11618 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
11620         * config/arc/arc.md (add_shift): New pattern.
11621         (add_shift2): Likewise.
11622         (sub_shift): Likewise.
11623         (sub_shift_cmp0_noout): Likewise.
11624         (compare_si_ashiftsi): Likewise.
11625         (xbfu_cmp0_noout): New combine pattern.
11626         (xbfu_cmp0"): Likewise.
11627         (movsi_set_cc_insn): Place the predicable variant first.
11628         (commutative_binary_cmp0_noout): Remove clobber.
11629         (commutative_binary_cmp0): New pattern.
11630         (noncommutative_binary_cmp0): Likewise.
11631         (noncommutative_binary_cmp0_noout): Likewise.
11632         (noncommutative_binary_comparison_result_used): Removed.
11633         (rsub_cmp0): New pattern.
11634         (rsub_cmp0_noout): Likewise.
11635         (extzvsi): Changed, keep only meaningful variants.
11636         (SQH, SEZ): New iterators.
11637         (SQH_postfix): New mode attribute.
11638         (SEZ_prefix): New code attribute.
11639         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11640         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11641         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11642         of numerical value.
11643         (noncommutative_operator): Check the availability of barrel
11644         shifter option.
11646 2018-04-09  Richard Biener  <rguenther@suse.de>
11648         PR tree-optimization/85284
11649         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11650         Only use the niter constraining form of simple_iv when the exit
11651         is always executed.
11653 2018-04-09  Tom de Vries  <tom@codesourcery.com>
11655         PR target/84041
11656         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11657         (define_expand "*memory_barrier"): New define_expand.
11658         (define_insn "memory_barrier"): New insn.
11660 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11662         PR rtl-optimization/80463
11663         PR rtl-optimization/83972
11664         PR rtl-optimization/83480
11666         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11667         correct producer for the insn.
11668         (tidy_control_flow): Fixup seqnos in case of debug insns.
11670 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11672         PR rtl-optimization/83913
11674         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11675         different sched-times when merging exprs.
11677 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11679         PR rtl-optimization/83962
11681         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11682         tidy_fallthru_edge and tidy_control_flow.
11684 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11686         PR rtl-optimization/83530
11688         * sel-sched.c (force_next_insn): New global variable.
11689         (remove_insn_for_debug): When force_next_insn is true, also leave only
11690         next insn in the ready list.
11691         (sel_sched_region): When the region wasn't scheduled, make another pass
11692         over it with force_next_insn set to 1.
11694 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
11696         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11697         into tm_file.
11698         * config/nds32/constants.md (unspec_volatile_element): Add enum values
11699         for interrupt control.
11700         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11701         functions for interrupt control.
11702         * config/nds32/nds32-intrinsic.md: Likewise.
11703         * config/nds32/nds32_intrinsic.h: Likewise.
11704         * config/nds32/nds32.h (nds32_builtins): Likewise.
11706 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
11708         * config/nds32/nds32.c (nds32_init_machine_status,
11709         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11710         strict_aligned_p field.
11711         (nds32_expand_to_rtl_hook): New function.
11712         (TARGET_EXPAND_TO_RTL_HOOK): Define.
11713         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11715 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11716             Chung-Ju Wu  <jasonwucj@gmail.com>
11718         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11719         * config/nds32/nds32-n7.md: New file.
11720         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11721         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11722         pipeline.
11723         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11724         * config/nds32/nds32.md (pipeline_model): Add n7.
11725         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11726         * config/nds32/pipelines.md: Include n7 settings.
11728 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11729             Chung-Ju Wu  <jasonwucj@gmail.com>
11731         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11732         * config/nds32/nds32-e8.md: New file.
11733         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11734         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11735         pipeline.
11736         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11737         * config/nds32/nds32.md (pipeline_model): Add e8.
11738         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11739         * config/nds32/pipelines.md: Include e8 settings.
11741 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11742             Chung-Ju Wu  <jasonwucj@gmail.com>
11744         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11745         * config/nds32/nds32-n8.md: New file.
11746         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11747         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11748         pipeline.
11749         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11750         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11751         * config/nds32/nds32.md (pipeline_model): Add n8.
11752         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11753         * config/nds32/pipelines.md: Include n8 settings.
11755 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11756             Chung-Ju Wu  <jasonwucj@gmail.com>
11758         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11759         * config/nds32/nds32-n9-2r1w.md: New file.
11760         * config/nds32/nds32-n9-3r2w.md: New file.
11761         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11762         nds32_register_ports): New or modify for cpu n9.
11763         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11764         pipeline.
11765         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11766         * config/nds32/nds32-utils.c: New file.
11767         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11768         TARGET_MUL_SLOW): Define.
11769         * config/nds32/nds32.md (pipeline_model): New attribute.
11770         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11771         New options that support cpu n9.
11772         * config/nds32/pipelines.md: Include n9 settings.
11773         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11775 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
11777         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11778         information if necessary.
11779         (output_cond_branch_compare_zero): Likewise.
11780         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11781         (nds32_target_alignment): Refine for alignment.
11782         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11783         (FUNCTION_BOUNDARY): Modify.
11784         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11785         align case.
11786         * config/nds32/nds32.opt (malways-align, malign-functions): New.
11788 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
11790         * config/nds32/constants.md (unspec_volatile_element): Add values for
11791         TLB operation and data prefetch.
11792         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11793         functions for TLB operation and data prefetch.
11794         * config/nds32/nds32-intrinsic.md: Likewise.
11795         * config/nds32/nds32_intrinsic.h: Likewise.
11796         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11797         (nds32_print_operand): Likewise.
11798         * config/nds32/nds32.h (nds32_builtins): Likewise.
11800 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
11801         Andrew Pinski <pinsika@gcc.gnu.org>
11803         PR middle-end/82976
11804         * match.pd: Use constant_boolean_node of correct type instead of
11805         boolean_true_node or boolean_false_node for simplifying
11806         pointer comparisons to zero.
11808 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
11810         PR tree-optimization/80021
11811         * tree.c (verify_type_variant): Make error call in verify_variant_match
11812         translatable and remove final full stop.
11814 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11816         * config/nds32/constants.md (unspec_volatile_element): Add
11817         UNSPEC_VOLATILE_EH_RETURN.
11818         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11819         nds32_output_stack_pop): Support dwarf exception handling process.
11820         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11821         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11822         exception handling process.
11823         (nds32_compute_stack_frame): Likewise.
11824         (nds32_return_addr_rtx): Likewise.
11825         (nds32_initial_elimination_offset): Likewise.
11826         (nds32_expand_prologue): Likewise.
11827         (nds32_expand_epilogue): Likewise.
11828         (nds32_dynamic_chain_address): New function.
11829         * config/nds32/nds32.h (machine_function): Add fields for dwarf
11830         exception handling.
11831         (DYNAMIC_CHAIN_ADDRESS): Define.
11832         (EH_RETURN_DATA_REGNO): Define.
11833         (EH_RETURN_STACKADJ_RTX): Define.
11834         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11835         patterns for dwarf exception handling.
11837 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11839         * config/nds32/nds32.h: Clean up obsolete macros.
11841 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11843         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11844         Add enum values for particular instructions.
11845         * config/nds32/nds32-intrinsic.c: Implementation of expanding
11846         particular intrinsic functions.
11847         * config/nds32/nds32-intrinsic.md: Likewise.
11848         * config/nds32/nds32_intrinsic.h: Likewise.
11849         * config/nds32/nds32.h (nds32_builtins): Likewise.
11850         * config/nds32/nds32.md (type): Add pbsad and pbsada.
11851         (btst, ave): New patterns for particular instructions.
11853 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11855         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11856         Add enum values for atomic load/store and memory sync.
11857         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11858         and memory sync.
11859         * config/nds32/nds32-intrinsic.md: Likewise.
11860         * config/nds32/nds32_intrinsic.h: Likewise.
11861         * config/nds32/nds32.h (nds32_builtins): Likewise.
11863 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
11865         PR tree-optimization/85257
11866         * fold-const.c (native_encode_vector): If not all elts could fit
11867         and off is -1, return 0 rather than offset.
11868         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11869         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11870         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
11871         adjust buffer in native_interpret_expr call.
11873 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11875         * config/nds32/constants.md (unspec_volatile_element): Add cache
11876         control enum values.
11877         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11878         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11879         * config/nds32/nds32.c (nds32_cctl_names): New.
11880         (nds32_print_operand): Handle cache control register names.
11881         * config/nds32/nds32.h (nds32_builtins): New enum values.
11882         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11883         macros.
11884         * config/nds32/nds32.md (type): Add mmu.
11885         * config/nds32/pipelines.md (simple_insn): Add mmu.
11887 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11889         * config/nds32/nds32.md (type): Remove call.
11890         * config/nds32/pipelines.md (simple_insn): Likewise.
11892 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11894         * config/nds32/constants.md (unspec_volatile_element): Add
11895         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11896         UNSPEC_VOLATILE_FMFCFG.
11897         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11898         description for fmfcfg and fmfcsr.
11899         (bdesc_1arg): Add fmtcsr.
11900         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11901         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11902         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11903         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11904         unspec_fmfcfg): New patterns.
11905         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11906         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11907         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11908         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11909         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11910         __nds32__fmfcfg): Define.
11912 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11914         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11915         intrinsic register names.
11916         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11917         intrinsic register enum values and macros.
11919 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11921         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11922         for load/store addressing form.
11923         (nds32_print_operand_address): Likewise.
11925 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
11927         PR target/85196
11928         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11929         based on LABEL_REF.  Remove useless assertion.
11930         (pic_address_needs_scratch): Fix formatting.
11931         (sparc_legitimize_pic_address): Minor tweaks.
11932         (sparc_delegitimize_address): Adjust assertion accordingly.
11933         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11934         into symbolic_operand.
11935         (movsi_high_pic_label_ref): Likewise.
11936         (movsi_lo_sum_pic_label_ref): Likewise.
11937         (movdi_pic_label_ref): Likewise.
11938         (movdi_high_pic_label_ref): Likewise.
11939         (movdi_lo_sum_pic_label_ref): Likewise.
11941 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
11943         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11944         custom LIB_SPEC setup.
11946 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
11947             Kito Cheng  <kito.cheng@gmail.com>
11949         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11950         * config/riscv/freebsd.h: New.
11952 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
11954         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11955         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11956         file.
11958 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
11959             Kito Cheng  <kito.cheng@gmail.com>
11961         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11962         nds32_output_call, nds32_symbol_binds_local_p): New functions.
11963         * config/nds32/nds32-protos.h (nds32_output_call,
11964         nds32_output_return): Declare.
11965         * config/nds32/nds32.md: Refine all the call and return patterns.
11967 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
11969         PR debug/85252
11970         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11971         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11973         PR rtl-optimization/84872
11974         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11975         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11976         EDGE_CROSSING edge.
11978 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
11980         * expr.c (copy_blkmode_to_reg): Revert 254862.
11981         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11983 2018-04-06  Richard Biener  <rguenther@suse.de>
11985         PR middle-end/85244
11986         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11987         after seeing a component reference with an adjacent field.  Treat
11988         refs to arrays at struct end of external decls similar to
11989         refs to unconstrained commons.
11991 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
11993         PR sanitizer/85213
11994         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11995         look through SAVE_EXPRs with non-side-effects argument.  Adjust
11996         recursive calls.
11997         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11998         save_p here.
12000 2018-04-06  Richard Biener  <rguenther@suse.de>
12002         PR middle-end/85180
12003         * alias.c (find_base_term): New wrapper around find_base_term
12004         unwinding CSELIB_VAL_PTR changes.
12005         (find_base_term): Do not restore CSELIB_VAL_PTR during the
12006         recursion.
12008 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12010         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12011         instructions.
12012         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12013         constant definitions.
12014         ("nop"): lr 0,0 -> nopr r0
12015         ("nop_lr0", "nop_lr1"): New insn definitions.
12017 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12019         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12020         NDS32_V3PUSH_AVAILABLE_P macro.
12022 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
12023             Chung-Ju Wu  <jasonwucj@gmail.com>
12025         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12026         (nds32*-*-*): Add float and fpu_config into supported_defaults.
12027         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12028         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12029         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12030         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12031         * config/nds32/constraints.md: New constraints and checking for hard
12032         float configuration.
12033         * config/nds32/iterators.md: New mode iterator and attribute for hard
12034         float configuration.
12035         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12036         patterns.
12037         * config/nds32/nds32-fpu.md: New file.
12038         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12039         deal with hard float code generation.
12040         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12041         ARCH_V3S.
12042         (abi_type, float_reg_number): New enum type.
12043         * config/nds32/nds32-predicates.c: New predicates for hard float.
12044         * config/nds32/nds32-protos.h: Declare functions for hard float.
12045         * config/nds32/nds32.c: Implementation for hard float configuration.
12046         * config/nds32/nds32.h: Definitions for hard float configuration.
12047         * config/nds32/nds32.md: Include hard float machine description and
12048         modify patterns for hard float configuration.
12049         * config/nds32/nds32.opt: New options for hard float configuration.
12050         * config/nds32/predicates.md: New predicates for hard float
12051         configuration.
12053 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
12055         * common/config/nds32/nds32-common.c
12056         (nds32_option_optimization_table): Enable -mreleax-hint by default.
12058 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
12060         PR middle-end/85195
12061         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12062         CONSTRUCTOR_ELT (ctor, ...)->value.
12064 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
12066         PR target/85193
12067         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12069 2018-04-05  Tom de Vries  <tom@codesourcery.com>
12071         PR target/85204
12072         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12073         cond jump.
12075 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
12076             Kito Cheng  <kito.cheng@gmail.com>
12078         * config/nds32/constraints.md (U33): Fine-tune checking condition.
12079         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12080         * config/nds32/nds32.h (nds32_16bit_address_type): Add
12081         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12083 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
12084             Kito Cheng  <kito.cheng@gmail.com>
12086         * config/nds32/constraints.md (Ufe): New memory constraint.
12087         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12088         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12089         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12090         operands.
12091         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12092         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12094 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12096         * config/nds32/nds32.md: Use optimize_size in the condition for
12097         alu-shift instructions.
12099 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12101         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12103 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12105         * config/nds32/nds32.md (negsi2): Refine pattern.
12107 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
12108             Chung-Ju Wu  <jasonwucj@gmail.com>
12110         * config/nds32/iterators.md (shift_rotate): New code iterator.
12111         (shift): New code attribute.
12112         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12113         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12114         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12115         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12116         bit-wise operations.
12117         (andsi3, *andsi3): Ditto.
12118         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12119         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12120         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12121         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12122         nds32_ior_operand, nds32_xor_operand): New predicates.
12124 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12126         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12127         (addsi3, subsi3): ... this.
12129 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12131         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12133 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12135         * config/nds32/nds32.md: Adjust indention.
12137 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
12139         * config/nds32/nds32.md (feature): New attribute.
12141 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12143         * config/nds32/nds32.md (subtype): New attribute.
12145 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12147         PR target/85203
12148         * config/arm/arm-builtins.c (arm_expand_builtin): Change
12149         expansion to perform a bitwise AND of the argument followed by a
12150         boolean negation of the result.
12152 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
12154         PR rtl-optimization/84878
12155         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12156         the basic block.  Assert the use reference is not artificial and that
12157         it has an associated insn.
12159 2018-04-04  Michael Matz  <matz@suse.de>
12161         * builtins.c (compute_objsize): Pass correct operand
12162         to array_at_struct_end_p.
12164 2018-04-04  Richard Biener  <rguenther@suse.de>
12166         PR lto/85176
12167         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12168         from contexts for DINFO_LEVEL_TERSE and below.
12170 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
12172         * config/nds32/nds32-doubleword.md (move_<mode>): Require
12173         resiter_operand condition.
12174         * config/nds32/nds32.md (*move<mode>): Ditto.
12176 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
12177             Monk Chiang  <sh.chiang04@gmail.com>
12179         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12181 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12183         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12185 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12186             Kito Cheng  <kito.cheng@gmail.com>
12188         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12189         nds32_cond_code_str, output_cond_branch,
12190         output_cond_branch_compare_zero, nds32_expand_cbranch,
12191         nds32_expand_cstore, nds32_expand_movcc,
12192         nds32_output_cbranchsi4_equality_zero,
12193         nds32_output_cbranchsi4_equality_reg,
12194         nds32_output_cbranchsi4_equality_reg_or_const_int,
12195         nds32_output_cbranchsi4_greater_less_zero: New functions.
12196         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12197         nds32_expand_cstore, nds32_expand_movcc,
12198         nds32_output_cbranchsi4_equality_zero,
12199         nds32_output_cbranchsi4_equality_reg,
12200         nds32_output_cbranchsi4_equality_reg_or_const_int,
12201         nds32_output_cbranchsi4_greater_less_zero): Declare.
12202         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12203         nds32_rimm11s_operand): New predicates.
12204         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12205         * config/nds32/nds32.md: Rewrite all the branch and conditional move
12206         patterns.
12208 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
12210         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12211         * config/nds32/nds32.md: Ditto.
12212         * config/nds32/pipelines.md: Ditto.
12214 2018-04-04  Richard Biener  <rguenther@suse.de>
12216         PR tree-optimization/85168
12217         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12218         propagating abnormals.
12220 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12222         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12224 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12225             Kito Cheng  <kito.cheng@gmail.com>
12227         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12228         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12229         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12230         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12231         * config/nds32/nds32.md (sibcall_internal): New.
12232         (sibcall_register): Remove.
12233         (sibcall_immediate): Remove.
12234         (sibcall_value_internal): New.
12235         (sibcall_value_register): Remove.
12236         (sibcall_value_immediate): Remove.
12237         * config/nds32/predicates.md (nds32_general_register_operand): New.
12238         (nds32_call_address_operand): New.
12240 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
12242         PR rtl-optimization/85167
12243         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12244         bb_defs if *split_p, instead preinitialize it to NULL.
12246         PR tree-optimization/85156
12247         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12248         evaluating the argument multiple times.
12250 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
12252         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12253         than vector.
12254         (_mm_cvtpd_ps): Likewise.
12255         (_mm_cvttpd_epi32): Likewise.
12256         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12257         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12258         vector, pixel, and bool following altivec.h include.
12260 2018-04-03  Martin Sebor  <msebor@redhat.com>
12262         * doc/extend.texi (Common Function Attributes): Clarify.
12263         (const attribute): Likewise.
12264         (pure attribute): Likewise.
12266 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
12268         PR target/85169
12269         * config/i386/i386.c (ix86_expand_vector_set): Use
12270         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
12272 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
12274         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12275         instructions when changing rounding bits to preserve precision bits
12276         in the x87 control word.
12278 2018-04-03  Martin Liska  <mliska@suse.cz>
12280         PR tree-optimization/82491
12281         * rtl.h (strip_offset_and_add): Replace += suboffset with
12282         poly_uint64 () + suboffset.
12284 2018-03-29  Martin Liska  <mliska@suse.cz>
12285             Martin Jambor  <mjambor@suse.cz>
12287         PR ipa/84947
12288         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12289         param_type is not an integral or pointer type.
12291 2018-04-03  Richard Biener  <rguenther@suse.de>
12293         * sese.h (recompute_all_dominators): Remove.
12295 2018-04-02  Martin Sebor  <msebor@redhat.com>
12297         * doc/invoke.texi (-Wrestrict): Fix typos.
12299 2018-04-02  Jim Wilson  <jimw@sifive.com>
12301         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12302         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12303         (<optab>di3, <optab>si3_extend): Likewise.
12304         (<optab>si3_mask, <optab>si3_mask_1): New.
12305         (<optab>di3_mask, <optab>di3_mask_1): New.
12306         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12307         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12308         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12310 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
12312         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12313         example.
12315 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12317         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12318         (nds32_canonicalize_comparison): New function.
12320 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
12321             Kito Cheng  <kito.cheng@gmail.com>
12322             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
12324         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12325         * config/nds32/constants.md (unspec_volatile_element): Add
12326         UNSPEC_VOLATILE_RELAX_GROUP.
12327         * config/nds32/nds32-relax-opt.c: New file.
12328         * config/nds32/nds32-predicates.c
12329         (nds32_symbol_load_store_p): New function.
12330         * config/nds32/nds32-protos.h
12331         (nds32_symbol_load_store_p): Declare function.
12332         (make_pass_nds32_relax_opt): Declare new rtl pass function.
12333         * config/nds32/nds32.c
12334         (nds32_register_pass): New function to register pass.
12335         (nds32_register_passes): New function to register passes.
12336         * config/nds32/nds32.md (relax_group): New pattern.
12337         * config/nds32/nds32.opt (mrelax-hint): New option.
12338         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12340 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
12342         * config/nds32/t-nds32: Modify files dependency.
12344 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
12346         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12347         (PROFILE_HOOK): Define its implementation.
12349 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
12351         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12352         type and 32-bit size.
12354 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
12356         PR middle-end/85090
12357         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12358         (V_128_256): New mode iterator.
12359         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12360         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12361         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12362         of V.
12363         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12364         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12366 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
12368         PR target/83315
12369         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12370         NaN inputs correctly.
12372 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
12374         PR target/80546
12375         * config/rs6000/vsx.md (??r): New mode attribute.
12376         (*vsx_mov<mode>_64bit): Use it.
12377         (*vsx_mov<mode>_32bit): Likewise.
12379 2018-03-30  Martin Sebor  <msebor@redhat.com>
12381         PR tree-optimization/84818
12382         * builtins.c (check_access): Use warning_n.
12384 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12386         PR target/83822
12387         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12388         condition.
12389         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12390         condition.
12392 2018-03-30  Julia Koval  <julia.koval@intel.com>
12394         PR target/84413
12395         * x86-tune.def (movx, partial_reg_dependency): Enable for
12396         m_SKYLAKE_AVX512.
12398 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
12400         PR inline-asm/84985
12401         * lra-constraints.c (process_alt_operands): Move setting
12402         this_alternative_matches below.
12404 2018-03-29  Martin Liska  <mliska@suse.cz>
12406         PR lto/84995.
12407         * doc/invoke.texi: Document how LTO works with debug info.
12408         Describe auto-load support of binutils.  Mention 'x86-64'
12409         as valid option value of -march option.
12411 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
12413         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12415         PR c/85094
12416         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12417         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12418         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12419         checking.
12421 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
12423         PR target/84912
12424         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12425         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12426         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12427         for RS6000_BTM_POWERPC64.
12428         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12429         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12430         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12431         definition.
12432         (DIVDE): Use it.
12433         (DIVDEU): Likewise.
12435 2018-03-28 Carl Love  <cel@us.ibm.com>
12437         Revert
12438         2017-09-27  Carl Love  <cel@us.ibm.com>
12440         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12441         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12442         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12443         fctiw instruction.
12445 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12447         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12448         instead of __vector bool.
12449         (_mm_max_pu8): Likewise.
12450         (_mm_min_pi16): Likewise.
12452 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
12454         PR target/84912
12455         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12456         (DIVWEUO): Likewise.
12457         (DIVDEO): Likewise.
12458         (DIVDEUO): Likewise.
12459         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12460         DIVWEUO and DIVDEUO.
12461         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12462         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12463         (div_extend): Likewise.
12464         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12465         builtin function.
12466         (__builtin_divweuo): Likewise.
12467         (__builtin_divdeo): Likewise.
12468         (__builtin_divdeuo): Likewise.
12470 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
12472         PR target/85095
12473         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12474         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12476         PR tree-optimization/82004
12477         * gimple-match-head.c (optimize_pow_to_exp): New function.
12478         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12479         Don't fold to exp if optimize_pow_to_exp is false.
12481 2018-03-28  Martin Liska  <mliska@suse.cz>
12483         PR other/84819
12484         * calls.c (initialize_argument_information): Fix trailing space.
12485         * common.opt: Fix typo and provide better explanation for
12486         -fsanitize-coverage option.
12487         * config/i386/i386.opt: Fix typo.
12489 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
12490             Martin Liska  <mliska@suse.cz>
12492         PR sanitizer/85081
12493         * gimplify.c (asan_poison_variable): Don't do the check for
12494         gimplify_omp_ctxp here.
12495         (gimplify_decl_expr): Do it here.
12496         (gimplify_target_expr): Likewise.
12498 2018-03-28  Martin Liska  <mliska@suse.cz>
12500         PR target/84988
12501         * config/i386/i386.c (ix86_function_arg_advance): Do not call
12502         chkp_type_bounds_count if MPX is not enabled.
12504 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
12506         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12508 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
12510         PR target/84914
12511         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12512         function to create the function decl for complex long double
12513         multiply and divide for -mabi=ieeelongdouble.
12514         (init_float128_ieee): Call it.
12516 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
12518         PR target/85044
12519         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12520         -fcf-protection=branch -mibt.
12521         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12523 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12525         PR target/81863
12526         * config/arm/arm.c (arm_valid_symbolic_address): Handle
12527         arm_word_relocations.
12529 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
12531         PR target/85056
12532         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12533         extern array declarations.
12535 2018-03-27  Richard Biener  <rguenther@suse.de>
12537         PR middle-end/84067
12538         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12539         explicit single_use checks.
12541 2018-03-27  Richard Biener  <rguenther@suse.de>
12543         PR tree-optimization/85082
12544         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12545         Valueize the VUSE.
12547 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12549         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12550         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12551         Turn on fasynchronous-unwind-tables and funwind-tables.
12553 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
12555         PR target/85073
12556         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12557         (*bmi_blsr_<mode>_ccz): Ditto.
12559 2018-03-26  Tom de Vries  <tom@codesourcery.com>
12561         PR tree-optimization/85063
12562         * omp-general.c (offloading_function_p): New function.  Factor out
12563         of ...
12564         * omp-offload.c (pass_omp_target_link::gate): ... here.
12565         * omp-general.h (offloading_function_p): Declare.
12566         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12567         with attribute omp declare target for offloading functions.
12569 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
12571         PR tree-optimization/84005
12572         * tree-data-ref.h (get_base_for_alignment): Declare.
12573         * tree-data-ref.c (get_base_for_alignment_1): New function.
12574         (get_base_for_alignment): Likewise.
12575         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12576         get_base_for_alignment to find a suitable base object, instead
12577         of always using drb->base_address.
12579 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
12581         PR inline-asm/85022
12582         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12583         known size by default.
12585 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
12587         PR inline-asm/85030
12588         * lra-constraints.c (process_alt_operands): Don't match BLKmode
12589         and non BLKmode operands.
12591 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12593         PR target/85026
12594         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12595         Clean up attributes.
12597 2018-03-23  Richard Biener  <rguenther@suse.de>
12599         PR debug/85020
12600         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12601         we are going to emit early debug for LTO.
12603 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
12605         PR inline-asm/85034
12606         * function.c (match_asm_constraints_1): Don't optimize if input
12607         doesn't satisfy general_operand predicate for output's mode.
12609         PR inline-asm/85022
12610         * alias.c (write_dependence_p): Don't require for x_canonicalized
12611         non-VOIDmode if x has VOIDmode.
12613         PR sanitizer/85029
12614         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12615         just don't try to optimize it rather than assert it never happens.
12617 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12619         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12620         macro expansions for definition of ST_INTERNAL_<mode> and
12621         LD_INTERNAL_<mode> builtins.
12622         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12623         Remove prototype.
12624         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12625         function.
12626         (altivec_expand_st_builtin): Likewise.
12627         (altivec_expand_builtin): Remove calls to deleted functions.
12628         (rs6000_address_for_altivec): Delete this function.
12629         * config/rs6000/vector.md: Remove expands for
12630         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12632 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
12634         PR target/84826
12635         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12636         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12637         re-computing once computed.
12638         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12639         (arm_init_machine_status): Initialize
12640         machine->static_chain_stack_bytes.
12642 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12644         PR target/84760
12645         * doc/extend.texi: Add four new prototypes for vec_ld.
12646         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12647         definitions for more logical presentation.
12648         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12649         entries for V1TI variants of __builtin_altivec_ld builtin.
12650         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12651         handling of V1TI variant of LVX icode pattern.
12652         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12653         (rs6000_gimple_fold_builtin): Likewise.
12654         (altivec_init_builtins): Add code to define
12655         __builtin_altivec_lvx_v1ti function.
12657 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
12659         PR inline-asm/84941
12660         * function.c (match_asm_constraints_1): Don't do the optimization
12661         if input isn't a REG, SUBREG, MEM or constant.
12663 2018-03-22  Tom de Vries  <tom@codesourcery.com>
12665         PR tree-optimization/84956
12666         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12667         bb_has_abnormal_pred.
12669 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
12671         PR sanitizer/85018
12672         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12673         DECL_INITIAL (decl) to decl at the end.
12674         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12675         adjust the comment.
12677 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
12679         * doc/extend.texi (__builtin_tgmath): Document when complex
12680         integer types are treated as _Complex _Float64.
12682 2018-03-21  Tom de Vries  <tom@codesourcery.com>
12684         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12686 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12688         PR tree-optimization/84960
12689         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12690         if it is ENTRY block, move them into single succ of ENTRY in that case.
12692 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
12694         PR tree-optimization/84811
12695         * poly-int.h (poly_span_traits): Remove the T3 parameter and
12696         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12697         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12698         (known_subrange_p): Update accordingly.  Cast each value involved
12699         in the size comparison, rather than casting the result of the
12700         subtraction.
12702 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12704         PR tree-optimization/84982
12705         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12706         by flipping the least significant bit rather than all bits from
12707         bitpos to bitpos + bitsize - 1.
12709 2018-03-21  Nathan Sidwell  <nathan@acm.org>
12711         * doc/extend.texi (Deprecated Features): Remove mention of
12712         long-deleted deprecations.
12714 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12716         PR jit/84288
12717         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12718         * configure: Regenerate.
12720 2018-03-21  Tom de Vries  <tom@codesourcery.com>
12722         PR tree-optimization/83126
12723         * tree-parloops.c (num_phis): New function.
12724         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12726 2018-03-21  Nathan Sidwell  <nathan@acm.org>
12728         * doc/extend.texi (Deprecated Features): Update deprecated flags,
12729         mention anon-struct/union members and trailing attributes.
12731 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
12733         PR tree-optimization/84969
12734         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12735         builtin memset partitions if they set different rhs values.
12737 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12739         PR rtl-optimization/84989
12740         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12741         VEC_DUPLICATE with scalar result mode.
12743 2018-03-21  Martin Liska  <mliska@suse.cz>
12745         PR ipa/84963
12746         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12747         not intended return statement.
12749 2018-03-21  Martin Liska  <mliska@suse.cz>
12751         PR target/84988
12752         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12753         (chkp_find_bound_slots_1): Limit number of iterations.
12755 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
12757         PR target/84838
12758         * Minor grammar fixes for x86 options.
12760 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12762         PR debug/84875
12763         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12764         holding REG_CFA_RESTORE notes, instead turn them into a USE.
12766 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
12768         PR target/83789
12769         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12770         (altivec_lvx_<mode>_1op): Likewise.
12771         (altivec_stvx_<mode>_2op): Likewise.
12772         (altivec_stvx_<mode>_1op): Likewise.
12773         (altivec_lvx_<VM2:mode>): New define_expand.
12774         (altivec_stvx_<VM2:mode>): Likewise.
12775         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12776         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12777         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12778         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12779         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12780         (rs6000_gen_lvx): Likewise.
12781         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12782         (altivec_expand_stv_builtin): Likewise.
12783         (altivec_expand_builtin): Likewise.
12784         * config/rs6000/vector.md: Likewise.
12786 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12788         PR target/82518
12789         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12790         BYTES_BIG_ENDIAN.
12792 2018-03-20  Richard Biener  <rguenther@suse.de>
12794         PR target/84986
12795         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12796         sign-conversions as zero, fall back to standard scalar_stmt
12797         cost for the rest.
12799 2018-03-20  Martin Liska  <mliska@suse.cz>
12801         PR ipa/84825
12802         * predict.c (rebuild_frequencies): Handle case when we have
12803         PROFILE_ABSENT, but flag_guess_branch_prob is false.
12805 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12807         PR target/84990
12808         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12809         flag_section_anchors.
12810         * varasm.c (use_blocks_for_decl_p): Remove hack for
12811         dw2_force_const_mem.
12813         PR target/84845
12814         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12815         to ...
12816         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
12817         be created, use lowpart_subreg of operands[0] rather than operands[0]
12818         itself.
12819         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12820         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12821         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12822         and n constraint instead of aarch64_shift_imm_di and Usd.
12823         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12824         (*aarch64_<optab>_reg_minus<mode>3): ... this.
12826 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
12828         PR target/82989
12829         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12830         to favor GPR over NEON registers.
12831         (<shift>di3_neon): Likewise.
12833 2018-03-20  Tom de Vries  <tom@codesourcery.com>
12835         PR target/84952
12836         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12837         (nvptx_process_pars): Emit bar.sync asap and alap.
12839 2018-03-20  Tom de Vries  <tom@codesourcery.com>
12841         PR target/84954
12842         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12843         seen_label if seen_label is already set.
12845 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12847         PR target/84945
12848         * config/i386/i386.c (fold_builtin_cpu): For features above 31
12849         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12850         Use 1U instead of 1.  Formatting fixes.
12852         PR c/84953
12853         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12854         instead of TREE_TYPE (s1) for the return value.
12856 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
12858         PR tree-optimization/84946
12859         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12860         bitsize + bitsize in poly_uint64 rather than poly_int64.
12862         PR sanitizer/78651
12863         * dwarf2asm.c: Include fold-const.c.
12864         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12865         of decl rather than decl itself.
12867         PR rtl-optimization/84643
12868         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12870 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
12872         PR sanitizer/78651
12873         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12874         calling assemble_variable.
12876 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
12878         PR target/81647
12879         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12880         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12882 2018-03-19  Jim Wilson  <jimw@sifive.com>
12884         PR bootstrap/84856
12885         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12886         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12887         (riscv_first_stack_step): Likewise.
12888         (riscv_option_override): Use STACK_BOUNDARY instead of
12889         MIN_STACK_BOUNDARY.
12890         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12891         MIN_STACK_BOUNDARY.
12892         (BIGGEST_ALIGNMENT): Set to 128.
12893         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12894         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12895         STACK_BOUNDARY.
12897 2018-03-19  Richard Biener  <rguenther@suse.de>
12899         PR tree-optimization/84933
12900         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12901         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12903 2018-03-19  Richard Biener  <rguenther@suse.de>
12905         PR tree-optimization/84859
12906         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12907         (cond_if_else_store_replacement): Perform sinking operation on
12908         single-store BBs regardless of MAX_STORES_TO_SINK setting.
12909         Generalize what a BB with a single eligible store is.
12911 2018-03-19  Richard Biener  <rguenther@suse.de>
12913         PR tree-optimization/84929
12914         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12915         chrec_is_positive against non-chrec arg.
12917 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
12919         PR target/84711
12920         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12922 2018-03-18  Martin Liska  <mliska@suse.cz>
12924         PR rtl-optimization/84635
12925         * regrename.c (build_def_use): Use matches_mode only when
12926         matches >= 0.
12928 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
12930         PR tree-optimization/84913
12931         * tree-vect-loop.c (vectorizable_reduction): Don't try to
12932         vectorize chains of COND_EXPRs.
12934 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
12936         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12938 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
12940         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12942 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
12944         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12946 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
12947             Kito Cheng  <kito.cheng@gmail.com>
12949         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12950         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12951         (nds32_adjust_reg_alloc_order): New function.
12952         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12954 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
12956         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12957         nds32_print_operand, nds32_print_operand_address): Use
12958         HOST_WIDE_INT_PRINT_DEC instead.
12960 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
12962         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12964 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
12966         PR target/84902
12967         * config/i386/i386.c (initial_ix86_tune_features,
12968         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12969         unsigned long long.
12970         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12971         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12972         rather than 1u << ix86_tune.  Formatting fix.
12973         (ix86_option_override_internal): Change ix86_arch_mask from
12974         unsigned int to unsigned HOST_WIDE_INT, initialize to
12975         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12976         (ix86_function_specific_restore): Likewise.
12978 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
12980         PR target/84899
12981         * postreload.c (reload_combine_recognize_pattern): Perform
12982         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12983         truncate_int_for_mode the result for the destination's mode.
12985         PR c/84909
12986         * hsa-gen.c (mem_type_for_type): Fix comment typo.
12987         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12988         Likewise.
12989         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12990         Likewise.
12992 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
12994         PR target/84876
12995         * lra-assigns.c (lra_split_hard_reg_for): Don't use
12996         regno_allocno_class_array and sorted_pseudos.
12997         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12998         insns where regno is used.
13000 2018-03-16  Martin Liska  <mliska@suse.cz>
13002         PR ipa/84833
13003         * multiple_target.c (create_dispatcher_calls): Redirect
13004         reference in the symbol table.
13006 2018-03-16  Martin Liska  <mliska@suse.cz>
13008         PR ipa/84722
13009         * multiple_target.c (create_dispatcher_calls): Redirect also
13010         an alias.
13012 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13014         PR c++/79937
13015         PR c++/82410
13016         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13017         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13018         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13020 2018-03-16  Julia Koval  <julia.koval@intel.com>
13022         * doc/invoke.texi (Skylake Server): Add CLWB.
13023         Cannonlake): Remove CLWB.
13025 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13027         PR tree-optimization/84841
13028         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13029         1 << 3.
13030         (FLOAT_ONE_CONST_TYPE): Define.
13031         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13032         (sort_by_operand_rank): Put entries with higher constant_type last
13033         rather than first to match comments.
13035 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
13037         * config/nios2/nios2.md (movsi_internal): Fix thinko in
13038         split predicate.
13040 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
13042         PR c++/79085
13043         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13044         check and use address of target always.
13046 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
13048         PR target/84574
13049         * config/i386/i386.c (indirect_thunk_needed): Update comments.
13050         (indirect_thunk_bnd_needed): Likewise.
13051         (indirect_thunks_used): Likewise.
13052         (indirect_thunks_bnd_used): Likewise.
13053         (indirect_return_needed): New.
13054         (indirect_return_bnd_needed): Likewise.
13055         (output_indirect_thunk_function): Add a bool argument for
13056         function return.
13057         (output_indirect_thunk_function): Don't generate alias for
13058         function return thunk.
13059         (ix86_code_end): Call output_indirect_thunk_function to generate
13060         function return thunks.
13061         (ix86_output_function_return): Set indirect_return_bnd_needed
13062         and indirect_return_needed instead of indirect_thunk_bnd_needed
13063         and indirect_thunk_needed.
13065 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
13067         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13068         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13069         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13071 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
13072             Paul Hua <paul.hua.gm@gmail.com>
13074         PR c/84852
13075         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13077 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
13079         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13080         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13081         resp. SFmode cases.
13083 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
13085         PR target/84711
13086         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13087         instead of GET_MODE_SIZE when comparing Units.
13089 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
13091         PR target/68256
13092         * varasm.c (hash_section): Return an unchangeble hash value
13093         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13094         Return !aarch64_can_use_per_function_literal_pools_p ().
13096 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
13098         PR target/84860
13099         * optabs.c (emit_conditional_move): Pass address of cmode's copy
13100         rather than address of cmode as last argument to prepare_cmp_insn.
13102 2018-03-15  Julia Koval  <julia.koval@intel.com>
13104         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13105         F_AVX512VNNI, F_AVX512BITALG): New.
13107 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
13109         PR target/83451
13110         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
13111         insn for floating-point loads and stores.
13113 2018-03-14  Carl Love  <cel@us.ibm.com>
13115         * config/rs6000/rs6000-c.c: Add macro definitions for
13116         ALTIVEC_BUILTIN_VEC_PERMXOR.
13117         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13118         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13119         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13120         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13121         UNSPEC_VPERMXOR.
13122         * config/doc/extend.texi: Add prototypes for vec_permxor.
13124 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
13126         PR c/84852
13127         * diagnostic-show-locus.c (class layout_point): Convert m_line
13128         from int to linenum_type.
13129         (line_span::comparator): Use linenum "compare" function when
13130         comparing line numbers.
13131         (test_line_span): New function.
13132         (layout_range::contains_point): Convert param "row" from int to
13133         linenum_type.
13134         (layout_range::intersects_line_p): Likewise.
13135         (layout::will_show_line_p): Likewise.
13136         (layout::print_source_line): Likewise.
13137         (layout::should_print_annotation_line_p): Likewise.
13138         (layout::print_annotation_line): Likewise.
13139         (layout::print_leading_fixits): Likewise.
13140         (layout::annotation_line_showed_range_p): Likewise.
13141         (struct line_corrections): Likewise for field m_row.
13142         (line_corrections::line_corrections): Likewise for param "row".
13143         (layout::print_trailing_fixits): Likewise.
13144         (layout::get_state_at_point): Likewise.
13145         (layout::get_x_bound_for_row): Likewise.
13146         (layout::print_line): Likewise.
13147         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13148         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13149         * input.c (selftest::test_linenum_comparisons): New function.
13150         (selftest::input_c_tests): Call it.
13151         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13152         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13153         * selftest.h (ASSERT_GT): New macro.
13154         (ASSERT_GT_AT): New macro.
13155         (ASSERT_LT): New macro.
13156         (ASSERT_LT_AT): New macro.
13158 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
13160         PR rtl-optimization/84780
13161         * combine.c (distribute_links): Don't make a link based on pc_rtx.
13163 2018-03-14  Martin Liska  <mliska@suse.cz>
13165         * tree.c (record_node_allocation_statistics): Use
13166         get_stats_node_kind.
13167         (get_stats_node_kind): New function extracted from
13168         record_node_allocation_statistics.
13169         (free_node): Use get_stats_node_kind.
13171 2018-03-14  Richard Biener  <rguenther@suse.de>
13173         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13174         that the value-set of ANTIC_IN doesn't grow.
13176         Revert
13177         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13178         member.
13179         (BB_VISITED_WITH_VISITED_SUCCS): New define.
13180         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13182 2018-03-14  Julia Koval  <julia.koval@intel.com>
13184         * config.gcc (icelake-client, icelake-server): New.
13185         (icelake): Remove.
13186         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13187         (initial_ix86_arch_features): Ditto.
13188         (PTA_SKYLAKE): Add SGX.
13189         (PTA_ICELAKE): Remove.
13190         (PTA_ICELAKE_CLIENT): New.
13191         (PTA_ICELAKE_SERVER): New.
13192         (ix86_option_override_internal): Split up icelake on icelake client and
13193         icelake server.
13194         (get_builtin_code_for_version): Ditto.
13195         (fold_builtin_cpu): Ditto.
13196         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13197         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13198         * config/i386/i386.h (processor_type): Ditto.
13199         * doc/invoke.texi: Ditto.
13201 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
13203         PR sanitizer/83392
13204         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13205         INTEGER_CST offset, add it together with bitpos / 8 and
13206         sign extend based on POINTER_SIZE.
13208         PR target/84844
13209         Revert
13210         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
13212         PR target/78090
13213         * config/i386/constraints.md (Yc): New register constraint.
13214         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13215         Use Yc constraint for alternative 2 of operand 0.  Remove
13216         preferred_for_speed attribute.
13218 2018-03-14  Richard Biener  <rguenther@suse.de>
13220         PR tree-optimization/84830
13221         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13222         with the old one to avoid oscillations.
13224 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
13226         PR target/83712
13227         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13228         pseudos.
13229         (assign_by_spills): Return a flag of reload assignment failure.
13230         Do not process the reload assignment failures.  Do not spill other
13231         reload pseudos if they has the same reg class.  Update n if
13232         necessary.
13233         (lra_assign): Add a return arg.  Set up from the result of
13234         assign_by_spills call.
13235         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13236         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
13237         usage_insns if it is not NULL.
13238         (spill_hard_reg_in_range): New function.
13239         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13240         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13241         function prototypes.
13242         (lra_assign): Change prototype.
13243         * lra.c (lra): Add code to deal with fails by splitting hard reg
13244         live ranges.
13246 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
13248         * config/riscv/riscv.opt (mrelax): New option.
13249         * config/riscv/riscv.c (riscv_file_start): Emit ".option
13250         "norelax" when riscv_mrelax is disabled.
13251         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13253 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13255         PR target/84743
13256         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13257         reassociation for int modes.
13259 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
13261         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13262         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13263         for big-endian.
13264         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13265         * config/aarch64/aarch64-sve.md
13266         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13267         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13268         (*extend<mode><Vwide>2): Rename to...
13269         (aarch64_sve_extend<mode><Vwide>2): ...this.
13270         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13271         renaming the old pattern to...
13272         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
13273         unsigned packs.
13274         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13275         define_expand, renaming the old pattern to...
13276         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13277         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13278         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13279         account when deciding which SVE instruction the optab should use.
13280         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13282 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
13284         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13285         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13286         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13287         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13288         (tlsdesc_small_<mode>): Turn a define_expand and use
13289         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
13290         (tlsdesc_small_advsimd_<mode>): ...this.
13291         (tlsdesc_small_sve_<mode>): New pattern.
13293 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
13295         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13296         (UNSPEC_UMUL_HIGHPART): New constants.
13297         (MUL_HIGHPART): New int iteraor.
13298         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13299         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13300         define_expand.
13301         (*<su>mul<mode>3_highpart): New define_insn.
13303 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
13305         PR lto/84805
13306         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13307         incomplete types.
13309 2018-03-13  Martin Liska  <mliska@suse.cz>
13311         PR ipa/84658.
13312         * (sem_item_optimizer::sem_item_optimizer): Initialize new
13313         vector.
13314         (sem_item_optimizer::~sem_item_optimizer): Release it.
13315         (sem_item_optimizer::merge_classes): Register variable aliases.
13316         (sem_item_optimizer::fixup_pt_set): New function.
13317         (sem_item_optimizer::fixup_points_to_sets): Likewise.
13318         * ipa-icf.h: Declare new variables and functions.
13320 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
13322         PR middle-end/84834
13323         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13324         integer_pow2p@2 and test integer_pow2p in condition.
13325         (A < 0 ? C : 0): Similarly for @1.
13327         PR middle-end/84831
13328         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13329         characters starting at p contain '\0' character, don't look beyond
13330         that.
13332         PR target/84827
13333         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13334         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13336         PR target/84828
13337         * reg-stack.c (change_stack): Change update_end var from int to
13338         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13339         also call set_block_for_insn on the newly added insns and rescan.
13341         PR target/84786
13342         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13343         on the last operand.
13345         PR c++/84704
13346         * tree.c (stabilize_reference_1): Return save_expr (e) for
13347         STATEMENT_LIST even if it doesn't have side-effects.
13349 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
13351         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13353 2018-03-12  Renlin Li  <renlin.li@arm.com>
13355         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13356         aarch64_output_scalar_simd_mov_immediate.
13358 2018-03-12  Martin Sebor  <msebor@redhat.com>
13360         PR tree-optimization/83456
13361         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13362         for perfectly overlapping calls to memcpy.
13363         (gimple_fold_builtin_memory_chk): Same.
13364         (gimple_fold_builtin_strcpy): Handle no-warning.
13365         (gimple_fold_builtin_stxcpy_chk): Same.
13366         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13368 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
13370         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13371         parameter.  Use it for SFmode.
13372         (rs6000_function_arg_advance_1): Adjust.
13373         (rs6000_function_arg): Adjust.
13374         (rs6000_gimplify_va_arg): Pass false for that new parameter.
13376 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
13378         PR rtl-optimization/84169
13379         PR rtl-optimization/84780
13380         * combine.c (can_combine_p): Check for a 2-insn combination whether
13381         the destination register is used between the two insns, too.
13383 2018-03-12  Richard Biener  <rguenther@suse.de>
13385         PR tree-optimization/84803
13386         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13387         for refs DR analysis didn't process.
13389 2018-03-12  Richard Biener  <rguenther@suse.de>
13391         PR tree-optimization/84777
13392         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13393         force-vectorize loops ignore whether we are optimizing for size.
13395 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
13397         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13398         (TARGET_MD_ASM_ADJUST): Define.
13400 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
13401             Kito Cheng  <kito.cheng@gmail.com>
13402             Chung-Ju Wu  <jasonwucj@gmail.com>
13404         * config/nds32/nds32.c (nds32_compute_stack_frame,
13405         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13406         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13407         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13408         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13409         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13410         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13411         * config/nds32/nds32.md (prologue, epilogue): Use macro
13412         NDS32_V3PUSH_AVAILABLE_P to do checking.
13414 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
13416         PR debug/58150
13417         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13418         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13419         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
13420         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
13421         addition of most attributes on !orig_type_die or the attribute not
13422         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13424 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
13425             Chung-Ju Wu  <jasonwucj@gmail.com>
13427         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13428         __NDS32_VH__ macro.
13429         * config/nds32/nds32.opt (mvh): New option.
13431 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
13432             Chung-Ju Wu  <jasonwucj@gmail.com>
13434         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13435         function.
13436         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13437         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13438         definition.
13440 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
13441             Chung-Ju Wu  <jasonwucj@gmail.com>
13443         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13444         function.
13445         * config/nds32/nds32-multiple.md (strlensi): New pattern.
13446         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13448 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
13449             Kito Cheng  <kito.cheng@gmail.com>
13450             Chung-Ju Wu  <jasonwucj@gmail.com>
13452         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13453         UNSPEC_FFMISM and UNSPEC_FLMISM.
13454         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13455         for ffb, ffmism and flmism.
13456         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13457         (unspec_ffmism): Ditto.
13458         (unspec_flmism): Ditto.
13459         (nds32_expand_builtin_impl): Check if string extension is available.
13460         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13461         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13463 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
13465         Reverting patch:
13466         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
13468         PR target/83712
13469         * lra-assigns.c (assign_by_spills): Return a flag of reload
13470         assignment failure.  Do not process the reload assignment
13471         failures.  Do not spill other reload pseudos if they has the same
13472         reg class.
13473         (lra_assign): Add a return arg.  Set up from the result of
13474         assign_by_spills call.
13475         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13476         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
13477         usage_insns if it is not NULL.
13478         (spill_hard_reg_in_range): New function.
13479         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13480         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13481         function prototypes.
13482         (lra_assign): Change prototype.
13483         * lra.c (lra): Add code to deal with fails by splitting hard reg
13484         live ranges.
13486 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
13488         PR target/84807
13489         * config/i386/i386.opt: Replace Enforcment with Enforcement.
13491 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
13493         PR debug/84620
13494         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13495         (dw_val_node): Add val_symbolic_view.
13496         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13497         (symview_upper_bound): New.
13498         (new_line_info_table): Initialize symviews_since_reset.
13499         (dwarf2out_source_line): Count symviews_since_reset and set
13500         symview_upper_bound.
13501         (dw_val_equal_p): Handle symview.
13502         (add_AT_symview): New.
13503         (print_dw_val): Handle symview.
13504         (attr_checksum, attr_checksum_ordered): Likewise.
13505         (same_dw_val_p, size_of_die): Likewise.
13506         (value_format, output_die): Likewise.
13507         (add_high_low_attributes): Use add_AT_symview for entry_view.
13508         (dwarf2out_finish): Reset symview_upper_bound, clear
13509         zero_view_p.
13511 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
13513         PR target/83969
13514         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13515         Add strict argument and use it.
13516         (rs6000_split_multireg_move): Update for new strict argument.
13517         (mem_operand_gpr): Disallow all non-offsettable addresses.
13518         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13520 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
13522         PR target/84772
13523         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13524         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13525         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13527         PR c++/84767
13528         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13529         decl, use remap_type if we want to use the type.
13531 2018-03-09  Martin Sebor  <msebor@redhat.com>
13533         PR tree-optimization/84526
13534         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13535         Remove dead code.
13536         (builtin_access::generic_overlap): Be prepared to handle non-array
13537         base objects.
13539 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
13541         PR rtl-optimization/84682
13542         * lra-constraints.c (process_address_1): Check is_address flag
13543         for address constraints.
13544         (process_alt_operands): Likewise.
13545         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13546         preprocess_constraints.
13547         * recog.h (preprocess_constraints): Add oploc parameter.
13548         Adjust callers.
13549         * recog.c (preprocess_constraints): Test address_operand for
13550         CT_ADDRESS constraints.
13552 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
13554         PR target/83712
13555         * lra-assigns.c (assign_by_spills): Return a flag of reload
13556         assignment failure.  Do not process the reload assignment
13557         failures.  Do not spill other reload pseudos if they has the same
13558         reg class.
13559         (lra_assign): Add a return arg.  Set up from the result of
13560         assign_by_spills call.
13561         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13562         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
13563         usage_insns if it is not NULL.
13564         (spill_hard_reg_in_range): New function.
13565         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13566         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13567         function prototypes.
13568         (lra_assign): Change prototype.
13569         * lra.c (lra): Add code to deal with fails by splitting hard reg
13570         live ranges.
13572 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13574         PR target/83193
13575         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13576         Accept complain bool parameter.  Only emit errors if it is true.
13577         (arm_parse_cpu_option_name): Likewise.
13578         (arm_target_thumb_only): Adjust callers of the above.
13579         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13580         prototype to take a default true bool parameter.
13581         (arm_parse_arch_option_name): Likewise.
13583 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
13584             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
13586         PR jit/64089
13587         PR jit/84288
13588         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13589         * configure: Regenerate.
13590         * configure.ac ("linker --version-script option"): New.
13591         ("linker soname option"): New.
13593 2018-03-09  Richard Biener  <rguenther@suse.de>
13595         PR tree-optimization/84775
13596         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13597         immediate uses of predicate stmts and mark them modified.
13599         Revert
13600         PR tree-optimization/84178
13601         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13602         to caller.
13603         (version_loop_for_if_conversion): Delay update_ssa call.
13604         (tree_if_conversion): Delay update_ssa until after predicate
13605         insertion.
13607 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
13609         PR target/84763
13610         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13611         when the function accesses prior frames.
13613 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
13615         PR debug/84456
13616         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13617         gen_llsym, otherwise call maybe_gen_llsym.
13619         PR inline-asm/84742
13620         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13621         has ',' character inside of it.
13623 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13625         PR target/84748
13626         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13627         as clobbering CC_REGNUM.
13629 2018-03-08  Richard Biener  <rguenther@suse.de>
13631         PR middle-end/84552
13632         * tree-scalar-evolution.c: Include tree-into-ssa.h.
13633         (follow_copies_to_constant): Do not follow SSA names registered
13634         for update.
13636 2018-03-08  Richard Biener  <rguenther@suse.de>
13638         PR tree-optimization/84178
13639         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13640         to caller.
13641         (version_loop_for_if_conversion): Delay update_ssa call.
13642         (tree_if_conversion): Delay update_ssa until after predicate
13643         insertion.
13645 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
13647         PR tree-optimization/84178
13648         * tree-if-conv.c (release_bb_predicate): Remove the
13649         the assertion that the stmts have NULL use_ops.
13650         Discard the statements, asserting that they haven't
13651         yet been added to a BB.
13653 2018-03-08  Richard Biener  <rguenther@suse.de>
13655         PR tree-optimization/84746
13656         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13657         (phi_translate): Pass in destination ANTIC_OUT set.
13658         (phi_translate_1): Likewise.  For a simplified result lookup
13659         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13660         (phi_translate_set): Adjust.
13661         (do_pre_regular_insertion): Likewise.
13662         (do_pre_partial_partial_insertion): Likewise.
13664 2018-03-08  Martin Liska  <mliska@suse.cz>
13666         PR gcov-profile/84735
13667         * doc/gcov.texi: Document usage of profile files.
13668         * gcov-io.h: Document changes in the format.
13670 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
13672         PR debug/84404
13673         PR debug/84408
13674         * dwarf2out.c (struct dw_line_info_table): Update comments for
13675         view == -1.
13676         (FORCE_RESET_NEXT_VIEW): New.
13677         (FORCE_RESETTING_VIEW_P): New.
13678         (RESETTING_VIEW_P): Check for -1 too.
13679         (ZERO_VIEW_P): Likewise.
13680         (new_line_info_table): Force-reset next view.
13681         (dwarf2out_begin_function): Likewise.
13682         (dwarf2out_source_line): Simplify zero_view_p initialization.
13683         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13684         view directly.  Omit view when omitting .loc at line 0.
13686 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
13688         PR tree-optimization/84740
13689         * tree-switch-conversion.c (process_switch): Call build_constructors
13690         only if info.phi_count is non-zero.
13692         PR tree-optimization/84739
13693         * tree-tailcall.c (find_tail_calls): Check call arguments against
13694         DECL_ARGUMENTS (current_function_decl) rather than
13695         DECL_ARGUMENTS (func) when checking for tail recursion.
13697 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
13699         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13700         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13701         Volker Reichelt's entry and add entries for people that perform
13702         GCC fuzzy testing and report numerous bugs.
13704 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
13706         PR target/82411
13707         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13708         readonly data in sdata, if that is disabled.
13709         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13710         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13711         -mreadonly-in-sdata option.
13713 2018-03-07  Martin Sebor  <msebor@redhat.com>
13715         PR tree-optimization/84468
13716         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13717         basic block when looking for nul assignment.
13719 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
13721         PR target/84277
13722         * except.h (output_function_exception_table): Adjust prototype.
13723         * except.c (output_function_exception_table): Remove FNNAME parameter
13724         and add SECTION parameter.  Ouput one part of the table at a time.
13725         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13726         the first part of the exception table and emit unwind directives.
13727         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13728         (i386_pe_seh_cold_init): Likewise.
13729         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13730         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13731         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13732         (ix86_output_call_insn): Emit a nop in one more case for SEH.
13733         * config/i386/winnt.c: Include except.h.
13734         (struct seh_frame_state): Add reg_offset, after_prologue and
13735         in_cold_section fields.
13736         (i386_pe_seh_end_prologue): Set seh->after_prologue.
13737         (i386_pe_seh_cold_init): New function.
13738         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13739         to seh->in_cold_section.
13740         (seh_emit_push): Record the offset of the push.
13741         (seh_emit_save): Record the offet of the save.
13742         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13743         Test seh->after_prologue to disregard the epilogue.
13744         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13745         (i386_pe_end_cold_function): New function.
13747 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
13749         PR fortran/84565
13750         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13751         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13753         PR c++/84704
13754         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13755         on tmp_var.
13756         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13757         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13759         PR middle-end/84723
13760         * multiple_target.c: Include tree-inline.h and intl.h.
13761         (expand_target_clones): Diagnose and fail if node->definition and
13762         !tree_versionable_function_p (node->decl).
13764 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
13766         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13767         sprint_ul.
13768         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13769         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13770         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13772 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
13774         PR target/84710
13775         * combine.c (try_combine): Use reg_or_subregno instead of handling
13776         just paradoxical SUBREGs and REGs.
13778 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
13780         * config/arc/arc.c (arc_finalize_pic): Remove function.
13781         (arc_must_save_register): We use single base PIC register, remove
13782         checks to save/restore the PIC register.
13783         (arc_expand_prologue): Likewise.
13784         * config/arc/arc-protos.h (arc_set_default_type_attributes):
13785         Remove.
13786         (arc_verify_short): Likewise.
13787         (arc_attr_type): Likewise.
13788         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13789         (walk_stores): Likewise.
13790         (arc_address_cost): Make it static.
13791         (arc_verify_short): Likewise.
13792         (branch_dest): Likewise.
13793         (arc_attr_type): Likewise.
13794         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13795         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13796         (arc_final_prescan_insn): Remove inserting the nops due to
13797         hardware hazards.  It is done in reorg step.
13798         (insn_length_variant_t): Remove.
13799         (insn_length_parameters_t): Likewise.
13800         (arc_insn_length_parameters): Likewise.
13801         (arc_get_insn_variants): Likewise.
13802         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13804 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
13806         PR inline-asm/84683
13807         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13808         assertion failure.
13810         PR tree-optimization/84687
13811         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13812         on new_node->decl.
13813         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13815 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13817         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13818         Rename to ppc_speculation_barrier.
13819         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13820         __builtin_ppc_speculation_barrier.
13822 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
13824         PR target/84700
13825         * combine.c (combine_simplify_rtx): Don't try to simplify if
13826         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13827         are equal to x.
13829 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
13831         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13832         to 32 bytes when compiling for POWER9.
13834 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
13836         PR target/84564
13837         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13838         regparm >= 3 with no arg reg available also for calls with
13839         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
13841         PR target/84524
13842         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13843         orig,vex.
13844         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
13846 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
13848         PR target/84264
13849         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13851 2018-03-05  Richard Biener  <rguenther@suse.de>
13853         PR tree-optimization/84486
13854         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13855         When inserting a __builtin_assume_aligned call set the LHS
13856         SSA name alignment info accordingly.
13858 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
13860         PR tree-optimization/84114
13861         * config/aarch64/aarch64.c (aarch64_reassociation_width)
13862         Avoid reassociation of FLOAT_MODE addition.
13864 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
13866         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13867         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13868         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13869         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13870         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13871         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13872         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13873         and -mwbnoinvd.
13874         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13875         __builtin_ia32_wbinvd): New builtins.
13876         (SPECIAL_ARGS2): New.
13877         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13878         (SPECIAL_ARGS2): New.
13879         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13880         (ix86_valid_target_attribute_inner_p): Ditto.
13881         (ix86_init_mmx_sse_builtins): Add special_args2.
13882         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13883         TARGET_WBNOINVD_P): New.
13884         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13885         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13886         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13887         * config/i386/immintrin.h (_wbinvd): New intrinsic.
13888         * config/i386/pconfigintrin.h: New file.
13889         * config/i386/wbnoinvdintrin.h: Ditto.
13890         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13891         wbnoinvdintrin.h.
13892         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13894 2018-03-05  Richard Biener  <rguenther@suse.de>
13896         PR tree-optimization/84670
13897         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13898         member.
13899         (BB_VISITED_WITH_VISITED_SUCCS): New define.
13900         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13901         (compute_antic_aux): Only assert the number of values in ANTIC_IN
13902         doesn't grow if all successors (recursively) were visited at least
13903         once.
13905 2018-03-05  Richard Biener  <rguenther@suse.de>
13907         PR tree-optimization/84650
13908         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13909         if executed in the loop pipeline.
13911 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
13913         * doc/configfiles.texi (Configuration Files): Move info about
13914         conditionalizing $target-protos.h to...
13915         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
13916         differs from $target-protos.h.
13918 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
13919             Chung-Ju Wu  <jasonwucj@gmail.com>
13921         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13922         * config/nds32/nds32-multiple.md (setmemsi): Define.
13923         * config/nds32/nds32-memory-manipulation.c
13924         (nds32_gen_dup_4_byte_to_word_value): New.
13925         (emit_setmem_word_loop): New.
13926         (emit_setmem_byte_loop): New.
13927         (nds32_expand_setmem_loop): New.
13928         (nds32_expand_setmem_loop_v3m): New.
13929         (nds32_expand_setmem_unroll): New.
13930         (nds32_expand_setmem): New.
13932 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
13933             Chung-Ju Wu  <jasonwucj@gmail.com>
13935         * config/nds32/nds32-memory-manipulation.c
13936         (nds32_emit_load_store): New.
13937         (nds32_emit_post_inc_load_store): New.
13938         (nds32_emit_mem_move): New.
13939         (nds32_emit_mem_move_block): New.
13940         (nds32_expand_movmemsi_loop_unknown_size): New.
13941         (nds32_expand_movmemsi_loop_known_size): New.
13942         (nds32_expand_movmemsi_loop): New.
13943         (nds32_expand_movmemsi_unroll): New.
13944         (nds32_expand_movmemqi): Rename ...
13945         (nds32_expand_movmemsi): ... to this.
13946         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13947         (movmemsi): ... to this.
13948         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13949         (nds32_expand_movmemsi): ... to this.
13951 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
13952             Monk Chiang  <sh.chiang04@gmail.com>
13953             Chung-Ju Wu  <jasonwucj@gmail.com>
13955         * config/nds32/nds32-protos.h
13956         (nds32_expand_load_multiple): New arguments.
13957         (nds32_expand_store_multiple): Ditto.
13958         (nds32_valid_multiple_load_store): Rename ...
13959         (nds32_valid_multiple_load_store_p): ... to this.
13960         * config/nds32/nds32-memory-manipulation.c
13961         (nds32_expand_load_multiple): Refine implementation.
13962         (nds32_expand_store_multiple): Ditto.
13963         * config/nds32/nds32-multiple.md
13964         (load_multiple): Update nds32_expand_load_multiple interface.
13965         (store_multiple): Update nds32_expand_store_multiple interface.
13966         * config/nds32/nds32-predicates.c
13967         (nds32_valid_multiple_load_store): Rename ...
13968         (nds32_valid_multiple_load_store_p): ... to this and refine
13969         implementation.
13970         * config/nds32/predicates.md
13971         (nds32_load_multiple_and_update_address_operation): New predicate.
13972         (nds32_store_multiple_and_update_address_operation): New predicate.
13974 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
13975             Chung-Ju Wu  <jasonwucj@gmail.com>
13977         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13978         (combo): New attribute.
13979         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13981 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13983         * config/nds32/nds32.opt: Change -mcmodel= default value.
13985 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
13986             Monk Chiang  <sh.chiang04@gmail.com>
13987             Chung-Ju Wu  <jasonwucj@gmail.com>
13989         * config/nds32/constants.md (unspec_element): New enum.
13990         * config/nds32/constraints.md (Umw): New constraint.
13991         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13992         * config/nds32/nds32-intrinsic.md: Likewise.
13993         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13994         (nds32_valid_smw_lwm_base_p): New.
13995         (nds32_output_smw_single_word): New.
13996         (nds32_output_lmw_single_word): New.
13997         (nds32_expand_unaligned_load): New.
13998         (nds32_expand_unaligned_store): New.
13999         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14000         (nds32_output_smw_single_word): Declare.
14001         (nds32_output_lmw_single_word): Declare.
14002         (nds32_expand_unaligned_load): Declare.
14003         (nds32_expand_unaligned_store): Declare.
14004         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14005         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14006         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14007         NDS32_BUILTIN_UASTORE_DW.
14008         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14009         predicate.
14011 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
14012             Kito Cheng  <kito.cheng@gmail.com>
14013             Chung-Ju Wu  <jasonwucj@gmail.com>
14015         * config/nds32/nds32-intrinsic.c
14016         (nds32_expand_builtin_null_ftype_reg): Delete.
14017         (nds32_expand_builtin_reg_ftype_imm): Ditto.
14018         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14019         (nds32_read_argument): New.
14020         (nds32_legitimize_target): Ditto.
14021         (nds32_legitimize_argument): Ditto.
14022         (nds32_check_constant_argument): Ditto.
14023         (nds32_expand_unop_builtin): Ditto.
14024         (nds32_expand_unopimm_builtin): Ditto.
14025         (nds32_expand_binop_builtin): Ditto.
14026         (nds32_builtin_decl_impl): Ditto.
14027         (builtin_description): Ditto.
14028         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14029         (nds32_init_builtins_impl): Ditto.
14030         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14031         (nds32_builtin_decl): New.
14032         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14033         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14035 2018-03-02  Jeff Law  <law@redhat.com>
14037         * reorg.c (stop_search_p): Handle DEBUG_INSN.
14038         (redundant_insn, fill_simple_delay_slots): Likewise.
14039         (fill_slots_from_thread): Likewise.
14040         * resource.c (mark_referenced_resources): Likewise.
14041         (mark_set_resources, find_dead_or_set_registers): Likewise.
14043 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14045         * substring-locations.h (format_warning_va): Formatting fix for
14046         ATTRIBUTE_GCC_DIAG.
14047         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14048         argument.
14049         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14050         * substring-locations.c: Include intl.h.
14051         (format_warning_va): Turned into small wrapper around
14052         format_warning_n_va, renamed to ...
14053         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14054         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14055         use ngettext.
14056         (format_warning_at_substring_n): New function.
14057         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14058         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
14059         format_warning_at_substring with just a shorter name instead of
14060         const function pointer.
14061         (fmtwarn_n): New function.
14062         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14063         appropriate, get rid of all the fmtstr temporaries, move conditionals
14064         with G_() wrapped string literals directly into fmtwarn arguments,
14065         cast dir.len to (int), formatting fixes.
14067 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
14069         * doc/invoke.texi: Remove "Cilk Plus" references.
14071 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14072             Richard Biener  <rguenther@suse.de>
14074         PR ipa/84628
14075         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14076         for error or warning attributes if CALL_FROM_THUNK_P is set.
14077         Formatting fixes.
14079 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14081         PR target/56540
14082         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14083         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14085         PR target/56540
14086         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14087         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14089         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14090         instead of -1U in last predictors element's probability member.
14092 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
14094         PR ipa/83983
14095         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14096         arguments if they are comparable.
14098 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
14100         PR tree-optimization/84634
14101         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14102         masks and masked_loop_p with a single loop_masks, making sure it's
14103         null for bb vectorization.
14105 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
14107         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14108         (vect_analyze_data_ref_access): Use loop->safe_len rather than
14109         loop->force_vectorize to check whether there is no alias.
14111 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14113         PR target/84614
14114         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14115         prototypes.
14116         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14117         comments.
14118         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14119         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14120         instead of a loop around prev_real_insn.
14121         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14122         prev_real_insn.
14124         PR inline-asm/84625
14125         * config/i386/i386.c (ix86_print_operand): Use conditional
14126         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14127         zero vector.
14129 2018-03-02  Richard Biener  <rguenther@suse.de>
14131         PR tree-optimization/84427
14132         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14133         (bitmap_set_subtract_values): Rewrite to handle multiple
14134         exprs per value.
14135         (clean): Likewise.
14136         (prune_clobbered_mems): Likewise.
14137         (phi_translate): Take edge instead of pred/phiblock.
14138         (phi_translate_1): Likewise.
14139         (phi_translate_set): Likewise.  Insert all translated
14140         exprs for a value into the set, keeping possibly multiple
14141         expressions per value.
14142         (compute_antic_aux): Adjust for phi_translate changes.
14143         When intersecting union the expressions and prune those
14144         not in the final value set, keeping possibly multiple
14145         expressions per value.  Do not use value-insertion
14146         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14147         all expressions.  Add verification that the value-sets
14148         only shrink during iteration.
14149         (compute_partial_antic_aux): Adjust for the phi_translate changes.
14150         (do_pre_regular_insertion): Likewise.
14151         (do_pre_partial_partial_insertion): Likewise.
14153 2018-03-02  Richard Biener  <rguenther@suse.de>
14155         PR target/82005
14156         * config/darwin.c (saved_debug_info_level): New static global.
14157         (darwin_asm_lto_start): Disable debug info generation for LTO out.
14158         (darwin_asm_lto_end): Restore debug info generation settings.
14160 2018-03-01  Martin Liska  <mliska@suse.cz>
14162         PR sanitizer/82484
14163         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14164         volatile arguments.
14166 2018-03-01  Richard Biener  <rguenther@suse.de>
14168         PR debug/84645
14169         * dwarf2out.c (gen_variable_die): Properly handle late VLA
14170         type annotation with LTO when debug was disabled at compile-time.
14172 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
14174         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14175         XINT with INTVAL.
14176         (mips_final_postscan_insn): Likewise.
14178 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
14180         PR rtl-optimization/84528
14181         * alias.c (init_alias_target): Add commentary.
14182         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14183         a unique base value if the frame pointer is not eliminated
14184         to the stack pointer.
14186 2018-03-01  Tom de Vries  <tom@codesourcery.com>
14188         PR rtl-optimization/83327
14189         * lra-int.h (hard_regs_spilled_into): Declare.
14190         * lra.c (hard_regs_spilled_into): Define.
14191         (init_reg_info): Init hard_regs_spilled_into.
14192         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14193         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14194         (process_bb_lives): Handle hard_regs_spilled_into.
14195         (lra_create_live_ranges_1): Before doing liveness propagation, clear
14196         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14198 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
14200         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14201         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14202         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14203         * config/rs6000/aix72.h: New file.
14205 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
14207         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14208         instead of warning_at with conditional singular and plural messages
14209         where possible.
14211         PR target/52991
14212         * stor-layout.c (update_alignment_for_field): For
14213         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14214         && !DECL_PACKED (field), do the alignment update, just use
14215         only desired_align instead of MAX (type_align, desired_align)
14216         as the alignment.
14217         (place_field): Don't do known_align < desired_align handling
14218         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14219         is non-NULL, instead do it after rli->prev_field handling and
14220         only if not within a bitfield word.  For DECL_PACKED (field)
14221         use type_align of BITS_PER_UNIT.
14223 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
14225         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14226         superfluous parentheses and trailing spaces.
14228 2018-02-28  Richard Biener  <rguenther@suse.de>
14230         PR tree-optimization/84584
14231         * graphite-scop-detection.c (scop_detection::add_scop): Discard
14232         SCoPs with fake exit edge.
14234 2018-02-28  Martin Liska  <mliska@suse.cz>
14236         PR testsuite/84597
14237         * timevar.c (timer::print): Fix format to properly print 100%
14238         values.
14240 2018-02-28  Richard Biener  <rguenther@suse.de>
14242         PR middle-end/84607
14243         * genmatch.c (capture_info::walk_match): Do not mark
14244         captured expressions without operands as expr_p given
14245         they act more like predicates and should be subject to
14246         "lost tail" side-effect preserving.
14248 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
14250         PR rtl-optimization/81611
14251         * auto-inc-dec.c (attempt_change): Move dead note from
14252         mem_insn if it's the next use of regno
14253         (find_address): Take address use of reg holding
14254         non-incremented value.  Add parm to limit search to the named
14255         reg only.
14256         (merge_in_block): Attempt to use a mem insn that is the next
14257         use of the original regno.
14259 2018-02-27  Martin Sebor  <msebor@redhat.com>
14261         PR c++/83871
14262         * doc/invoke.texi (-Wmissing-attributes): New option.
14263         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14265 2018-02-27  Martin Sebor  <msebor@redhat.com>
14267         PR translation/84207
14268         * diagnostic-core.h (warning_n, error_n, inform_n): Change
14269         n argument to unsigned HOST_WIDE_INT.
14270         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14271         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
14272         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14273         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14275 2018-02-27  Richard Biener  <rguenther@suse.de>
14277         PR tree-optimization/84512
14278         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14279         Do not use the estimate returned from record_stmt_cost for
14280         the scalar iteration cost but sum properly using add_stmt_cost.
14282 2018-02-27  Richard Biener  <rguenther@suse.de>
14284         PR tree-optimization/84466
14285         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14286         Adjust last change to less strictly validate use operands.
14288 2018-02-27  Martin Liska  <mliska@suse.cz>
14290         PR gcov-profile/84548
14291         * gcov.c (process_file): Allow partial overlap and consider it
14292         also as group functions.
14293         (output_lines): Properly calculate range of lines for a group.
14295 2018-02-27  Martin Liska  <mliska@suse.cz>
14297         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14298         'ggc' suffixes.  Change first column width.
14299         (timer::print): Fix formatting of the column.
14301 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
14303         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14304         preserve inline entry blocks for the sake of debug inline
14305         entry point markers alone.
14306         (remove_unused_locals): Suggest in comments a better place to
14307         force the preservation of inline entry blocks that are
14308         otherwise unused, but do not preserve them.
14310 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
14312         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14314 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
14316         PR target/84039
14317         * config/i386/constraints.md (Bs): Replace
14318         ix86_indirect_branch_register with
14319         TARGET_INDIRECT_BRANCH_REGISTER.
14320         (Bw): Likewise.
14321         * config/i386/i386.md (indirect_jump): Likewise.
14322         (tablejump): Likewise.
14323         (*sibcall_memory): Likewise.
14324         (*sibcall_value_memory): Likewise.
14325         Peepholes of indirect call and jump via memory: Likewise.
14326         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14327         (*sibcall_value_GOT_32): Likewise.
14328         * config/i386/predicates.md (indirect_branch_operand): Likewise.
14329         (GOT_memory_operand): Likewise.
14330         (call_insn_operand): Likewise.
14331         (sibcall_insn_operand): Likewise.
14332         (GOT32_symbol_operand): Likewise.
14333         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14335 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
14337         PR rtl-optimization/83496
14338         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14339         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
14340         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14341         redundant insn, if any.
14342         (relax_delay_slots): Likewise.
14343         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14345 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
14347         PR tree-optimization/83965
14348         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14349         that grouped statements are part of a reduction chain.  Return
14350         true if the statement is not marked as a reduction itself but
14351         is part of a group.
14352         (vect_recog_dot_prod_pattern): Don't check whether the statement
14353         is part of a group here.
14354         (vect_recog_sad_pattern): Likewise.
14355         (vect_recog_widen_sum_pattern): Likewise.
14357 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
14359         PR debug/84545
14360         * final.c (rest_of_clean_state): Also look for calls inside sequences.
14362 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
14364         PR target/84530
14365         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14366         the bool argument.
14367         (ix86_output_indirect_function_return): New prototype.
14368         (ix86_split_simple_return_pop_internal): Likewise.
14369         * config/i386/i386.c (indirect_return_via_cx): New.
14370         (indirect_return_via_cx_bnd): Likewise.
14371         (indirect_thunk_name): Handle return va CX_REG.
14372         (output_indirect_thunk_function): Create alias for
14373         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14374         (ix86_output_indirect_jmp): Remove the bool argument.
14375         (ix86_output_indirect_function_return): New function.
14376         (ix86_split_simple_return_pop_internal): Likewise.
14377         * config/i386/i386.md (*indirect_jump): Don't pass false
14378         to ix86_output_indirect_jmp.
14379         (*tablejump_1): Likewise.
14380         (simple_return_pop_internal): Change it to define_insn_and_split.
14381         Call ix86_split_simple_return_pop_internal to split it for
14382         -mfunction-return=.
14383         (simple_return_indirect_internal): Call
14384         ix86_output_indirect_function_return instead of
14385         ix86_output_indirect_jmp.
14387 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
14389         PR bootstrap/84405
14390         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14391         memset and value initialization afterwards.
14393 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
14395         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14397 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14399         PR target/84521
14400         * common/config/aarch64/aarch64-common.c
14401         (aarch_option_optimization_table[]): Switch
14402         off fomit-frame-pointer
14404 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
14405             Chung-Ju Wu  <jasonwucj@gmail.com>
14407         * config/nds32/nds32-multiple.md (load_multiple): Disallow
14408         volatile memory.
14409         (store_multiple): Ditto.
14411 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
14413         * config.gcc: Add --with-cpu support for nds32 target.
14414         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14415         * config/nds32/nds32.opt: Add -mcpu= option.
14417 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
14419         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14420         isel=yes): Warn for these deprecated options.
14422 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
14424         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14425         ISA_2_5_MASKS_EMBEDDED.
14427 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
14429         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14430         p->max as pointers rather than using iterative_hash_expr.
14432 2018-02-23  Carl Love  <cel@us.ibm.com>
14434         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14435         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14436         BU_P8V_OVERLOAD_2.
14437         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14438         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14439         P8V_BUILTIN_VEC_VUNSIGNED2.
14441 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
14443         PR target/81572
14444         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14445         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14446         LRA_UNKNOWN_ALT.
14447         * lra-constraints.c (curr_insn_transform): Set up
14448         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
14449         LRA_UNKNOWN_ALT.
14450         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14451         * lra-eliminations.c (spill_pseudos): Ditto.
14452         (process_insn_for_elimination): Ditto.
14453         * lra-lives.c (reg_early_clobber_p): Use the new macros.
14454         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14455         LRA_NON_CLOBBERED_ALT.
14457 2018-02-22  Martin Sebor  <msebor@redhat.com>
14459         PR tree-optimization/84480
14460         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14461         to maybe_diag_stxncpy_trunc.  Call it.
14462         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14463         from gimple_fold_builtin_strcpy.  Print inlining stack.
14464         (handle_builtin_stxncpy): Print inlining stack.
14465         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14467 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
14469         PR target/84176
14470         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14471         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14472         and -fcheck-pointer-bounds are used together.
14473         (indirect_thunk_prefix): New enum.
14474         (indirect_thunk_need_prefix): New function.
14475         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
14476         "_nt" instead of "_bnd" for NOTRACK prefix.
14477         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14478         (output_indirect_thunk_function): Likewise.
14479         (): Likewise.
14480         (ix86_code_end): Update output_indirect_thunk_function calls.
14481         (ix86_output_indirect_branch_via_reg): Replace
14482         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14483         (ix86_output_indirect_branch_via_push): Likewise.
14484         (ix86_output_function_return): Likewise.
14485         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14486         incompatible with -fcf-protection=branch and
14487         -fcheck-pointer-bounds.
14489 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
14491         PR target/83335
14492         * config/aarch64/aarch64.c (aarch64_print_address_internal):
14493         Change gcc_assert call to output_operand_lossage.
14495 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
14497         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14499 2018-02-22  DJ Delorie  <dj@redhat.com>
14500             Sebastian Perta  <sebastian.perta@renesas.com>
14501             Oleg Endo  <olegendo@gcc.gnu.org>
14503         * config/rx/rx.c (rx_rtx_costs): New function.
14504         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14506 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14508         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14510 2018-02-22  Martin Liska  <mliska@suse.cz>
14512         PR driver/83193
14513         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14514         Add "native" as a possible value.
14516 2018-02-22  Martin Liska  <mliska@suse.cz>
14518         PR driver/83193
14519         * config/i386/i386.c (ix86_option_override_internal):
14520         Add "native" as a possible value for -march and -mtune.
14522 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
14524         PR target/84502
14525         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14526         to all type variants.
14528         PR tree-optimization/84503
14529         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14530         width as info->bitpos + info->bitsize - start.
14531         (merged_store_group::merge_overlapping): Simplify width computation.
14532         (check_no_overlap): New function.
14533         (imm_store_chain_info::try_coalesce_bswap): Compute expected
14534         start + width and last_order of the group, fail if check_no_overlap
14535         fails.
14536         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14537         to group if check_no_overlap fails.
14539 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
14541         * config/rs6000/altivec.md: Delete contraint arguments to
14542         define_expand, define_split, and define_peephole2, and in
14543         define_insn_and_split if always unused.
14544         * config/rs6000/darwin.md: Ditto.
14545         * config/rs6000/dfp.md: Ditto.
14546         * config/rs6000/rs6000.md: Ditto.
14547         * config/rs6000/sync.md: Ditto.
14548         * config/rs6000/vector.md: Ditto.
14549         * config/rs6000/vsx.md: Ditto.
14551 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
14553         * config/rs6000/altivec.md: Write output control strings as braced
14554         blocks instead of double-quoted strings.
14555         * config/rs6000/darwin.md: Ditto.
14556         * config/rs6000/rs6000.md: Ditto.
14557         * config/rs6000/vector.md: Ditto.
14558         * config/rs6000/vsx.md: Ditto.
14560 2018-02-21  Jason Merrill  <jason@redhat.com>
14562         PR c++/84314 - ICE with templates and fastcall attribute.
14563         * attribs.c (build_type_attribute_qual_variant): Remove assert.
14565 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
14567         * ipa-cp.c (determine_versionability): Fix comment typos.
14569 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
14571         PR c/84229
14572         * ipa-cp.c (determine_versionability): Do not version functions caling
14573         va_arg_pack.
14575 2018-02-21  Martin Liska  <mliska@suse.cz>
14577         PR driver/83193
14578         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14579         Add "native" as a possible value.
14580         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
14581         the macro when native cpu detection is available.
14583 2018-02-21  Martin Liska  <mliska@suse.cz>
14585         PR driver/83193
14586         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14587         Add "native" as a possible value.
14588         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14589         when native cpu detection is available.
14591 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
14592             Martin Sebor  <msebor@redhat.com>
14594         PR tree-optimization/84478
14595         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14596         false.
14597         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14598         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14599         support which is conservatively correct, for 2 only stay conservative
14600         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
14601         argument to the 2 argument get_range_strlen, adjust 6 arg
14602         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14603         false.
14604         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14605         (gimple_fold_builtin_strlen): Pass true as last argument to
14606         get_range_strlen.
14608 2018-02-20  Martin Sebor  <msebor@redhat.com>
14610         PR middle-end/84095
14611         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14612         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
14613         (builtin_memref::builtin_memref): Factor out parts into
14614         set_base_and_offset and call it.
14616 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
14618         PR middle-end/84406
14619         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14620         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14621         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
14622         search at the associated MODE_INT.
14624 2018-02-20  Jeff Law  <law@redhat.com>
14626         PR middle-end/82123
14627         PR tree-optimization/81592
14628         PR middle-end/79257
14629         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14630         for range data rather than using global data.
14631         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14632         range data rather than using global data.
14633         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14634         pass it to children as needed.
14635         (struct directive::fmtresult): Similarly.
14636         (struct directive::set_width): Similarly.
14637         (struct directive::set_precision): Similarly.
14638         (format_integer, format_directive, parse_directive): Similarly.
14639         (format_none): Accept unnamed vr_values parameter.
14640         (format_percent, format_floating, format_character): Similarly.
14641         (format_string, format_plain): Similarly.
14642         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14643         the EVRP range analyzer for range data rather than using global data.
14644         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14645         gimple-ssa-evrp-analyze.h
14646         (class sprintf_dom_walker): Add after_dom_children member function.
14647         Add evrp_range_analyzer member.
14648         (sprintf_dom_walker::before_dom_children): Call into the EVRP
14649         range analyzer as needed.
14650         (sprintf_dom_walker::after_dom_children): New member function.
14651         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14652         if not optimizing.
14653         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14654         (evrp_range_analyzer::pop_to_marker): Likewise.
14656 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
14658         PR tree-optimization/84419
14659         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14660         with the required type if its current type is compatible but
14661         different.
14663 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
14665         PR middle-end/82004
14666         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14667         after vectorization.
14669 2018-02-20  Martin Liska  <mliska@suse.cz>
14671         PR driver/83193
14672         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14673         possible values if we don't have a hint.
14675 2018-02-20  Martin Liska  <mliska@suse.cz>
14677         PR c/84310
14678         PR target/79747
14679         * final.c (shorten_branches): Build align_tab array with one
14680         more element.
14681         * opts.c (finish_options): Add alignment option limit check.
14682         (MAX_CODE_ALIGN): Likewise.
14683         (MAX_CODE_ALIGN_VALUE): Likewise.
14684         * doc/invoke.texi: Document maximum allowed option value for
14685         all -falign-* options.
14687 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
14689         PR target/84146
14690         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14691         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14692         * var-tracking.c (emit_note_insn_var_location): Remove all references
14693         to NOTE_INSN_CALL_ARG_LOCATION.
14694         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14695         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14696         Use copy_rtx_if_shared.
14697         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14698         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14699         (dwarf2out_var_location): Remove handling of
14700         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14701         on call_insn.
14702         * final.c (final_scan_insn): Remove all references to
14703         NOTE_INSN_CALL_ARG_LOCATION.
14704         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
14705         before dumping final insns.
14706         * except.c (emit_note_eh_region_end): Remove all references to
14707         NOTE_INSN_CALL_ARG_LOCATION.
14708         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14709         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14710         * config/arc/arc.c (hwloop_optimize): Likewise.
14711         * config/arm/arm.c (create_fix_barrier): Likewise.
14712         * config/s390/s390.c (s390_chunkify_start): Likewise.
14713         * config/sh/sh.c (find_barrier): Likewise.
14714         * config/i386/i386.c (rest_of_insert_endbranch,
14715         ix86_seh_fixup_eh_fallthru): Likewise.
14716         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14717         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14718         * config/frv/frv.c (frv_function_prologue): Likewise.
14719         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
14720         reg note.
14721         (note_outside_basic_block_p): Remove all references to
14722         NOTE_INSN_CALL_ARG_LOCATION.
14723         * gengtype.c (adjust_field_rtx_def): Likewise.
14724         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14725         Likewise.
14726         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14727         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14729         PR c++/84444
14730         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14731         is ADDR_EXPR.
14733         PR tree-optimization/84452
14734         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14735         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14736         is NULL.
14738 2018-02-19  Martin Liska  <mliska@suse.cz>
14740         PR sanitizer/82183
14741         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14743 2018-02-19  Martin Liska  <mliska@suse.cz>
14744             Richard Sandiford  <richard.sandiford@linaro.org>
14746         PR tree-optimization/82491
14747         * gimple-fold.c (get_base_constructor): Make earlier bail out
14748         to prevent ubsan.
14750 2018-02-19  Carl Love  <cel@us.ibm.com>
14752         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14753         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14754         BU_P8V_OVERLOAD_1.
14755         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14756         P8V_BUILTIN_VEC_NEG.
14758 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
14760         * config/rl78/rl78.md (movdf): New define expand.
14762 2018-02-19  Martin Liska  <mliska@suse.cz>
14764         PR other/80589
14765         * doc/invoke.texi: Fix typo.
14766         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14768 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
14770         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14771         handle rs6000_single_float and rs6000_double_float specially for
14772         e500 family CPUs.
14774 2018-02-16  Jeff Law  <law@redhat.com>
14776         * config/rx/rx.c (add_pop_cfi_notes): New function.;
14777         (pop_regs): Use it.
14779 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
14781         PR ipa/84425
14782         * ipa-inline.c (inline_small_functions): Fix a typo.
14784 2018-02-16  Nathan Sidwell  <nathan@acm.org>
14786         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14788 2018-02-16  Carl Love  <cel@us.ibm.com>
14790         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14791         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14792         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14793         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14794         expansion to P8V_BUILTIN_VEC_FLOAT2.
14796 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
14798         PR rtl-optimization/70023
14799         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14800         src_regno into account.
14802 2018-02-16  Carl Love  <cel@us.ibm.com>
14804         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14805         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14806         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14807         * config/rs6000/rs6000.c: Remove case statements for
14808         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14809         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14810         and P9V_BUILTIN_VEC_VINSERT4B.
14811         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14812         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14813         * config/rs6000/vsx.md:
14814         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14815         vec_insert4b.
14817 2018-02-16  Carl Love  <cel@us.ibm.com>
14819         * config/rs6000/altivec.h: Add builtin names vec_extract4b
14820         vec_insert4b.
14821         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14822         definitions.
14823         * config/rs6000/rs6000-c.c: Add the definitions for
14824         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14825         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14826         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14827         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
14828         definition for insert4b and define insn *insert3b_internal.
14829         * doc/extend.texi: Add documentation for vec_extract4b.
14831 2018-02-16  Nathan Sidwell  <nathan@acm.org>
14833         * doc/extend.texi (Backwards Compatibility): Mention friend
14834         injection.  Note for-scope is deprecated.
14835         * doc/invoke.texi (-ffriend-injection): Deprecate.
14837 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
14839         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14840         that moved to I2, also allow destinations that are a paradoxical
14841         subreg (instead of a normal reg).
14843 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
14845         PR target/83831
14846         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14847         to QImode.
14849 2018-02-16  Richard Biener  <rguenther@suse.de>
14851         PR tree-optimization/84037
14852         PR tree-optimization/84016
14853         PR target/82862
14854         * config/i386/i386.c (ix86_builtin_vectorization_cost):
14855         Adjust vec_construct for the fact we need additional higher latency
14856         128bit inserts for AVX256 and AVX512 vector builds.
14857         (ix86_add_stmt_cost): Scale vector construction cost for
14858         elementwise loads.
14860 2018-02-16  Richard Biener  <rguenther@suse.de>
14862         PR tree-optimization/84417
14863         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14864         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14865         (non_rewritable_lvalue_p): Likewise, use poly-ints.
14867 2018-02-16  Martin Liska  <mliska@suse.cz>
14869         PR sanitizer/84307
14870         * internal-fn.def (ASAN_CHECK): Set proper flags.
14871         (ASAN_MARK): Likewise.
14873 2018-02-16  Julia Koval  <julia.koval@intel.com>
14875         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14876         from PTA_CANNONLAKE.
14878 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
14880         PR target/84272
14881         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14882         Use ++iter rather than iter++ for std::list iterators.
14883         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
14884         defer deleting them until all nodes in the forest are processed.  Do
14885         free even leaf nodes.  Change to_process into auto_vec.
14887         PR bootstrap/84405
14888         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14889         * vec.h (vec_default_construct): Use memset instead of placement new
14890         if BROKEN_VALUE_INITIALIZATION is defined.
14891         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14892         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14893         is defined.
14895         PR rtl-optimization/83723
14896         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14897         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
14898         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
14899         recursive calls.
14900         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14901         callers.
14902         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14904 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
14906         PR rtl-optimization/81443
14907         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14908         from inner REGs to paradoxical SUBREGs.
14910 2018-02-16  Richard Biener  <rguenther@suse.de>
14912         PR tree-optimization/84399
14913         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14914         For operands we can analyze at their definition make sure we can
14915         analyze them at each use as well.
14917 2018-02-16  Richard Biener  <rguenther@suse.de>
14919         PR tree-optimization/84190
14920         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14921         volatile accesses if the decl isn't volatile.
14923 2018-02-15  Jason Merrill  <jason@redhat.com>
14925         PR c++/84314 - ICE with templates and fastcall attribute.
14926         * attribs.c (build_type_attribute_qual_variant): Don't clobber
14927         TYPE_CANONICAL on an existing type.
14929 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
14931         PR tree-optimization/84383
14932         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14933         dstoff nor call operand_equal_p if dstbase is NULL.
14935         PR tree-optimization/84334
14936         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14937         also a CONSTANT_CLASS_P, punt.
14939 2018-02-14  Jim Wilson  <jimw@sifive.com>
14941         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14942         first SMALL_OPERAND check.  New local min_second_step.  Move assert
14943         to where locals are set.  Add TARGET_RVC support.
14944         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14946 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
14948         * doc/invoke.texi: Correct -Wformat-overflow code sample.
14950 2018-02-14  Martin Sebor  <msebor@redhat.com>
14952         PR tree-optimization/83698
14953         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14954         arrays constrain the offset range to their bounds.
14955         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14956         (builtin_access::overlap): Avoid setting the size of overlap if it's
14957         already been set.
14958         (maybe_diag_overlap): Also consider arrays when deciding what values
14959         of offsets to include in diagnostics.
14961 2018-02-14  Martin Sebor  <msebor@redhat.com>
14963         PR c/84108
14964         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14965         that correspond to the kind of a declaration.
14967 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
14969         PR target/83984
14970         * config/pa/pa.md: Load address of PIC label using the linkage table
14971         if the label is nonlocal.
14973 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14975         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14976         warning message if user requests -maltivec=be.
14977         * doc/invoke.texi: Document deprecation of -maltivec=be.
14979 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
14981         PR target/84220
14982         * config/rs6000/rs6000-c.c: Update definitions for
14983         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14984         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14986 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14988         PR target/84239
14989         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14990         add _get_ssp intrinsics. Remove argument from
14991         __builtin_ia32_rdssp[d|q].
14992         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14993         * config/i386/i386-builtin.def: Remove argument from
14994         __builtin_ia32_rdssp[d|q].
14995         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14996         ix86_expand_special_args_builtin for _rdssp[d|q].
14997         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14998         Clear register before usage.
14999         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15000         Add documentation for new _get_ssp and _inc_ssp intrinsics.
15002 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
15004         PR tree-optimization/84357
15005         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15006         operand 1 of an ARRAY_REF too.
15008 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
15010         PR target/83831
15011         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15012         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15013         declarations.
15014         (set_of_reg): New struct.
15015         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15016         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15017         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15018         functions.
15019         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15020         Split into bitclr, bitset, bitinvert patterns if appropriate.
15021         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15022         use rx_fuse_in_memory_bitop.
15023         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15024         to named insn, correct maximum insn length.
15026 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
15028         PR target/79242
15029         * machmode.def: Define a complex mode for PARTIAL_INT.
15030         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15031         MODE_PARTIAL_INT.
15032         * doc/rtl.texi: Document CSPImode.
15033         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15034         handling.
15035         (msp430_hard_regno_nregs_with_padding): Likewise.
15037 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
15039         PR target/84279
15040         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15042 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
15044         PR rtl-optimization/84169
15045         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
15046         we generated a parallel as new i3 and we split that to new i2 and i3
15047         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
15048         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
15049         those to i2, not i1.  Partially rewrite this scan code.
15051 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
15053         PR c/82210
15054         * stor-layout.c (place_field): For variable length fields, adjust
15055         offset_align afterwards not just based on the field's alignment,
15056         but also on the size.
15058         PR middle-end/84309
15059         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15060         of exps and logs in the use_exp2 case.
15062 2018-02-13  Jeff Law  <law@redhat.com>
15064         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15065         entry for "vector".
15067         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15068         ARGS as unused.
15070 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
15072         PR debug/84342
15073         PR debug/84319
15074         * common.opt (gas-loc-support, gas-locview-support): New.
15075         (ginline-points, ginternal-reset-location-views): New.
15076         * doc/invoke.texi: Document them.  Use @itemx where intended.
15077         (gvariable-location-views): Adjust.
15078         * target.def (reset_location_view): New.
15079         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15080         (TARGET_RESET_LOCATION_VIEW): New.
15081         * doc/tm.texi: Rebuilt.
15082         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15083         (dwarf2out_default_as_locview_support): New.
15084         (output_asm_line_debug_info): Use option variables.
15085         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15086         (output_loc_list): Likewise.
15087         (add_high_low_attributes): Check option variables.
15088         Don't output entry view attribute in strict mode.
15089         (gen_inlined_subroutine_die): Check option variables.
15090         (dwarf2out_inline_entry): Likewise.
15091         (init_sections_and_labels): Likewise.
15092         (dwarf2out_early_finish): Likewise.
15093         (maybe_reset_location_view): New, from...
15094         (dwarf2out_var_location): ... here.  Call it.
15095         * debug.h (dwarf2out_default_as_loc_support): Declare.
15096         (dwarf2out_default_as_locview_support): Declare.
15097         * hooks.c (hook_int_rtx_insn_0): New.
15098         * hooks.h (hook_int_rtx_insn_0): Declare.
15099         * toplev.c (process_options): Take -gas-loc-support and
15100         -gas-locview-support from dwarf2out.  Enable
15101         -gvariable-location-views by default only with locview
15102         assembler support.  Enable -ginternal-reset-location-views by
15103         default only if the target defines the corresponding hook.
15104         Enable -ginline-points by default if location views are
15105         enabled; force it disabled if statement frontiers are
15106         disabled.
15107         * tree-inline.c (expand_call_inline): Check option variables.
15108         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15110 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
15112         PR tree-optimization/84321
15113         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15114         handling.  Also check whether the anti-range contains any values
15115         that satisfy the mask; switch to a VR_RANGE if not.
15117 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
15119         PR sanitizer/84340
15120         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15122 2018-02-13  Martin Jambor  <mjambor@suse.cz>
15124         PR c++/83990
15125         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15126         of call statements, also set location of a load to a temporary.
15128 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
15130         * config/rl78/rl78.c (add_vector_labels): New function.
15131         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15132         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15133         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15134         which checks that no arguments are passed.
15135         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15136         * doc/extend.texi: Documentation for the new attribute.
15138 2018-02-13  Andreas Schwab  <schwab@suse.de>
15140         * config/riscv/linux.h (CPP_SPEC): Define.
15142 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
15144         PR target/84335
15145         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15146         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15147         OPTION_MASK_ISA_AES as first argument to def_builtin_const
15148         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15149         instead of OPTION_MASK_ISA_PCLMUL as first argument to
15150         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15151         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15152         temporarily for AES and PCLMUL builtins.
15154         PR tree-optimization/84339
15155         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15156         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15157         Formatting fixes.
15159         PR middle-end/84309
15160         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15161         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15162         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15163         inline function.
15164         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15165         inline function.
15166         * omp-simd-clone.h: New file.
15167         * omp-simd-clone.c: Include omp-simd-clone.h.
15168         (expand_simd_clones): No longer static.
15169         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15170         cgraph.h and omp-simd-clone.h.
15171         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15172         (vect_recog_widen_shift_pattern): Formatting fix.
15173         (vect_pattern_recog_1): Don't check optab for calls.
15175         PR target/84336
15176         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15177         operands[2] into a REG before using gen_lowpart on it.
15179 2018-02-12  Jeff Law  <law@redhat.com>
15181         PR target/83760
15182         * config/sh/sh.c (find_barrier): Consider a sibling call
15183         a barrier as well.
15185         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15186         successfully back substituting a reg.
15188 2018-02-12  Richard Biener  <rguenther@suse.de>
15190         PR tree-optimization/84037
15191         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15192         parameter, move visited init to caller.
15193         (vect_slp_analyze_operations): Separate cost from validity
15194         check, initialize visited once for all instances.
15195         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15196         for all instances.
15197         * tree-vect-stmts.c (vect_model_simple_cost): Make early
15198         out an assert.
15199         (vect_model_promotion_demotion_cost): Likewise.
15200         (vectorizable_bswap): Guard cost modeling with !slp_node
15201         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15202         SLP stmts.
15203         (vectorizable_call): Likewise.
15204         (vectorizable_conversion): Likewise.
15205         (vectorizable_assignment): Likewise.
15206         (vectorizable_shift): Likewise.
15207         (vectorizable_operation): Likewise.
15208         (vectorizable_store): Likewise.
15209         (vectorizable_load): Likewise.
15210         (vectorizable_condition): Likewise.
15211         (vectorizable_comparison): Likewise.
15213 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
15215         PR sanitizer/84307
15216         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15217         (ASAN_MARK): Fix fnspec to account for return value, change pointer
15218         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15220 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
15222         PR middle-end/83665
15223         * params.def (inline-min-speedup): Increase from 8 to 15.
15224         (max-inline-insns-auto): Decrease from 40 to 30.
15225         * ipa-split.c (consider_split): Add some buffer for function to
15226         be considered inlining candidate.
15227         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15228         default values.
15230 2018-02-12  Richard Biener  <rguenther@suse.de>
15232         PR tree-optimization/84037
15233         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15234         matched stmts if we cannot swap the non-matched ones.
15236 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
15238         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15239         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15240         _mm_maskz_scalef_round_ss): New intrinsics.
15241         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15242         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15243         __builtin_ia32_scalefss_round): Remove.
15244         (__builtin_ia32_scalefsd_mask_round,
15245         __builtin_ia32_scalefss_mask_round): New intrinsics.
15246         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15247         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15248         ((match_operand:VF_128 2 "<round_nimm_predicate>"
15249         "<round_constraint>")): Changed to ...
15250         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15251         "<round_scalar_constraint>")): ... this.
15252         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15253         %0, %1, %2<round_op3>}"): Changed to ...
15254         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15255         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15256         %2<round_scalar_mask_op3>}"): ... this.
15257         * config/i386/subst.md (round_scalar_nimm_predicate): New.
15259 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
15261         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15262         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15263         (_mm_maskz_sqrt_round_ss): New intrinsics.
15264         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15265         (__builtin_ia32_sqrtsd_mask_round)
15266         (__builtin_ia32_sqrtss_mask_round): New builtins.
15267         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15268         (__builtin_ia32_sqrtss_round): Remove.
15269         (__builtin_ia32_sqrtsd_mask_round)
15270         (__builtin_ia32_sqrtss_mask_round): New builtins.
15271         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15272         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15273         ((match_operand:VF_128 1 "vector_operand"
15274         "xBm,<round_constraint>")): Changed to ...
15275         ((match_operand:VF_128 1 "vector_operand"
15276         "xBm,<round_scalar_constraint>")): ... this.
15277         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15278         %0, %2, %<iptr>1<round_op3>}): Changed to ...
15279         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15280         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15281         %<iptr>1<round_scalar_mask_op3>}): ... this.
15282         ((set_attr "prefix" "<round_prefix>")): Changed to ...
15283         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15285 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
15287         PR target/84266
15288         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15289         Cast vec_cmpeq result to correct type.
15290         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15291         Cast vec_cmpgt result to correct type.
15293 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
15295         * final.c (final_scan_insn_1): Renamed from...
15296         (final_scan_insn): ... this.  New wrapper, to recover
15297         seen from the outermost call in recursive ones.
15298         * config/sparc/sparc.c (output_return): Drop seen from call.
15299         (output_sibcall): Likewise.
15300         * config/visium/visium.c (output_branch): Likewise.
15302 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
15304         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15305         function label.
15307 2018-02-10  Alan Modra  <amodra@gmail.com>
15309         PR target/84300
15310         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15311         Specify LR as an input.
15313 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
15315         PR sanitizer/83987
15316         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15317         remove_member_access_dummy_vars): New functions.
15318         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15319         lower_omp_1, execute_lower_omp): Use them.
15321         PR rtl-optimization/84308
15322         * shrink-wrap.c (spread_components): Release todo vector.
15324 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
15326         PR rtl-optimization/57193
15327         * ira-color.c (struct allocno_color_data): Add member
15328         conflict_allocno_hard_prefs.
15329         (update_conflict_allocno_hard_prefs): New.
15330         (bucket_allocno_compare_func): Add a preference based on
15331         conflict_allocno_hard_prefs.
15332         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15333         (color_allocnos): Remove a dead code.  Initiate
15334         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
15336 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
15338         PR target/84226
15339         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15340         constraint from =wa to wa.  Avoid a subreg on the output operand,
15341         instead use a pseudo and subreg it in a move.
15342         (p9_xxbrd_<mode>): Changed to ...
15343         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15344         (p9_xxbrd_v2df): New expander.
15345         (p9_xxbrw_<mode>): Changed to ...
15346         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15347         (p9_xxbrw_v4sf): New expander.
15349 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
15351         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15353 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
15355         PR target/83926
15356         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15357         multiply in 32-bit mode.
15358         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15359         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15360         mode.
15362 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
15364         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15365         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15366         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15367         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15369 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
15371         PR lto/84213
15372         * dwarf2out.c (is_trivial_indirect_ref): New function.
15373         (dwarf2out_late_global_decl): Do not generate a location
15374         attribute for variables that have a non-trivial DECL_VALUE_EXPR
15375         and that are not defined in the current unit.
15377 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
15379         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15380         instead of a libcall for UNORDERED.
15382 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
15384         PR target/82641
15385         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15386         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15388 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15390         PR target/PR84295
15391         * config/s390/s390.c (s390_set_current_function): Invoke
15392         s390_indirect_branch_settings also if fndecl didn't change.
15394 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
15396         * config/rs6000/rs6000.md (blockage): Set length to zero.
15398 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
15400         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15402 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
15404         PR sanitizer/84285
15405         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15406         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15407         -static-lib*san.
15409         PR debug/84252
15410         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15411         PARALLEL incoming that failed vt_get_decl_and_offset check.
15413         PR middle-end/84237
15414         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15415         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15416         TREE_READONLY bit.
15417         (get_variable_section): For decls in named .bss* sections pass true as
15418         second argument to bss_initializer_p.
15420 2018-02-09  Marek Polacek  <polacek@redhat.com>
15421             Jakub Jelinek  <jakub@redhat.com>
15423         PR c++/83659
15424         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15425         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
15426         Sync some changes from cxx_fold_indirect_ref.
15428 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
15430         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15431         markers.
15432         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15433         (BLOCK_INLINE_ENTRY_LABEL): New.
15434         (dwarf2out_var_location): Disregard inline entry markers.
15435         (inline_entry_data): New struct.
15436         (inline_entry_data_hasher): New hashtable type.
15437         (inline_entry_data_hasher::hash): New.
15438         (inline_entry_data_hasher::equal): New.
15439         (inline_entry_data_table): New variable.
15440         (add_high_low_attributes): Add DW_AT_entry_pc and
15441         DW_AT_GNU_entry_view attributes if a pending entry is found
15442         in inline_entry_data_table.  Add old entry_pc attribute only
15443         if debug nonbinding markers are disabled.
15444         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15445         markers are enabled.
15446         (block_within_block_p, dwarf2out_inline_entry): New.
15447         (dwarf2out_finish): Check that no entries remained in
15448         inline_entry_data_table.
15449         * final.c (reemit_insn_block_notes): Handle inline entry notes.
15450         (final_scan_insn, notice_source_line): Likewise.
15451         (rest_of_clean_state): Skip inline entry markers.
15452         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15453         markers.
15454         * gimple.c (gimple_build_debug_inline_entry): New.
15455         * gimple.h (enum gimple_debug_subcode): Add
15456         GIMPLE_DEBUG_INLINE_ENTRY.
15457         (gimple_build_debug_inline_entry): Declare.
15458         (gimple_debug_inline_entry_p): New.
15459         (gimple_debug_nonbind_marker_p): Adjust.
15460         * insn-notes.def (INLINE_ENTRY): New.
15461         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15462         inline entry marker notes.
15463         (print_insn): Likewise.
15464         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15465         (INSN_DEBUG_MARKER_KIND): Likewise.
15466         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15467         * tree-inline.c (expand_call_inline): Build and insert
15468         debug_inline_entry stmt.
15469         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15470         inline entry blocks early, if nonbind markers are enabled.
15471         (dump_scope_block): Dump fragment info.
15472         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15473         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15474         (gimple_build_debug_inline_entry): New.
15475         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15476         Enable/disable inline entry points too.
15477         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15478         (DEBUG_INSN): Describe inline entry markers.
15480         * common.opt (gvariable-location-views): New.
15481         (gvariable-location-views=incompat5): New.
15482         * config.in: Rebuilt.
15483         * configure: Rebuilt.
15484         * configure.ac: Test assembler for view support.
15485         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15486         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15487         * dwarf2out.c (var_loc_view): New typedef.
15488         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15489         (dwarf2out_locviews_in_attribute): New.
15490         (dwarf2out_locviews_in_loclist): New.
15491         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15492         (enum dw_line_info_opcode): Add LI_adv_address.
15493         (struct dw_line_info_table): Add view.
15494         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15495         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15496         (zero_view_p): New variable.
15497         (ZERO_VIEW_P): New macro.
15498         (output_asm_line_debug_info): New.
15499         (struct var_loc_node): Add view.
15500         (add_AT_view_list, AT_loc_list): New.
15501         (add_var_loc_to_decl): Add view param.  Test it against last.
15502         (new_loc_list): Add view params.  Record them.
15503         (AT_loc_list_ptr): Handle loc and view lists.
15504         (view_list_to_loc_list_val_node): New.
15505         (print_dw_val): Handle dw_val_class_view_list.
15506         (size_of_die): Likewise.
15507         (value_format): Likewise.
15508         (loc_list_has_views): New.
15509         (gen_llsym): Set vl_symbol too.
15510         (maybe_gen_llsym, skip_loc_list_entry): New.
15511         (dwarf2out_maybe_output_loclist_view_pair): New.
15512         (output_loc_list): Output view list or entries too.
15513         (output_view_list_offset): New.
15514         (output_die): Handle dw_val_class_view_list.
15515         (output_dwarf_version): New.
15516         (output_compilation_unit_header): Use it.
15517         (output_skeleton_debug_sections): Likewise.
15518         (output_rnglists, output_line_info): Likewise.
15519         (output_pubnames, output_aranges): Update version comments.
15520         (output_one_line_info_table): Output view numbers in asm comments.
15521         (dw_loc_list): Determine current endview, pass it to new_loc_list.
15522         Call maybe_gen_llsym.
15523         (loc_list_from_tree_1): Adjust.
15524         (add_AT_location_description): Create view list attribute if
15525         needed, check it's absent otherwise.
15526         (convert_cfa_to_fb_loc_list): Adjust.
15527         (maybe_emit_file): Call output_asm_line_debug_info for test.
15528         (dwarf2out_var_location): Reset views as needed.  Precompute
15529         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
15530         attribute.  Set view.
15531         (new_line_info_table): Reset next view.
15532         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15533         (dwarf2out_source_line): Likewise.  Output view resets and labels to
15534         the assembler, or select appropriate line info opcodes.
15535         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15536         (optimize_string_length): Catch it.  Adjust.
15537         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
15538         dw_val_class_view_list, and remove it if no longer needed.
15539         (hash_loc_list): Hash view numbers.
15540         (loc_list_hasher::equal): Compare them.
15541         (optimize_location_lists): Check whether a view list symbol is
15542         needed, and whether the locview attribute is present, and
15543         whether they match.  Remove the locview attribute if no longer
15544         needed.
15545         (index_location_lists): Call skip_loc_list_entry for test.
15546         (dwarf2out_finish): Call output_asm_line_debug_info for test.
15547         Use output_dwarf_version.
15548         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15549         (struct dw_val_node): Add val_view_list.
15550         * final.c (SEEN_NEXT_VIEW): New.
15551         (set_next_view_needed): New.
15552         (clear_next_view_needed): New.
15553         (maybe_output_next_view): New.
15554         (final_start_function): Rename to...
15555         (final_start_function_1): ... this.  Take pointer to FIRST,
15556         add SEEN parameter.  Emit param bindings in the initial view.
15557         (final_start_function): Reintroduce SEEN-less interface.
15558         (final): Rename to...
15559         (final_1): ... this.  Take SEEN parameter.  Output final pending
15560         next view at the end.
15561         (final): Reintroduce seen-less interface.
15562         (final_scan_insn): Output pending next view before switching
15563         sections or ending a block.  Mark the next view as needed when
15564         outputting variable locations.  Notify debug backend of section
15565         changes, and of location view changes.
15566         (rest_of_handle_final): Adjust.
15567         * toplev.c (process_options): Autodetect value for debug variable
15568         location views option.  Warn on incompat5 without -gdwarf-5.
15569         * doc/invoke.texi (gvariable-location-views): New.
15570         (gvariable-location-views=incompat5): New.
15571         (gno-variable-location-views): New.
15573 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
15575         PR tree-optimization/84136
15576         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15577         that the result of find_edge is non-NULL.
15579 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
15581         PR target/83008
15582         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15583         storing integer register in SImode.  Fix cost of 256 and 512
15584         byte aligned SSE register store.
15586 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
15588         * config/i386/i386.c (ix86_multiplication_cost): Fix
15589         multiplication cost for TARGET_AVX512DQ.
15591 2018-02-08  Marek Polacek  <polacek@redhat.com>
15593         PR tree-optimization/84238
15594         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15595         get_range_strlen.
15597 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15599         PR tree-optimization/84265
15600         * tree-vect-stmts.c (vectorizable_store): Don't treat
15601         VMAT_CONTIGUOUS accesses as grouped.
15602         (vectorizable_load): Likewise.
15604 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15606         PR tree-optimization/81635
15607         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15608         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15609         (test_round_for_mask): New functions.
15610         (wide_int_cc_tests): Call test_round_for_mask.
15611         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15612         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15613         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15614         range returned by get_range_info.
15616 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
15618         PR ipa/81360
15619         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15620         * symtab.c: Include builtins.h
15621         (symtab_node::output_to_lto_symbol_table_p): Move here
15622         from lto-streamer-out.c:output_symbol_p.
15623         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15624         (output_symbol_p): Move all logic to symtab.c
15625         (produce_symtab): Update.
15627 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15629         * config/s390/s390-opts.h (enum indirect_branch): Define.
15630         * config/s390/s390-protos.h (s390_return_addr_from_memory)
15631         (s390_indirect_branch_via_thunk)
15632         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15633         (enum s390_indirect_branch_type): Define.
15634         * config/s390/s390.c (struct s390_frame_layout, struct
15635         machine_function): Remove.
15636         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15637         (indirect_branch_table_label_no, indirect_branch_table_name):
15638         Define variables.
15639         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15640         (enum s390_indirect_branch_option): Define.
15641         (s390_return_addr_from_memory): New function.
15642         (s390_handle_string_attribute): New function.
15643         (s390_attribute_table): Add new attribute handler.
15644         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15645         (s390_indirect_branch_via_thunk): New function.
15646         (s390_indirect_branch_via_inline_thunk): New function.
15647         (s390_function_ok_for_sibcall): When jumping via thunk disallow
15648         sibling call optimization for non z10 compiles.
15649         (s390_emit_call): Force indirect branch target to be a single
15650         register.  Add r1 clobber for non-z10 compiles.
15651         (s390_emit_epilogue): Emit return jump via return_use expander.
15652         (s390_reorg): Handle JUMP_INSNs as execute targets.
15653         (s390_option_override_internal): Perform validity checks for the
15654         new command line options.
15655         (s390_indirect_branch_attrvalue): New function.
15656         (s390_indirect_branch_settings): New function.
15657         (s390_set_current_function): Invoke s390_indirect_branch_settings.
15658         (s390_output_indirect_thunk_function):  New function.
15659         (s390_code_end): Implement target hook.
15660         (s390_case_values_threshold): Implement target hook.
15661         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15662         macros.
15663         * config/s390/s390.h (struct s390_frame_layout)
15664         (struct machine_function): Move here from s390.c.
15665         (TARGET_INDIRECT_BRANCH_NOBP_RET)
15666         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15667         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15668         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15669         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15670         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15671         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15672         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15673         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15674         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15675         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15676         (mnemonic attribute): Add values which aren't recognized
15677         automatically.
15678         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15679         pattern for branch conversion.  Fix mnemonic attribute.
15680         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15681         indirect branch via thunk if requested.
15682         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15683         ("*indirect_jump"): Disable for branch conversion using out of
15684         line thunks.
15685         ("indirect_jump_via_thunk<mode>_z10")
15686         ("indirect_jump_via_thunk<mode>")
15687         ("indirect_jump_via_inlinethunk<mode>_z10")
15688         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15689         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15690         ("casesi_jump_via_inlinethunk<mode>_z10")
15691         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15692         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15693         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15694         ("*indirect2_jump"): Disable for branch conversion.
15695         ("casesi_jump"): Turn into expander and expand patterns for branch
15696         conversion.
15697         ("return_use"): New expander.
15698         ("*return"): Emit return via thunk and rename it to ...
15699         ("*return<mode>"): ... this one.
15700         * config/s390/s390.opt: Add new options and and enum for the
15701         option values.
15703 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15705         * lra-constraints.c (match_reload): Unconditionally use
15706         gen_lowpart_SUBREG, rather than selecting between that
15707         and equivalent gen_rtx_SUBREG code.
15709 2018-02-08  Richard Biener  <rguenther@suse.de>
15711         PR tree-optimization/84233
15712         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15713         changed flag instead of boguously re-using phi_inserted.
15715 2018-02-08  Martin Jambor  <mjambor@suse.cz>
15717         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15718         static local variables.
15720 2018-02-08  Richard Biener  <rguenther@suse.de>
15722         PR tree-optimization/84278
15723         * tree-vect-stmts.c (vectorizable_store): When looking for
15724         smaller vector types to perform grouped strided loads/stores
15725         make sure the mode is supported by the target.
15726         (vectorizable_load): Likewise.
15728 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
15730         * config/aarch64/aarch64.c (aarch64_components_for_bb):
15731         Increase LDP/STP opportunities by adding adjacent callee-saves.
15733 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
15735         PR rtl-optimization/84068
15736         PR rtl-optimization/83459
15737         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15739 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
15741         PR tree-optimization/84224
15742         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15743         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15744         non-zero arguments.
15746 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
15748         PR target/84113
15749         * config/rs6000/altivec.md (*restore_world): Remove LR use.
15750         * config/rs6000/predicates.md (restore_world_operation): Adjust op
15751         count, remove one USE.
15753 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
15755         * doc/install.texi (Configuration): Document the
15756         --with-long-double-format={ibm,ieee} PowerPC configuration
15757         options.
15759         PR target/84154
15760         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15761         Convert from define_expand to be define_insn_and_split.  Rework
15762         float/double/_Float128 conversions to QI/HI/SImode to work with
15763         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
15764         conversions to QI/HImode types did a store and then a load to
15765         truncate the value.  For conversions to VSX registers, don't split
15766         the insn, instead emit the code directly.  Use the code iterator
15767         any_fix to combine signed and unsigned conversions.
15768         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15769         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15770         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15771         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15772         (fix_<mode>di2_hw): Likewise.
15773         (fixuns_<mode>di2_hw): Likewise.
15774         (fix_<mode>si2_hw): Likewise.
15775         (fixuns_<mode>si2_hw): Likewise.
15776         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15777         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15778         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15779         fix<uns>_trunc<SFDF:mode>si2_p8.
15780         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15781         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15782         (fix<uns>_<mode>_mem): Likewise.
15783         (fctiw<u>z_<mode>_mem): Likewise.
15784         (fix<uns>_<mode>_mem): Likewise.
15785         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15786         the register allocator from doing a direct move to the GPRs to do
15787         a store, and instead use the ISA 3.0 store byte/half-word from
15788         vector register instruction.  For IEEE 128-bit floating point,
15789         also optimize stores of 32-bit ints.
15790         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15792 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
15794         * genextract.c (push_pathstr_operand): New function to support
15795         [a-zA-Z].
15796         (walk_rtx): Call push_pathstr_operand.
15797         (print_path): Support [a-zA-Z].
15799 2018-02-07  Richard Biener  <rguenther@suse.de>
15801         PR tree-optimization/84037
15802         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15803         (cse_and_gimplify_to_preheader): Declare.
15804         (vect_get_place_in_interleaving_chain): Likewise.
15805         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15806         ivexpr_map.
15807         (_loop_vec_info::~_loop_vec_info): Delete it.
15808         (cse_and_gimplify_to_preheader): New function.
15809         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15810         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15811         (vectorizable_load): Likewise.  For grouped stores always base
15812         the IV on the first element.
15813         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15814         condition before gimplifying.
15816 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
15818         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15819         *DIV_EXPR and *MOD_EXPR.
15821 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
15823         PR target/84248
15824         * config/i386/i386.c (ix86_option_override_internal): Mask out
15825         the CF_SET bit when checking -fcf-protection.
15827 2018-02-07  Tom de Vries  <tom@codesourcery.com>
15829         PR libgomp/84217
15830         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15831         enough.
15833 2018-02-07  Richard Biener  <rguenther@suse.de>
15835         PR tree-optimization/84204
15836         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15837         this place.
15839         PR tree-optimization/84205
15840         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15841         special-case isl_ast_op_zdiv_r.
15843         PR tree-optimization/84223
15844         * graphite-scop-detection.c (gather_bbs::before_dom_children):
15845         Only add conditions from within the region.
15846         (gather_bbs::after_dom_children): Adjust.
15848 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
15850         PR target/84209
15851         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15852         * config/avr/avr.md: Only post-reload split REG-REG moves if
15853         either register is GENERAL_REG_P.
15855 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
15857         PR tree-optimization/84235
15858         * tree-ssa-scopedtables.c
15859         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15860         if the subtraction is performed in floating point type where NaNs are
15861         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15862         build 1.  Formatting fix.
15864 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
15866         PR target/84146
15867         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15868         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15869         and skip it regardless of bb boundaries.  Use CALL_P macro,
15870         don't test INSN_P (insn) together with CALL_P or JUMP_P check
15871         unnecessarily, formatting fix.
15873 2018-02-06  Michael Collison  <michael.collison@arm.com>
15875         * config/arm/thumb2.md:
15876         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15877         (*thumb_mov_notscc): Ditto.
15879 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
15881         PR target/84154
15882         * config/rs6000/rs6000.md (su code attribute): Use "u" for
15883         unsigned_fix, not "s".
15885 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15887         * configure.ac (gcc_fn_eh_frame_ro): New function.
15888         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15889         correct .eh_frame permissions.
15890         * configure: Regenerate.
15892 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
15894         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15895         irrelevant options.
15897 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15899         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15900         Display warning message for -mno-speculate-indirect-jumps.
15902 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
15904         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15905         Undocumented.
15906         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15908 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
15910         PR tree-optimization/84225
15911         * tree-eh.c (find_trapping_overflow): Only call
15912         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15914 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
15916         PR target/84145
15917         * config/i386/i386.c: Reimplement the check of possible options
15918         -mibt/-mshstk conbination. Change error messages.
15919         * doc/invoke.texi: Fix a typo: remove extra '='.
15921 2018-02-06  Marek Polacek  <polacek@redhat.com>
15923         PR tree-optimization/84228
15924         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15926 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
15928         PR target/82641
15929         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15930         emitted arch directives.
15931         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15932         __ARM_FEATURE_COPROC before changing architectures.
15934 2018-02-06  Richard Biener  <rguenther@suse.de>
15936         * config/i386/i386.c (print_reg): Fix typo.
15937         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15939 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
15941         * configure: Regenerate.
15943 2018-02-05  Martin Sebor  <msebor@redhat.com>
15945         PR tree-optimization/83369
15946         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15947         inlining context.
15949 2018-02-05  Martin Liska  <mliska@suse.cz>
15951         * doc/invoke.texi: Cherry-pick upstream r323995.
15953 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
15955         * ira.c (ira_init_register_move_cost): Adjust comment.
15957 2018-02-05  Martin Liska  <mliska@suse.cz>
15959         PR gcov-profile/84137
15960         * doc/gcov.texi: Fix typo in documentation.
15962 2018-02-05  Martin Liska  <mliska@suse.cz>
15964         PR gcov-profile/83879
15965         * doc/gcov.texi: Document necessity of --dynamic-list-data when
15966         using dlopen functionality.
15968 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
15970         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15971         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15972         _mm_maskz_range_ss, _mm_mask_range_round_ss,
15973         _mm_maskz_range_round_ss): New intrinsics.
15974         (__builtin_ia32_rangesd128_round)
15975         (__builtin_ia32_rangess128_round): Remove.
15976         (__builtin_ia32_rangesd128_mask_round,
15977         __builtin_ia32_rangess128_mask_round): New builtins.
15978         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15979         __builtin_ia32_rangess128_round): Remove.
15980         (__builtin_ia32_rangesd128_mask_round,
15981         __builtin_ia32_rangess128_mask_round): New builtins.
15982         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15983         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15984         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15985         "<round_saeonly_constraint>")): Changed to ...
15986         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15987         "<round_saeonly_scalar_constraint>")): ... this.
15988         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15989         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15990         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15991         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15992         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15994 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
15996         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15997         options.
15998         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15999         Remove all values except native, 8540 and 8548.
16001 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
16003         * config/i386/i386.c (ix86_output_function_return): Pass
16004         INVALID_REGNUM, instead of -1, as invalid register number to
16005         indirect_thunk_name and output_indirect_thunk.
16007 2018-02-02  Julia Koval  <julia.koval@intel.com>
16009         * config.gcc: Add -march=icelake.
16010         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16011         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16012         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16013         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16014         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16015         (processor_target_table): Add icelake.
16016         (ix86_option_override_internal): Handle new PTAs.
16017         (get_builtin_code_for_version): Handle icelake.
16018         (M_INTEL_COREI7_ICELAKE): New.
16019         (fold_builtin_cpu): Handle icelake.
16020         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16021         * doc/invoke.texi: Add -march=icelake.
16023 2018-02-02  Julia Koval  <julia.koval@intel.com>
16025         * config/i386/i386.c (ix86_option_override_internal): Change flags type
16026         to wide_int_bitmask.
16027         * wide-int-bitmask.h: New.
16029 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16031         PR target/84066
16032         * config/i386/i386.md: Replace Pmode with word_mode in
16033         builtin_setjmp_setup and builtin_longjmp to support x32.
16035 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
16037         PR target/56010
16038         PR target/83743
16039         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16040         #include "opts.h".
16041         (rs6000_supported_cpu_names): New static variable.
16042         (linux_cpu_translation_table): Likewise.
16043         (elf_platform) <cpu>: Define new static variable and use it.
16044         Translate kernel AT_PLATFORM name to canonical name if needed.
16045         Error if platform name is unknown.
16047 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
16049         PR target/84089
16050         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16052 2018-02-01  Jeff Law  <law@redhat.com>
16054         PR target/84128
16055         * config/i386/i386.c (release_scratch_register_on_entry): Add new
16056         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
16057         the scratch if RELEASE_VIA_POP is false.
16058         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16059         If we have to save a temporary register, decrement SIZE appropriately.
16060         Pass new arguments to release_scratch_register_on_entry.
16061         (ix86_adjust_stack_and_probe): Likewise.
16062         (ix86_emit_probe_stack_range): Pass new arguments to
16063         release_scratch_register_on_entry.
16065 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
16067         PR rtl-optimization/84157
16068         * combine.c (change_zero_ext): Use REG_P predicate in
16069         front of HARD_REGISTER_P predicate.
16071 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
16073         * config/avr/avr.c (avr_option_override): Move disabling of
16074         -fdelete-null-pointer-checks to...
16075         * common/config/avr/avr-common.c (avr_option_optimization_table):
16076         ...here.
16078 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16080         PR tree-optimization/81635
16081         * tree-data-ref.c (split_constant_offset_1): For types that
16082         wrap on overflow, try to use range info to prove that wrapping
16083         cannot occur.
16085 2018-02-01  Renlin Li  <renlin.li@arm.com>
16087         PR target/83370
16088         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16089         TAILCALL_ADDR_REGS.
16090         (aarch64_register_move_cost): Likewise.
16091         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16092         TAILCALL_ADDR_REGS.
16093         (REG_CLASS_NAMES): Likewise.
16094         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16095         TAILCALL_ADDR_REGS. Remove IP registers.
16096         * config/aarch64/aarch64.md (Ucs): Update register constraint.
16098 2018-02-01  Richard Biener  <rguenther@suse.de>
16100         * domwalk.h (dom_walker::dom_walker): Add additional constructor
16101         for specifying RPO order and allow NULL for that.
16102         * domwalk.c (dom_walker::dom_walker): Likewise.
16103         (dom_walker::walk): Handle NULL RPO order.
16104         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16105         in RPO order.
16106         (rewrite_update_dom_walker): Likewise.
16107         (mark_def_dom_walker): Likewise.
16109 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16111         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16112         (aarch64_maybe_expand_sve_subreg_move): Declare.
16113         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16114         * config/aarch64/predicates.md (aarch64_any_register_operand): New
16115         predicate.
16116         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16117         that are semantically a reverse operation.
16118         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16119         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16120         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16121         functions.
16122         (aarch64_can_change_mode_class): For big-endian, forbid changes
16123         between two SVE modes if they have different element sizes.
16125 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16127         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16128         the TImode handling for big-endian targets.
16130 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16132         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16133         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
16134         not just bytes.
16135         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16136         Remove BSWAP handing for big-endian targets and use the form of
16137         LD1RQ appropariate for the mode.
16139 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16141         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16142         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16143         duplicated element.
16145 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16147         PR tearget/83845
16148         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16149         check for operands that need to go through aarch64_sve_reload_be.
16151 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
16153         PR tree-optimization/81661
16154         PR tree-optimization/84117
16155         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16156         * tree-eh.c: Include gimplify.h.
16157         (find_trapping_overflow, replace_trapping_overflow,
16158         rewrite_to_non_trapping_overflow): New functions.
16159         * tree-vect-loop.c: Include tree-eh.h.
16160         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16161         * tree-data-ref.c: Include tree-eh.h.
16162         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16164 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
16166         PR rtl-optimization/84123
16167         * combine.c (change_zero_ext): Check if hard register satisfies
16168         can_change_dest_mode before calling gen_lowpart_SUBREG.
16170 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
16172         PR target/82444
16173         * ira.c (ira_init_register_move_cost): Remove assert.
16175 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
16177         PR rtl-optimization/84071
16178         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16179         * doc/tm.texi: Regenerate.
16181 2018-01-31  Richard Biener  <rguenther@suse.de>
16183         PR tree-optimization/84132
16184         * tree-data-ref.c (analyze_miv_subscript): Properly
16185         check whether evolution_function_is_affine_multivariate_p
16186         before calling gcd_of_steps_may_divide_p.
16188 2018-01-31  Julia Koval  <julia.koval@intel.com>
16190         PR target/83618
16191         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16192         * config/i386/i386.md (rdpid_rex64) New.
16193         (rdpid): Make 32bit only.
16195 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
16197         PR lto/84105
16198         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16199         an IDENTIFIER_NODE for FUNCTION_TYPE's.
16201 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
16203         Revert
16204         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16206         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16208 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
16210         PR rtl-optimization/84071
16211         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16212         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16214 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
16216         * config/arc/arc.c (arc_handle_aux_attribute): New function.
16217         (arc_attribute_table): Add 'aux' attribute.
16218         (arc_in_small_data_p): Consider aux like variables.
16219         (arc_is_aux_reg_p): New function.
16220         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16221         (arc_get_aux_arg): New function.
16222         (prepare_move_operands): Handle aux-register access.
16223         (arc_handle_aux_attribute): New function.
16224         * doc/extend.texi (ARC Variable attributes): Add subsection.
16226 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
16228         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16229         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16230         (arc_attribute_table): Add 'uncached' attribute.
16231         (arc_print_operand): Print '.di' flag for uncached memory
16232         accesses.
16233         (arc_in_small_data_p): Do not consider for small data the uncached
16234         types.
16235         (arc_is_uncached_mem_p): New function.
16236         * config/arc/predicates.md (compact_store_memory_operand): Check
16237         for uncached memory accesses.
16238         (nonvol_nonimm_operand): Likewise.
16239         * doc/extend.texi (ARC Type Attribute): New subsection.
16241 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
16243         PR c/84100
16244         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16245         falign-loops=): Add Optimization flag.
16247 2018-01-30  Jeff Law  <law@redhat.com>
16249         PR target/84064
16250         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16251         INT_REGISTERS_SAVED.  Check it prior to calling
16252         get_scratch_register_on_entry.
16253         (ix86_adjust_stack_and_probe): Similarly.
16254         (ix86_emit_probe_stack_range): Similarly.
16255         (ix86_expand_prologue): Corresponding changes.
16257 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16259         PR target/40411
16260         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16261         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16263 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
16265         PR target/84112
16266         * lra-constraints.c (curr_insn_transform): Process AND in the
16267         address.
16269 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
16271         PR rtl-optimization/83986
16272         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16273         dependence against last_pending_memory_flush in addition to
16274         pending_jump_insns.
16276 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
16278         PR tree-optimization/81611
16279         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16280         copies.
16282 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16284         PR target/83758
16285         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16286         a reg rtx.
16288 2018-01-30  Richard Biener  <rguenther@suse.de>
16289             Jakub Jelinek  <jakub@redhat.com>
16291         PR tree-optimization/84111
16292         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16293         inner loops added during recursion, as they don't have up-to-date
16294         SSA form.
16296 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
16298         PR ipa/81360
16299         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16300         (can_inline_edge_by_limits_p): ... here.
16301         (can_early_inline_edge_p, check_callers,
16302         update_caller_keys, update_callee_keys, recursive_inlining,
16303         add_new_edges_to_heap, speculation_useful_p,
16304         inline_small_functions,
16305         inline_small_functions, flatten_function,
16306         inline_to_all_callers_1): Update.
16308 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
16310         * profile-count.c (profile_count::combine_with_ipa_count): Handle
16311         zeros correctly.
16313 2018-01-30  Richard Biener  <rguenther@suse.de>
16315         PR tree-optimization/83008
16316         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16317         invariant and constant vector uses in stmts when they need
16318         more than one stmt.
16320 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16322         PR bootstrap/84017
16323         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16324         * configure: Regenerate.
16326 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
16328         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16329         pattern.
16330         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16331         Use gen_rtx_REG rather than gen_lowpart.
16333 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
16335         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16336         rather than 0 when creating partial subregs.
16338 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
16340         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16341         of usage.
16343 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
16345         PR target/81550
16346         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16347         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16348         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16349         flags.  This restores the settings used before the 2017-07-24.
16350         Turning off pre increment/decrement/modify allows IVOPTS to
16351         optimize DF/SF loops where the index is an int.
16353 2018-01-29  Richard Biener  <rguenther@suse.de>
16354             Kelvin Nilsen  <kelvin@gcc.gnu.org>
16356         PR bootstrap/80867
16357         * tree-vect-stmts.c (vectorizable_call): Don't call
16358         targetm.vectorize_builtin_md_vectorized_function if callee is
16359         NULL.
16361 2018-01-22  Carl Love  <cel@us.ibm.com>
16363         * doc/extend.tex: Fix typo in second arg in
16364         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16366 2018-01-29  Richard Biener  <rguenther@suse.de>
16368         PR tree-optimization/84086
16369         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16370         (flush_ssaname_freelist): When SSA names were released reset
16371         the SCEV hash table.
16373 2018-01-29  Richard Biener  <rguenther@suse.de>
16375         PR tree-optimization/84057
16376         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16377         removed paths when removing edges.
16379 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
16381         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16382         -mfunction-return=@var{choice}.
16384 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16386         PR diagnostic/84034
16387         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16388         Handle CR like TAB.
16389         (layout::print_source_line): Likewise.
16390         (test_get_line_width_without_trailing_whitespace): Add test cases.
16392 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
16394         PR middle-end/84040
16395         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16396         debug insns.
16398 2018-01-26  Jim Wilson  <jimw@sifive.com>
16400         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16402         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16403         specified.
16405 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16407         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16408         and CMP + SUB-immediate -> SUBS.
16410 2018-01-26  Martin Sebor  <msebor@redhat.com>
16412         PR tree-optimization/83896
16413         * tree-ssa-strlen.c (get_string_len): Rename...
16414         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
16415         Avoid assuming length is constant.
16416         (handle_char_store): Use HOST_WIDE_INT for string length.
16418 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
16420         PR target/81763
16421         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16422         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16424 2018-01-26  Richard Biener  <rguenther@suse.de>
16426         PR rtl-optimization/84003
16427         * dse.c (record_store): Only record redundant stores when
16428         the earlier store aliases at least all accesses the later one does.
16430 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
16432         PR rtl-optimization/83985
16433         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16434         REG_CFA_RESTORE insns.
16435         (delete_unmarked_insns): Don't ignore separate shrink wrapping
16436         REG_CFA_RESTORE insns here.
16438         PR c/83989
16439         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16440         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16442 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16444         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16445         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16446         (arc_init): Likewise.
16447         (arc_override_options): Likewise.
16448         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16449         value.
16450         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16451         support.
16452         * config/arc/arc.h (TARGET_DBNZ): Define.
16453         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16454         properly set the tune attribute.
16455         (dbnz): Use TARGET_DBNZ guard.
16456         * config/arc/arc.opt (mtune): Add core3 option.
16458 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16460         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16461         recognize new pic like addresses.
16462         (arc_delegitimize_address): Clean up.
16464 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16466         * config/arc/arc-arches.def: Option mrf16 valid for all
16467         architectures.
16468         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16469         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16470         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16471         * config/arc/arc-tables.opt: Regenerate.
16472         * config/arc/arc.c (arc_conditional_register_usage): Handle
16473         reduced register file case.
16474         (arc_file_start): Set must have build attributes.
16475         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16476         mrf16 option value.
16477         * config/arc/arc.opt (mrf16): Add new option.
16478         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16479         * config/arc/genmultilib.awk: Handle new mrf16 option.
16480         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16481         * config/arc/t-multilib: Regenerate.
16482         * doc/invoke.texi (ARC Options): Document mrf16 option.
16484 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16486         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16487         * config/arc/arc.c (arc_handle_secure_attribute): New function.
16488         (arc_attribute_table): Add 'secure_call' attribute.
16489         (arc_print_operand): Print secure call operand.
16490         (arc_function_ok_for_sibcall): Don't optimize tail calls when
16491         secure.
16492         (arc_is_secure_call_p): New function.  * config/arc/arc.md
16493         (call_i): Add support for sjli instruction.
16494         (call_value_i): Likewise.
16495         * config/arc/constraints.md (Csc): New constraint.
16497 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16498             John Eric Martin  <John.Martin@emmicro-us.com>
16500         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16501         * config/arc/arc.c (_arc_jli_section): New struct.
16502         (arc_jli_section): New type.
16503         (rc_jli_sections): New static variable.
16504         (arc_handle_jli_attribute): New function.
16505         (arc_attribute_table): Add jli_always and jli_fixed attribute.
16506         (arc_file_end): New function.
16507         (TARGET_ASM_FILE_END): Define.
16508         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16509         (arc_add_jli_section): New function.
16510         (jli_call_scan): Likewise.
16511         (arc_reorg): Call jli_call_scan.
16512         (arc_output_addsi): Remove 'S' from printing asm operand.
16513         (arc_is_jli_call_p): New function.
16514         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16515         operand.
16516         (movhi_insn): Likewise.
16517         (movsi_insn): Likewise.
16518         (movsi_set_cc_insn): Likewise.
16519         (loadqi_update): Likewise.
16520         (load_zeroextendqisi_update): Likewise.
16521         (load_signextendqisi_update): Likewise.
16522         (loadhi_update): Likewise.
16523         (load_zeroextendhisi_update): Likewise.
16524         (load_signextendhisi_update): Likewise.
16525         (loadsi_update): Likewise.
16526         (loadsf_update): Likewise.
16527         (movsicc_insn): Likewise.
16528         (bset_insn): Likewise.
16529         (bxor_insn): Likewise.
16530         (bclr_insn): Likewise.
16531         (bmsk_insn): Likewise.
16532         (bicsi3_insn): Likewise.
16533         (cmpsi_cc_c_insn): Likewise.
16534         (movsi_ne): Likewise.
16535         (movsi_cond_exec): Likewise.
16536         (clrsbsi2): Likewise.
16537         (norm_f): Likewise.
16538         (normw): Likewise.
16539         (swap): Likewise.
16540         (divaw): Likewise.
16541         (flag): Likewise.
16542         (sr): Likewise.
16543         (kflag): Likewise.
16544         (ffs): Likewise.
16545         (ffs_f): Likewise.
16546         (fls): Likewise.
16547         (call_i): Remove 'S' asm letter, add jli instruction.
16548         (call_value_i): Likewise.
16549         * config/arc/arc.op (mjli-always): New option.
16550         * config/arc/constraints.md (Cji): New constraint.
16551         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16552         operand.
16553         (subsf3_fpx): Likewise.
16554         (mulsf3_fpx): Likewise.
16555         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16556         asm operand.
16557         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16558         function attrbutes.
16559         * doc/invoke.texi (ARC): Document mjli-always option.
16561 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
16563         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16564         avoid addition with 0 and use incw and decw where possible.
16566 2018-01-26  Richard Biener  <rguenther@suse.de>
16568         PR tree-optimization/81082
16569         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16570         association if it requires casting to unsigned.
16571         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16572         from fold_plusminus_mult_expr to catch important cases late when
16573         range info is available.
16575 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16577         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16578         * configure.ac (hidden_linkonce): New test.
16579         * configure: Regenerate.
16580         * config.in: Regenerate.
16582 2018-01-26  Julia Koval  <julia.koval@intel.com>
16584         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16585         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16586         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16587         _mm_mask_bitshuffle_epi64_mask): Fix type.
16588         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16589         USI_FTYPE_V4DI_V4DI_USI): Remove.
16590         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16591         __builtin_ia32_vpshufbitqmb256_mask,
16592         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16593         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16594         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16596 2018-01-26  Alan Modra  <amodra@gmail.com>
16598         PR target/84033
16599         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16600         UNSPEC_VBPERMQ.  Sort other unspecs.
16602 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
16604         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16606 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
16608         PR middle-end/83055
16609         * predict.c (drop_profile): Do not push/pop cfun; update also
16610         node->count.
16611         (handle_missing_profiles): Fix logic looking for zero profiles.
16613 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
16615         PR middle-end/83977
16616         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16617         on functions with #pragma omp declare simd or functions with simd
16618         attribute.
16619         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16620         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16621         Remove trailing \n from warning_at calls.
16623 2018-01-25  Tom de Vries  <tom@codesourcery.com>
16625         PR target/84028
16626         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16627         for neutered workers.
16629 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
16631         PR target/68467
16632         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16633         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16635 2018-01-24  Jeff Law  <law@redhat.com>
16637         PR target/83994
16638         * i386.c (get_probe_interval): Move to earlier point.
16639         (ix86_compute_frame_layout): If -fstack-clash-protection and
16640         the frame is larger than the probe interval, then use pushes
16641         to save registers rather than reg->mem moves.
16642         (ix86_expand_prologue): Remove conditional for int_registers_saved
16643         assertion.
16645 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
16647         PR target/84014
16648         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16649         min/max for never referenced object.
16651 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
16653         PR middle-end/83977
16654         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16655         here.
16656         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16657         attributes from DECL_ATTRIBUTES (decl) without affecting
16658         DECL_ATTRIBUTES (current_function_decl).
16659         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16660         functions with non-NULL DECL_ABSTRACT_ORIGIN.
16662 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
16664         PR tree-optimization/83979
16665         * fold-const.c (fold_comparison): Use constant_boolean_node
16666         instead of boolean_{true,false}_node.
16668 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
16670         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16671         with zero counts.
16673 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16675         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16676         Simplify the clause that sets the length attribute.
16677         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16678         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16679         clause that sets the length attribute.
16680         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16682 2018-01-24  Tom de Vries  <tom@codesourcery.com>
16684         PR target/83589
16685         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16686         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16687         Add strict parameter.
16688         (prevent_branch_around_nothing): Insert dummy insn between branch to
16689         label and label with no ptx insn inbetween.
16690         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16692 2018-01-24  Tom de Vries  <tom@codesourcery.com>
16694         PR target/81352
16695         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16696         for neutered threads in warp.
16697         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16699 2018-01-24  Richard Biener  <rguenther@suse.de>
16701         PR tree-optimization/83176
16702         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16703         operands.
16705 2018-01-24  Richard Biener  <rguenther@suse.de>
16707         PR tree-optimization/82819
16708         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16709         code generating pluses that are no-ops in the target precision.
16711 2018-01-24  Richard Biener  <rguenther@suse.de>
16713         PR middle-end/84000
16714         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16716 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16718         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16719         to merge probabilities.
16720         * predict.c (probably_never_executed): Also mark as cold functions
16721         with global 0 profile and guessed local profile.
16722         * profile-count.c (profile_probability::combine_with_count): New
16723         member function.
16724         * profile-count.h (profile_probability::operator*,
16725         profile_probability::operator*=, profile_probability::operator/,
16726         profile_probability::operator/=): Reduce precision to adjusted
16727         and set value to guessed on contradictory divisions.
16728         (profile_probability::combine_with_freq): Remove.
16729         (profile_probability::combine_wiht_count): Declare.
16730         (profile_count::force_nonzero):: Set to adjusted.
16731         (profile_count::probability_in):: Set quality to adjusted.
16732         * tree-ssa-tail-merge.c (replace_block_by): Use
16733         combine_with_count.
16735 2018-01-23  Andrew Waterman  <andrew@sifive.com>
16736             Jim Wilson  <jimw@sifive.com>
16738         * config/riscv/riscv.c (riscv_stack_boundary): New.
16739         (riscv_option_override): Set riscv_stack_boundary.  Handle
16740         riscv_preferred_stack_boundary_arg.
16741         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16742         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16743         (STACK_BOUNDARY): Set to riscv_stack_boundary.
16744         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16745         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16746         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16748 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
16750         PR target/83905
16751         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16752         of struct ix86_frame.
16753         (ix86_expand_epilogue): Likewise.  Add a local variable for
16754         the reg_save_offset field in struct ix86_frame.
16756 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
16758         PR tree-optimization/82604
16759         * tree-loop-distribution.c (enum partition_kind): New enum item
16760         PKIND_PARTIAL_MEMSET.
16761         (partition_builtin_p): Support above new enum item.
16762         (generate_code_for_partition): Ditto.
16763         (compute_access_range): Differentiate cases that equality can be
16764         proven at all loops, the innermost loops or no loops.
16765         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16766         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
16767         (finalize_partitions, distribute_loop): Don't fuse partition of
16768         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16769         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16770         parloop is enabled.
16772 2018-01-23  Martin Liska  <mliska@suse.cz>
16774         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16775         order to ignore the predictor.
16776         (PRED_POLYMORPHIC_CALL): Likewise.
16777         (PRED_RECURSIVE_CALL): Likewise.
16779 2018-01-23  Martin Liska  <mliska@suse.cz>
16781         * tree-profile.c (tree_profiling): Print function header to
16782         aware reader which function we are working on.
16783         * value-prof.c (gimple_find_values_to_profile): Do not print
16784         not interesting value histograms.
16786 2018-01-23  Martin Liska  <mliska@suse.cz>
16788         * profile-count.h (enum profile_quality): Add
16789         profile_uninitialized as the first value. Do not number values
16790         as they are zero based.
16791         (profile_count::verify): Update sanity check.
16792         (profile_probability::verify): Likewise.
16794 2018-01-23  Nathan Sidwell  <nathan@acm.org>
16796         * doc/invoke.texi (ffor-scope): Deprecate.
16798 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16800         PR tree-optimization/83510
16801         * domwalk.c (set_all_edges_as_executable): New function.
16802         (dom_walker::dom_walker): Convert bool param
16803         "skip_unreachable_blocks" to enum reachability.  Move setup of
16804         edge flags to set_all_edges_as_executable and only do it when
16805         reachability is REACHABLE_BLOCKS.
16806         * domwalk.h (enum dom_walker::reachability): New enum.
16807         (dom_walker::dom_walker): Convert bool param
16808         "skip_unreachable_blocks" to enum reachability.
16809         (set_all_edges_as_executable): New decl.
16810         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
16811         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16812         "reachability".
16813         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16814         but converting true to REACHABLE_BLOCKS.
16815         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16816         * tree-vrp.c
16817         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16818         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16819         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16820         REACHABLE_BLOCKS.
16821         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16822         if check_all_array_refs will be called.
16824 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16826         * tree.c (selftest::test_location_wrappers): Add more test
16827         coverage.
16829 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16831         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16832         (selftest::test_bit_in_range): Likewise.
16834 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
16836         PR testsuite/83888
16837         * doc/sourcebuild.texi (vect_float): Say that the selector
16838         only describes the situation when -funsafe-math-optimizations is on.
16839         (vect_float_strict): Document.
16841 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
16843         PR tree-optimization/83965
16844         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16845         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16846         instead of checking only for a reduction.
16847         (vect_recog_widen_sum_pattern): Likewise.
16849 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16851         * predict.c (probably_never_executed): Only use precise profile info.
16852         (compute_function_frequency): Skip after inlining hack since we now
16853         have quality checking.
16855 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16857         * profile-count.h (profile_probability::very_unlikely,
16858         profile_probability::unlikely, profile_probability::even): Set
16859         precision to guessed.
16861 2018-01-23  Richard Biener  <rguenther@suse.de>
16863         PR tree-optimization/83963
16864         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16865         Properly terminate dominator walk when crossing the exit edge not
16866         when visiting its source block.
16868 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
16870         PR c++/83918
16871         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16872         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16874 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
16876         PR tree-optimization/83957
16877         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
16878         semicolon after for body surrounded by braces.
16880         PR tree-optimization/83081
16881         * profile-count.h (profile_probability::split): New method.
16882         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16883         Use profile_probability::split.
16884         (do_compare_rtx_and_jump): Fix adjustment of probabilities
16885         when splitting a single conditional jump into 2.
16887 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
16889         PR tree-optimization/69452
16890         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16891         decl.
16893 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16895         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16896         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16897         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16899 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16901         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16902         declaration.
16903         * config/rl78/rl78.md (movdi): New define_expand.
16904         * config/rl78/rl78.c (rl78_split_movdi): New function.
16906 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
16908         PR target/83862
16909         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16910         no longer used.
16911         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16912         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16913         128-bit to produce an UNSPEC move to get the double word with the
16914         signbit and then a shift directly to do signbit.
16915         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16916         implementation with a new version that just does either a direct
16917         move or a regular move.  Move memory interface to separate insns.
16918         Move insns so they are next to the expander.
16919         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16920         with signbit move.  Split big and little endian case.
16921         (signbit<mode>2_dm_mem_le): Likewise.
16922         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16923         (signbit<mode>2_dm2): Likewise.
16925 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16927         * config/rl78/rl78.md (anddi3): New define_expand.
16929 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16931         * config/rl78/rl78.md (umindi3): New define_expand.
16933 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16935         * config/rl78/rl78.md (smindi3): New define_expand.
16937 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16939         * config/rl78/rl78.md (smaxdi3): New define_expand.
16941 2018-01-22  Carl Love  <cel@us.ibm.com>
16943         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16944         LVX_V1TI): Add macro expansion.
16945         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16946         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16947         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16948         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16949         Change check to determine if the instruction is a byte reversing
16950         entry.  Fix typo in comment.
16951         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16952         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16953         Add def_builtin calls for new builtins.
16954         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16955         Add define_insn expansion.
16957 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16959         * config/rl78/rl78.md (umaxdi3): New define_expand.
16961 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16963         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16964         for non-QImode registers.
16966 2018-01-22  Richard Biener  <rguenther@suse.de>
16968         PR tree-optimization/83963
16969         * graphite-scop-detection.c (scop_detection::get_sese): Delay
16970         including the loop exit block.
16971         (scop_detection::merge_sese): Likewise.
16972         (scop_detection::add_scop): Do it here instead.
16974 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16976         * doc/sourcebuild.texi (arm_softfloat): Document.
16978 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
16980         PR gcc/77734
16981         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16982         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16983         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16985 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16986             David Edelsohn  <dje.gcc@gmail.com>
16988         PR target/83946
16989         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16990         Change "crset eq" to "crset 2".
16991         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16992         (*call_indirect_aix<mode>_nospec): Likewise.
16993         (*call_value_indirect_aix<mode>_nospec): Likewise.
16994         (*call_indirect_elfv2<mode>_nospec): Likewise.
16995         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16996         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16997         change assembly output from . to $.
16998         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16999         (indirect_jump<mode>_nospec): Change assembly output from . to $.
17000         (*tablejump<mode>_internal1_nospec): Likewise.
17002 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
17004         PR target/80870
17005         * config/sh/sh_optimize_sett_clrt.cc:
17006         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17008 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
17010         PR tree-optimization/83940
17011         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17012         offset_dt to vect_constant_def rather than vect_unknown_def_type.
17013         (vect_check_load_store_mask): Add a mask_dt_out parameter and
17014         use it to pass back the definition type.
17015         (vect_check_store_rhs): Likewise rhs_dt_out.
17016         (vect_build_gather_load_calls): Add a mask_dt argument and use
17017         it instead of a call to vect_is_simple_use.
17018         (vectorizable_store): Update calls to vect_check_load_store_mask
17019         and vect_check_store_rhs.  Use the dt returned by the latter instead
17020         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
17021         instead of calls to vect_is_simple_use.  Pass the scalar rather
17022         than the vector operand to vect_is_simple_use when handling
17023         second and subsequent copies of an rhs value.
17024         (vectorizable_load): Update calls to vect_check_load_store_mask
17025         and vect_build_gather_load_calls.  Use the cached mask_dt and
17026         gs_info.offset_dt instead of calls to vect_is_simple_use.
17028 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
17030         PR middle-end/83945
17031         * tree-emutls.c: Include gimplify.h.
17032         (lower_emutls_2): New function.
17033         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17034         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17035         it before further processing.
17037         PR target/83930
17038         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17039         UINTVAL (trueop1) instead of INTVAL (op1).
17041 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
17043         PR debug/81570
17044         PR debug/83728
17045         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17046         INCOMING_FRAME_SP_OFFSET if not defined.
17047         (scan_trace): Add ENTRY argument.  If true and
17048         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17049         emit a note to adjust the CFA offset.
17050         (create_cfi_notes): Adjust scan_trace callers.
17051         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17052         INCOMING_FRAME_SP_OFFSET in the CIE.
17053         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17054         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17055         Likewise.
17056         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17057         * doc/tm.texi: Regenerated.
17059 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17061         PR rtl-optimization/83147
17062         * lra-constraints.c (remove_inheritance_pseudos): Use
17063         lra_substitute_pseudo_within_insn.
17065 2018-01-19  Tom de Vries  <tom@codesourcery.com>
17066             Cesar Philippidis  <cesar@codesourcery.com>
17068         PR target/83920
17069         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17071 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
17073         PR target/83790
17074         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17075         spaces for function labels.
17077 2018-01-19  Martin Liska  <mliska@suse.cz>
17079         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17080         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17081         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17082         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17083         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17084         (PRED_CONST_RETURN): Change from 69 to 65.
17085         (PRED_NULL_RETURN): Change from 91 to 71.
17086         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17087         (PRED_LOOP_GUARD): Change from 66 to 73.
17089 2018-01-19  Martin Liska  <mliska@suse.cz>
17091         * predict.c (predict_insn_def): Add new assert.
17092         (struct branch_predictor): Change type to signed integer.
17093         (test_prediction_value_range): Amend test to cover
17094         PROB_UNINITIALIZED.
17095         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17096         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17097         (PRED_LOOP_ITERATIONS_MAX): Likewise.
17098         (PRED_LOOP_IV_COMPARE): Likewise.
17099         * predict.h (PROB_UNINITIALIZED): Define new constant.
17101 2018-01-19  Martin Liska  <mliska@suse.cz>
17103         * predict.c (dump_prediction): Add new format for
17104         analyze_brprob.py script which is enabled with -details
17105         suboption.
17106         * profile-count.h (precise_p): New function.
17108 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
17110         PR tree-optimization/83922
17111         * tree-vect-loop.c (vect_verify_full_masking): Return false if
17112         there are no statements that need masking.
17113         (vect_active_double_reduction_p): New function.
17114         (vect_analyze_loop_operations): Use it when handling phis that
17115         are not in the loop header.
17117 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
17119         PR tree-optimization/83914
17120         * tree-vect-loop.c (vectorizable_induction): Don't convert
17121         init_expr or apply the peeling adjustment for inductions
17122         that are nested within the vectorized loop.
17124 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17126         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17127         instead of NEG.
17129 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
17131         PR sanitizer/81715
17132         PR testsuite/83882
17133         * function.h (gimplify_parameters): Add gimple_seq * argument.
17134         * function.c: Include gimple.h and options.h.
17135         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17136         for the added local temporaries if needed.
17137         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17138         if there are any parameter cleanups, wrap whole body into a
17139         try/finally with the cleanups.
17141 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
17143         PR target/82964
17144         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17145         Use GET_MODE_CLASS for scalar floating point.
17147 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
17149         PR ipa/82256
17150         patch by PaX Team
17151         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17152         Fix call of call_cgraph_insertion_hooks.
17154 2018-01-18  Martin Sebor  <msebor@redhat.com>
17156         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17158 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
17160         PR ipa/83619
17161         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17162         frequencies.
17164 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
17166         PR other/70268
17167         * common.opt: (-ffile-prefix-map): New option.
17168         * opts.c (common_handle_option): Defer it.
17169         * opts-global.c (handle_common_deferred_options): Handle it.
17170         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17171         * file-prefix-map.h: New file.
17172         (remap_debug_filename, add_debug_prefix_map): ...here.
17173         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17174         * final.c (debug_prefix_map, add_debug_prefix_map
17175         remap_debug_filename): Move to...
17176         * file-prefix-map.c: New file.
17177         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17178         generalize, get rid of alloca(), use strrchr() instead of strchr().
17179         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17180         Implement in terms of add_prefix_map().
17181         (remap_macro_filename, remap_debug_filename): Implement in term of
17182         remap_filename().
17183         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17184         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17185         * dbxout.c: Include file-prefix-map.h.
17186         * varasm.c: Likewise.
17187         * vmsdbgout.c: Likewise.
17188         * xcoffout.c: Likewise.
17189         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17190         * doc/cppopts.texi (-fmacro-prefix-map): Document.
17191         * doc/invoke.texi (-ffile-prefix-map): Document.
17192         (-fdebug-prefix-map): Update description.
17194 2018-01-18  Martin Liska  <mliska@suse.cz>
17196         * config/i386/i386.c (indirect_thunk_name): Document that also
17197         lfence is emitted.
17198         (output_indirect_thunk): Document why both instructions
17199         (pause and lfence) are generated.
17201 2018-01-18  Richard Biener  <rguenther@suse.de>
17203         PR tree-optimization/83887
17204         * graphite-scop-detection.c
17205         (scop_detection::get_nearest_dom_with_single_entry): Remove.
17206         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17207         (scop_detection::merge_sese): Re-implement with a flood-fill
17208         algorithm that properly finds a SESE region if it exists.
17210 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
17212         PR c/61240
17213         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17214         pointer_diff optimizations use view_convert instead of convert.
17216 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17218         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17219         Generate different code for -mno-speculate-indirect-jumps.
17220         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17221         (*call_indirect_aix<mode>): Disable for
17222         -mno-speculate-indirect-jumps.
17223         (*call_indirect_aix<mode>_nospec): New define_insn.
17224         (*call_value_indirect_aix<mode>): Disable for
17225         -mno-speculate-indirect-jumps.
17226         (*call_value_indirect_aix<mode>_nospec): New define_insn.
17227         (*sibcall_nonlocal_sysv<mode>): Generate different code for
17228         -mno-speculate-indirect-jumps.
17229         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17231 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
17233         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17234         long double type, set the flags for noting the default long double
17235         type, even if we don't pass or return a long double type.
17237 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
17239         PR ipa/83051
17240         * ipa-inline.c (flatten_function): Do not overwrite final inlining
17241         failure.
17243 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
17245         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17246         support for merge[hl].
17247         (fold_mergehl_helper): New helper function.
17248         (tree-vector-builder.h): New #include for tree_vector_builder usage.
17249         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17250         (altivec_vmrglw_direct): Add xxmrglw insn.
17252 2018-01-17  Andrew Waterman  <andrew@sifive.com>
17254         * config/riscv/riscv.c (riscv_conditional_register_usage): If
17255         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17257 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
17259         PR lto/83121
17260         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17261         call the lto_location_cache before reading the
17262         DECL_SOURCE_LOCATION of the types.
17264 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
17265             Richard Sandiford  <richard.sandiford@linaro.org>
17267         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17268         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17269         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17270         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17271         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17272         Add declaration.
17273         * config/aarch64/constraints.md (aarch64_movti_operand):
17274         Limit immediates.
17275         * config/aarch64/predicates.md (Uti): Add new constraint.
17277 2018-01-17 Carl Love  <cel@us.ibm.com>
17279         * config/rs6000/vsx.md (define_expand xl_len_r,
17280         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17281         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17282         lxvll.
17283         (define_expand, define_insn): Move the shift left from  the
17284         define_insn to the define_expand for lxvl and stxvl instructions.
17285         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17286         and XL_LEN_R definitions to PURE.
17288 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
17290         * config/i386/i386.c (indirect_thunk_name): Declare regno
17291         as unsigned int.  Compare regno with INVALID_REGNUM.
17292         (output_indirect_thunk): Ditto.
17293         (output_indirect_thunk_function): Ditto.
17294         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
17295         in the call to output_indirect_thunk_function.
17297 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
17299         PR middle-end/83884
17300         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17301         rather than the size of inner_type to determine the stack slot size
17302         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17304 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
17306         PR target/83546
17307         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17308         to PTA_SILVERMONT.
17310 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
17312         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17313         endian Linux systems to optionally enable multilibs for selecting
17314         the long double type if the user configured an explicit type.
17315         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17316         have no long double multilibs if not defined.
17317         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17318         warn if the user used -mabi={ieee,ibm}longdouble and we built
17319         multilibs for long double.
17320         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17321         appropriate multilib option.
17322         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17323         multilib options.
17324         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17325         for building long double multilibs.
17326         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17328 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
17330         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17331         copies.
17333         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17334         64 bits.
17335         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17336         128 bits.
17338         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17339         variables.
17341         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17342         return value.
17344 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
17346         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17347         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17349 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17351         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17352         different rtl trees depending on TARGET_64BIT.
17353         (rs6000_gen_lvx): Likewise.
17355 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
17357         * config/visium/visium.md (nop): Tweak comment.
17358         (hazard_nop): Likewise.
17360 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17362         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17363         -mspeculate-indirect-jumps.
17364         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17365         for -mno-speculate-indirect-jumps.
17366         (*call_indirect_elfv2<mode>_nospec): New define_insn.
17367         (*call_value_indirect_elfv2<mode>): Disable for
17368         -mno-speculate-indirect-jumps.
17369         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17370         (indirect_jump): Emit different RTL for
17371         -mno-speculate-indirect-jumps.
17372         (*indirect_jump<mode>): Disable for
17373         -mno-speculate-indirect-jumps.
17374         (*indirect_jump<mode>_nospec): New define_insn.
17375         (tablejump): Emit different RTL for
17376         -mno-speculate-indirect-jumps.
17377         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17378         (tablejumpsi_nospec): New define_expand.
17379         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17380         (tablejumpdi_nospec): New define_expand.
17381         (*tablejump<mode>_internal1): Disable for
17382         -mno-speculate-indirect-jumps.
17383         (*tablejump<mode>_internal1_nospec): New define_insn.
17384         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17385         option.
17387 2018-01-16  Artyom Skrobov tyomitch@gmail.com
17389         * caller-save.c (insert_save): Drop unnecessary parameter.  All
17390         callers updated.
17392 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
17393             Richard Biener  <rguenth@suse.de>
17395         PR libgomp/83590
17396         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17397         return early, inline manually is_gimple_sizepos.  Make sure if we
17398         call gimplify_expr we don't end up with a gimple constant.
17399         * tree.c (variably_modified_type_p): Don't return true for
17400         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
17401         * gimplify.h (is_gimple_sizepos): Remove.
17403 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17405         PR tree-optimization/83857
17406         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17407         vectorizable_live_operation for pure SLP statements.
17408         (vectorizable_live_operation): Handle PHIs.
17410 2018-01-16  Richard Biener  <rguenther@suse.de>
17412         PR tree-optimization/83867
17413         * tree-vect-stmts.c (vect_transform_stmt): Precompute
17414         nested_in_vect_loop_p since the scalar stmt may get invalidated.
17416 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
17418         PR c/83844
17419         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17420         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17421         If off is not INTEGER_CST, issue a may not be aligned warning
17422         rather than isn't aligned.  Use isn%'t rather than isn't.
17423         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17424         into MULT_EXPR.
17425         <case MULT_EXPR>: Improve the case when bottom and one of the
17426         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17427         operand, in that case check if the other operand is multiple of
17428         bottom divided by the INTEGER_CST operand.
17430 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17432         PR target/83858
17433         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17434         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17435         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17436         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17437         * config/pa/pa.c (pa_function_arg_advance): Likewise.
17438         (pa_function_arg, pa_arg_partial_bytes): Likewise.
17439         (pa_function_arg_size): New function.
17441 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17443         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17444         in a separate statement.
17446 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17448         PR tree-optimization/83847
17449         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17450         group gathers and scatters.
17452 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
17454         PR rtl-optimization/86620
17455         * params.def (max-sched-ready-insns): Bump minimum value to 1.
17457         PR rtl-optimization/83213
17458         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17459         to last if both are JUMP_INSNs.
17461         PR tree-optimization/83843
17462         * gimple-ssa-store-merging.c
17463         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17464         store_immediate_info for bswap/nop orig_stores.
17466 2018-01-15  Andrew Waterman  <andrew@sifive.com>
17468         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17469         !TARGET_MUL.
17470         <UDIV>: Increase cost if !TARGET_DIV.
17472 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
17474         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17475         (define_attr "cr_logical_3op"): New.
17476         (cceq_ior_compare): Adjust.
17477         (cceq_ior_compare_complement): Adjust.
17478         (*cceq_rev_compare): Adjust.
17479         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17480         (is_cracked_insn): Adjust.
17481         (insn_must_be_first_in_group): Adjust.
17482         * config/rs6000/40x.md: Adjust.
17483         * config/rs6000/440.md: Adjust.
17484         * config/rs6000/476.md: Adjust.
17485         * config/rs6000/601.md: Adjust.
17486         * config/rs6000/603.md: Adjust.
17487         * config/rs6000/6xx.md: Adjust.
17488         * config/rs6000/7450.md: Adjust.
17489         * config/rs6000/7xx.md: Adjust.
17490         * config/rs6000/8540.md: Adjust.
17491         * config/rs6000/cell.md: Adjust.
17492         * config/rs6000/e300c2c3.md: Adjust.
17493         * config/rs6000/e500mc.md: Adjust.
17494         * config/rs6000/e500mc64.md: Adjust.
17495         * config/rs6000/e5500.md: Adjust.
17496         * config/rs6000/e6500.md: Adjust.
17497         * config/rs6000/mpc.md: Adjust.
17498         * config/rs6000/power4.md: Adjust.
17499         * config/rs6000/power5.md: Adjust.
17500         * config/rs6000/power6.md: Adjust.
17501         * config/rs6000/power7.md: Adjust.
17502         * config/rs6000/power8.md: Adjust.
17503         * config/rs6000/power9.md: Adjust.
17504         * config/rs6000/rs64.md: Adjust.
17505         * config/rs6000/titan.md: Adjust.
17507 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17509         * config/i386/predicates.md (indirect_branch_operand): Rewrite
17510         ix86_indirect_branch_register logic.
17512 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17514         * config/i386/constraints.md (Bs): Update
17515         ix86_indirect_branch_register check.  Don't check
17516         ix86_indirect_branch_register with GOT_memory_operand.
17517         (Bw): Likewise.
17518         * config/i386/predicates.md (GOT_memory_operand): Don't check
17519         ix86_indirect_branch_register here.
17520         (GOT32_symbol_operand): Likewise.
17522 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17524         * config/i386/predicates.md (constant_call_address_operand):
17525         Rewrite ix86_indirect_branch_register logic.
17526         (sibcall_insn_operand): Likewise.
17528 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17530         * config/i386/constraints.md (Bs): Replace
17531         ix86_indirect_branch_thunk_register with
17532         ix86_indirect_branch_register.
17533         (Bw): Likewise.
17534         * config/i386/i386.md (indirect_jump): Likewise.
17535         (tablejump): Likewise.
17536         (*sibcall_memory): Likewise.
17537         (*sibcall_value_memory): Likewise.
17538         Peepholes of indirect call and jump via memory: Likewise.
17539         * config/i386/i386.opt: Likewise.
17540         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17541         (GOT_memory_operand): Likewise.
17542         (call_insn_operand): Likewise.
17543         (sibcall_insn_operand): Likewise.
17544         (GOT32_symbol_operand): Likewise.
17546 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
17548         PR middle-end/83837
17549         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17550         type rather than type addr's type points to.
17551         (expand_omp_atomic_mutex): Likewise.
17552         (expand_omp_atomic): Likewise.
17554 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17556         PR target/83839
17557         * config/i386/i386.c (output_indirect_thunk_function): Use
17558         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17559         for  __x86_return_thunk.
17561 2018-01-15  Richard Biener  <rguenther@suse.de>
17563         PR middle-end/83850
17564         * expmed.c (extract_bit_field_1): Fix typo.
17566 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17568         PR target/83687
17569         * config/arm/iterators.md (VF): New mode iterator.
17570         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17571         Remove integer-related logic from pattern.
17572         (neon_vabd<mode>_3): Likewise.
17574 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
17576         PR middle-end/82694
17577         * common.opt (fstrict-overflow): No longer an alias.
17578         (fwrapv-pointer): New option.
17579         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17580         also for pointer types based on flag_wrapv_pointer.
17581         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17582         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17583         opts->x_flag_wrapv got set.
17584         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17585         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17586         POINTER_TYPE_OVERFLOW_UNDEFINED.
17587         * match.pd: Likewise in address comparison pattern.
17588         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17590 2018-01-15  Richard Biener  <rguenther@suse.de>
17592         PR lto/83804
17593         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17594         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
17595         Reset type names to their identifier if their TYPE_DECL doesn't
17596         have linkage (and thus is used for ODR and devirt).
17597         (save_debug_info_for_decl): Remove.
17598         (save_debug_info_for_type): Likewise.
17599         (add_tree_to_fld_list): Adjust.
17600         * tree-pretty-print.c (dump_generic_node): Make dumping of
17601         type names more robust.
17603 2018-01-15  Richard Biener  <rguenther@suse.de>
17605         * BASE-VER: Bump to 8.0.1.
17607 2018-01-14  Martin Sebor  <msebor@redhat.com>
17609         PR other/83508
17610         * builtins.c (check_access): Avoid warning when the no-warning bit
17611         is set.
17613 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
17615         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17616         * ira-color (allocno_hard_regs_compare): Likewise.
17618 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
17620         PR target/83013
17621         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17622         Use .pushsection/.popsection.
17624 2018-01-14  Martin Sebor  <msebor@redhat.com>
17626         PR c++/81327
17627         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17629 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
17631         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17632         entry from extra_headers.
17633         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17634         extra_headers, make the list bitwise identical to the i?86-*-* one.
17636 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17638         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17639         -mcmodel=large with -mindirect-branch=thunk,
17640         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17641         -mfunction-return=thunk-extern.
17642         * doc/invoke.texi: Document -mcmodel=large is incompatible with
17643         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17644         -mfunction-return=thunk and -mfunction-return=thunk-extern.
17646 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17648         * config/i386/i386.c (print_reg): Print the name of the full
17649         integer register without '%'.
17650         (ix86_print_operand): Handle 'V'.
17651         * doc/extend.texi: Document 'V' modifier.
17653 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17655         * config/i386/constraints.md (Bs): Disallow memory operand for
17656         -mindirect-branch-register.
17657         (Bw): Likewise.
17658         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17659         (GOT_memory_operand): Likewise.
17660         (call_insn_operand): Likewise.
17661         (sibcall_insn_operand): Likewise.
17662         (GOT32_symbol_operand): Likewise.
17663         * config/i386/i386.md (indirect_jump): Call convert_memory_address
17664         for -mindirect-branch-register.
17665         (tablejump): Likewise.
17666         (*sibcall_memory): Likewise.
17667         (*sibcall_value_memory): Likewise.
17668         Disallow peepholes of indirect call and jump via memory for
17669         -mindirect-branch-register.
17670         (*call_pop): Replace m with Bw.
17671         (*call_value_pop): Likewise.
17672         (*sibcall_pop_memory): Replace m with Bs.
17673         * config/i386/i386.opt (mindirect-branch-register): New option.
17674         * doc/invoke.texi: Document -mindirect-branch-register option.
17676 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17678         * config/i386/i386-protos.h (ix86_output_function_return): New.
17679         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17680         set function_return_type.
17681         (indirect_thunk_name): Add ret_p to indicate thunk for function
17682         return.
17683         (output_indirect_thunk_function): Pass false to
17684         indirect_thunk_name.
17685         (ix86_output_indirect_branch_via_reg): Likewise.
17686         (ix86_output_indirect_branch_via_push): Likewise.
17687         (output_indirect_thunk_function): Create alias for function
17688         return thunk if regno < 0.
17689         (ix86_output_function_return): New function.
17690         (ix86_handle_fndecl_attribute): Handle function_return.
17691         (ix86_attribute_table): Add function_return.
17692         * config/i386/i386.h (machine_function): Add
17693         function_return_type.
17694         * config/i386/i386.md (simple_return_internal): Use
17695         ix86_output_function_return.
17696         (simple_return_internal_long): Likewise.
17697         * config/i386/i386.opt (mfunction-return=): New option.
17698         (indirect_branch): Mention -mfunction-return=.
17699         * doc/extend.texi: Document function_return function attribute.
17700         * doc/invoke.texi: Document -mfunction-return= option.
17702 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17704         * config/i386/i386-opts.h (indirect_branch): New.
17705         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17706         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17707         with local indirect jump when converting indirect call and jump.
17708         (ix86_set_indirect_branch_type): New.
17709         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17710         (indirectlabelno): New.
17711         (indirect_thunk_needed): Likewise.
17712         (indirect_thunk_bnd_needed): Likewise.
17713         (indirect_thunks_used): Likewise.
17714         (indirect_thunks_bnd_used): Likewise.
17715         (INDIRECT_LABEL): Likewise.
17716         (indirect_thunk_name): Likewise.
17717         (output_indirect_thunk): Likewise.
17718         (output_indirect_thunk_function): Likewise.
17719         (ix86_output_indirect_branch_via_reg): Likewise.
17720         (ix86_output_indirect_branch_via_push): Likewise.
17721         (ix86_output_indirect_branch): Likewise.
17722         (ix86_output_indirect_jmp): Likewise.
17723         (ix86_code_end): Call output_indirect_thunk_function if needed.
17724         (ix86_output_call_insn): Call ix86_output_indirect_branch if
17725         needed.
17726         (ix86_handle_fndecl_attribute): Handle indirect_branch.
17727         (ix86_attribute_table): Add indirect_branch.
17728         * config/i386/i386.h (machine_function): Add indirect_branch_type
17729         and has_local_indirect_jump.
17730         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17731         to true.
17732         (tablejump): Likewise.
17733         (*indirect_jump): Use ix86_output_indirect_jmp.
17734         (*tablejump_1): Likewise.
17735         (simple_return_indirect_internal): Likewise.
17736         * config/i386/i386.opt (mindirect-branch=): New option.
17737         (indirect_branch): New.
17738         (keep): Likewise.
17739         (thunk): Likewise.
17740         (thunk-inline): Likewise.
17741         (thunk-extern): Likewise.
17742         * doc/extend.texi: Document indirect_branch function attribute.
17743         * doc/invoke.texi: Document -mindirect-branch= option.
17745 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
17747         PR ipa/83051
17748         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17750 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
17752         * ipa-inline.c (want_inline_small_function_p): Return false if
17753         inlining has already failed with CIF_FINAL_ERROR.
17754         (update_caller_keys): Call want_inline_small_function_p before
17755         can_inline_edge_p.
17756         (update_callee_keys): Likewise.
17758 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17760         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17761         New function.
17762         (rs6000_quadword_masked_address_p): Likewise.
17763         (quad_aligned_load_p): Likewise.
17764         (quad_aligned_store_p): Likewise.
17765         (const_load_sequence_p): Add comment to describe the outer-most loop.
17766         (mimic_memory_attributes_and_flags): New function.
17767         (rs6000_gen_stvx): Likewise.
17768         (replace_swapped_aligned_store): Likewise.
17769         (rs6000_gen_lvx): Likewise.
17770         (replace_swapped_aligned_load): Likewise.
17771         (replace_swapped_load_constant): Capitalize argument name in
17772         comment describing this function.
17773         (rs6000_analyze_swaps): Add a third pass to search for vector loads
17774         and stores that access quad-word aligned addresses and replace
17775         with stvx or lvx instructions when appropriate.
17776         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17777         New function prototype.
17778         (rs6000_quadword_masked_address_p): Likewise.
17779         (rs6000_gen_lvx): Likewise.
17780         (rs6000_gen_stvx): Likewise.
17781         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17782         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17783         when memory address is aligned.
17784         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17785         this split to select lvx instruction when memory address is aligned.
17786         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17787         instruction when memory address is aligned.
17788         (*vsx_le_perm_load_v16qi): Likewise.
17789         (four unnamed splitters): Modify to select the stvx instruction
17790         when memory is aligned.
17792 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
17794         * predict.c (determine_unlikely_bbs): Handle correctly BBs
17795         which appears in the queue multiple times.
17797 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17798             Alan Hayward  <alan.hayward@arm.com>
17799             David Sherwood  <david.sherwood@arm.com>
17801         * tree-vectorizer.h (vec_lower_bound): New structure.
17802         (_loop_vec_info): Add check_nonzero and lower_bounds.
17803         (LOOP_VINFO_CHECK_NONZERO): New macro.
17804         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17805         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17806         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17807         fields.  Make seg_len the distance travelled, not including the
17808         access size.
17809         (dr_direction_indicator): Declare.
17810         (dr_zero_step_indicator): Likewise.
17811         (dr_known_forward_stride_p): Likewise.
17812         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17813         tree-ssanames.h.
17814         (runtime_alias_check_p): Allow runtime alias checks with
17815         variable strides.
17816         (operator ==): Compare access_size and align.
17817         (prune_runtime_alias_test_list): Rework for new distinction between
17818         the access_size and seg_len.
17819         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
17820         segment lengths.
17821         (get_segment_min_max): New function.
17822         (create_intersect_range_checks): Use it.
17823         (dr_step_indicator): New function.
17824         (dr_direction_indicator): Likewise.
17825         (dr_zero_step_indicator): Likewise.
17826         (dr_known_forward_stride_p): Likewise.
17827         * tree-loop-distribution.c (data_ref_segment_size): Return
17828         DR_STEP * (niters - 1).
17829         (compute_alias_check_pairs): Update call to the dr_with_seg_len
17830         constructor.
17831         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17832         (vect_preserves_scalar_order_p): New function, split out from...
17833         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
17834         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17835         (vect_vfa_access_size): New function.
17836         (vect_vfa_align): Likewise.
17837         (vect_compile_time_alias): Take access_size_a and access_b arguments.
17838         (dump_lower_bound): New function.
17839         (vect_check_lower_bound): Likewise.
17840         (vect_small_gap_p): Likewise.
17841         (vectorizable_with_step_bound_p): Likewise.
17842         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17843         depencies if the vectorization factor is 1.  Convert the checks
17844         for nonzero steps into checks on the bounds of DR_STEP.  Try using
17845         a bunds check for variable steps if the minimum required step is
17846         relatively small. Update calls to the dr_with_seg_len
17847         constructor and to vect_compile_time_alias.
17848         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17849         function.
17850         (vect_loop_versioning): Call it.
17851         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17852         when retrying.
17853         (vect_estimate_min_profitable_iters): Account for any bounds checks.
17855 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17856             Alan Hayward  <alan.hayward@arm.com>
17857             David Sherwood  <david.sherwood@arm.com>
17859         * doc/sourcebuild.texi (vect_scatter_store): Document.
17860         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17861         optabs.
17862         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17863         Document.
17864         * genopinit.c (main): Add supports_vec_scatter_store and
17865         supports_vec_scatter_store_cached to target_optabs.
17866         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17867         IFN_MASK_SCATTER_STORE.
17868         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17869         functions.
17870         * internal-fn.h (internal_store_fn_p): Declare.
17871         (internal_fn_stored_value_index): Likewise.
17872         * internal-fn.c (scatter_store_direct): New macro.
17873         (expand_scatter_store_optab_fn): New function.
17874         (direct_scatter_store_optab_supported_p): New macro.
17875         (internal_store_fn_p): New function.
17876         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17877         IFN_MASK_SCATTER_STORE.
17878         (internal_fn_mask_index): Likewise.
17879         (internal_fn_stored_value_index): New function.
17880         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17881         for scatter stores.
17882         * optabs-query.h (supports_vec_scatter_store_p): Declare.
17883         * optabs-query.c (supports_vec_scatter_store_p): New function.
17884         * tree-vectorizer.h (vect_get_store_rhs): Declare.
17885         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17886         true for scatter stores.
17887         (vect_gather_scatter_fn_p): Handle scatter stores too.
17888         (vect_check_gather_scatter): Consider using scatter stores if
17889         supports_vec_scatter_store_p.
17890         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17891         scatter stores too.
17892         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17893         internal_fn_stored_value_index.
17894         (check_load_store_masking): Handle scatter stores too.
17895         (vect_get_store_rhs): Make public.
17896         (vectorizable_call): Use internal_store_fn_p.
17897         (vectorizable_store): Handle scatter store internal functions.
17898         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17899         when deciding whether the end of the group has been reached.
17900         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17901         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17902         (mask_scatter_store<mode>): New insns.
17904 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17905             Alan Hayward  <alan.hayward@arm.com>
17906             David Sherwood  <david.sherwood@arm.com>
17908         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17909         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17910         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17911         function.
17912         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17913         Use vect_truncate_gather_scatter_offset if we can't treat the
17914         operation as a normal gather load or scatter store.
17915         (get_group_load_store_type): Take the gather_scatter_info
17916         as argument.  Try using a gather load or scatter store for
17917         single-element groups.
17918         (get_load_store_type): Update calls to get_group_load_store_type
17919         and vect_use_strided_gather_scatters_p.
17921 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17922             Alan Hayward  <alan.hayward@arm.com>
17923             David Sherwood  <david.sherwood@arm.com>
17925         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17926         optional tree argument.
17927         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17928         null target hooks.
17929         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17930         but continue to use the current value as a fallback.
17931         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17932         to compare the updates.
17933         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17934         (get_load_store_type): Use it when handling a strided access.
17935         (vect_get_strided_load_store_ops): New function.
17936         (vect_get_data_ptr_increment): Likewise.
17937         (vectorizable_load): Handle strided gather loads.  Always pass
17938         a step to vect_create_data_ref_ptr and bump_vector_ptr.
17940 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17941             Alan Hayward  <alan.hayward@arm.com>
17942             David Sherwood  <david.sherwood@arm.com>
17944         * doc/md.texi (gather_load@var{m}): Document.
17945         (mask_gather_load@var{m}): Likewise.
17946         * genopinit.c (main): Add supports_vec_gather_load and
17947         supports_vec_gather_load_cached to target_optabs.
17948         * optabs-tree.c (init_tree_optimization_optabs): Use
17949         ggc_cleared_alloc to allocate target_optabs.
17950         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17951         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17952         functions.
17953         * internal-fn.h (internal_load_fn_p): Declare.
17954         (internal_gather_scatter_fn_p): Likewise.
17955         (internal_fn_mask_index): Likewise.
17956         (internal_gather_scatter_fn_supported_p): Likewise.
17957         * internal-fn.c (gather_load_direct): New macro.
17958         (expand_gather_load_optab_fn): New function.
17959         (direct_gather_load_optab_supported_p): New macro.
17960         (direct_internal_fn_optab): New function.
17961         (internal_load_fn_p): Likewise.
17962         (internal_gather_scatter_fn_p): Likewise.
17963         (internal_fn_mask_index): Likewise.
17964         (internal_gather_scatter_fn_supported_p): Likewise.
17965         * optabs-query.c (supports_at_least_one_mode_p): New function.
17966         (supports_vec_gather_load_p): Likewise.
17967         * optabs-query.h (supports_vec_gather_load_p): Declare.
17968         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17969         and memory_type field.
17970         (NUM_PATTERNS): Bump to 15.
17971         * tree-vect-data-refs.c: Include internal-fn.h.
17972         (vect_gather_scatter_fn_p): New function.
17973         (vect_describe_gather_scatter_call): Likewise.
17974         (vect_check_gather_scatter): Try using internal functions for
17975         gather loads.  Recognize existing calls to a gather load function.
17976         (vect_analyze_data_refs): Consider using gather loads if
17977         supports_vec_gather_load_p.
17978         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17979         (vect_get_gather_scatter_offset_type): Likewise.
17980         (vect_convert_mask_for_vectype): Likewise.
17981         (vect_add_conversion_to_patterm): Likewise.
17982         (vect_try_gather_scatter_pattern): Likewise.
17983         (vect_recog_gather_scatter_pattern): New pattern recognizer.
17984         (vect_vect_recog_func_ptrs): Add it.
17985         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17986         internal_fn_mask_index and internal_gather_scatter_fn_p.
17987         (check_load_store_masking): Take the gather_scatter_info as an
17988         argument and handle gather loads.
17989         (vect_get_gather_scatter_ops): New function.
17990         (vectorizable_call): Check internal_load_fn_p.
17991         (vectorizable_load): Likewise.  Handle gather load internal
17992         functions.
17993         (vectorizable_store): Update call to check_load_store_masking.
17994         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17995         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17996         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17997         (aarch64_gather_scale_operand_d): New predicates.
17998         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17999         (mask_gather_load<mode>): New insns.
18001 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18002             Alan Hayward  <alan.hayward@arm.com>
18003             David Sherwood  <david.sherwood@arm.com>
18005         * optabs.def (fold_left_plus_optab): New optab.
18006         * doc/md.texi (fold_left_plus_@var{m}): Document.
18007         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18008         * internal-fn.c (fold_left_direct): Define.
18009         (expand_fold_left_optab_fn): Likewise.
18010         (direct_fold_left_optab_supported_p): Likewise.
18011         * fold-const-call.c (fold_const_fold_left): New function.
18012         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18013         * tree-parloops.c (valid_reduction_p): New function.
18014         (gather_scalar_reductions): Use it.
18015         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18016         (vect_finish_replace_stmt): Declare.
18017         * tree-vect-loop.c (fold_left_reduction_fn): New function.
18018         (needs_fold_left_reduction_p): New function, split out from...
18019         (vect_is_simple_reduction): ...here.  Accept reductions that
18020         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18021         (vect_force_simple_reduction): Also store the reduction type in
18022         the assignment's STMT_VINFO_REDUC_TYPE.
18023         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18024         (merge_with_identity): New function.
18025         (vect_expand_fold_left): Likewise.
18026         (vectorize_fold_left_reduction): Likewise.
18027         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
18028         scalar phi in place for it.  Check for target support and reject
18029         cases that would reassociate the operation.  Defer the transform
18030         phase to vectorize_fold_left_reduction.
18031         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18032         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18033         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18035 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18037         * tree-if-conv.c (predicate_mem_writes): Remove redundant
18038         call to ifc_temp_var.
18040 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18041             Alan Hayward  <alan.hayward@arm.com>
18042             David Sherwood  <david.sherwood@arm.com>
18044         * target.def (legitimize_address_displacement): Take the original
18045         offset as a poly_int.
18046         * targhooks.h (default_legitimize_address_displacement): Update
18047         accordingly.
18048         * targhooks.c (default_legitimize_address_displacement): Likewise.
18049         * doc/tm.texi: Regenerate.
18050         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18051         as an argument, moving assert of ad->disp == ad->disp_term to...
18052         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
18053         Try calling targetm.legitimize_address_displacement before expanding
18054         the address rather than afterwards, and adjust for the new interface.
18055         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18056         Match the new hook interface.  Handle SVE addresses.
18057         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18058         new hook interface.
18060 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18062         * Makefile.in (OBJS): Add early-remat.o.
18063         * target.def (select_early_remat_modes): New hook.
18064         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18065         * doc/tm.texi: Regenerate.
18066         * targhooks.h (default_select_early_remat_modes): Declare.
18067         * targhooks.c (default_select_early_remat_modes): New function.
18068         * timevar.def (TV_EARLY_REMAT): New timevar.
18069         * passes.def (pass_early_remat): New pass.
18070         * tree-pass.h (make_pass_early_remat): Declare.
18071         * early-remat.c: New file.
18072         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18073         function.
18074         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18076 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18077             Alan Hayward  <alan.hayward@arm.com>
18078             David Sherwood  <david.sherwood@arm.com>
18080         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18081         vfm1 with a bound_epilog parameter.
18082         (vect_do_peeling): Update calls accordingly, and move the prologue
18083         call earlier in the function.  Treat the base bound_epilog as 0 for
18084         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
18085         this base when peeling for gaps.
18086         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18087         with fully-masked loops.
18088         (vect_estimate_min_profitable_iters): Handle the single peeled
18089         iteration in that case.
18091 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18092             Alan Hayward  <alan.hayward@arm.com>
18093             David Sherwood  <david.sherwood@arm.com>
18095         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18096         single-element interleaving even if the size is not a power of 2.
18097         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18098         accesses for single-element interleaving if the group size is
18099         not a power of 2.
18101 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18102             Alan Hayward  <alan.hayward@arm.com>
18103             David Sherwood  <david.sherwood@arm.com>
18105         * doc/md.texi (fold_extract_last_@var{m}): Document.
18106         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18107         * optabs.def (fold_extract_last_optab): New optab.
18108         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18109         * internal-fn.c (fold_extract_direct): New macro.
18110         (expand_fold_extract_optab_fn): Likewise.
18111         (direct_fold_extract_optab_supported_p): Likewise.
18112         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18113         * tree-vect-loop.c (vect_model_reduction_cost): Handle
18114         EXTRACT_LAST_REDUCTION.
18115         (get_initial_def_for_reduction): Do not create an initial vector
18116         for EXTRACT_LAST_REDUCTION reductions.
18117         (vectorizable_reduction): Leave the scalar phi in place for
18118         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
18119         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
18120         epilogue code for EXTRACT_LAST_REDUCTION and defer the
18121         transform phase to vectorizable_condition.
18122         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18123         split out from...
18124         (vect_finish_stmt_generation): ...here.
18125         (vect_finish_replace_stmt): New function.
18126         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18127         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18128         pattern.
18129         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18131 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18132             Alan Hayward  <alan.hayward@arm.com>
18133             David Sherwood  <david.sherwood@arm.com>
18135         * doc/md.texi (extract_last_@var{m}): Document.
18136         * optabs.def (extract_last_optab): New optab.
18137         * internal-fn.def (EXTRACT_LAST): New internal function.
18138         * internal-fn.c (cond_unary_direct): New macro.
18139         (expand_cond_unary_optab_fn): Likewise.
18140         (direct_cond_unary_optab_supported_p): Likewise.
18141         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18142         loops using EXTRACT_LAST.
18143         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18144         (extract_last_<mode>): ...this optab.
18145         (vec_extract<mode><Vel>): Update accordingly.
18147 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18148             Alan Hayward  <alan.hayward@arm.com>
18149             David Sherwood  <david.sherwood@arm.com>
18151         * target.def (empty_mask_is_expensive): New hook.
18152         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18153         * doc/tm.texi: Regenerate.
18154         * targhooks.h (default_empty_mask_is_expensive): Declare.
18155         * targhooks.c (default_empty_mask_is_expensive): New function.
18156         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18157         if the target says that empty masks are expensive.
18158         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18159         New function.
18160         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18162 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18163             Alan Hayward  <alan.hayward@arm.com>
18164             David Sherwood  <david.sherwood@arm.com>
18166         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18167         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18168         (vect_use_loop_mask_for_alignment_p): New function.
18169         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18170         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18171         niters_skip argument.  Make sure that the first niters_skip elements
18172         of the first iteration are inactive.
18173         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18174         Update call to vect_set_loop_masks_directly.
18175         (get_misalign_in_elems): New function, split out from...
18176         (vect_gen_prolog_loop_niters): ...here.
18177         (vect_update_init_of_dr): Take a code argument that specifies whether
18178         the adjustment should be added or subtracted.
18179         (vect_update_init_of_drs): Likewise.
18180         (vect_prepare_for_masked_peels): New function.
18181         (vect_do_peeling): Skip prologue peeling if we're using a mask
18182         instead.  Update call to vect_update_inits_of_drs.
18183         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18184         mask_skip_niters.
18185         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18186         alignment.  Do not include the number of peeled iterations in
18187         the minimum threshold in that case.
18188         (vectorizable_induction): Adjust the start value down by
18189         LOOP_VINFO_MASK_SKIP_NITERS iterations.
18190         (vect_transform_loop): Call vect_prepare_for_masked_peels.
18191         Take the number of skipped iterations into account when calculating
18192         the loop bounds.
18193         * tree-vect-stmts.c (vect_gen_while_not): New function.
18195 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18196             Alan Hayward  <alan.hayward@arm.com>
18197             David Sherwood  <david.sherwood@arm.com>
18199         * doc/sourcebuild.texi (vect_fully_masked): Document.
18200         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18201         default value to 0.
18202         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18203         split out from...
18204         (vect_analyze_loop_2): ...here. Don't check the vectorization
18205         factor against the number of loop iterations if the loop is
18206         fully-masked.
18208 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18209             Alan Hayward  <alan.hayward@arm.com>
18210             David Sherwood  <david.sherwood@arm.com>
18212         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18213         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18214         (dump_groups): Update accordingly.
18215         (iv_use::mem_type): New member variable.
18216         (address_p): New function.
18217         (record_use): Add a mem_type argument and initialize the new
18218         mem_type field.
18219         (record_group_use): Add a mem_type argument.  Use address_p.
18220         Remove obsolete null checks of base_object.  Update call to record_use.
18221         (find_interesting_uses_op): Update call to record_group_use.
18222         (find_interesting_uses_cond): Likewise.
18223         (find_interesting_uses_address): Likewise.
18224         (get_mem_type_for_internal_fn): New function.
18225         (find_address_like_use): Likewise.
18226         (find_interesting_uses_stmt): Try find_address_like_use before
18227         calling find_interesting_uses_op.
18228         (addr_offset_valid_p): Use the iv mem_type field as the type
18229         of the addressed memory.
18230         (add_autoinc_candidates): Likewise.
18231         (get_address_cost): Likewise.
18232         (split_small_address_groups_p): Use address_p.
18233         (split_address_groups): Likewise.
18234         (add_iv_candidate_for_use): Likewise.
18235         (autoinc_possible_for_pair): Likewise.
18236         (rewrite_groups): Likewise.
18237         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18238         (determine_group_iv_cost): Update after split of USE_ADDRESS.
18239         (get_alias_ptr_type_for_ptr_address): New function.
18240         (rewrite_use_address): Rewrite address uses in calls that were
18241         identified by find_address_like_use.
18243 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18244             Alan Hayward  <alan.hayward@arm.com>
18245             David Sherwood  <david.sherwood@arm.com>
18247         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18248         TARGET_MEM_REFs.
18249         * gimple-expr.h (is_gimple_addressable: Likewise.
18250         * gimple-expr.c (is_gimple_address): Likewise.
18251         * internal-fn.c (expand_call_mem_ref): New function.
18252         (expand_mask_load_optab_fn): Use it.
18253         (expand_mask_store_optab_fn): Likewise.
18255 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18256             Alan Hayward  <alan.hayward@arm.com>
18257             David Sherwood  <david.sherwood@arm.com>
18259         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18260         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18261         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18262         (cond_umax@var{mode}): Document.
18263         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18264         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18265         (cond_umin_optab, cond_umax_optab): New optabs.
18266         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18267         (COND_IOR, COND_XOR): New internal functions.
18268         * internal-fn.h (get_conditional_internal_fn): Declare.
18269         * internal-fn.c (cond_binary_direct): New macro.
18270         (expand_cond_binary_optab_fn): Likewise.
18271         (direct_cond_binary_optab_supported_p): Likewise.
18272         (get_conditional_internal_fn): New function.
18273         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18274         Cope with reduction statements that are vectorized as calls rather
18275         than assignments.
18276         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18277         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18278         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18279         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18280         (UNSPEC_COND_EOR): New unspecs.
18281         (optab): Add mappings for them.
18282         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18283         (sve_int_op, sve_fp_op): New int attributes.
18285 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18286             Alan Hayward  <alan.hayward@arm.com>
18287             David Sherwood  <david.sherwood@arm.com>
18289         * optabs.def (while_ult_optab): New optab.
18290         * doc/md.texi (while_ult@var{m}@var{n}): Document.
18291         * internal-fn.def (WHILE_ULT): New internal function.
18292         * internal-fn.h (direct_internal_fn_supported_p): New override
18293         that takes two types as argument.
18294         * internal-fn.c (while_direct): New macro.
18295         (expand_while_optab_fn): New function.
18296         (convert_optab_supported_p): Likewise.
18297         (direct_while_optab_supported_p): New macro.
18298         * wide-int.h (wi::udiv_ceil): New function.
18299         * tree-vectorizer.h (rgroup_masks): New structure.
18300         (vec_loop_masks): New typedef.
18301         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18302         and fully_masked_p.
18303         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18304         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18305         (vect_max_vf): New function.
18306         (slpeel_make_loop_iterate_ntimes): Delete.
18307         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18308         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18309         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18310         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18311         internal-fn.h, stor-layout.h and optabs-query.h.
18312         (vect_set_loop_mask): New function.
18313         (add_preheader_seq): Likewise.
18314         (add_header_seq): Likewise.
18315         (interleave_supported_p): Likewise.
18316         (vect_maybe_permute_loop_masks): Likewise.
18317         (vect_set_loop_masks_directly): Likewise.
18318         (vect_set_loop_condition_masked): Likewise.
18319         (vect_set_loop_condition_unmasked): New function, split out from
18320         slpeel_make_loop_iterate_ntimes.
18321         (slpeel_make_loop_iterate_ntimes): Rename to..
18322         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
18323         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18324         (vect_do_peeling): Update call accordingly.
18325         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18326         loops.
18327         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18328         mask_compare_type, can_fully_mask_p and fully_masked_p.
18329         (release_vec_loop_masks): New function.
18330         (_loop_vec_info): Use it to free the loop masks.
18331         (can_produce_all_loop_masks_p): New function.
18332         (vect_get_max_nscalars_per_iter): Likewise.
18333         (vect_verify_full_masking): Likewise.
18334         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18335         retries, and free the mask rgroups before retrying.  Check loop-wide
18336         reasons for disallowing fully-masked loops.  Make the final decision
18337         about whether use a fully-masked loop or not.
18338         (vect_estimate_min_profitable_iters): Do not assume that peeling
18339         for the number of iterations will be needed for fully-masked loops.
18340         (vectorizable_reduction): Disable fully-masked loops.
18341         (vectorizable_live_operation): Likewise.
18342         (vect_halve_mask_nunits): New function.
18343         (vect_double_mask_nunits): Likewise.
18344         (vect_record_loop_mask): Likewise.
18345         (vect_get_loop_mask): Likewise.
18346         (vect_transform_loop): Handle the case in which the final loop
18347         iteration might handle a partial vector.  Call vect_set_loop_condition
18348         instead of slpeel_make_loop_iterate_ntimes.
18349         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18350         (check_load_store_masking): New function.
18351         (prepare_load_store_mask): Likewise.
18352         (vectorizable_store): Handle fully-masked loops.
18353         (vectorizable_load): Likewise.
18354         (supportable_widening_operation): Use vect_halve_mask_nunits for
18355         booleans.
18356         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18357         (vect_gen_while): New function.
18358         * config/aarch64/aarch64.md (umax<mode>3): New expander.
18359         (aarch64_uqdec<mode>): New insn.
18361 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18362             Alan Hayward  <alan.hayward@arm.com>
18363             David Sherwood  <david.sherwood@arm.com>
18365         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18366         (reduc_xor_scal_optab): New optabs.
18367         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18368         (reduc_xor_scal_@var{m}): Document.
18369         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18370         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18371         internal functions.
18372         * fold-const-call.c (fold_const_call): Handle them.
18373         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18374         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18375         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18376         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18377         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18378         (UNSPEC_XORV): New unspecs.
18379         (optab): Add entries for them.
18380         (BITWISEV): New int iterator.
18381         (bit_reduc_op): New int attributes.
18383 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18384             Alan Hayward  <alan.hayward@arm.com>
18385             David Sherwood  <david.sherwood@arm.com>
18387         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18388         * internal-fn.def (VEC_SHL_INSERT): New internal function.
18389         * optabs.def (vec_shl_insert_optab): New optab.
18390         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18391         (duplicate_and_interleave): Likewise.
18392         * tree-vect-loop.c: Include internal-fn.h.
18393         (neutral_op_for_slp_reduction): New function, split out from
18394         get_initial_defs_for_reduction.
18395         (get_initial_def_for_reduction): Handle option 2 for variable-length
18396         vectors by loading the neutral value into a vector and then shifting
18397         the initial value into element 0.
18398         (get_initial_defs_for_reduction): Replace the code argument with
18399         the neutral value calculated by neutral_op_for_slp_reduction.
18400         Use gimple_build_vector for constant-length vectors.
18401         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18402         but the first group_size elements have a neutral value.
18403         Use duplicate_and_interleave otherwise.
18404         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18405         Update call to get_initial_defs_for_reduction.  Handle SLP
18406         reductions for variable-length vectors by creating one vector
18407         result for each scalar result, with the elements associated
18408         with other scalar results stubbed out with the neutral value.
18409         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18410         Require IFN_VEC_SHL_INSERT for double reductions on
18411         variable-length vectors, or SLP reductions that have
18412         a neutral value.  Require can_duplicate_and_interleave_p
18413         support for variable-length unchained SLP reductions if there
18414         is no neutral value, such as for MIN/MAX reductions.  Also require
18415         the number of vector elements to be a multiple of the number of
18416         SLP statements when doing variable-length unchained SLP reductions.
18417         Update call to vect_create_epilog_for_reduction.
18418         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18419         and remove initial values.
18420         (duplicate_and_interleave): Make public.
18421         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18422         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18424 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18425             Alan Hayward  <alan.hayward@arm.com>
18426             David Sherwood  <david.sherwood@arm.com>
18428         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18429         (can_duplicate_and_interleave_p): New function.
18430         (vect_get_and_check_slp_defs): Take the vector of statements
18431         rather than just the current one.  Remove excess parentheses.
18432         Restriction rejectinon of vect_constant_def and vect_external_def
18433         for variable-length vectors to boolean types, or types for which
18434         can_duplicate_and_interleave_p is false.
18435         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18436         (duplicate_and_interleave): New function.
18437         (vect_get_constant_vectors): Use gimple_build_vector for
18438         constant-length vectors and suitable variable-length constant
18439         vectors.  Use duplicate_and_interleave for other variable-length
18440         vectors.  Don't defer the update when inserting new statements.
18442 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18443             Alan Hayward  <alan.hayward@arm.com>
18444             David Sherwood  <david.sherwood@arm.com>
18446         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18447         min_profitable_iters doesn't go negative.
18449 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18450             Alan Hayward  <alan.hayward@arm.com>
18451             David Sherwood  <david.sherwood@arm.com>
18453         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18454         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18455         * optabs.def (vec_mask_load_lanes_optab): New optab.
18456         (vec_mask_store_lanes_optab): Likewise.
18457         * internal-fn.def (MASK_LOAD_LANES): New internal function.
18458         (MASK_STORE_LANES): Likewise.
18459         * internal-fn.c (mask_load_lanes_direct): New macro.
18460         (mask_store_lanes_direct): Likewise.
18461         (expand_mask_load_optab_fn): Handle masked operations.
18462         (expand_mask_load_lanes_optab_fn): New macro.
18463         (expand_mask_store_optab_fn): Handle masked operations.
18464         (expand_mask_store_lanes_optab_fn): New macro.
18465         (direct_mask_load_lanes_optab_supported_p): Likewise.
18466         (direct_mask_store_lanes_optab_supported_p): Likewise.
18467         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18468         parameter.
18469         (vect_load_lanes_supported): Likewise.
18470         * tree-vect-data-refs.c (strip_conversion): New function.
18471         (can_group_stmts_p): Likewise.
18472         (vect_analyze_data_ref_accesses): Use it instead of checking
18473         for a pair of assignments.
18474         (vect_store_lanes_supported): Take a masked_p parameter.
18475         (vect_load_lanes_supported): Likewise.
18476         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18477         vect_store_lanes_supported and vect_load_lanes_supported.
18478         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18479         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18480         parameter.  Don't allow gaps for masked accesses.
18481         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
18482         and vect_load_lanes_supported.
18483         (get_load_store_type): Take a masked_p parameter and update
18484         call to get_group_load_store_type.
18485         (vectorizable_store): Update call to get_load_store_type.
18486         Handle IFN_MASK_STORE_LANES.
18487         (vectorizable_load): Update call to get_load_store_type.
18488         Handle IFN_MASK_LOAD_LANES.
18490 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18491             Alan Hayward  <alan.hayward@arm.com>
18492             David Sherwood  <david.sherwood@arm.com>
18494         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18495         modes for SVE.
18496         * config/aarch64/aarch64-protos.h
18497         (aarch64_sve_struct_memory_operand_p): Declare.
18498         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18499         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18500         (VPRED, vpred): Handle SVE structure modes.
18501         * config/aarch64/constraints.md (Utx): New constraint.
18502         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18503         (aarch64_sve_struct_nonimmediate_operand): New predicates.
18504         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18505         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18506         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18507         structure modes.  Split into pieces after RA.
18508         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18509         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18510         New patterns.
18511         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18512         SVE structure modes.
18513         (aarch64_classify_address): Likewise.
18514         (sizetochar): Move earlier in file.
18515         (aarch64_print_operand): Handle SVE register lists.
18516         (aarch64_array_mode): New function.
18517         (aarch64_sve_struct_memory_operand_p): Likewise.
18518         (TARGET_ARRAY_MODE): Redefine.
18520 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18521             Alan Hayward  <alan.hayward@arm.com>
18522             David Sherwood  <david.sherwood@arm.com>
18524         * target.def (array_mode): New target hook.
18525         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18526         * doc/tm.texi: Regenerate.
18527         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18528         * hooks.c (hook_optmode_mode_uhwi_none): New function.
18529         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18530         targetm.array_mode.
18531         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
18532         type sizes.
18534 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18535             Alan Hayward  <alan.hayward@arm.com>
18536             David Sherwood  <david.sherwood@arm.com>
18538         * fold-const.c (fold_binary_loc): Check the argument types
18539         rather than the result type when testing for a vector operation.
18541 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18543         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18544         * doc/tm.texi: Regenerate.
18546 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18547             Alan Hayward  <alan.hayward@arm.com>
18548             David Sherwood  <david.sherwood@arm.com>
18550         * doc/invoke.texi (-msve-vector-bits=): Document new option.
18551         (sve): Document new AArch64 extension.
18552         * doc/md.texi (w): Extend the description of the AArch64
18553         constraint to include SVE vectors.
18554         (Upl, Upa): Document new AArch64 predicate constraints.
18555         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18556         enum.
18557         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18558         (msve-vector-bits=): New option.
18559         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18560         SVE when these are disabled.
18561         (sve): New extension.
18562         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18563         modes.  Adjust their number of units based on aarch64_sve_vg.
18564         (MAX_BITSIZE_MODE_ANY_MODE): Define.
18565         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18566         aarch64_addr_query_type.
18567         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18568         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18569         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18570         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18571         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18572         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18573         (aarch64_simd_imm_zero_p): Delete.
18574         (aarch64_check_zero_based_sve_index_immediate): Declare.
18575         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18576         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18577         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18578         (aarch64_sve_float_mul_immediate_p): Likewise.
18579         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18580         rather than an rtx.
18581         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18582         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18583         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18584         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18585         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18586         (aarch64_regmode_natural_size): Likewise.
18587         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18588         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18589         left one place.
18590         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18591         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18592         for VG and the SVE predicate registers.
18593         (V_ALIASES): Add a "z"-prefixed alias.
18594         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18595         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18596         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18597         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18598         (REG_CLASS_NAMES): Add entries for them.
18599         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
18600         and the predicate registers.
18601         (aarch64_sve_vg): Declare.
18602         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18603         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18604         (REGMODE_NATURAL_SIZE): Define.
18605         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18606         SVE macros.
18607         * config/aarch64/aarch64.c: Include cfgrtl.h.
18608         (simd_immediate_info): Add a constructor for series vectors,
18609         and an associated step field.
18610         (aarch64_sve_vg): New variable.
18611         (aarch64_dbx_register_number): Handle VG and the predicate registers.
18612         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18613         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18614         (VEC_ANY_DATA, VEC_STRUCT): New constants.
18615         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18616         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18617         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18618         (aarch64_get_mask_mode): New functions.
18619         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18620         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18621         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
18622         predicate modes and predicate registers.  Explicitly restrict
18623         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
18624         to store a vector mode if it is recognized by
18625         aarch64_classify_vector_mode.
18626         (aarch64_regmode_natural_size): New function.
18627         (aarch64_hard_regno_caller_save_mode): Return the original mode
18628         for predicates.
18629         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18630         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18631         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18632         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18633         functions.
18634         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
18635         does not overlap dest if the function is frame-related.  Handle
18636         SVE constants.
18637         (aarch64_split_add_offset): New function.
18638         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18639         them aarch64_add_offset.
18640         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18641         and update call to aarch64_sub_sp.
18642         (aarch64_add_cfa_expression): New function.
18643         (aarch64_expand_prologue): Pass extra temporary registers to the
18644         functions above.  Handle the case in which we need to emit new
18645         DW_CFA_expressions for registers that were originally saved
18646         relative to the stack pointer, but now have to be expressed
18647         relative to the frame pointer.
18648         (aarch64_output_mi_thunk): Pass extra temporary registers to the
18649         functions above.
18650         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
18651         IP0 and IP1 values for SVE frames.
18652         (aarch64_expand_vec_series): New function.
18653         (aarch64_expand_sve_widened_duplicate): Likewise.
18654         (aarch64_expand_sve_const_vector): Likewise.
18655         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18656         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
18657         into the register, rather than emitting a SET directly.
18658         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18659         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18660         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18661         (offset_9bit_signed_scaled_p): New functions.
18662         (aarch64_replicate_bitmask_imm): New function.
18663         (aarch64_bitmask_imm): Use it.
18664         (aarch64_cannot_force_const_mem): Reject expressions involving
18665         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
18666         (aarch64_classify_index): Handle SVE indices, by requiring
18667         a plain register index with a scale that matches the element size.
18668         (aarch64_classify_address): Handle SVE addresses.  Assert that
18669         the mode of the address is VOIDmode or an integer mode.
18670         Update call to aarch64_classify_symbol.
18671         (aarch64_classify_symbolic_expression): Update call to
18672         aarch64_classify_symbol.
18673         (aarch64_const_vec_all_in_range_p): New function.
18674         (aarch64_print_vector_float_operand): Likewise.
18675         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
18676         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
18677         and the FP immediates 1.0 and 0.5.
18678         (aarch64_print_address_internal): Handle SVE addresses.
18679         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18680         (aarch64_regno_regclass): Handle predicate registers.
18681         (aarch64_secondary_reload): Handle big-endian reloads of SVE
18682         data modes.
18683         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18684         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18685         (aarch64_convert_sve_vector_bits): New function.
18686         (aarch64_override_options): Use it to handle -msve-vector-bits=.
18687         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18688         rather than an rtx.
18689         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18690         Handle SVE vector and predicate modes.  Accept VL-based constants
18691         that need only one temporary register, and VL offsets that require
18692         no temporary registers.
18693         (aarch64_conditional_register_usage): Mark the predicate registers
18694         as fixed if SVE isn't available.
18695         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18696         Return true for SVE vector and predicate modes.
18697         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18698         rather than an unsigned int.  Handle SVE modes.
18699         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
18700         SVE modes.
18701         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18702         if SVE is enabled.
18703         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18704         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18705         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18706         (aarch64_sve_float_mul_immediate_p): New functions.
18707         (aarch64_sve_valid_immediate): New function.
18708         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18709         Explicitly reject structure modes.  Check for INDEX constants.
18710         Handle PTRUE and PFALSE constants.
18711         (aarch64_check_zero_based_sve_index_immediate): New function.
18712         (aarch64_simd_imm_zero_p): Delete.
18713         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18714         vector modes.  Accept constants in the range of CNT[BHWD].
18715         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18716         ask for an Advanced SIMD mode.
18717         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18718         (aarch64_simd_vector_alignment): Handle SVE predicates.
18719         (aarch64_vectorize_preferred_vector_alignment): New function.
18720         (aarch64_simd_vector_alignment_reachable): Use it instead of
18721         the vector size.
18722         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18723         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18724         functions.
18725         (MAX_VECT_LEN): Delete.
18726         (expand_vec_perm_d): Add a vec_flags field.
18727         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18728         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18729         (aarch64_evpc_ext): Don't apply a big-endian lane correction
18730         for SVE modes.
18731         (aarch64_evpc_rev): Rename to...
18732         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
18733         (aarch64_evpc_rev_global): New function.
18734         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18735         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18736         MAX_VECT_LEN.
18737         (aarch64_evpc_sve_tbl): New function.
18738         (aarch64_expand_vec_perm_const_1): Update after rename of
18739         aarch64_evpc_rev.  Handle SVE permutes too, trying
18740         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18741         than aarch64_evpc_tbl.
18742         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18743         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18744         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18745         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18746         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18747         (aarch64_expand_sve_vcond): New functions.
18748         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18749         of aarch64_vector_mode_p.
18750         (aarch64_dwarf_poly_indeterminate_value): New function.
18751         (aarch64_compute_pressure_classes): Likewise.
18752         (aarch64_can_change_mode_class): Likewise.
18753         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18754         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18755         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18756         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18757         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18758         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18759         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18760         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18761         constraints.
18762         (Dn, Dl, Dr): Accept const as well as const_vector.
18763         (Dz): Likewise.  Compare against CONST0_RTX.
18764         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18765         of "vector" where appropriate.
18766         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18767         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18768         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18769         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18770         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18771         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18772         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18773         (v_int_equiv): Extend to SVE modes.
18774         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18775         mode attributes.
18776         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18777         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18778         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18779         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18780         (SVE_COND_FP_CMP): New int iterators.
18781         (perm_hilo): Handle the new unpack unspecs.
18782         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18783         attributes.
18784         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18785         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18786         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18787         (aarch64_equality_operator, aarch64_constant_vector_operand)
18788         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18789         (aarch64_sve_nonimmediate_operand): Likewise.
18790         (aarch64_sve_general_operand): Likewise.
18791         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18792         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18793         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18794         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18795         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18796         (aarch64_sve_float_arith_immediate): Likewise.
18797         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18798         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18799         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18800         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18801         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18802         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18803         (aarch64_sve_float_arith_operand): Likewise.
18804         (aarch64_sve_float_arith_with_sub_operand): Likewise.
18805         (aarch64_sve_float_mul_operand): Likewise.
18806         (aarch64_sve_vec_perm_operand): Likewise.
18807         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18808         (aarch64_mov_operand): Accept const_poly_int and const_vector.
18809         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18810         as well as const_vector.
18811         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18812         in file.  Use CONST0_RTX and CONSTM1_RTX.
18813         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
18814         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18815         Use aarch64_simd_imm_zero.
18816         * config/aarch64/aarch64-sve.md: New file.
18817         * config/aarch64/aarch64.md: Include it.
18818         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18819         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18820         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18821         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18822         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18823         (sve): New attribute.
18824         (enabled): Disable instructions with the sve attribute unless
18825         TARGET_SVE.
18826         (movqi, movhi): Pass CONST_POLY_INT operaneds through
18827         aarch64_expand_mov_immediate.
18828         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18829         CNT[BHSD] immediates.
18830         (movti): Split CONST_POLY_INT moves into two halves.
18831         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18832         Split additions that need a temporary here if the destination
18833         is the stack pointer.
18834         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18835         (*add<mode>3_poly_1): New instruction.
18836         (set_clobber_cc): New expander.
18838 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18840         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18841         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
18842         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18843         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18844         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
18845         Change innermode from fixed_mode_size to machine_mode.
18846         (simplify_subreg): Update call accordingly.  Handle a constant-sized
18847         subreg of a variable-length CONST_VECTOR.
18849 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18850             Alan Hayward  <alan.hayward@arm.com>
18851             David Sherwood  <david.sherwood@arm.com>
18853         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18854         (add_offset_to_base): New function, split out from...
18855         (create_mem_ref): ...here.  When handling a scale other than 1,
18856         check first whether the address is valid without the offset.
18857         Add it into the base if so, leaving the index and scale as-is.
18859 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
18861         PR c++/83778
18862         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18863         fold_for_warn before checking if arg2 is INTEGER_CST.
18865 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
18867         * config/rs6000/predicates.md (load_multiple_operation): Delete.
18868         (store_multiple_operation): Delete.
18869         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18870         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18871         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18872         guarded by TARGET_STRING.
18873         (rs6000_output_load_multiple): Delete.
18874         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18875         OPTION_MASK_STRING / TARGET_STRING handling.
18876         (print_operand) <'N', 'O'>: Add comment that these are unused now.
18877         (const rs6000_opt_masks) <"string">: Change mask to 0.
18878         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18879         (MASK_STRING): Delete.
18880         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18881         parts.  Simplify.
18882         (load_multiple): Delete.
18883         (*ldmsi8): Delete.
18884         (*ldmsi7): Delete.
18885         (*ldmsi6): Delete.
18886         (*ldmsi5): Delete.
18887         (*ldmsi4): Delete.
18888         (*ldmsi3): Delete.
18889         (store_multiple): Delete.
18890         (*stmsi8): Delete.
18891         (*stmsi7): Delete.
18892         (*stmsi6): Delete.
18893         (*stmsi5): Delete.
18894         (*stmsi4): Delete.
18895         (*stmsi3): Delete.
18896         (movmemsi_8reg): Delete.
18897         (corresponding unnamed define_insn): Delete.
18898         (movmemsi_6reg): Delete.
18899         (corresponding unnamed define_insn): Delete.
18900         (movmemsi_4reg): Delete.
18901         (corresponding unnamed define_insn): Delete.
18902         (movmemsi_2reg): Delete.
18903         (corresponding unnamed define_insn): Delete.
18904         (movmemsi_1reg): Delete.
18905         (corresponding unnamed define_insn): Delete.
18906         * config/rs6000/rs6000.opt (mno-string): New.
18907         (mstring): Replace by deprecation warning stub.
18908         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18910 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
18912         * regrename.c (regrename_do_replace): If replacing the same
18913         reg multiple times, try to reuse last created gen_raw_REG.
18915         PR debug/81155
18916         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18917         main to workaround a bug in GDB.
18919 2018-01-12  Tom de Vries  <tom@codesourcery.com>
18921         PR target/83737
18922         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18924 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
18926         PR rtl-optimization/80481
18927         * ira-color.c (get_cap_member): New function.
18928         (allocnos_conflict_by_live_ranges_p): Use it.
18929         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18930         (setup_slot_coalesced_allocno_live_ranges): Ditto.
18932 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
18934         PR target/83628
18935         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18936         (*saddl_se_1): Ditto.
18937         (*ssubsi_1): Ditto.
18938         (*ssubl_se_1): Ditto.
18940 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
18942         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18943         rather than wi::to_widest for DR_INITs.
18944         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18945         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18946         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18947         INTEGER_CSTs.
18948         (vect_analyze_group_access_1): Note that here.
18950 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
18952         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18953         polynomial type sizes.
18955 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
18957         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18958         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18959         (gimple_add_tmp_var): Likewise.
18961 2018-01-12  Martin Liska  <mliska@suse.cz>
18963         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18964         (gimple_alloc_sizes): Likewise.
18965         (dump_gimple_statistics): Use PRIu64 in printf format.
18966         * gimple.h: Change uint64_t to int.
18968 2018-01-12  Martin Liska  <mliska@suse.cz>
18970         * tree-core.h: Use uint64_t instead of int.
18971         * tree.c (tree_node_counts): Likewise.
18972         (tree_node_sizes): Likewise.
18973         (dump_tree_statistics): Use PRIu64 in printf format.
18975 2018-01-12  Martin Liska  <mliska@suse.cz>
18977         * Makefile.in: As qsort_chk is implemented in vec.c, add
18978         vec.o to linkage of gencfn-macros.
18979         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18980         passing the info to record_node_allocation_statistics.
18981         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18982         and pass the info.
18983         * ggc-common.c (struct ggc_usage): Add operator== and use
18984         it in operator< and compare function.
18985         * mem-stats.h (struct mem_usage): Likewise.
18986         * vec.c (struct vec_usage): Remove operator< and compare
18987         function. Can be simply inherited.
18989 2018-01-12  Martin Jambor  <mjambor@suse.cz>
18991         PR target/81616
18992         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18993         * tree-ssa-math-opts.c: Include domwalk.h.
18994         (convert_mult_to_fma_1): New function.
18995         (fma_transformation_info): New type.
18996         (fma_deferring_state): Likewise.
18997         (cancel_fma_deferring): New function.
18998         (result_of_phi): Likewise.
18999         (last_fma_candidate_feeds_initial_phi): Likewise.
19000         (convert_mult_to_fma): Added deferring logic, split actual
19001         transformation to convert_mult_to_fma_1.
19002         (math_opts_dom_walker): New type.
19003         (math_opts_dom_walker::after_dom_children): New method, body moved
19004         here from pass_optimize_widening_mul::execute, added deferring logic
19005         bits.
19006         (pass_optimize_widening_mul::execute): Moved most of code to
19007         math_opts_dom_walker::after_dom_children.
19008         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19009         * config/i386/i386.c (ix86_option_override_internal): Added
19010         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19012 2018-01-12  Richard Biener  <rguenther@suse.de>
19014         PR debug/83157
19015         * dwarf2out.c (gen_variable_die): Do not reset old_die for
19016         inline instance vars.
19018 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
19020         PR target/81819
19021         * config/rx/rx.c (rx_is_restricted_memory_address):
19022         Handle SUBREG case.
19024 2018-01-12  Richard Biener  <rguenther@suse.de>
19026         PR tree-optimization/80846
19027         * target.def (split_reduction): New target hook.
19028         * targhooks.c (default_split_reduction): New function.
19029         * targhooks.h (default_split_reduction): Declare.
19030         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19031         target requests first reduce vectors by combining low and high
19032         parts.
19033         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19034         (get_vectype_for_scalar_type_and_size): Export.
19035         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19036         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19037         * doc/tm.texi: Regenerate.
19038         * config/i386/i386.c (ix86_split_reduction): Implement
19039         TARGET_VECTORIZE_SPLIT_REDUCTION.
19041 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19043         PR target/83368
19044         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19045         in PIC mode except for TARGET_VXWORKS_RTP.
19046         * config/sparc/sparc.c: Include cfgrtl.h.
19047         (TARGET_INIT_PIC_REG): Define.
19048         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19049         (sparc_pic_register_p): New predicate.
19050         (sparc_legitimate_address_p): Use it.
19051         (sparc_legitimize_pic_address): Likewise.
19052         (sparc_delegitimize_address): Likewise.
19053         (sparc_mode_dependent_address_p): Likewise.
19054         (gen_load_pcrel_sym): Remove 4th parameter.
19055         (load_got_register): Adjust call to above.  Remove obsolete stuff.
19056         (sparc_expand_prologue): Do not call load_got_register here.
19057         (sparc_flat_expand_prologue): Likewise.
19058         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19059         (sparc_use_pseudo_pic_reg): New function.
19060         (sparc_init_pic_reg): Likewise.
19061         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19062         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19064 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
19066         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19067         Add item for branch_cost.
19069 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19071         PR rtl-optimization/83565
19072         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19073         not extend the result to a larger mode for rotate operations.
19074         (num_sign_bit_copies1): Likewise.
19076 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19078         PR target/40411
19079         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19080         -symbolic.
19081         Use values-Xc.o for -pedantic.
19082         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19084 2018-01-12  Martin Liska  <mliska@suse.cz>
19086         PR ipa/83054
19087         * ipa-devirt.c (final_warning_record::grow_type_warnings):
19088         New function.
19089         (possible_polymorphic_call_targets): Use it.
19090         (ipa_devirt): Likewise.
19092 2018-01-12  Martin Liska  <mliska@suse.cz>
19094         * profile-count.h (enum profile_quality): Use 0 as invalid
19095         enum value of profile_quality.
19097 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
19099         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19100         -mext-string options.
19102 2018-01-12  Richard Biener  <rguenther@suse.de>
19104         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19105         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19106         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19107         Likewise.
19108         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19110 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
19112         * configure.ac (--with-long-double-format): Add support for the
19113         configuration option to change the default long double format on
19114         PowerPC systems.
19115         * config.gcc (powerpc*-linux*-*): Likewise.
19116         * configure: Regenerate.
19117         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19118         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19119         used without modification.
19121 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19123         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19124         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19125         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19126         MISC_BUILTIN_SPEC_BARRIER.
19127         (rs6000_init_builtins): Likewise.
19128         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19129         enum value.
19130         (speculation_barrier): New define_insn.
19131         * doc/extend.texi: Document __builtin_speculation_barrier.
19133 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
19135         PR target/83203
19136         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19137         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19138         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19139         iterators.
19140         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
19141         integral modes instead of "ss" and "sd".
19142         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19143         vectors with 32-bit and 64-bit elements.
19144         (vecdupssescalarmodesuffix): New mode attribute.
19145         (vec_dup<mode>): Use it.
19147 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
19149         PR target/83330
19150         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19151         frame if argument is passed on stack.
19153 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
19155         PR target/82682
19156         * ree.c (combine_reaching_defs): Optimize also
19157         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19158         reg2=any_extend(exp); reg1=reg2;, formatting fix.
19160 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
19162         PR middle-end/83189
19163         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19165 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
19167         PR middle-end/83718
19168         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19169         after they are computed.
19171 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
19173         PR tree-optimization/83695
19174         * gimple-loop-linterchange.cc
19175         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19176         reset cached scev information after interchange.
19177         (pass_linterchange::execute): Remove call to scev_reset_htab.
19179 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19181         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19182         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19183         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19184         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19185         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19186         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19187         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19188         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19189         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19190         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19191         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19192         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19193         (V_lane_reg): Likewise.
19194         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19195         New define_expand.
19196         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19197         (vfmal_lane_low<mode>_intrinsic,
19198         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19199         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19200         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19201         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19202         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19203         vfmsl_lane_high<mode>_intrinsic): New define_insns.
19205 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19207         * config/arm/arm-cpus.in (fp16fml): New feature.
19208         (ALL_SIMD): Add fp16fml.
19209         (armv8.2-a): Add fp16fml as an option.
19210         (armv8.3-a): Likewise.
19211         (armv8.4-a): Add fp16fml as part of fp16.
19212         * config/arm/arm.h (TARGET_FP16FML): Define.
19213         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19214         when appropriate.
19215         * config/arm/arm-modes.def (V2HF): Define.
19216         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19217         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19218         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19219         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19220         vfmsl_low, vfmsl_high): New set of builtins.
19221         * config/arm/iterators.md (PLUSMINUS): New code iterator.
19222         (vfml_op): New code attribute.
19223         (VFMLHALVES): New int iterator.
19224         (VFML, VFMLSEL): New mode attributes.
19225         (V_reg): Define mapping for V2HF.
19226         (V_hi, V_lo): New mode attributes.
19227         (VF_constraint): Likewise.
19228         (vfml_half, vfml_half_selector): New int attributes.
19229         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19230         define_expand.
19231         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19232         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19233         New define_insn.
19234         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19235         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19236         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19237         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
19238         documentation.
19239         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19240         Document new effective target and option set.
19242 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19244         * config/arm/arm-cpus.in (armv8_4): New feature.
19245         (ARMv8_4a): New fgroup.
19246         (armv8.4-a): New arch.
19247         * config/arm/arm-tables.opt: Regenerate.
19248         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19249         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19250         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19251         Add matching rules for -march=armv8.4-a and extensions.
19252         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19254 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
19256         PR target/81821
19257         * config/rx/rx.md (BW): New mode attribute.
19258         (sync_lock_test_and_setsi): Add mode suffix to insn output.
19260 2018-01-11  Richard Biener  <rguenther@suse.de>
19262         PR tree-optimization/83435
19263         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19264         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19265         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19267 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19268             Alan Hayward  <alan.hayward@arm.com>
19269             David Sherwood  <david.sherwood@arm.com>
19271         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19272         field.
19273         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
19274         (aarch64_print_address_internal): Use it to check for a zero offset.
19276 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19277             Alan Hayward  <alan.hayward@arm.com>
19278             David Sherwood  <david.sherwood@arm.com>
19280         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19281         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19282         Return a poly_int64 rather than a HOST_WIDE_INT.
19283         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19284         rather than a HOST_WIDE_INT.
19285         * config/aarch64/aarch64.h (aarch64_frame): Protect with
19286         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
19287         hard_fp_offset, frame_size, initial_adjust, callee_offset and
19288         final_offset from HOST_WIDE_INT to poly_int64.
19289         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19290         to_constant when getting the number of units in an Advanced SIMD
19291         mode.
19292         (aarch64_builtin_vectorized_function): Check for a constant number
19293         of units.
19294         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19295         GET_MODE_SIZE.
19296         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19297         attribute instead of GET_MODE_NUNITS.
19298         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19299         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19300         GET_MODE_SIZE for fixed-size registers.
19301         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19302         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19303         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19304         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19305         (aarch64_print_operand, aarch64_print_address_internal)
19306         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19307         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19308         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19309         Handle polynomial GET_MODE_SIZE.
19310         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
19311         wider than SImode without modification.
19312         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19313         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19314         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19315         passing and returning SVE modes.
19316         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19317         rather than GEN_INT.
19318         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19319         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19320         (aarch64_allocate_and_probe_stack_space): Likewise.
19321         (aarch64_layout_frame): Cope with polynomial offsets.
19322         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19323         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
19324         polynomial offsets.
19325         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19326         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19327         poly_int64 rather than a HOST_WIDE_INT.
19328         (aarch64_get_separate_components, aarch64_process_components)
19329         (aarch64_expand_prologue, aarch64_expand_epilogue)
19330         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19331         (aarch64_anchor_offset): New function, split out from...
19332         (aarch64_legitimize_address): ...here.
19333         (aarch64_builtin_vectorization_cost): Handle polynomial
19334         TYPE_VECTOR_SUBPARTS.
19335         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19336         GET_MODE_NUNITS.
19337         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19338         number of elements from the PARALLEL rather than the mode.
19339         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19340         rather than GET_MODE_BITSIZE.
19341         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19342         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19343         (aarch64_expand_vec_perm_const_1): Handle polynomial
19344         d->perm.length () and d->perm elements.
19345         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
19346         Apply to_constant to d->perm elements.
19347         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19348         polynomial CONST_VECTOR_NUNITS.
19349         (aarch64_move_pointer): Take amount as a poly_int64 rather
19350         than an int.
19351         (aarch64_progress_pointer): Avoid temporary variable.
19352         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19353         the mode attribute instead of GET_MODE.
19355 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19356             Alan Hayward  <alan.hayward@arm.com>
19357             David Sherwood  <david.sherwood@arm.com>
19359         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19360         x exists before using it.
19361         (aarch64_add_constant_internal): Rename to...
19362         (aarch64_add_offset_1): ...this.  Replace regnum with separate
19363         src and dest rtxes.  Handle the case in which they're different,
19364         including when the offset is zero.  Replace scratchreg with an rtx.
19365         Use 2 additions if there is no spare register into which we can
19366         move a 16-bit constant.
19367         (aarch64_add_constant): Delete.
19368         (aarch64_add_offset): Replace reg with separate src and dest
19369         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
19370         Use aarch64_add_offset_1.
19371         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19372         an rtx rather than an int.  Take the delta as a poly_int64
19373         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
19374         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19375         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19376         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19377         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19378         and aarch64_add_sp.
19379         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19380         aarch64_add_constant.
19382 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19384         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19385         Use scalar_float_mode.
19387 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19389         * config/aarch64/aarch64-simd.md
19390         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19391         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19392         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19393         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19394         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19395         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19396         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19397         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19398         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19399         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19401 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19403         PR target/83514
19404         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19405         targ_options->x_arm_arch_string is non NULL.
19407 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
19409         * config/aarch64/aarch64.h
19410         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
19412 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
19414         PR target/82096
19415         * expmed.c (emit_store_flag_force): Swap if const op0
19416         and change VOIDmode to mode of op0.
19418 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19420         PR rtl-optimization/83761
19421         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19422         than bytes to mode_for_size.
19424 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
19426         PR middle-end/83189
19427         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19428         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19429         profile.
19431 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
19433         PR middle-end/83575
19434         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19435         when in layout mode.
19436         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19437         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19438         partition fixup.
19440 2018-01-10  Michael Collison  <michael.collison@arm.com>
19442         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19443         * config/aarch64/aarch64-option-extension.def: Add
19444         AARCH64_OPT_EXTENSION of 'fp16fml'.
19445         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19446         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19447         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19448         * config/aarch64/constraints.md (Ui7): New constraint.
19449         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19450         (VFMLA_SEL_W): Ditto.
19451         (f16quad): Ditto.
19452         (f16mac1): Ditto.
19453         (VFMLA16_LOW): New int iterator.
19454         (VFMLA16_HIGH): Ditto.
19455         (UNSPEC_FMLAL): New unspec.
19456         (UNSPEC_FMLSL): Ditto.
19457         (UNSPEC_FMLAL2): Ditto.
19458         (UNSPEC_FMLSL2): Ditto.
19459         (f16mac): New code attribute.
19460         * config/aarch64/aarch64-simd-builtins.def
19461         (aarch64_fmlal_lowv2sf): Ditto.
19462         (aarch64_fmlsl_lowv2sf): Ditto.
19463         (aarch64_fmlalq_lowv4sf): Ditto.
19464         (aarch64_fmlslq_lowv4sf): Ditto.
19465         (aarch64_fmlal_highv2sf): Ditto.
19466         (aarch64_fmlsl_highv2sf): Ditto.
19467         (aarch64_fmlalq_highv4sf): Ditto.
19468         (aarch64_fmlslq_highv4sf): Ditto.
19469         (aarch64_fmlal_lane_lowv2sf): Ditto.
19470         (aarch64_fmlsl_lane_lowv2sf): Ditto.
19471         (aarch64_fmlal_laneq_lowv2sf): Ditto.
19472         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19473         (aarch64_fmlalq_lane_lowv4sf): Ditto.
19474         (aarch64_fmlsl_lane_lowv4sf): Ditto.
19475         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19476         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19477         (aarch64_fmlal_lane_highv2sf): Ditto.
19478         (aarch64_fmlsl_lane_highv2sf): Ditto.
19479         (aarch64_fmlal_laneq_highv2sf): Ditto.
19480         (aarch64_fmlsl_laneq_highv2sf): Ditto.
19481         (aarch64_fmlalq_lane_highv4sf): Ditto.
19482         (aarch64_fmlsl_lane_highv4sf): Ditto.
19483         (aarch64_fmlalq_laneq_highv4sf): Ditto.
19484         (aarch64_fmlsl_laneq_highv4sf): Ditto.
19485         * config/aarch64/aarch64-simd.md:
19486         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19487         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19488         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19489         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19490         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19491         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19492         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19493         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19494         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19495         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19496         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19497         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19498         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19499         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19500         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19501         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19502         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19503         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19504         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19505         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19506         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19507         (vfmlsl_low_u32): Ditto.
19508         (vfmlalq_low_u32): Ditto.
19509         (vfmlslq_low_u32): Ditto.
19510         (vfmlal_high_u32): Ditto.
19511         (vfmlsl_high_u32): Ditto.
19512         (vfmlalq_high_u32): Ditto.
19513         (vfmlslq_high_u32): Ditto.
19514         (vfmlal_lane_low_u32): Ditto.
19515         (vfmlsl_lane_low_u32): Ditto.
19516         (vfmlal_laneq_low_u32): Ditto.
19517         (vfmlsl_laneq_low_u32): Ditto.
19518         (vfmlalq_lane_low_u32): Ditto.
19519         (vfmlslq_lane_low_u32): Ditto.
19520         (vfmlalq_laneq_low_u32): Ditto.
19521         (vfmlslq_laneq_low_u32): Ditto.
19522         (vfmlal_lane_high_u32): Ditto.
19523         (vfmlsl_lane_high_u32): Ditto.
19524         (vfmlal_laneq_high_u32): Ditto.
19525         (vfmlsl_laneq_high_u32): Ditto.
19526         (vfmlalq_lane_high_u32): Ditto.
19527         (vfmlslq_lane_high_u32): Ditto.
19528         (vfmlalq_laneq_high_u32): Ditto.
19529         (vfmlslq_laneq_high_u32): Ditto.
19530         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19531         (AARCH64_FL_FOR_ARCH8_4): New.
19532         (AARCH64_ISA_F16FML): New ISA flag.
19533         (TARGET_F16FML): New feature flag for fp16fml.
19534         (doc/invoke.texi): Document new fp16fml option.
19536 2018-01-10  Michael Collison  <michael.collison@arm.com>
19538         * config/aarch64/aarch64-builtins.c:
19539         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19540         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19541         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19542         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19543         (AARCH64_ISA_SHA3): New ISA flag.
19544         (TARGET_SHA3): New feature flag for sha3.
19545         * config/aarch64/iterators.md (sha512_op): New int attribute.
19546         (CRYPTO_SHA512): New int iterator.
19547         (UNSPEC_SHA512H): New unspec.
19548         (UNSPEC_SHA512H2): Ditto.
19549         (UNSPEC_SHA512SU0): Ditto.
19550         (UNSPEC_SHA512SU1): Ditto.
19551         * config/aarch64/aarch64-simd-builtins.def
19552         (aarch64_crypto_sha512hqv2di): New builtin.
19553         (aarch64_crypto_sha512h2qv2di): Ditto.
19554         (aarch64_crypto_sha512su0qv2di): Ditto.
19555         (aarch64_crypto_sha512su1qv2di): Ditto.
19556         (aarch64_eor3qv8hi): Ditto.
19557         (aarch64_rax1qv2di): Ditto.
19558         (aarch64_xarqv2di): Ditto.
19559         (aarch64_bcaxqv8hi): Ditto.
19560         * config/aarch64/aarch64-simd.md:
19561         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19562         (aarch64_crypto_sha512su0qv2di): Ditto.
19563         (aarch64_crypto_sha512su1qv2di): Ditto.
19564         (aarch64_eor3qv8hi): Ditto.
19565         (aarch64_rax1qv2di): Ditto.
19566         (aarch64_xarqv2di): Ditto.
19567         (aarch64_bcaxqv8hi): Ditto.
19568         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19569         (vsha512h2q_u64): Ditto.
19570         (vsha512su0q_u64): Ditto.
19571         (vsha512su1q_u64): Ditto.
19572         (veor3q_u16): Ditto.
19573         (vrax1q_u64): Ditto.
19574         (vxarq_u64): Ditto.
19575         (vbcaxq_u16): Ditto.
19576         * config/arm/types.md (crypto_sha512): New type attribute.
19577         (crypto_sha3): Ditto.
19578         (doc/invoke.texi): Document new sha3 option.
19580 2018-01-10  Michael Collison  <michael.collison@arm.com>
19582         * config/aarch64/aarch64-builtins.c:
19583         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19584         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19585         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19586         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19587         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19588         (AARCH64_ISA_SM4): New ISA flag.
19589         (TARGET_SM4): New feature flag for sm4.
19590         * config/aarch64/aarch64-simd-builtins.def
19591         (aarch64_sm3ss1qv4si): Ditto.
19592         (aarch64_sm3tt1aq4si): Ditto.
19593         (aarch64_sm3tt1bq4si): Ditto.
19594         (aarch64_sm3tt2aq4si): Ditto.
19595         (aarch64_sm3tt2bq4si): Ditto.
19596         (aarch64_sm3partw1qv4si): Ditto.
19597         (aarch64_sm3partw2qv4si): Ditto.
19598         (aarch64_sm4eqv4si): Ditto.
19599         (aarch64_sm4ekeyqv4si): Ditto.
19600         * config/aarch64/aarch64-simd.md:
19601         (aarch64_sm3ss1qv4si): Ditto.
19602         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19603         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19604         (aarch64_sm4eqv4si): Ditto.
19605         (aarch64_sm4ekeyqv4si): Ditto.
19606         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19607         (sm3part_op): Ditto.
19608         (CRYPTO_SM3TT): Ditto.
19609         (CRYPTO_SM3PART): Ditto.
19610         (UNSPEC_SM3SS1): New unspec.
19611         (UNSPEC_SM3TT1A): Ditto.
19612         (UNSPEC_SM3TT1B): Ditto.
19613         (UNSPEC_SM3TT2A): Ditto.
19614         (UNSPEC_SM3TT2B): Ditto.
19615         (UNSPEC_SM3PARTW1): Ditto.
19616         (UNSPEC_SM3PARTW2): Ditto.
19617         (UNSPEC_SM4E): Ditto.
19618         (UNSPEC_SM4EKEY): Ditto.
19619         * config/aarch64/constraints.md (Ui2): New constraint.
19620         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19621         * config/arm/types.md (crypto_sm3): New type attribute.
19622         (crypto_sm4): Ditto.
19623         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19624         (vsm3tt1aq_u32): Ditto.
19625         (vsm3tt1bq_u32): Ditto.
19626         (vsm3tt2aq_u32): Ditto.
19627         (vsm3tt2bq_u32): Ditto.
19628         (vsm3partw1q_u32): Ditto.
19629         (vsm3partw2q_u32): Ditto.
19630         (vsm4eq_u32): Ditto.
19631         (vsm4ekeyq_u32): Ditto.
19632         (doc/invoke.texi): Document new sm4 option.
19634 2018-01-10  Michael Collison  <michael.collison@arm.com>
19636         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19637         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19638         (AARCH64_FL_FOR_ARCH8_4): New.
19639         (AARCH64_FL_V8_4): New flag.
19640         (doc/invoke.texi): Document new armv8.4-a option.
19642 2018-01-10  Michael Collison  <michael.collison@arm.com>
19644         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19645         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19646         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19647         * config/aarch64/aarch64-option-extension.def: Add
19648         AARCH64_OPT_EXTENSION of 'sha2'.
19649         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19650         (crypto): Disable sha2 and aes if crypto disabled.
19651         (crypto): Enable aes and sha2 if enabled.
19652         (simd): Disable sha2 and aes if simd disabled.
19653         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19654         New flags.
19655         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19656         (TARGET_SHA2): New feature flag for sha2.
19657         (TARGET_AES): New feature flag for aes.
19658         * config/aarch64/aarch64-simd.md:
19659         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19660         conditional on TARGET_AES.
19661         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19662         (aarch64_crypto_sha1hsi): Make pattern conditional
19663         on TARGET_SHA2.
19664         (aarch64_crypto_sha1hv4si): Ditto.
19665         (aarch64_be_crypto_sha1hv4si): Ditto.
19666         (aarch64_crypto_sha1su1v4si): Ditto.
19667         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19668         (aarch64_crypto_sha1su0v4si): Ditto.
19669         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19670         (aarch64_crypto_sha256su0v4si): Ditto.
19671         (aarch64_crypto_sha256su1v4si): Ditto.
19672         (doc/invoke.texi): Document new aes and sha2 options.
19674 2018-01-10  Martin Sebor  <msebor@redhat.com>
19676         PR tree-optimization/83781
19677         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19678         as string arrays.
19680 2018-01-11  Martin Sebor  <msebor@gmail.com>
19681             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19683         PR tree-optimization/83501
19684         PR tree-optimization/81703
19686         * tree-ssa-strlen.c (get_string_cst): Rename...
19687         (get_string_len): ...to this.  Handle global constants.
19688         (handle_char_store): Adjust.
19690 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
19691             Jim Wilson  <jimw@sifive.com>
19693         * config/riscv/riscv-protos.h (riscv_output_return): New.
19694         * config/riscv/riscv.c (struct machine_function): New naked_p field.
19695         (riscv_attribute_table, riscv_output_return),
19696         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19697         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19698         (riscv_compute_frame_info): Only compute frame->mask if not a naked
19699         function.
19700         (riscv_expand_prologue): Add early return for naked function.
19701         (riscv_expand_epilogue): Likewise.
19702         (riscv_function_ok_for_sibcall): Return false for naked function.
19703         (riscv_set_current_function): New.
19704         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19705         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19706         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19707         * doc/extend.texi (RISC-V Function Attributes): New.
19709 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
19711         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19712         check for 128-bit long double before checking TCmode.
19713         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19714         128-bit long doubles before checking TFmode or TCmode.
19715         (FLOAT128_IBM_P): Likewise.
19717 2018-01-10  Martin Sebor  <msebor@redhat.com>
19719         PR tree-optimization/83671
19720         * builtins.c (c_strlen): Unconditionally return zero for the empty
19721         string.
19722         Use -Warray-bounds for warnings.
19723         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19724         for non-constant array indices with COMPONENT_REF, arrays of
19725         arrays, and pointers to arrays.
19726         (gimple_fold_builtin_strlen): Determine and set length range for
19727         non-constant character arrays.
19729 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
19731         PR middle-end/81897
19732         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19733         empty blocks.
19735 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
19737         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19739 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
19741         PR target/83399
19742         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19743         VECTOR_MEM_ALTIVEC_OR_VSX_P.
19744         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19745         indexed_or_indirect_operand predicate.
19746         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19747         (*vsx_le_perm_load_v8hi): Likewise.
19748         (*vsx_le_perm_load_v16qi): Likewise.
19749         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19750         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19751         (*vsx_le_perm_store_v8hi): Likewise.
19752         (*vsx_le_perm_store_v16qi): Likewise.
19753         (eight unnamed splitters): Likewise.
19755 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
19757         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19758         * config/rs6000/emmintrin.h: Likewise.
19759         * config/rs6000/mmintrin.h: Likewise.
19760         * config/rs6000/xmmintrin.h: Likewise.
19762 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
19764         PR c++/43486
19765         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19766         "public_flag".
19767         * tree.c (tree_nop_conversion): Return true for location wrapper
19768         nodes.
19769         (maybe_wrap_with_location): New function.
19770         (selftest::check_strip_nops): New function.
19771         (selftest::test_location_wrappers): New function.
19772         (selftest::tree_c_tests): Call it.
19773         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19774         (maybe_wrap_with_location): New decl.
19775         (EXPR_LOCATION_WRAPPER_P): New macro.
19776         (location_wrapper_p): New inline function.
19777         (tree_strip_any_location_wrapper): New inline function.
19779 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
19781         PR target/83735
19782         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19783         stack_realign_offset for the largest alignment of stack slot
19784         actually used.
19785         (ix86_find_max_used_stack_alignment): New function.
19786         (ix86_finalize_stack_frame_flags): Use it.  Set
19787         max_used_stack_alignment if we don't realign stack.
19788         * config/i386/i386.h (machine_function): Add
19789         max_used_stack_alignment.
19791 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
19793         * config/arm/arm.opt (-mbranch-cost): New option.
19794         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19795         account.
19797 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
19799         PR target/83629
19800         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19801         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19803 2018-01-10  Richard Biener  <rguenther@suse.de>
19805         PR debug/83765
19806         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19807         early out so it also covers the case where we have a non-NULL
19808         origin.
19810 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
19812         PR tree-optimization/83753
19813         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19814         for non-strided grouped accesses if the number of elements is 1.
19816 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
19818         PR target/81616
19819         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19820         * i386.h (TARGET_USE_GATHER): Define.
19821         * x86-tune.def (X86_TUNE_USE_GATHER): New.
19823 2018-01-10  Martin Liska  <mliska@suse.cz>
19825         PR bootstrap/82831
19826         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19827         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19828         partitioning.
19829         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19830         CLEANUP_NO_PARTITIONING is not set.
19832 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
19834         * doc/rtl.texi: Remove documentation of (const ...) wrappers
19835         for vectors, as a partial revert of r254296.
19836         * rtl.h (const_vec_p): Delete.
19837         (const_vec_duplicate_p): Don't test for vector CONSTs.
19838         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19839         * expmed.c (make_tree): Likewise.
19841         Revert:
19842         * common.md (E, F): Use CONSTANT_P instead of checking for
19843         CONST_VECTOR.
19844         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19845         checking for CONST_VECTOR.
19847 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
19849         PR middle-end/83575
19850         * predict.c (force_edge_cold): Handle in more sane way edges
19851         with no prediction.
19853 2018-01-09  Carl Love  <cel@us.ibm.com>
19855         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19856         V4SI, V4SF types.
19857         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19858         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19859         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19860         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
19861         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19862         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
19863         * config/rs6000/rs6000-protos.h: Add extern defition for
19864         rs6000_generate_float2_double_code.
19865         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19866         function.
19867         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19868         (float2_v2df): Add define_expand.
19870 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
19872         PR target/83628
19873         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19874         op_mode in the force_to_mode call.
19876 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19878         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19879         instead of checking each element individually.
19880         (aarch64_evpc_uzp): Likewise.
19881         (aarch64_evpc_zip): Likewise.
19882         (aarch64_evpc_ext): Likewise.
19883         (aarch64_evpc_rev): Likewise.
19884         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19885         instead of checking each element individually.  Return true without
19886         generating rtl if
19887         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19888         whether all selected elements come from the same input, instead of
19889         checking each element individually.  Remove calls to gen_rtx_REG,
19890         start_sequence and end_sequence and instead assert that no rtl is
19891         generated.
19893 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19895         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19896         order of HIGH and CONST checks.
19898 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19900         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19901         if the destination isn't an SSA_NAME.
19903 2018-01-09  Richard Biener  <rguenther@suse.de>
19905         PR tree-optimization/83668
19906         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19907         move prologue...
19908         (canonicalize_loop_form): ... here, renamed from ...
19909         (canonicalize_loop_closed_ssa_form): ... this and amended to
19910         swap successor edges for loop exit blocks to make us use
19911         the RPO order we need for initial schedule generation.
19913 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
19915         PR tree-optimization/64811
19916         * match.pd: When optimizing comparisons with Inf, avoid
19917         introducing or losing exceptions from comparisons with NaN.
19919 2018-01-09  Martin Liska  <mliska@suse.cz>
19921         PR sanitizer/82517
19922         * asan.c (shadow_mem_size): Add gcc_assert.
19924 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
19926         Don't save registers in main().
19928         PR target/83738
19929         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19930         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19931         * config/avr/avr.c (avr_set_current_function): Don't error if
19932         naked, OS_task or OS_main are specified at the same time.
19933         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19934         OS_main.
19935         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19936         attribute.
19937         * common/config/avr/avr-common.c (avr_option_optimization_table):
19938         Switch on -mmain-is-OS_task for optimizing compilations.
19940 2018-01-09  Richard Biener  <rguenther@suse.de>
19942         PR tree-optimization/83572
19943         * graphite.c: Include cfganal.h.
19944         (graphite_transform_loops): Connect infinite loops to exit
19945         and remove fake edges at the end.
19947 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
19949         * ipa-inline.c (edge_badness): Revert accidental checkin.
19951 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
19953         PR ipa/80763
19954         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19955         symbols; not inline clones.
19957 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
19959         PR target/83507
19960         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19961         hard registers.  Formatting fixes.
19963         PR preprocessor/83722
19964         * gcc.c (try_generate_repro): Pass
19965         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19966         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19967         do_report_bug.
19969 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
19970             Kito Cheng  <kito.cheng@gmail.com>
19972         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19973         (riscv_leaf_function_p): Delete.
19974         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19976 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19978         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19979         function.
19980         (do_ifelse): New function.
19981         (do_isel): New function.
19982         (do_sub3): New function.
19983         (do_add3): New function.
19984         (do_load_mask_compare): New function.
19985         (do_overlap_load_compare): New function.
19986         (expand_compare_loop): New function.
19987         (expand_block_compare): Call expand_compare_loop() when appropriate.
19988         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19989         option description.
19990         (-mblock-compare-inline-loop-limit): New option.
19992 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19994         PR target/83677
19995         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19996         Reverse order of second and third operands in first alternative.
19997         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19998         of first and second elements in UNSPEC_VPERMR vector.
19999         (altivec_expand_vec_perm_le): Likewise.
20001 2018-01-08  Jeff Law  <law@redhat.com>
20003         PR rtl-optimizatin/81308
20004         * tree-switch-conversion.c (cfg_altered): New file scoped static.
20005         (process_switch): If group_case_labels makes a change, then set
20006         cfg_altered.
20007         (pass_convert_switch::execute): If a switch is converted, then
20008         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
20010         PR rtl-optimization/81308
20011         * recog.c (split_all_insns): Conditionally cleanup the CFG after
20012         splitting insns.
20014 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
20016         PR target/83663 - Revert r255946
20017         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20018         generation for cases where splatting a value is not useful.
20019         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20020         across a vec_duplicate and a paradoxical subreg forming a vector
20021         mode to a vec_concat.
20023 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20025         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20026         -march=armv8.3-a variants.
20027         * config/arm/t-multilib: Likewise.
20028         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
20030 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20032         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20033         to generate rtl.
20034         (cceq_ior_compare_complement): Give it a name so I can use it, and
20035         change boolean_or_operator predicate to boolean_operator so it can
20036         be used to generate a crand.
20037         (eqne): New code iterator.
20038         (bd/bd_neg): New code_attrs.
20039         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20040         a single define_insn.
20041         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20042         decrement (bdnzt/bdnzf/bdzt/bdzf).
20043         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20044         with the new names of the branch decrement patterns, and added the
20045         names of the branch decrement conditional patterns.
20047 2018-01-08  Richard Biener  <rguenther@suse.de>
20049         PR tree-optimization/83563
20050         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20051         cache.
20053 2018-01-08  Richard Biener  <rguenther@suse.de>
20055         PR middle-end/83713
20056         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20058 2018-01-08  Richard Biener  <rguenther@suse.de>
20060         PR tree-optimization/83685
20061         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20062         references to abnormals.
20064 2018-01-08  Richard Biener  <rguenther@suse.de>
20066         PR lto/83719
20067         * dwarf2out.c (output_indirect_strings): Handle empty
20068         skeleton_debug_str_hash.
20069         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20071 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
20073         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20074         (emit_store_direct): Likewise.
20075         (arc_trampoline_adjust_address): Likewise.
20076         (arc_asm_trampoline_template): New function.
20077         (arc_initialize_trampoline): Use asm_trampoline_template.
20078         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20079         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20080         * config/arc/arc.md (flush_icache): Delete pattern.
20082 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
20084         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20085         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20086         munaligned-access.
20088 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20090         PR target/83681
20091         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20092         by not USED_FOR_TARGET.
20093         (make_pass_resolve_sw_modes): Likewise.
20095 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20097         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20098         USED_FOR_TARGET.
20100 2018-01-08  Richard Biener  <rguenther@suse.de>
20102         PR middle-end/83580
20103         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20105 2018-01-08  Richard Biener  <rguenther@suse.de>
20107         PR middle-end/83517
20108         * match.pd ((t * 2) / 2) -> t): Add missing :c.
20110 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
20112         PR middle-end/81897
20113         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20114         basic blocks with a small number of successors.
20115         (convert_control_dep_chain_into_preds): Improve handling of
20116         forwarder blocks.
20117         (dump_predicates): Split apart into...
20118         (dump_pred_chain): ...here...
20119         (dump_pred_info): ...and here.
20120         (can_one_predicate_be_invalidated_p): Add debugging printfs.
20121         (can_chain_union_be_invalidated_p): Improve check for invalidation
20122         of paths.
20123         (uninit_uses_cannot_happen): Avoid unnecessary if
20124         convert_control_dep_chain_into_preds yielded nothing.
20126 2018-01-06  Martin Sebor  <msebor@redhat.com>
20128         PR tree-optimization/83640
20129         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20130         subtracting negative offset from size.
20131         (builtin_access::overlap): Adjust offset bounds of the access to fall
20132         within the size of the object if possible.
20134 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
20136         PR rtl-optimization/83699
20137         * expmed.c (extract_bit_field_1): Restrict the vector usage of
20138         extract_bit_field_as_subreg to cases in which the extracted
20139         value is also a vector.
20141         * lra-constraints.c (process_alt_operands): Test for the equivalence
20142         substitutions when detecting a possible reload cycle.
20144 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
20146         PR debug/83480
20147         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20148         by default if flag_selective_schedling{,2}.  Formatting fixes.
20150         PR rtl-optimization/83682
20151         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20152         if it has non-VECTOR_MODE element mode.
20153         (vec_duplicate_p): Likewise.
20155         PR middle-end/83694
20156         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20157         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20159 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
20161         PR target/83604
20162         * config/i386/i386-builtin.def
20163         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20164         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20165         Require also OPTION_MASK_ISA_AVX512F in addition to
20166         OPTION_MASK_ISA_GFNI.
20167         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20168         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20169         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20170         to OPTION_MASK_ISA_GFNI.
20171         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20172         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20173         OPTION_MASK_ISA_AVX512BW.
20174         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20175         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20176         addition to OPTION_MASK_ISA_GFNI.
20177         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20178         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20179         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20180         to OPTION_MASK_ISA_GFNI.
20181         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20182         a requirement for all ISAs rather than any of them with a few
20183         exceptions.
20184         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20185         processing.
20186         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20187         bitmasks to be enabled with 3 exceptions, instead of requiring any
20188         enabled ISA with lots of exceptions.
20189         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20190         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20191         Change avx512bw in isa attribute to avx512f.
20192         * config/i386/sgxintrin.h: Add license boilerplate.
20193         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
20194         to __AVX512F__ and __AVX512VL to __AVX512VL__.
20195         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20196         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20197         defined.
20198         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20199         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20200         temporarily sse2 rather than sse if not enabled already.
20202         PR target/83604
20203         * config/i386/sse.md (VI248_VLBW): Rename to ...
20204         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
20205         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20206         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20207         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20208         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20209         mode iterator instead of VI248_VLBW.
20211 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
20213         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20214         (record_modified): Skip clobbers; add debug output.
20215         (param_change_prob): Use sreal frequencies.
20217 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
20219         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20220         punt for user-aligned variables.
20222 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
20224         * tree-chrec.c (chrec_contains_symbols): Return true for
20225         POLY_INT_CST.
20227 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
20229         PR target/82439
20230         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20231         of (x|y) == x for BICS pattern.
20233 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
20235         PR tree-optimization/83605
20236         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20237         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20238         can throw.
20240 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20242         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20243         * config/epiphany/rtems.h: New file.
20245 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20246             Uros Bizjak  <ubizjak@gmail.com>
20248         PR target/83554
20249         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20250         QIreg_operand instead of register_operand predicate.
20251         * config/i386/i386.c (ix86_rop_should_change_byte_p,
20252         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20253         comments instead of -fmitigate[-_]rop.
20255 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20257         PR bootstrap/81926
20258         * cgraphunit.c (symbol_table::compile): Switch to text_section
20259         before calling assembly_start debug hook.
20260         * run-rtl-passes.c (run_rtl_passes): Likewise.
20261         Include output.h.
20263 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20265         * tree-vrp.c (extract_range_from_binary_expr_1): Check
20266         range_int_cst_p rather than !symbolic_range_p before calling
20267         extract_range_from_multiplicative_op_1.
20269 2018-01-04  Jeff Law  <law@redhat.com>
20271         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20272         redundant test in assertion.
20274 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20276         * doc/rtl.texi: Document machine_mode wrapper classes.
20278 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20280         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20281         using tree_to_uhwi.
20283 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20285         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20286         the VEC_PERM_EXPR fold to fail.
20288 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20290         PR debug/83585
20291         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20292         to switched_sections.
20294 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20296         PR target/83680
20297         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20298         test for d.testing.
20300 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
20302         PR target/83387
20303         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20304         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20306 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20308         PR debug/83666
20309         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20310         is BLKmode and bitpos not zero or mode change is needed.
20312 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20314         PR target/83675
20315         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20316         TARGET_VIS2.
20318 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
20320         PR target/83628
20321         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20322         instead of MULT rtx.  Update all corresponding splitters.
20323         (*saddl_se): Ditto.
20324         (*ssub<modesuffix>): Ditto.
20325         (*ssubl_se): Ditto.
20326         (*cmp_sadd_di): Update split patterns.
20327         (*cmp_sadd_si): Ditto.
20328         (*cmp_sadd_sidi): Ditto.
20329         (*cmp_ssub_di): Ditto.
20330         (*cmp_ssub_si): Ditto.
20331         (*cmp_ssub_sidi): Ditto.
20332         * config/alpha/predicates.md (const23_operand): New predicate.
20333         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20334         Look for ASHIFT, not MULT inner operand.
20335         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20337 2018-01-04  Martin Liska  <mliska@suse.cz>
20339         PR gcov-profile/83669
20340         * gcov.c (output_intermediate_file): Add version to intermediate
20341         gcov file.
20342         * doc/gcov.texi: Document new field 'version' in intermediate
20343         file format. Fix location of '-k' option of gcov command.
20345 2018-01-04  Martin Liska  <mliska@suse.cz>
20347         PR ipa/82352
20348         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20350 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20352         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20354 2018-01-03  Martin Sebor  <msebor@redhat.com>
20356         PR tree-optimization/83655
20357         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20358         checking calls with invalid arguments.
20360 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20362         * tree-vect-stmts.c (vect_get_store_rhs): New function.
20363         (vectorizable_mask_load_store): Delete.
20364         (vectorizable_call): Return false for masked loads and stores.
20365         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
20366         instead of gimple_assign_rhs1.
20367         (vectorizable_load): Handle IFN_MASK_LOAD.
20368         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20370 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20372         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20373         split out from..,
20374         (vectorizable_mask_load_store): ...here.
20375         (vectorizable_load): ...and here.
20377 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20379         * tree-vect-stmts.c (vect_build_all_ones_mask)
20380         (vect_build_zero_merge_argument): New functions, split out from...
20381         (vectorizable_load): ...here.
20383 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20385         * tree-vect-stmts.c (vect_check_store_rhs): New function,
20386         split out from...
20387         (vectorizable_mask_load_store): ...here.
20388         (vectorizable_store): ...and here.
20390 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20392         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20393         split out from...
20394         (vectorizable_mask_load_store): ...here.
20396 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20398         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20399         (vect_model_store_cost): Take a vec_load_store_type instead of a
20400         vect_def_type.
20401         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20402         (vect_model_store_cost): Take a vec_load_store_type instead of a
20403         vect_def_type.
20404         (vectorizable_mask_load_store): Update accordingly.
20405         (vectorizable_store): Likewise.
20406         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20408 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20410         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20411         IFN_MASK_LOAD calls here rather than...
20412         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20414 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20415             Alan Hayward  <alan.hayward@arm.com>
20416             David Sherwood  <david.sherwood@arm.com>
20418         * expmed.c (extract_bit_field_1): For vector extracts,
20419         fall back to extract_bit_field_as_subreg if vec_extract
20420         isn't available.
20422 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20423             Alan Hayward  <alan.hayward@arm.com>
20424             David Sherwood  <david.sherwood@arm.com>
20426         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20427         they are variable or constant sized.
20428         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20429         slots for constant-sized data.
20431 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20432             Alan Hayward  <alan.hayward@arm.com>
20433             David Sherwood  <david.sherwood@arm.com>
20435         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20436         handling COND_EXPRs with boolean comparisons, try to find a better
20437         basis for the mask type than the boolean itself.
20439 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20441         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20442         is calculated and how it can be overridden.
20443         * genmodes.c (max_bitsize_mode_any_mode): New variable.
20444         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20445         if defined.
20446         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20447         if nonzero.
20449 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20450             Alan Hayward  <alan.hayward@arm.com>
20451             David Sherwood  <david.sherwood@arm.com>
20453         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20454         Remove the mode argument.
20455         (aarch64_simd_valid_immediate): Remove the mode and inverse
20456         arguments.
20457         * config/aarch64/iterators.md (bitsize): New iterator.
20458         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20459         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20460         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20461         aarch64_simd_valid_immediate.
20462         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20463         (aarch64_reg_or_bic_imm): Likewise.
20464         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20465         with an insn_type enum and msl with a modifier_type enum.
20466         Replace element_width with a scalar_mode.  Change the shift
20467         to unsigned int.  Add constructors for scalar_float_mode and
20468         scalar_int_mode elements.
20469         (aarch64_vect_float_const_representable_p): Delete.
20470         (aarch64_can_const_movi_rtx_p)
20471         (aarch64_simd_scalar_immediate_valid_for_move)
20472         (aarch64_simd_make_constant): Update call to
20473         aarch64_simd_valid_immediate.
20474         (aarch64_advsimd_valid_immediate_hs): New function.
20475         (aarch64_advsimd_valid_immediate): Likewise.
20476         (aarch64_simd_valid_immediate): Remove mode and inverse
20477         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
20478         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20479         and aarch64_float_const_representable_p on the result.
20480         (aarch64_output_simd_mov_immediate): Remove mode argument.
20481         Update call to aarch64_simd_valid_immediate and use of
20482         simd_immediate_info.
20483         (aarch64_output_scalar_simd_mov_immediate): Update call
20484         accordingly.
20486 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20487             Alan Hayward  <alan.hayward@arm.com>
20488             David Sherwood  <david.sherwood@arm.com>
20490         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20491         (mode_nunits): Likewise CONST_MODE_NUNITS.
20492         * machmode.def (ADJUST_NUNITS): Document.
20493         * genmodes.c (mode_data::need_nunits_adj): New field.
20494         (blank_mode): Update accordingly.
20495         (adj_nunits): New variable.
20496         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20497         parameter.
20498         (emit_mode_size_inline): Set need_bytesize_adj for all modes
20499         listed in adj_nunits.
20500         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20501         listed in adj_nunits.  Don't emit case statements for such modes.
20502         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20503         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
20504         nothing if adj_nunits is nonnull.
20505         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20506         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20507         (emit_mode_fbit): Update use of print_maybe_const_decl.
20508         (emit_move_size): Likewise.  Treat the array as non-const
20509         if adj_nunits.
20510         (emit_mode_adjustments): Handle adj_nunits.
20512 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20514         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20515         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20516         (VECTOR_MODES): Use it.
20517         (make_vector_modes): Take the prefix as an argument.
20519 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20520             Alan Hayward  <alan.hayward@arm.com>
20521             David Sherwood  <david.sherwood@arm.com>
20523         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20524         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20525         for MODE_VECTOR_BOOL.
20526         * machmode.def (VECTOR_BOOL_MODE): Document.
20527         * genmodes.c (VECTOR_BOOL_MODE): New macro.
20528         (make_vector_bool_mode): New function.
20529         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20530         MODE_VECTOR_BOOL.
20531         * lto-streamer-in.c (lto_input_mode_table): Likewise.
20532         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20533         Likewise.
20534         * stor-layout.c (int_mode_for_mode): Likewise.
20535         * tree.c (build_vector_type_for_mode): Likewise.
20536         * varasm.c (output_constant_pool_2): Likewise.
20537         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20538         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
20539         for MODE_VECTOR_BOOL.
20540         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20541         of mode class checks.
20542         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20543         instead of a list of mode class checks.
20544         (expand_vector_scalar_condition): Likewise.
20545         (type_for_widest_vector_mode): Handle BImode as an inner mode.
20547 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20548             Alan Hayward  <alan.hayward@arm.com>
20549             David Sherwood  <david.sherwood@arm.com>
20551         * machmode.h (mode_size): Change from unsigned short to
20552         poly_uint16_pod.
20553         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20554         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20555         or if measurement_type is not polynomial.
20556         (fixed_size_mode::includes_p): Check for constant-sized modes.
20557         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20558         return a poly_uint16 rather than an unsigned short.
20559         (emit_mode_size): Change the type of mode_size from unsigned short
20560         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
20561         (emit_mode_adjustments): Cope with polynomial vector sizes.
20562         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20563         for GET_MODE_SIZE.
20564         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20565         for GET_MODE_SIZE.
20566         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20567         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20568         * caller-save.c (setup_save_areas): Likewise.
20569         (replace_reg_with_saved_mem): Likewise.
20570         * calls.c (emit_library_call_value_1): Likewise.
20571         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20572         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20573         (gen_lowpart_for_combine): Likewise.
20574         * convert.c (convert_to_integer_1): Likewise.
20575         * cse.c (equiv_constant, cse_insn): Likewise.
20576         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20577         (cselib_subst_to_values): Likewise.
20578         * dce.c (word_dce_process_block): Likewise.
20579         * df-problems.c (df_word_lr_mark_ref): Likewise.
20580         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20581         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20582         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20583         (rtl_for_decl_location): Likewise.
20584         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20585         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20586         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20587         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20588         (expand_expr_real_1): Likewise.
20589         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20590         (pad_below): Likewise.
20591         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20592         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20593         * ira.c (get_subreg_tracking_sizes): Likewise.
20594         * ira-build.c (ira_create_allocno_objects): Likewise.
20595         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20596         (ira_sort_regnos_for_alter_reg): Likewise.
20597         * ira-costs.c (record_operand_costs): Likewise.
20598         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20599         (resolve_simple_move): Likewise.
20600         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20601         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20602         (lra_constraints): Likewise.
20603         (CONST_POOL_OK_P): Reject variable-sized modes.
20604         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20605         (add_pseudo_to_slot, lra_spill): Likewise.
20606         * omp-low.c (omp_clause_aligned_alignment): Likewise.
20607         * optabs-query.c (get_best_extraction_insn): Likewise.
20608         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20609         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20610         (expand_mult_highpart, valid_multiword_target_p): Likewise.
20611         * recog.c (offsettable_address_addr_space_p): Likewise.
20612         * regcprop.c (maybe_mode_change): Likewise.
20613         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20614         * regrename.c (build_def_use): Likewise.
20615         * regstat.c (dump_reg_info): Likewise.
20616         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20617         (find_reloads, find_reloads_subreg_address): Likewise.
20618         * reload1.c (eliminate_regs_1): Likewise.
20619         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20620         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20621         (simplify_binary_operation_1, simplify_subreg): Likewise.
20622         * targhooks.c (default_function_arg_padding): Likewise.
20623         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20624         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20625         (verify_gimple_assign_ternary): Likewise.
20626         * tree-inline.c (estimate_move_cost): Likewise.
20627         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20628         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20629         (get_address_cost_ainc): Likewise.
20630         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20631         (vect_supportable_dr_alignment): Likewise.
20632         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20633         (vectorizable_reduction): Likewise.
20634         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20635         (vectorizable_operation, vectorizable_load): Likewise.
20636         * tree.c (build_same_sized_truth_vector_type): Likewise.
20637         * valtrack.c (cleanup_auto_inc_dec): Likewise.
20638         * var-tracking.c (emit_note_insn_var_location): Likewise.
20639         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20640         (ADDR_VEC_ALIGN): Likewise.
20642 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20643             Alan Hayward  <alan.hayward@arm.com>
20644             David Sherwood  <david.sherwood@arm.com>
20646         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20647         unsigned short.
20648         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20649         or if measurement_type is polynomial.
20650         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20651         * combine.c (make_extraction): Likewise.
20652         * dse.c (find_shift_sequence): Likewise.
20653         * dwarf2out.c (mem_loc_descriptor): Likewise.
20654         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20655         (extract_bit_field, extract_low_bits): Likewise.
20656         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20657         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20658         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20659         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20660         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20661         * reload.c (find_reloads): Likewise.
20662         * reload1.c (alter_reg): Likewise.
20663         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20664         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20665         * tree-if-conv.c (predicate_mem_writes): Likewise.
20666         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20667         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20668         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20669         * valtrack.c (dead_debug_insert_temp): Likewise.
20670         * varasm.c (mergeable_constant_section): Likewise.
20671         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20673 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20674             Alan Hayward  <alan.hayward@arm.com>
20675             David Sherwood  <david.sherwood@arm.com>
20677         * expr.c (expand_assignment): Cope with polynomial mode sizes
20678         when assigning to a CONCAT.
20680 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20681             Alan Hayward  <alan.hayward@arm.com>
20682             David Sherwood  <david.sherwood@arm.com>
20684         * machmode.h (mode_precision): Change from unsigned short to
20685         poly_uint16_pod.
20686         (mode_to_precision): Return a poly_uint16 rather than an unsigned
20687         short.
20688         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20689         or if measurement_type is not polynomial.
20690         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
20691         in which the mode is already known to be a scalar_int_mode.
20692         * genmodes.c (emit_mode_precision): Change the type of mode_precision
20693         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
20694         initializer.
20695         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20696         for GET_MODE_PRECISION.
20697         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20698         for GET_MODE_PRECISION.
20699         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20700         as polynomial.
20701         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20702         (expand_field_assignment, make_extraction): Likewise.
20703         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20704         (get_last_value): Likewise.
20705         * convert.c (convert_to_integer_1): Likewise.
20706         * cse.c (cse_insn): Likewise.
20707         * expr.c (expand_expr_real_1): Likewise.
20708         * lra-constraints.c (simplify_operand_subreg): Likewise.
20709         * optabs-query.c (can_atomic_load_p): Likewise.
20710         * optabs.c (expand_atomic_load): Likewise.
20711         (expand_atomic_store): Likewise.
20712         * ree.c (combine_reaching_defs): Likewise.
20713         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20714         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20715         * tree.h (type_has_mode_precision_p): Likewise.
20716         * ubsan.c (instrument_si_overflow): Likewise.
20718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20719             Alan Hayward  <alan.hayward@arm.com>
20720             David Sherwood  <david.sherwood@arm.com>
20722         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20723         polynomial numbers of units.
20724         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20725         (valid_vector_subparts_p): New function.
20726         (build_vector_type): Remove temporary shim and take the number
20727         of units as a poly_uint64 rather than an int.
20728         (build_opaque_vector_type): Take the number of units as a
20729         poly_uint64 rather than an int.
20730         * tree.c (build_vector_from_ctor): Handle polynomial
20731         TYPE_VECTOR_SUBPARTS.
20732         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20733         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20734         (build_vector_from_val): If the number of units is variable,
20735         use build_vec_duplicate_cst for constant operands and
20736         VEC_DUPLICATE_EXPR otherwise.
20737         (make_vector_type): Remove temporary is_constant ().
20738         (build_vector_type, build_opaque_vector_type): Take the number of
20739         units as a poly_uint64 rather than an int.
20740         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20741         VECTOR_CST_NELTS.
20742         * cfgexpand.c (expand_debug_expr): Likewise.
20743         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20744         (store_constructor, expand_expr_real_1): Likewise.
20745         (const_scalar_mask_from_tree): Likewise.
20746         * fold-const-call.c (fold_const_reduction): Likewise.
20747         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20748         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20749         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20750         (fold_relational_const): Likewise.
20751         (native_interpret_vector): Likewise.  Change the size from an
20752         int to an unsigned int.
20753         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20754         TYPE_VECTOR_SUBPARTS.
20755         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20756         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20757         duplicating a non-constant operand into a variable-length vector.
20758         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20759         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20760         * ipa-icf.c (sem_variable::equals): Likewise.
20761         * match.pd: Likewise.
20762         * omp-simd-clone.c (simd_clone_subparts): Likewise.
20763         * print-tree.c (print_node): Likewise.
20764         * stor-layout.c (layout_type): Likewise.
20765         * targhooks.c (default_builtin_vectorization_cost): Likewise.
20766         * tree-cfg.c (verify_gimple_comparison): Likewise.
20767         (verify_gimple_assign_binary): Likewise.
20768         (verify_gimple_assign_ternary): Likewise.
20769         (verify_gimple_assign_single): Likewise.
20770         * tree-pretty-print.c (dump_generic_node): Likewise.
20771         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20772         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20773         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20774         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20775         (vect_shift_permute_load_chain): Likewise.
20776         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20777         (expand_vector_condition, optimize_vector_constructor): Likewise.
20778         (lower_vec_perm, get_compute_type): Likewise.
20779         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20780         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20781         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20782         (vect_recog_mask_conversion_pattern): Likewise.
20783         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20784         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20785         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20786         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20787         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20788         (vectorizable_shift, vectorizable_operation, vectorizable_store)
20789         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20790         (supportable_widening_operation): Likewise.
20791         (supportable_narrowing_operation): Likewise.
20792         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20793         Likewise.
20794         * varasm.c (output_constant): Likewise.
20796 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20797             Alan Hayward  <alan.hayward@arm.com>
20798             David Sherwood  <david.sherwood@arm.com>
20800         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20801         so that both the length == 3 and length != 3 cases set up their
20802         own permute vectors.  Add comments explaining why we know the
20803         number of elements is constant.
20804         (vect_permute_load_chain): Likewise.
20806 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20807             Alan Hayward  <alan.hayward@arm.com>
20808             David Sherwood  <david.sherwood@arm.com>
20810         * machmode.h (mode_nunits): Change from unsigned char to
20811         poly_uint16_pod.
20812         (ONLY_FIXED_SIZE_MODES): New macro.
20813         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20814         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20815         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20816         New typedefs.
20817         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20818         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20819         or if measurement_type is not polynomial.
20820         * genmodes.c (ZERO_COEFFS): New macro.
20821         (emit_mode_nunits_inline): Make mode_nunits_inline return a
20822         poly_uint16.
20823         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20824         Use ZERO_COEFFS when emitting initializers.
20825         * data-streamer.h (bp_pack_poly_value): New function.
20826         (bp_unpack_poly_value): Likewise.
20827         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20828         for GET_MODE_NUNITS.
20829         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20830         for GET_MODE_NUNITS.
20831         * tree.c (make_vector_type): Remove temporary shim and make
20832         the real function take the number of units as a poly_uint64
20833         rather than an int.
20834         (build_vector_type_for_mode): Handle polynomial nunits.
20835         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20836         * emit-rtl.c (const_vec_series_p_1): Likewise.
20837         (gen_rtx_CONST_VECTOR): Likewise.
20838         * fold-const.c (test_vec_duplicate_folding): Likewise.
20839         * genrecog.c (validate_pattern): Likewise.
20840         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20841         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20842         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20843         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20844         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20845         * rtlanal.c (subreg_get_info): Likewise.
20846         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20847         (vect_grouped_load_supported): Likewise.
20848         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20849         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20850         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20851         (simplify_const_unary_operation, simplify_binary_operation_1)
20852         (simplify_const_binary_operation, simplify_ternary_operation)
20853         (test_vector_ops_duplicate, test_vector_ops): Likewise.
20854         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20855         instead of CONST_VECTOR_NUNITS.
20856         * varasm.c (output_constant_pool_2): Likewise.
20857         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20858         explicit-encoded elements in the XVEC for variable-length vectors.
20860 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20862         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20864 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20865             Alan Hayward  <alan.hayward@arm.com>
20866             David Sherwood  <david.sherwood@arm.com>
20868         * coretypes.h (fixed_size_mode): Declare.
20869         (fixed_size_mode_pod): New typedef.
20870         * builtins.h (target_builtins::x_apply_args_mode)
20871         (target_builtins::x_apply_result_mode): Change type to
20872         fixed_size_mode_pod.
20873         * builtins.c (apply_args_size, apply_result_size, result_vector)
20874         (expand_builtin_apply_args_1, expand_builtin_apply)
20875         (expand_builtin_return): Update accordingly.
20877 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20879         * cse.c (hash_rtx_cb): Hash only the encoded elements.
20880         * cselib.c (cselib_hash_rtx): Likewise.
20881         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20882         CONST_VECTOR encoding.
20884 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20885             Jeff Law  <law@redhat.com>
20887         PR target/83641
20888         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20889         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20890         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20891         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20893         PR target/83641
20894         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20895         explicitly probe *sp in a noreturn function if there were any callee
20896         register saves or frame pointer is needed.
20898 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20900         PR debug/83621
20901         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20902         BLKmode for ternary, binary or unary expressions.
20904         PR debug/83645
20905         * var-tracking.c (delete_vta_debug_insn): New inline function.
20906         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20907         insns from get_insns () to NULL instead of each bb separately.
20908         Use delete_vta_debug_insn.  No longer static.
20909         (vt_debug_insns_local, variable_tracking_main_1): Adjust
20910         delete_vta_debug_insns callers.
20911         * rtl.h (delete_vta_debug_insns): Declare.
20912         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20913         instead of variable_tracking_main.
20915 2018-01-03  Martin Sebor  <msebor@redhat.com>
20917         PR tree-optimization/83603
20918         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20919         arguments past the endof the argument list in functions declared
20920         without a prototype.
20921         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20922         Avoid checking when arguments are null.
20924 2018-01-03  Martin Sebor  <msebor@redhat.com>
20926         PR c/83559
20927         * doc/extend.texi (attribute const): Fix a typo.
20928         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20929         issuing -Wsuggest-attribute for void functions.
20931 2018-01-03  Martin Sebor  <msebor@redhat.com>
20933         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20934         offset_int::from instead of wide_int::to_shwi.
20935         (maybe_diag_overlap): Remove assertion.
20936         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20937         * gimple-ssa-sprintf.c (format_directive): Same.
20938         (parse_directive): Same.
20939         (sprintf_dom_walker::compute_format_length): Same.
20940         (try_substitute_return_value): Same.
20942 2018-01-03  Jeff Law  <law@redhat.com>
20944         PR middle-end/83654
20945         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20946         non-constant residual for zero at runtime and avoid probing in
20947         that case.  Reorganize code for trailing problem to mirror handling
20948         of the residual.
20950 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20952         PR tree-optimization/83501
20953         * tree-ssa-strlen.c (get_string_cst): New.
20954         (handle_char_store): Call get_string_cst.
20956 2018-01-03  Martin Liska  <mliska@suse.cz>
20958         PR tree-optimization/83593
20959         * tree-ssa-strlen.c: Include tree-cfg.h.
20960         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20961         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20962         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20963         to false.
20964         (strlen_dom_walker::before_dom_children): Call
20965         gimple_purge_dead_eh_edges. Dump tranformation with details
20966         dump flags.
20967         (strlen_dom_walker::before_dom_children): Update call by adding
20968         new argument cleanup_eh.
20969         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20971 2018-01-03  Martin Liska  <mliska@suse.cz>
20973         PR ipa/83549
20974         * cif-code.def (VARIADIC_THUNK): New enum value.
20975         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20976         thunks.
20978 2018-01-03  Jan Beulich  <jbeulich@suse.com>
20980         * sse.md (mov<mode>_internal): Tighten condition for when to use
20981         vmovdqu<ssescalarsize> for TI and OI modes.
20983 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20985         Update copyright years.
20987 2018-01-03  Martin Liska  <mliska@suse.cz>
20989         PR ipa/83594
20990         * ipa-visibility.c (function_and_variable_visibility): Skip
20991         functions with noipa attribure.
20993 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20995         * gcc.c (process_command): Update copyright notice dates.
20996         * gcov-dump.c (print_version): Ditto.
20997         * gcov.c (print_version): Ditto.
20998         * gcov-tool.c (print_version): Ditto.
20999         * gengtype.c (create_file): Ditto.
21000         * doc/cpp.texi: Bump @copying's copyright year.
21001         * doc/cppinternals.texi: Ditto.
21002         * doc/gcc.texi: Ditto.
21003         * doc/gccint.texi: Ditto.
21004         * doc/gcov.texi: Ditto.
21005         * doc/install.texi: Ditto.
21006         * doc/invoke.texi: Ditto.
21008 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21010         * vector-builder.h (vector_builder::m_full_nelts): Change from
21011         unsigned int to poly_uint64.
21012         (vector_builder::full_nelts): Update prototype accordingly.
21013         (vector_builder::new_vector): Likewise.
21014         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21015         (vector_builder::operator ==): Likewise.
21016         (vector_builder::finalize): Likewise.
21017         * int-vector-builder.h (int_vector_builder::int_vector_builder):
21018         Take the number of elements as a poly_uint64 rather than an
21019         unsigned int.
21020         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21021         from unsigned int to poly_uint64.
21022         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21023         (vec_perm_indices::new_vector): Likewise.
21024         (vec_perm_indices::length): Likewise.
21025         (vec_perm_indices::nelts_per_input): Likewise.
21026         (vec_perm_indices::input_nelts): Likewise.
21027         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21028         number of elements per input as a poly_uint64 rather than an
21029         unsigned int.  Use the original encoding for variable-length
21030         vectors, rather than clamping each individual element.
21031         For the second and subsequent elements in each pattern,
21032         clamp the step and base before clamping their sum.
21033         (vec_perm_indices::series_p): Handle polynomial element counts.
21034         (vec_perm_indices::all_in_range_p): Likewise.
21035         (vec_perm_indices_to_tree): Likewise.
21036         (vec_perm_indices_to_rtx): Likewise.
21037         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21038         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21039         (tree_vector_builder::new_binary_operation): Handle polynomial
21040         element counts.  Return false if we need to know the number
21041         of elements at compile time.
21042         * fold-const.c (fold_vec_perm): Punt if the number of elements
21043         isn't known at compile time.
21045 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21047         * vec-perm-indices.h (vec_perm_builder): Change element type
21048         from HOST_WIDE_INT to poly_int64.
21049         (vec_perm_indices::element_type): Update accordingly.
21050         (vec_perm_indices::clamp): Handle polynomial element_types.
21051         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21052         (vec_perm_indices::all_in_range_p): Likewise.
21053         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21054         than shwi trees.
21055         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21056         polynomial vec_perm_indices element types.
21057         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21058         * fold-const.c (fold_vec_perm): Likewise.
21059         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21060         * tree-vect-generic.c (lower_vec_perm): Likewise.
21061         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21062         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21063         element type to HOST_WIDE_INT.
21065 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21066             Alan Hayward  <alan.hayward@arm.com>
21067             David Sherwood  <david.sherwood@arm.com>
21069         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21070         rather than an int.  Use plus_constant.
21071         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21072         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21074 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21075             Alan Hayward  <alan.hayward@arm.com>
21076             David Sherwood  <david.sherwood@arm.com>
21078         * calls.c (emit_call_1, expand_call): Change struct_value_size from
21079         a HOST_WIDE_INT to a poly_int64.
21081 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21082             Alan Hayward  <alan.hayward@arm.com>
21083             David Sherwood  <david.sherwood@arm.com>
21085         * calls.c (load_register_parameters): Cope with polynomial
21086         mode sizes.  Require a constant size for BLKmode parameters
21087         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
21088         forces a parameter to be padded at the lsb end in order to
21089         fill a complete number of words, require the parameter size
21090         to be ordered wrt UNITS_PER_WORD.
21092 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21093             Alan Hayward  <alan.hayward@arm.com>
21094             David Sherwood  <david.sherwood@arm.com>
21096         * reload1.c (spill_stack_slot_width): Change element type
21097         from unsigned int to poly_uint64_pod.
21098         (alter_reg): Treat mode sizes as polynomial.
21100 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21101             Alan Hayward  <alan.hayward@arm.com>
21102             David Sherwood  <david.sherwood@arm.com>
21104         * reload.c (complex_word_subreg_p): New function.
21105         (reload_inner_reg_of_subreg, push_reload): Use it.
21107 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21108             Alan Hayward  <alan.hayward@arm.com>
21109             David Sherwood  <david.sherwood@arm.com>
21111         * lra-constraints.c (process_alt_operands): Reject matched
21112         operands whose sizes aren't ordered.
21113         (match_reload): Refer to this check here.
21115 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21116             Alan Hayward  <alan.hayward@arm.com>
21117             David Sherwood  <david.sherwood@arm.com>
21119         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21120         that the mode size is in the set {1, 2, 4, 8, 16}.
21122 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21123             Alan Hayward  <alan.hayward@arm.com>
21124             David Sherwood  <david.sherwood@arm.com>
21126         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21127         Use plus_constant instead of gen_rtx_PLUS.
21129 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21130             Alan Hayward  <alan.hayward@arm.com>
21131             David Sherwood  <david.sherwood@arm.com>
21133         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21134         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21135         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21136         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21137         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21138         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21139         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21140         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21141         * config/i386/i386.c (ix86_push_rounding): ...this new function.
21142         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21143         a poly_int64.
21144         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21145         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21146         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21147         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21148         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21149         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21150         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21151         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21152         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21153         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21154         function.
21155         * expr.c (emit_move_resolve_push): Treat the input and result
21156         of PUSH_ROUNDING as a poly_int64.
21157         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21158         (emit_push_insn): Likewise.
21159         * lra-eliminations.c (mark_not_eliminable): Likewise.
21160         * recog.c (push_operand): Likewise.
21161         * reload1.c (elimination_effects): Likewise.
21162         * rtlanal.c (nonzero_bits1): Likewise.
21163         * calls.c (store_one_arg): Likewise.  Require the padding to be
21164         known at compile time.
21166 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21167             Alan Hayward  <alan.hayward@arm.com>
21168             David Sherwood  <david.sherwood@arm.com>
21170         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21171         Use plus_constant instead of gen_rtx_PLUS.
21173 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21174             Alan Hayward  <alan.hayward@arm.com>
21175             David Sherwood  <david.sherwood@arm.com>
21177         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21178         rather than an int.
21180 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21181             Alan Hayward  <alan.hayward@arm.com>
21182             David Sherwood  <david.sherwood@arm.com>
21184         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21185         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21186         via stack temporaries.  Treat the mode size as polynomial too.
21188 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21189             Alan Hayward  <alan.hayward@arm.com>
21190             David Sherwood  <david.sherwood@arm.com>
21192         * expr.c (expand_expr_real_2): When handling conversions involving
21193         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21194         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
21195         as a poly_uint64 too.
21197 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21198             Alan Hayward  <alan.hayward@arm.com>
21199             David Sherwood  <david.sherwood@arm.com>
21201         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21203 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21204             Alan Hayward  <alan.hayward@arm.com>
21205             David Sherwood  <david.sherwood@arm.com>
21207         * combine.c (can_change_dest_mode): Handle polynomial
21208         REGMODE_NATURAL_SIZE.
21209         * expmed.c (store_bit_field_1): Likewise.
21210         * expr.c (store_constructor): Likewise.
21211         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21212         and polynomial REGMODE_NATURAL_SIZE.
21213         (gen_lowpart_common): Likewise.
21214         * reginfo.c (record_subregs_of_mode): Likewise.
21215         * rtlanal.c (read_modify_subreg_p): Likewise.
21217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21218             Alan Hayward  <alan.hayward@arm.com>
21219             David Sherwood  <david.sherwood@arm.com>
21221         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21222         numbers of elements.
21224 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21225             Alan Hayward  <alan.hayward@arm.com>
21226             David Sherwood  <david.sherwood@arm.com>
21228         * match.pd: Cope with polynomial numbers of vector elements.
21230 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21231             Alan Hayward  <alan.hayward@arm.com>
21232             David Sherwood  <david.sherwood@arm.com>
21234         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21235         in a POINTER_PLUS_EXPR.
21237 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21238             Alan Hayward  <alan.hayward@arm.com>
21239             David Sherwood  <david.sherwood@arm.com>
21241         * omp-simd-clone.c (simd_clone_subparts): New function.
21242         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21243         (ipa_simd_modify_function_body): Likewise.
21245 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21246             Alan Hayward  <alan.hayward@arm.com>
21247             David Sherwood  <david.sherwood@arm.com>
21249         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21250         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21251         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21252         (expand_vector_condition, vector_element): Likewise.
21253         (subparts_gt): New function.
21254         (get_compute_type): Use subparts_gt.
21255         (count_type_subparts): Delete.
21256         (expand_vector_operations_1): Use subparts_gt instead of
21257         count_type_subparts.
21259 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21260             Alan Hayward  <alan.hayward@arm.com>
21261             David Sherwood  <david.sherwood@arm.com>
21263         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21264         (vect_compile_time_alias): ...this new function.  Do the calculation
21265         on poly_ints rather than trees.
21266         (vect_prune_runtime_alias_test_list): Update call accordingly.
21268 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21269             Alan Hayward  <alan.hayward@arm.com>
21270             David Sherwood  <david.sherwood@arm.com>
21272         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21273         numbers of units.
21274         (vect_schedule_slp_instance): Likewise.
21276 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21277             Alan Hayward  <alan.hayward@arm.com>
21278             David Sherwood  <david.sherwood@arm.com>
21280         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21281         constant and extern definitions for variable-length vectors.
21282         (vect_get_constant_vectors): Note that the number of units
21283         is known to be constant.
21285 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21286             Alan Hayward  <alan.hayward@arm.com>
21287             David Sherwood  <david.sherwood@arm.com>
21289         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21290         of units as polynomial.  Choose between WIDE and NARROW based
21291         on multiple_p.
21293 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21294             Alan Hayward  <alan.hayward@arm.com>
21295             David Sherwood  <david.sherwood@arm.com>
21297         * tree-vect-stmts.c (simd_clone_subparts): New function.
21298         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21300 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21301             Alan Hayward  <alan.hayward@arm.com>
21302             David Sherwood  <david.sherwood@arm.com>
21304         * tree-vect-stmts.c (vectorizable_call): Treat the number of
21305         vectors as polynomial.  Use build_index_vector for
21306         IFN_GOMP_SIMD_LANE.
21308 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21309             Alan Hayward  <alan.hayward@arm.com>
21310             David Sherwood  <david.sherwood@arm.com>
21312         * tree-vect-stmts.c (get_load_store_type): Treat the number of
21313         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21314         for variable-length vectors.
21315         (vectorizable_mask_load_store): Treat the number of units as
21316         polynomial, asserting that it is constant if the condition has
21317         already been enforced.
21318         (vectorizable_store, vectorizable_load): Likewise.
21320 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21321             Alan Hayward  <alan.hayward@arm.com>
21322             David Sherwood  <david.sherwood@arm.com>
21324         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21325         of units as polynomial.  Punt if we can't tell at compile time
21326         which vector contains the final result.
21328 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21329             Alan Hayward  <alan.hayward@arm.com>
21330             David Sherwood  <david.sherwood@arm.com>
21332         * tree-vect-loop.c (vectorizable_induction): Treat the number
21333         of units as polynomial.  Punt on SLP inductions.  Use an integer
21334         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
21335         cast of such a series for variable-length floating-point
21336         reductions.
21338 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21339             Alan Hayward  <alan.hayward@arm.com>
21340             David Sherwood  <david.sherwood@arm.com>
21342         * tree.h (build_index_vector): Declare.
21343         * tree.c (build_index_vector): New function.
21344         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21345         of units as polynomial, forcibly converting it to a constant if
21346         vectorizable_reduction has already enforced the condition.
21347         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
21348         to create a {1,2,3,...} vector.
21349         (vectorizable_reduction): Treat the number of units as polynomial.
21350         Choose vectype_in based on the largest scalar element size rather
21351         than the smallest number of units.  Enforce the restrictions
21352         relied on above.
21354 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21355             Alan Hayward  <alan.hayward@arm.com>
21356             David Sherwood  <david.sherwood@arm.com>
21358         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21359         number of units as polynomial.
21361 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21362             Alan Hayward  <alan.hayward@arm.com>
21363             David Sherwood  <david.sherwood@arm.com>
21365         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21366         * target.def (autovectorize_vector_sizes): Return the vector sizes
21367         by pointer, using vector_sizes rather than a bitmask.
21368         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21369         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21370         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21371         Likewise.
21372         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21373         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21374         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21375         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21376         * omp-general.c (omp_max_vf): Likewise.
21377         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21378         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21379         * tree-vect-loop.c (vect_analyze_loop): Likewise.
21380         * tree-vect-slp.c (vect_slp_bb): Likewise.
21381         * doc/tm.texi: Regenerate.
21382         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21383         to a poly_uint64.
21384         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21385         the vector size as a poly_uint64 rather than an unsigned int.
21386         (current_vector_size): Change from an unsigned int to a poly_uint64.
21387         (get_vectype_for_scalar_type): Update accordingly.
21388         * tree.h (build_truth_vector_type): Take the size and number of
21389         units as a poly_uint64 rather than an unsigned int.
21390         (build_vector_type): Add a temporary overload that takes
21391         the number of units as a poly_uint64 rather than an unsigned int.
21392         * tree.c (make_vector_type): Likewise.
21393         (build_truth_vector_type): Take the number of units as a poly_uint64
21394         rather than an unsigned int.
21396 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21397             Alan Hayward  <alan.hayward@arm.com>
21398             David Sherwood  <david.sherwood@arm.com>
21400         * target.def (get_mask_mode): Take the number of units and length
21401         as poly_uint64s rather than unsigned ints.
21402         * targhooks.h (default_get_mask_mode): Update accordingly.
21403         * targhooks.c (default_get_mask_mode): Likewise.
21404         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21405         * doc/tm.texi: Regenerate.
21407 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21408             Alan Hayward  <alan.hayward@arm.com>
21409             David Sherwood  <david.sherwood@arm.com>
21411         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21412         * omp-general.c (omp_max_vf): Likewise.
21413         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21414         (expand_omp_simd): Handle polynomial safelen.
21415         * omp-low.c (omplow_simd_context): Add a default constructor.
21416         (omplow_simd_context::max_vf): Change from int to poly_uint64.
21417         (lower_rec_simd_input_clauses): Update accordingly.
21418         (lower_rec_input_clauses): Likewise.
21420 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21421             Alan Hayward  <alan.hayward@arm.com>
21422             David Sherwood  <david.sherwood@arm.com>
21424         * tree-vectorizer.h (vect_nunits_for_cost): New function.
21425         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21426         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21427         (vect_analyze_slp_cost): Likewise.
21428         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21429         (vect_model_load_cost): Likewise.
21431 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21432             Alan Hayward  <alan.hayward@arm.com>
21433             David Sherwood  <david.sherwood@arm.com>
21435         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21436         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21437         from an unsigned int * to a poly_uint64_pod *.
21438         (calculate_unrolling_factor): New function.
21439         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
21441 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21442             Alan Hayward  <alan.hayward@arm.com>
21443             David Sherwood  <david.sherwood@arm.com>
21445         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21446         from an unsigned int to a poly_uint64.
21447         (_loop_vec_info::slp_unrolling_factor): Likewise.
21448         (_loop_vec_info::vectorization_factor): Change from an int
21449         to a poly_uint64.
21450         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21451         (vect_get_num_vectors): New function.
21452         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21453         (vect_get_num_copies): Use vect_get_num_vectors.
21454         (vect_analyze_data_ref_dependences): Change max_vf from an int *
21455         to an unsigned int *.
21456         (vect_analyze_data_refs): Change min_vf from an int * to a
21457         poly_uint64 *.
21458         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21459         than an unsigned HOST_WIDE_INT.
21460         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21461         (vect_analyze_data_ref_dependence): Change max_vf from an int *
21462         to an unsigned int *.
21463         (vect_analyze_data_ref_dependences): Likewise.
21464         (vect_compute_data_ref_alignment): Handle polynomial vf.
21465         (vect_enhance_data_refs_alignment): Likewise.
21466         (vect_prune_runtime_alias_test_list): Likewise.
21467         (vect_shift_permute_load_chain): Likewise.
21468         (vect_supportable_dr_alignment): Likewise.
21469         (dependence_distance_ge_vf): Take the vectorization factor as a
21470         poly_uint64 rather than an unsigned HOST_WIDE_INT.
21471         (vect_analyze_data_refs): Change min_vf from an int * to a
21472         poly_uint64 *.
21473         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21474         vfm1 as a poly_uint64 rather than an int.  Make the same change
21475         for the returned bound_scalar.
21476         (vect_gen_vector_loop_niters): Handle polynomial vf.
21477         (vect_do_peeling): Likewise.  Update call to
21478         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21479         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21480         be constant.
21481         * tree-vect-loop.c (vect_determine_vectorization_factor)
21482         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21483         (vect_get_known_peeling_cost): Likewise.
21484         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21485         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21486         (vect_transform_loop): Likewise.  Use the lowest possible VF when
21487         updating the upper bounds of the loop.
21488         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
21489         rather than an int.
21490         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21491         polynomial unroll factors.
21492         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21493         (vect_make_slp_decision): Likewise.
21494         (vect_supported_load_permutation_p): Likewise, and polynomial
21495         vf too.
21496         (vect_analyze_slp_cost): Handle polynomial vf.
21497         (vect_slp_analyze_node_operations): Likewise.
21498         (vect_slp_analyze_bb_1): Likewise.
21499         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21500         than an unsigned HOST_WIDE_INT.
21501         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21502         (vectorizable_load): Handle polynomial vf.
21503         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21504         a poly_uint64.
21505         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21507 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21508             Alan Hayward  <alan.hayward@arm.com>
21509             David Sherwood  <david.sherwood@arm.com>
21511         * match.pd: Handle bit operations involving three constants
21512         and try to fold one pair.
21514 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21516         * tree-vect-loop-manip.c: Include gimple-fold.h.
21517         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21518         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
21519         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21520         Add a path that uses a step of VF instead of 1, but disable it
21521         for now.
21522         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21523         and niters_no_overflow parameters.  Update calls to
21524         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21525         Create a new SSA name if the latter choses to use a ste other
21526         than zero, and return it via niters_vector_mult_vf_var.
21527         * tree-vect-loop.c (vect_transform_loop): Update calls to
21528         vect_do_peeling, vect_gen_vector_loop_niters and
21529         slpeel_make_loop_iterate_ntimes.
21530         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21531         (vect_gen_vector_loop_niters): Update declarations after above changes.
21533 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
21535         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21536         128-bit round to integer instructions.
21537         (ceil<mode>2): Likewise.
21538         (btrunc<mode>2): Likewise.
21539         (round<mode>2): Likewise.
21541 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21543         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21544         unaligned VSX load/store on P8/P9.
21545         (expand_block_clear): Allow the use of unaligned VSX
21546         load/store on P8/P9.
21548 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21550         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21551         New function.
21552         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21553         swap associated with both a load and a store.
21555 2018-01-02  Andrew Waterman  <andrew@sifive.com>
21557         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21558         * config/riscv/riscv.md (clear_cache): Use it.
21560 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
21562         * web.c: Remove out-of-date comment.
21564 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21566         * expr.c (fixup_args_size_notes): Check that any existing
21567         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21568         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21569         (emit_single_push_insn): ...here.
21571 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21573         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21574         (const_vector_encoded_nelts): New function.
21575         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21576         (const_vector_int_elt, const_vector_elt): Declare.
21577         * emit-rtl.c (const_vector_int_elt_1): New function.
21578         (const_vector_elt): Likewise.
21579         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21580         of CONST_VECTOR_ELT.
21582 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21584         * expr.c: Include rtx-vector-builder.h.
21585         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21586         directly on the tree encoding.
21587         (const_vector_from_tree): Likewise.
21588         * optabs.c: Include rtx-vector-builder.h.
21589         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21590         sequence of "u" values.
21591         * vec-perm-indices.c: Include rtx-vector-builder.h.
21592         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21593         directly on the vec_perm_indices encoding.
21595 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21597         * doc/rtl.texi (const_vector): Describe new encoding scheme.
21598         * Makefile.in (OBJS): Add rtx-vector-builder.o.
21599         * rtx-vector-builder.h: New file.
21600         * rtx-vector-builder.c: Likewise.
21601         * rtl.h (rtx_def::u2): Add a const_vector field.
21602         (CONST_VECTOR_NPATTERNS): New macro.
21603         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21604         (CONST_VECTOR_DUPLICATE_P): Likewise.
21605         (CONST_VECTOR_STEPPED_P): Likewise.
21606         (CONST_VECTOR_ENCODED_ELT): Likewise.
21607         (const_vec_duplicate_p): Check for a duplicated vector encoding.
21608         (unwrap_const_vec_duplicate): Likewise.
21609         (const_vec_series_p): Check for a non-duplicated vector encoding.
21610         Say that the function only returns true for integer vectors.
21611         * emit-rtl.c: Include rtx-vector-builder.h.
21612         (gen_const_vec_duplicate_1): Delete.
21613         (gen_const_vector): Call gen_const_vec_duplicate instead of
21614         gen_const_vec_duplicate_1.
21615         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21616         (gen_const_vec_duplicate): Use rtx_vector_builder.
21617         (gen_const_vec_series): Likewise.
21618         (gen_rtx_CONST_VECTOR): Likewise.
21619         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21620         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21621         Build a new vector rather than modifying a CONST_VECTOR in-place.
21622         (handle_special_swappables): Update call accordingly.
21623         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21624         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21625         Build a new vector rather than modifying a CONST_VECTOR in-place.
21626         (handle_special_swappables): Update call accordingly.
21628 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21630         * simplify-rtx.c (simplify_const_binary_operation): Use
21631         CONST_VECTOR_ELT instead of XVECEXP.
21633 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21635         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21636         the selector elements to be different from the data elements
21637         if the selector is a VECTOR_CST.
21638         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21639         ssizetype for the selector.
21641 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21643         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21644         before testing each element individually.
21645         * tree-vect-generic.c (lower_vec_perm): Likewise.
21647 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21649         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21650         * selftest-run-tests.c (selftest::run_tests): Call it.
21651         * vector-builder.h (vector_builder::operator ==): New function.
21652         (vector_builder::operator !=): Likewise.
21653         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21654         (vec_perm_indices::all_from_input_p): New function.
21655         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21656         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21657         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21658         instead of reading the VECTOR_CST directly.  Detect whether both
21659         vector inputs are the same before constructing the vec_perm_indices,
21660         and update the number of inputs argument accordingly.  Use the
21661         utility functions added above.  Only construct sel2 if we need to.
21663 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21665         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21666         the broadcast of the low byte.
21667         (expand_mult_highpart): Use an explicit encoding for the permutes.
21668         * optabs-query.c (can_mult_highpart_p): Likewise.
21669         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21670         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21671         (vectorizable_bswap): Likewise.
21672         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21673         explicit encoding for the power-of-2 permutes.
21674         (vect_permute_store_chain): Likewise.
21675         (vect_grouped_load_supported): Likewise.
21676         (vect_permute_load_chain): Likewise.
21678 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21680         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21681         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21682         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21683         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21684         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21685         (vect_gen_perm_mask_any): Likewise.
21687 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21689         * int-vector-builder.h: New file.
21690         * vec-perm-indices.h: Include int-vector-builder.h.
21691         (vec_perm_indices): Redefine as an int_vector_builder.
21692         (auto_vec_perm_indices): Delete.
21693         (vec_perm_builder): Redefine as a stand-alone class.
21694         (vec_perm_indices::vec_perm_indices): New function.
21695         (vec_perm_indices::clamp): Likewise.
21696         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21697         (vec_perm_indices::new_vector): New function.
21698         (vec_perm_indices::new_expanded_vector): Update for new
21699         vec_perm_indices class.
21700         (vec_perm_indices::rotate_inputs): New function.
21701         (vec_perm_indices::all_in_range_p): Operate directly on the
21702         encoded form, without computing elided elements.
21703         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21704         encoding.  Update for new vec_perm_indices class.
21705         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21706         the given vec_perm_builder.
21707         (expand_vec_perm_var): Update vec_perm_builder constructor.
21708         (expand_mult_highpart): Use vec_perm_builder instead of
21709         auto_vec_perm_indices.
21710         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21711         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
21712         or double series encoding as appropriate.
21713         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21714         vec_perm_indices instead of auto_vec_perm_indices.
21715         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21716         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21717         (vect_permute_store_chain): Likewise.
21718         (vect_grouped_load_supported): Likewise.
21719         (vect_permute_load_chain): Likewise.
21720         (vect_shift_permute_load_chain): Likewise.
21721         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21722         (vect_transform_slp_perm_load): Likewise.
21723         (vect_schedule_slp_instance): Likewise.
21724         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21725         (vectorizable_mask_load_store): Likewise.
21726         (vectorizable_bswap): Likewise.
21727         (vectorizable_store): Likewise.
21728         (vectorizable_load): Likewise.
21729         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21730         vec_perm_indices instead of auto_vec_perm_indices.  Use
21731         tree_to_vec_perm_builder to read the vector from a tree.
21732         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21733         vec_perm_builder instead of a vec_perm_indices.
21734         (have_whole_vector_shift): Use vec_perm_builder and
21735         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
21736         truncation to calc_vec_perm_mask_for_shift.
21737         (vect_create_epilog_for_reduction): Likewise.
21738         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21739         from auto_vec_perm_indices to vec_perm_indices.
21740         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21741         instead of changing individual elements.
21742         (aarch64_vectorize_vec_perm_const): Use new_vector to install
21743         the vector in d.perm.
21744         * config/arm/arm.c (expand_vec_perm_d::perm): Change
21745         from auto_vec_perm_indices to vec_perm_indices.
21746         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21747         instead of changing individual elements.
21748         (arm_vectorize_vec_perm_const): Use new_vector to install
21749         the vector in d.perm.
21750         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21751         Update vec_perm_builder constructor.
21752         (rs6000_expand_interleave): Likewise.
21753         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21754         (rs6000_expand_interleave): Likewise.
21756 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21758         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21759         to qimode could truncate the indices.
21760         * optabs.c (expand_vec_perm_var): Likewise.
21762 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21764         * Makefile.in (OBJS): Add vec-perm-indices.o.
21765         * vec-perm-indices.h: New file.
21766         * vec-perm-indices.c: Likewise.
21767         * target.h (vec_perm_indices): Replace with a forward class
21768         declaration.
21769         (auto_vec_perm_indices): Move to vec-perm-indices.h.
21770         * optabs.h: Include vec-perm-indices.h.
21771         (expand_vec_perm): Delete.
21772         (selector_fits_mode_p, expand_vec_perm_var): Declare.
21773         (expand_vec_perm_const): Declare.
21774         * target.def (vec_perm_const_ok): Replace with...
21775         (vec_perm_const): ...this new hook.
21776         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21777         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21778         * doc/tm.texi: Regenerate.
21779         * optabs.def (vec_perm_const): Delete.
21780         * doc/md.texi (vec_perm_const): Likewise.
21781         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21782         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21783         expand_vec_perm for constant permutation vectors.  Assert that
21784         the mode of variable permutation vectors is the integer equivalent
21785         of the mode that is being permuted.
21786         * optabs-query.h (selector_fits_mode_p): Declare.
21787         * optabs-query.c: Include vec-perm-indices.h.
21788         (selector_fits_mode_p): New function.
21789         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21790         is defined, instead of checking whether the vec_perm_const_optab
21791         exists.  Use targetm.vectorize.vec_perm_const instead of
21792         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
21793         fit in the vector mode before using a variable permute.
21794         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21795         vec_perm_indices instead of an rtx.
21796         (expand_vec_perm): Replace with...
21797         (expand_vec_perm_const): ...this new function.  Take the selector
21798         as a vec_perm_indices rather than an rtx.  Also take the mode of
21799         the selector.  Update call to shift_amt_for_vec_perm_mask.
21800         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21801         Use vec_perm_indices::new_expanded_vector to expand the original
21802         selector into bytes.  Check whether the indices fit in the vector
21803         mode before using a variable permute.
21804         (expand_vec_perm_var): Make global.
21805         (expand_mult_highpart): Use expand_vec_perm_const.
21806         * fold-const.c: Includes vec-perm-indices.h.
21807         * tree-ssa-forwprop.c: Likewise.
21808         * tree-vect-data-refs.c: Likewise.
21809         * tree-vect-generic.c: Likewise.
21810         * tree-vect-loop.c: Likewise.
21811         * tree-vect-slp.c: Likewise.
21812         * tree-vect-stmts.c: Likewise.
21813         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21814         Delete.
21815         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21816         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21817         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21818         (aarch64_vectorize_vec_perm_const): ...this new function.
21819         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21820         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21821         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21822         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21823         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21824         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21825         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21826         into...
21827         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
21828         check for NEON modes.
21829         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21830         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21831         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21832         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21833         into...
21834         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
21835         the old VEC_PERM_CONST conditions.
21836         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21837         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21838         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21839         (ia64_vectorize_vec_perm_const_ok): Merge into...
21840         (ia64_vectorize_vec_perm_const): ...this new function.
21841         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21842         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21843         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21844         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21845         * config/mips/mips.c (mips_expand_vec_perm_const)
21846         (mips_vectorize_vec_perm_const_ok): Merge into...
21847         (mips_vectorize_vec_perm_const): ...this new function.
21848         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21849         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21850         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21851         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21852         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21853         (rs6000_expand_vec_perm_const): Delete.
21854         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21855         Delete.
21856         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21857         (altivec_expand_vec_perm_const_le): Take each operand individually.
21858         Operate on constant selectors rather than rtxes.
21859         (altivec_expand_vec_perm_const): Likewise.  Update call to
21860         altivec_expand_vec_perm_const_le.
21861         (rs6000_expand_vec_perm_const): Delete.
21862         (rs6000_vectorize_vec_perm_const_ok): Delete.
21863         (rs6000_vectorize_vec_perm_const): New function.
21864         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21865         an element count and rtx array.
21866         (rs6000_expand_extract_even): Update call accordingly.
21867         (rs6000_expand_interleave): Likewise.
21868         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21869         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21870         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21871         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21872         (rs6000_expand_vec_perm_const): Delete.
21873         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21874         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21875         (altivec_expand_vec_perm_const_le): Take each operand individually.
21876         Operate on constant selectors rather than rtxes.
21877         (altivec_expand_vec_perm_const): Likewise.  Update call to
21878         altivec_expand_vec_perm_const_le.
21879         (rs6000_expand_vec_perm_const): Delete.
21880         (rs6000_vectorize_vec_perm_const_ok): Delete.
21881         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
21882         reference to the SPE evmerge intructions.
21883         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21884         an element count and rtx array.
21885         (rs6000_expand_extract_even): Update call accordingly.
21886         (rs6000_expand_interleave): Likewise.
21887         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21888         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21889         new function.
21890         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21892 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21894         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21895         vector mode and that that mode matches the mode of the data
21896         being permuted.
21897         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21898         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
21899         directly using expand_vec_perm_1 when forcing selectors into
21900         registers.
21901         (expand_vec_perm_var): New function, split out from expand_vec_perm.
21903 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21905         * optabs-query.h (can_vec_perm_p): Delete.
21906         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21907         * optabs-query.c (can_vec_perm_p): Split into...
21908         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21909         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21910         particular selector is valid.
21911         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21912         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21913         (vect_grouped_load_supported): Likewise.
21914         (vect_shift_permute_load_chain): Likewise.
21915         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21916         (vect_transform_slp_perm_load): Likewise.
21917         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21918         (vectorizable_bswap): Likewise.
21919         (vect_gen_perm_mask_checked): Likewise.
21920         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
21921         implementations of variable permutation vectors into account
21922         when deciding which selector to use.
21923         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21924         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21925         with a false third argument.
21926         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21927         to test whether the constant selector is valid and can_vec_perm_var_p
21928         to test whether a variable selector is valid.
21930 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21932         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21933         * optabs-query.c (can_vec_perm_p): Likewise.
21934         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21935         instead of vec_perm_indices.
21936         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21937         (vect_gen_perm_mask_checked): Likewise,
21938         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21939         (vect_gen_perm_mask_checked): Likewise,
21941 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21943         * optabs-query.h (qimode_for_vec_perm): Declare.
21944         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21945         (qimode_for_vec_perm): ...this new function.
21946         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21948 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21950         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21951         does not have a conditional at the top.
21953 2018-01-02  Richard Biener  <rguenther@suse.de>
21955         * ipa-inline.c (big_speedup_p): Fix expression.
21957 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
21959         PR target/81616
21960         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21961         for generic 4->6.
21963 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
21965         PR target/81616
21966         Generic tuning.
21967         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21968         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21969         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21970         cond_taken_branch_cost 3->4.
21972 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
21974         PR tree-optimization/83581
21975         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21976         TODO_cleanup_cfg if any changes have been made.
21978         PR middle-end/83608
21979         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21980         convert_modes if target mode has the right side, but different mode
21981         class.
21983         PR middle-end/83609
21984         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21985         last argument when extracting from CONCAT.  If either from_real or
21986         from_imag is NULL, use expansion through memory.  If result is not
21987         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21988         the parts directly to inner mode, if even that fails, use expansion
21989         through memory.
21991         PR middle-end/83623
21992         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21993         check for bswap in mode rather than HImode and use that in expand_unop
21994         too.
21996 Copyright (C) 2018 Free Software Foundation, Inc.
21998 Copying and distribution of this file, with or without modification,
21999 are permitted in any medium without royalty provided the copyright
22000 notice and this notice are preserved.