[03/11] Remove vect_transform_stmt grouped_store argument
[official-gcc.git] / gcc / ChangeLog
blobbe6b24c047817c37bf6127a5cbd00ed97002b174
1 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
4         argument.
5         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7         (vect_transform_loop): Likewise.
8         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12         * tree-vectorizer.h (vect_schedule_slp): Return void.
13         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
14         (vect_schedule_slp): Likewise.
16 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
18         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
19         argument.
20         (vect_transform_loop): Update calls accordingly.  Schedule SLP
21         instances before the main loop, if any exist.
23 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
25         PR tree-optimization/86749
26         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
27         If the lhs is used in a COND_EXPR, check that it is being used
28         as the "then" or "else" value.
30 2018-08-01  Tom de Vries  <tdevries@suse.de>
32         PR target/86800
33         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
34         speculation_safe_value_not_needed.
36 2018-08-01  Richard Biener  <rguenther@suse.de>
38         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
39         as base and offset.
41 2018-08-01  Martin Liska  <mliska@suse.cz>
43         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
44         format how successful transformation is dumped.
45         (gimple_mod_pow2_value_transform): Likewise.
46         (gimple_mod_subtract_transform): Likewise.
47         (gimple_stringops_transform): Likewise.
49 2018-08-01  Martin Liska  <mliska@suse.cz>
51         PR value-prof/35543
52         * value-prof.c (interesting_stringop_to_profile_p):
53         Simplify the code and add BUILT_IN_MEMMOVE.
54         (gimple_stringops_transform): Likewise.
56 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
58         * config/aarch64/aarch64-simd.md
59         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
60         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
61         use GPI iterator instead of SI mode.
63 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
65         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
66         rs6000_speculation_barrier.
67         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
68         new barrier pattern name.
70 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
72         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
73         (speculation_barrier): New insn.
75 2018-08-01  Richard Biener  <rguenther@suse.de>
77         PR bootstrap/86724
78         * graphite.h: Include isl/id.h and isl/space.h to allow build
79         with ISL 0.20.
81 2018-08-01 Jan Willem Jagersma  <jwjagersma@gmail.com>
83         PR target/86651
84         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
85         mode for COFF targets.
86         * defaults.h (TARGET_COFF): Define.
87         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
88         TARGET_COFF): Define.
89         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
90         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
91         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
93 2018-07-31  Alexandre Oliva <oliva@adacore.com>
95         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
96         * gimple-streamer-out.c (output_bb): Save it.
97         * lto-streamer-in.c (input_struct_function_base): Restore
98         instance discriminator if available.  Create map on demand.
99         * lto-streamer-out.c (output_struct_function_base): Save it if
100         available.
101         * final.c (decl_to_instance_map): Document LTO strategy.
103 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
104             Olivier Hainque  <hainque@adacore.com>
106         * debug.h (decl_to_instance_map_t): New type.
107         (decl_to_instance_map): Declare.
108         (maybe_create_decl_to_instance_map): New inline function.
109         * final.c (bb_discriminator, last_bb_discriminator): New statics,
110         to track basic block discriminators.
111         (final_start_function_1): Initialize them.
112         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
113         bb_discriminator.
114         (decl_to_instance_map): New variable.
115         (map_decl_to_instance, maybe_set_discriminator): New functions.
116         (notice_source_line): Set discriminator.
118 2018-07-31  Ian Lance Taylor  <iant@golang.org>
120         * targhooks.c (default_have_speculation_safe_value): Add
121         ATTRIBUTE_UNUSED.
123 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
125         * dump-context.h: Include "pretty-print.h".
126         (dump_context::refresh_dumps_are_enabled): New decl.
127         (dump_context::emit_item): New decl.
128         (class dump_context): Add fields "m_test_pp" and
129         "m_test_pp_flags".
130         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
131         (temp_dump_context::get_dumped_text): New decl.
132         (class temp_dump_context): Add field "m_pp".
133         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
134         (dump_context::refresh_dumps_are_enabled): ...and add a test for
135         m_test_pp.
136         (set_dump_file): Update for above change.
137         (set_alt_dump_file): Likewise.
138         (dump_loc): New overload, taking a pretty_printer *.
139         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
140         to any test pretty-printer.
141         (make_item_for_dump_gimple_stmt): New function, adapted from
142         optinfo::add_gimple_stmt.
143         (dump_context::dump_gimple_stmt): Call it, and use the result,
144         eliminating the direct usage of dump_file and alt_dump_file in
145         favor of indirectly using them via emit_item.
146         (make_item_for_dump_gimple_expr): New function, adapted from
147         optinfo::add_gimple_expr.
148         (dump_context::dump_gimple_expr): Call it, and use the result,
149         eliminating the direct usage of dump_file and alt_dump_file in
150         favor of indirectly using them via emit_item.
151         (make_item_for_dump_generic_expr): New function, adapted from
152         optinfo::add_tree.
153         (dump_context::dump_generic_expr): Call it, and use the result,
154         eliminating the direct usage of dump_file and alt_dump_file in
155         favor of indirectly using them via emit_item.
156         (make_item_for_dump_printf_va): New function, adapted from
157         optinfo::add_printf_va.
158         (make_item_for_dump_printf): New function.
159         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
160         and use the result, eliminating the direct usage of dump_file and
161         alt_dump_file in favor of indirectly using them via emit_item.
162         (make_item_for_dump_dec): New function.
163         (dump_context::dump_dec): Call it, and use the result,
164         eliminating the direct usage of dump_file and alt_dump_file in
165         favor of indirectly using them via emit_item.
166         (make_item_for_dump_symtab_node): New function, adapted from
167         optinfo::add_symtab_node.
168         (dump_context::dump_symtab_node): Call it, and use the result,
169         eliminating the direct usage of dump_file and alt_dump_file in
170         favor of indirectly using them via emit_item.
171         (dump_context::begin_scope): Reimplement, avoiding direct usage
172         of dump_file and alt_dump_file in favor of indirectly using them
173         via emit_item.
174         (dump_context::emit_item): New member function.
175         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
176         Set up test pretty-printer on the underlying context.  Call
177         refresh_dumps_are_enabled.
178         (temp_dump_context::~temp_dump_context): Call
179         refresh_dumps_are_enabled.
180         (temp_dump_context::get_dumped_text): New member function.
181         (selftest::verify_dumped_text): New function.
182         (ASSERT_DUMPED_TEXT_EQ): New macro.
183         (selftest::test_capture_of_dump_calls): Run all tests twice, with
184         and then without optinfo enabled.  Add uses of
185         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
186         * dumpfile.h: Update comment for the dump_* API.
187         * optinfo-emit-json.cc
188         (selftest::test_building_json_from_dump_calls): Update for new
189         param for temp_dump_context ctor.
190         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
191         and "m_owned" field.
192         (optinfo_item::~optinfo_item): Likewise.
193         (optinfo::add_item): New member function.
194         (optinfo::emit): Update comment.
195         (optinfo::add_string): Delete.
196         (optinfo::add_printf): Delete.
197         (optinfo::add_printf_va): Delete.
198         (optinfo::add_gimple_stmt): Delete.
199         (optinfo::add_gimple_expr): Delete.
200         (optinfo::add_tree): Delete.
201         (optinfo::add_symtab_node): Delete.
202         (optinfo::add_dec): Delete.
203         * optinfo.h (class dump_context): New forward decl.
204         (optinfo::add_item): New decl.
205         (optinfo::add_string): Delete.
206         (optinfo::add_printf): Delete.
207         (optinfo::add_printf_va): Delete.
208         (optinfo::add_gimple_stmt): Delete.
209         (optinfo::add_gimple_expr): Delete.
210         (optinfo::add_tree): Delete.
211         (optinfo::add_symtab_node): Delete.
212         (optinfo::add_dec): Delete.
213         (optinfo::add_poly_int): Delete.
214         (optinfo_item::optinfo_item): Remove "owned" param.
215         (class optinfo_item): Remove field "m_owned".
217 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
219         PR middle-end/86705
220         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
221         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
222         requested variable alignment.
223         (expand_one_ssa_partition): Likewise.
224         (expand_one_var): Likewise.
226 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
228         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
229         to speculation_safe_value_not_needed.
231 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
233         * targhooks.h (speculation_safe_value_not_needed): New prototype.
234         * targhooks.c (speculation_safe_value_not_needed): New function.
235         * target.def (have_speculation_safe_value): Update documentation.
236         * doc/tm.texi: Regenerated.
238 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
240         * config/aarch64/iterators.md (ALLI_TI): New iterator.
241         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
242         expand.
243         (despeculate_copy<ALLI:mode>_insn): New insn.
244         (despeculate_copyti_insn): New insn.
245         (despeculate_simple<ALLI:mode>): New insn
246         (despeculate_simpleti): New insn.
247         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
248         function.
249         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
250         aarch64_speculation_safe_value.
251         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
253 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
255         * config/aarch64/aarch64-speculation.cc: New file.
256         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
257         before pass_reorder_blocks.
258         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
259         prototype.
260         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
261         X14 and X15 when tracking speculation.
262         * config/aarch64/aarch64.md (register name constants): Add
263         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
264         (unspec): Add UNSPEC_SPECULATION_TRACKER.
265         (speculation_barrier): New insn attribute.
266         (cmp<mode>): Allow SP in comparisons.
267         (speculation_tracker): New insn.
268         (speculation_barrier): Add speculation_barrier attribute.
269         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
270         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
271         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
273 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
275         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
276         aarch64_track_speculation is true.
277         (tb<optab><mode>1): Likewise.
278         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
279         generate CB[N]Z when tracking speculation.
280         (aarch64_split_compare_and_swap): Likewise.
281         (aarch64_split_atomic_op): Likewise.
283 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
285         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
287 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
289         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
290         (speculation_barrier): New insn.
292 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
294         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
295         * config/arm/arm.md (speculation_barrier): New expand.
296         (speculation_barrier_insn): New pattern.
298 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
300         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
301         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
302         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
303         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
304         list.
305         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
306         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
307         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
308         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
309         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
310         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
311         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
312         * builtins.c (expand_speculation_safe_value): New function.
313         (expand_builtin): Call it.
314         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
315         * doc/extend.texi: Document __builtin_speculation_safe_value.
316         * doc/md.texi: Document "speculation_barrier" pattern.
317         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
318         TARGET_HAVE_SPECULATION_SAFE_VALUE.
319         * doc/tm.texi: Regenerated.
320         * target.def (have_speculation_safe_value, speculation_safe_value): New
321         hooks.
322         * targhooks.c (default_have_speculation_safe_value): New function.
323         (default_speculation_safe_value): New function.
324         * targhooks.h (default_have_speculation_safe_value): Add prototype.
325         (default_speculation_safe_value): Add prototype.
327 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
329         * dump-context.h (dump_context::dump_loc): New decl.
330         * dumpfile.c (dump_context::dump_loc): New member function.
331         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
332         and dump_gimple_stmt.
333         (dump_context::dump_gimple_expr_loc): Likewise, using
334         dump_gimple_expr.
335         (dump_context::dump_generic_expr_loc): Likewise, using
336         dump_generic_expr.
337         (dump_context::dump_printf_loc_va): Likewise, using
338         dump_printf_va.
339         (dump_context::begin_scope): Explicitly using the global function
340         "dump_loc", rather than the member function.
342 2018-07-31  Martin Sebor  <msebor@redhat.com>
344         PR tree-optimization/86741
345         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
347 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
349         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
350         depend on whether prefetch instructions will be emitted or not.
351         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
352         will be emitted or not.
353         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
354         (TARGET_SETMEM_PFD): New macros.
356 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
358         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
359         (NULL_STMT_VEC_INFO): Delete.
360         (stmt_vec_info::operator*): Likewise.
361         (stmt_vec_info::operator gimple *): Likewise.
362         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
363         of NULL_STMT_VEC_INFO.
364         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
365         (vect_reassociating_reduction_p): Likewise.
366         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
367         (vectorizable_store): Likewise.
368         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
369         (vec_info::free_stmt_vec_infos): Likewise.
371 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
373         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
374         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
376 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
378         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
379         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
380         (vec_info::free_stmt_vec_info): New private member functions.
381         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
382         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
383         * tree-parloops.c (gather_scalar_reductions): Remove calls to
384         set_stmt_vec_info_vec and free_stmt_vec_infos.
385         * tree-vect-loop.c (_loop_vec_info): Remove call to
386         set_stmt_vec_info_vec.
387         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
388         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
389         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
390         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
391         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
392         assignments in {vec_info::,}new_stmt_vec_info that are redundant
393         with the clearing in the xcalloc.
394         (stmt_vec_info_vec): Delete.
395         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
396         (vectorize_loops): Likewise.
397         (vec_info::~vec_info): Remove argument from call to
398         free_stmt_vec_infos.
399         (vec_info::add_stmt): Remove vinfo argument from call to
400         new_stmt_vec_info.
402 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
404         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
405         rather than a gimple stmt.
406         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
407         information for pattern statements when passed the original
408         statement; instead wait to be passed the pattern statement itself.
409         Don't call set_vinfo_for_stmt here.
410         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
411         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
412         stmt_vec_infos here.
413         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
414         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
415         stmt_vec_infos entry.
417 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
419         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
420         * tree-vectorizer.c (vec_info::replace_stmt): New function.
421         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
422         * tree-vect-stmts.c (vectorizable_call): Likewise.
423         (vectorizable_simd_clone_call): Likewise.
425 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
427         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
428         * tree-vectorizer.c (vec_info::remove_stmt): New function.
429         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
430         * tree-vect-loop.c (vect_transform_loop): Likewise.
431         * tree-vect-slp.c (vect_schedule_slp): Likewise.
432         * tree-vect-stmts.c (vect_remove_stores): Likewise.
434 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
436         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
437         (vect_dr_stmt): Delete.
438         * tree-vectorizer.c (vec_info::lookup_dr): New function.
439         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
440         of DR_VECT_AUX.
441         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
442         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
443         (vect_verify_datarefs_alignment, vect_peeling_supportable)
444         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
445         (vect_analyze_data_refs): Likewise.
446         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
447         argument.
448         (vect_find_same_alignment_drs): Likewise.
449         (vect_slp_analyze_node_dependences): Update calls accordingly.
450         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
451         instead of DR_VECT_AUX.
452         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
453         of a vector data references.  Use vec_info::lookup_dr instead of
454         DR_VECT_AUX.
455         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
456         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
457         instead of DR_VECT_AUX.
459 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
461         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
462         dr_vec_info.
463         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
464         accordingly.
465         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
466         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
467         (vect_gen_prolog_loop_niters): Likewise.
469 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
471         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
472         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
473         (vect_known_alignment_in_bytes, vect_dr_behavior)
474         (vect_get_scalar_dr_size): Take references as dr_vec_infos
475         instead of data_references.  Update calls to other routines for
476         which the same change has been made.
477         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
478         dr_vec_infos instead of stmt_vec_infos.
479         (vect_analyze_data_ref_dependence): Update call accordingly.
480         (vect_slp_analyze_data_ref_dependence)
481         (vect_record_base_alignments): Use DR_VECT_AUX.
482         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
483         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
484         (vector_alignment_reachable_p, vect_get_data_access_cost)
485         (vect_peeling_supportable, vect_analyze_group_access_1)
486         (vect_analyze_group_access, vect_analyze_data_ref_access)
487         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
488         (vect_compile_time_alias, vect_small_gap_p)
489         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
490         (vect_supportable_dr_alignment): Take references as dr_vec_infos
491         instead of data_references.  Update calls to other routines for
492         which the same change has been made.
493         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
494         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
495         (vect_slp_analyze_and_verify_node_alignment)
496         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
497         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
498         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
499         above changes.
500         (_vect_peel_info::dr): Replace with...
501         (_vect_peel_info::dr_info): ...this new field.
502         (vect_peeling_hash_get_most_frequent)
503         (vect_peeling_hash_choose_best_peeling): Update accordingly.
504         (vect_peeling_hash_get_lowest_cost):
505         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
506         routines for which the same change has been made.
507         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
508         data_reference.
509         * tree-vect-loop-manip.c (get_misalign_in_elems)
510         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
511         above changes.
512         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
513         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
514         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
515         (get_group_load_store_type, get_negative_load_store_type)
516         (vect_get_data_ptr_increment, vectorizable_store)
517         (vectorizable_load): Likewise.
518         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
519         Update calls to other routines for which the same change has been made.
521 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
523         * tree-vectorizer.h (vec_info::move_dr): New member function.
524         (dataref_aux): Rename to...
525         (dr_vec_info): ...this and add "dr" and "stmt" fields.
526         (_stmt_vec_info::dr_aux): Update accordingly.
527         (_stmt_vec_info::data_ref_info): Delete.
528         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
529         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
530         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
531         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
532         of data_ref.
533         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
534         (STMT_VINFO_DR_INFO): New macro.
535         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
536         (set_dr_misalignment): Update after rename of dataref_aux.
537         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
538         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
539         initialization of STMT_VINFO_DATA_REF.
540         * tree-vectorizer.c (vec_info::move_dr): New function.
541         * tree-vect-patterns.c (vect_recog_bool_pattern)
542         (vect_recog_mask_conversion_pattern)
543         (vect_recog_gather_scatter_pattern): Use it.
544         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
545         the "dr" and "stmt" fields of dr_vec_info instead of
546         STMT_VINFO_DATA_REF.
548 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
550         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
551         (is_pattern_stmt_p): Use it.
552         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
553         on pattern statements.
555 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
557         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
558         original stmt as a stmt_vec_info rather than a gimple stmt.
559         (vect_pattern_recog_1): Take the statement directly as a
560         stmt_vec_info, rather than via a gimple_stmt_iterator.
561         Update call to vect_mark_pattern_stmts.
562         (vect_pattern_recog): Update calls accordingly.
564 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
566         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
567         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
568         a vect_def_type for the first argument.
569         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
570         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
571         operand if it isn't defined by a vectorized statement.
572         (vect_build_gather_load_calls): Remove the mask_dt argument and
573         update calls to vect_get_vec_def_for_stmt_copy.
574         (vectorizable_bswap): Likewise the dt argument.
575         (vectorizable_call): Update calls to vectorizable_bswap and
576         vect_get_vec_def_for_stmt_copy.
577         (vectorizable_simd_clone_call, vectorizable_assignment)
578         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
579         (vectorizable_comparison): Update calls to
580         vect_get_vec_def_for_stmt_copy.
581         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
582         vect_is_simple_use.
583         (vect_get_loop_based_defs): Remove dt argument and update call
584         to vect_get_vec_def_for_stmt_copy.
585         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
586         and vect_get_vec_def_for_stmt_copy.
587         (vectorizable_load): Update calls to vect_build_gather_load_calls
588         and vect_get_vec_def_for_stmt_copy.
589         * tree-vect-loop.c (vect_create_epilog_for_reduction)
590         (vectorizable_reduction, vectorizable_live_operation): Update calls
591         to vect_get_vec_def_for_stmt_copy.
593 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
595         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
596         and gimple stmt arguments with a stmt_vec_info.
597         (vect_record_base_alignments): Update calls accordingly.
598         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
599         and gimple stmt arguments with a stmt_vec_info.
600         (vect_build_slp_tree_1): Remove vinfo argument and update call
601         to vect_record_max_nunits.
602         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
603         and vect_record_max_nunits.
605 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
607         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
608         file and take a stmt_vec_info instead of a gimple stmt.
609         (supportable_widening_operation, vect_finish_replace_stmt)
610         (vect_finish_stmt_generation, vect_get_store_rhs)
611         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
612         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
613         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
614         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
615         (vect_create_data_ref_ptr, bump_vector_ptr)
616         (vect_permute_store_chain, vect_setup_realignment)
617         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
618         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
619         (vectorizable_reduction, vectorizable_induction)
620         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
621         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
622         than gimple stmts as arguments.
623         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
624         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
625         (can_group_stmts_p, vect_check_gather_scatter)
626         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
627         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
628         (vect_permute_load_chain, vect_shift_permute_load_chain)
629         (vect_transform_grouped_load)
630         (vect_record_grouped_load_vectors): Likewise.
631         * tree-vect-loop.c (vect_fixup_reduc_chain)
632         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
633         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
634         (vectorizable_reduction, vectorizable_induction)
635         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
636         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
637         (vect_get_load_store_mask): Likewise.
638         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
639         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
640         * tree-vect-stmts.c (vect_mark_relevant)
641         (is_simple_and_all_uses_invariant)
642         (exist_non_indexing_operands_for_use_p, process_use)
643         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
644         (vect_get_vec_def_for_operand, vect_get_vec_defs)
645         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
646         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
647         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
648         (get_negative_load_store_type, get_load_store_type)
649         (vect_check_load_store_mask, vect_check_store_rhs)
650         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
651         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
652         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
653         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
654         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
655         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
656         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
657         (supportable_widening_operation): Likewise.
659 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
661         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
662         a stmt_vec_info instead of a gcall.
663         (vect_check_gather_scatter): Update call accordingly.
664         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
665         of a gphi.
666         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
667         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
668         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
669         instead of a gimple stmt.
670         (vect_transform_loop): Update calls accordingly.
671         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
672         stmt_vec_infos instead of gimple stmts.
673         (vect_analyze_slp_instance): Update use accordingly.
674         * tree-vect-stmts.c (read_vector_array, write_vector_array)
675         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
676         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
677         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
678         (vect_gen_widened_results_half, vect_get_loop_based_defs)
679         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
680         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
681         down to subroutines.
683 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
685         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
686         of the worklist from a vector of gimple stmts to a vector of
687         stmt_vec_infos.
688         * tree-vect-stmts.c (vect_mark_relevant, process_use)
689         (vect_mark_stmts_to_be_vectorized): Likewise
691 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
693         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
694         statement before passing it to vect_analyze_stmt.
695         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
696         the chain of phi vector definitions.  Track the exit phi via its
697         stmt_vec_info.
698         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
699         STMT_VINFO_REDUC_DEF.
700         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
701         stmt_vec_infos to handle the statement chains.
702         (vect_get_slp_defs): Record the first statement in the node
703         using a stmt_vec_info.
704         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
705         statements here and pass their stmt_vec_info down to subroutines.
706         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
707         down to vect_finish_stmt_generation.
708         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
709         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
710         stmt_vec_infos to subroutines.
711         (vect_remove_stores): Use stmt_vec_infos to handle the statement
712         chains.
714 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
716         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
717         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
718         (vect_permute_store_chain, vect_setup_realignment)
719         (vect_permute_load_chain, vect_shift_permute_load_chain)
720         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
721         stmts internally, and when passing values to other vectorizer routines.
722         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
723         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
724         (vect_analyze_loop_operations, get_initial_def_for_reduction)
725         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
726         (vectorizable_reduction, vectorizable_induction)
727         (vectorizable_live_operation, vect_transform_loop_stmt)
728         (vect_transform_loop): Likewise.
729         * tree-vect-patterns.c (vect_reassociating_reduction_p)
730         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
731         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
732         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
733         (vect_slp_analyze_node_operations_1): Likewise.
734         * tree-vect-stmts.c (vect_mark_relevant, process_use)
735         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
736         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
737         (vect_finish_stmt_generation_1, get_group_load_store_type)
738         (get_load_store_type, vect_build_gather_load_calls)
739         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
740         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
741         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
742         (vectorizable_store, vectorizable_load, vectorizable_condition)
743         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
744         (supportable_widening_operation): Likewise.
745         (vect_get_vector_types_for_stmt): Likewise.
746         * tree-vectorizer.h (vect_dr_behavior): Likewise.
748 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
750         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
751         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
752         (vect_permute_store_chain, vect_permute_load_chain)
753         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
754         repeated stmt_vec_info lookups.
755         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
756         (vect_update_ivs_after_vectorizer): Likewise.
757         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
758         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
759         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
760         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
761         (vect_bb_slp_scalar_cost): Likewise.
762         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
764 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
766         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
767         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
768         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
769         to get gassigns and gcalls, rather than operating on generc gimple
770         stmts.
771         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
772         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
773         (vectorizable_load, vect_analyze_stmt): Likewise.
774         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
776 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
778         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
779         return stmt_vec_infos rather than gimple stmts.  Do not accept
780         null arguments.
781         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
782         of a gimple stmt.
783         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
784         Update use of get_later_stmt.
785         (vect_get_constant_vectors): Update call accordingly.
786         (vect_schedule_slp_instance): Likewise
787         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
788         (vect_slp_analyze_instance_dependence): Likewise.
789         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
791 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
793         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
794         (stmt_info_for_cost::stmt_info): ...this new field.
795         (add_stmt_costs): Update accordingly.
796         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
797         (vect_get_known_peeling_cost): Likewise.
798         (vect_estimate_min_profitable_iters): Likewise.
799         * tree-vect-stmts.c (record_stmt_cost): Likewise.
801 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
803         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
804         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
805         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
806         accordingly.
807         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
809 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
811         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
812         a gimple stmt to a stmt_vec_info.
813         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
815 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
817         * tree-vectorizer.h (vec_info::grouped_stores): Change from
818         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
819         (_loop_vec_info::reduction_chains): Likewise.
820         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
821         accordingly.
822         * tree-vect-slp.c (vect_analyze_slp): Likewise.
824 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
826         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
827         a gimple stmt to a stmt_vec_info.
828         (_stmt_vec_info::next_element): Likewise.
829         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
830         (vect_slp_analyze_and_verify_node_alignment)
831         (vect_analyze_group_access_1, vect_analyze_group_access)
832         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
833         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
834         (vect_supportable_dr_alignment): Update accordingly.
835         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
836         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
837         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
838         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
839         * tree-vect-slp.c (vect_build_slp_tree_1)
840         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
841         (vect_split_slp_store_group, vect_analyze_slp_instance)
842         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
843         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
844         (get_group_load_store_type, get_load_store_type)
845         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
846         (vect_transform_stmt, vect_remove_stores): Likewise.
848 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
850         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
851         than a gimple stmt.
852         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
853         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
854         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
855         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
856         (vector_alignment_reachable_p, vect_get_data_access_cost)
857         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
858         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
859         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
860         (vect_analyze_group_access_1, vect_analyze_group_access)
861         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
862         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
863         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
864         result of vect_dr_stmt and use the stmt_vec_info instead of
865         the associated gimple stmt.
866         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
867         (vect_gen_prolog_loop_niters): Likewise.
868         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
870 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
872         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
873         to a vec<stmt_vec_info>.
874         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
875         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
876         vec<stmt_vec_info>.
877         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
878         to a vec<stmt_vec_info>.
879         (bst_traits::value_type, bst_traits::value_type): Likewise.
880         (bst_traits::hash): Update accordingly.
881         (vect_get_and_check_slp_defs): Change the stmts parameter from
882         a vec<gimple *> to a vec<stmt_vec_info>.
883         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
884         (vect_build_slp_tree): Likewise.
885         (vect_build_slp_tree_2): Likewise.  Update uses of
886         SLP_TREE_SCALAR_STMTS.
887         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
888         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
889         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
890         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
891         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
892         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
893         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
894         (vect_get_constant_vectors, vect_get_slp_defs)
895         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
896         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
897         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
898         instead of gimple stmts.
899         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
900         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
901         (vect_slp_analyze_instance_dependence): Update uses of
902         SLP_TREE_SCALAR_STMTS.
903         (vect_slp_analyze_and_verify_node_alignment): Likewise.
904         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
905         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
906         (get_initial_defs_for_reduction): Likewise.
907         (vect_create_epilog_for_reduction): Likewise.
908         (vectorize_fold_left_reduction): Likewise.
909         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
910         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
911         (can_vectorize_live_stmts): Likewise.
913 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
915         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
916         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
917         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
918         than gimple stmts.
919         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
920         of a gimple stmt.
921         (gather_scalar_reductions): Update after above interface changes.
922         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
923         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
924         than gimple stmts.
925         (vect_force_simple_reduction): Likewise.
926         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
927         LOOP_VINFO_REDUCTIONS.
928         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
930 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
932         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
933         a gimple stmt to a stmt_vec_info.
934         * tree-vect-loop.c (vect_active_double_reduction_p)
935         (vect_force_simple_reduction, vectorizable_reduction): Update
936         accordingly.
938 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
940         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
941         vec<gimple *> to a vec<stmt_vec_info>.
942         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
943         the reduction_phis argument from a vec<gimple *> to a
944         vec<stmt_vec_info>.
945         (vectorizable_reduction): Likewise the phis local variable that
946         is passed to vect_create_epilog_for_reduction.  Update for new type
947         of SLP_TREE_VEC_STMTS.
948         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
949         (vectorizable_live_operation): Likewise.
950         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
951         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
953 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
955         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
956         a gimple stmt to a stmt_vec_info.
957         (vectorizable_condition, vectorizable_live_operation)
958         (vectorizable_reduction, vectorizable_induction): Pass back the
959         vectorized statement as a stmt_vec_info.
960         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
961         use of STMT_VINFO_VEC_STMT.
962         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
963         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
964         as stmt_vec_infos rather than gimple stmts.
965         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
966         to a stmt_vec_info.
967         (vectorizable_live_operation): Likewise.
968         (vectorizable_reduction, vectorizable_induction): Likewise,
969         updating use of STMT_VINFO_VEC_STMT.
970         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
971         of STMT_VINFO_VEC_STMT.
972         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
973         (vectorizable_simd_clone_call, vectorizable_conversion)
974         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
975         (vectorizable_store, vectorizable_load, vectorizable_condition)
976         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
977         from a gimple stmt to a stmt_vec_info.
978         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
979         pointer to a stmt_vec_info to the vectorizable_* routines.
981 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
983         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
984         a gimple stmt to a stmt_vec_info.
985         (is_pattern_stmt_p): Update accordingly.
986         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
987         (vect_record_grouped_load_vectors): Likewise.
988         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
989         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
990         (vect_model_reduction_cost): Likewise.
991         (vect_create_epilog_for_reduction): Likewise.
992         (vectorizable_reduction, vectorizable_induction): Likewise.
993         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
994         Return the stmt_vec_info for the pattern statement.
995         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
996         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
997         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
998         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
999         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1000         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1001         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1002         (free_stmt_vec_info, vect_is_simple_use): Likewise.
1004 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1006         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1007         (vect_finish_stmt_generation): Likewise.
1008         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1009         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1010         (vect_build_gather_load_calls): Use the return value of the above
1011         functions instead of a separate call to vinfo_for_stmt.  Use narrow
1012         scopes for the input gimple stmt and wider scopes for the associated
1013         stmt_vec_info.  Use vec_info::lookup_def when setting these
1014         stmt_vec_infos from an SSA_NAME definition.
1015         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1016         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1017         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1018         (vectorizable_store, vectorizable_load, vectorizable_condition)
1019         (vectorizable_comparison): Likewise.
1020         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1021         (vectorizable_reduction): Likewise.
1023 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1025         * tree-vectorizer.h (vect_is_simple_use): Add an optional
1026         stmt_vec_info * parameter before the optional gimple **.
1027         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1028         (process_use, vect_get_vec_def_for_operand_1): Update callers.
1029         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1030         * tree-vect-loop.c (vectorizable_reduction): Likewise.
1031         (vectorizable_live_operation): Likewise.
1032         * tree-vect-patterns.c (type_conversion_p): Likewise.
1033         (vect_look_through_possible_promotion): Likewise.
1034         (vect_recog_rotate_pattern): Likewise.
1035         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1037 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1039         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1040         a typedef to a wrapper class.
1041         (NULL_STMT_VEC_INFO): New macro.
1042         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1043         (stmt_vec_info::operator*): New function.
1044         (stmt_vec_info::operator gimple *): Likewise.
1045         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1046         (add_stmt_costs): Likewise.
1047         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1048         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1049         (vect_get_known_peeling_cost): Likewise.
1050         (vect_estimate_min_profitable_iters): Likewise.
1051         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1052         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1053         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1054         (vectorizable_store, free_stmt_vec_infos): Likewise.
1055         (new_stmt_vec_info): Change return type of xcalloc to
1056         _stmt_vec_info *.
1058 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1060         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1061         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1062         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1063         a single_imm_use-based sequence.
1064         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1066 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1068         * tree-vectorizer.h (vec_info::lookup_def): Declare.
1069         * tree-vectorizer.c (vec_info::lookup_def): New function.
1070         * tree-vect-patterns.c (vect_get_internal_def): Use it.
1071         (vect_widened_op_tree): Likewise.
1072         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1073         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1074         (vectorizable_reduction): Likewise.
1075         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1076         of a gimple *.
1077         (vect_is_slp_reduction): Update calls accordingly.  Use
1078         vec_info::lookup_def.
1079         (vect_is_simple_reduction): Likewise
1080         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1082 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1084         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1085         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1086         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1087         of vinfo_for_stmt.
1088         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1089         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1090         (vect_update_vf_for_slp, vect_analyze_loop_operations)
1091         (vect_is_slp_reduction, vectorizable_induction)
1092         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1093         * tree-vect-patterns.c (vect_init_pattern_stmt):
1094         (vect_determine_min_output_precision_1, vect_determine_precisions)
1095         (vect_pattern_recog): Likewise.
1096         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1097         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1098         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1099         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1100         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1101         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
1102         info field from a loop to a loop_vec_info.
1104 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1106         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1107         (vec_info::add_stmt): Declare.
1108         * tree-vectorizer.c (vec_info::add_stmt): New function.
1109         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1110         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1111         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1112         (vectorizable_induction): Likewise.
1113         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1114         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1115         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1116         (vectorizable_load): Likewise.
1117         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1118         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1119         (vect_recog_gather_scatter_pattern): Likewise.
1120         (append_pattern_def_seq): Likewise.  Remove a check that is
1121         performed by add_stmt itself.
1123 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1125         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1126         which make_ssa_name was called with new_stmt before new_stmt
1127         had been created.
1129 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1131         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1132         split out from...
1133         (vect_is_slp_reduction): ...here...
1134         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
1135         that are already known to be false.
1137 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1139         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1140         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
1141         STMT_VINFO_NUM_SLP_USES when it's true.
1142         (vect_free_slp_instance): Add a final_p parameter and pass it to
1143         vect_free_slp_tree.
1144         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1145         (vect_analyze_slp_instance): Likewise.
1146         (vect_slp_analyze_operations): Likewise.
1147         (vect_slp_analyze_bb_1): Likewise.
1148         * tree-vectorizer.c (vec_info): Likewise.
1149         * tree-vect-loop.c (vect_transform_loop): Likewise.
1151 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1153         * tree-vect-loop.c (vectorizable_reduction): Assert that the
1154         function is not called for second and subsequent members of
1155         a reduction group.
1157 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1159         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1160         cases for nested loops from here to ...
1161         (vect_create_epilog_for_reduction): ...here.  Only call
1162         vect_is_simple_use for inner-loop reductions.
1164 2018-07-31  Martin Liska  <mliska@suse.cz>
1166         PR gcov-profile/85338
1167         PR gcov-profile/85350
1168         PR gcov-profile/85372
1169         * profile.c (struct location_triplet): New.
1170         (struct location_triplet_hash): Likewise.
1171         (output_location): Do not output a BB that
1172         is already recorded for a line.
1173         (branch_prob): Use streamed_locations.
1175 2018-07-31  Martin Liska  <mliska@suse.cz>
1177         PR gcov-profile/85370
1178         * coverage.c (coverage_begin_function): Do not mark target
1179         clones as artificial functions.
1181 2018-07-31  Martin Liska  <mliska@suse.cz>
1183         PR gcov-profile/83813
1184         PR gcov-profile/84758
1185         PR gcov-profile/85217
1186         PR gcov-profile/85332
1187         * profile.c (branch_prob): Do not record GOTO expressions
1188         for GIMPLE statements which locations are already streamed.
1190 2018-07-31  Olivier Hainque  <hainque@adacore.com>
1192         * gcc.c (handle_spec_function): Accept a soft_matched_part
1193         argument, as do_spec_1.  Pass it down to ...
1194         (eval_spec_function): Accept a soft_matched_part argument,
1195         and pass it down to ...
1196         (do_spec_2): Accept a soft_matched_part argument, and pass
1197         it down to do_spec_1.
1198         (do_spec_1): Pass soft_matched_part to handle_spec_function.
1199         (handle_braces): Update call to handle_spec_function.
1200         (driver::set_up_specs): Update calls to do_spec_2.
1201         (compare_debug_dump_opt_spec_function): Likewise.
1202         (compare_debug_self_opt_spec_function): Likewise.
1204 2018-07-31  Olivier Hainque  <hainque@adacore.com>
1206         * common.opt (nolibc): New option.
1207         * doc/invoke.texi (Link Options): Document it.
1208         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1209         * config/alpha/linux.h: Likewise.
1210         * config/arc/elf.h: Likewise.
1211         * config/arm/uclinux-elf.h: Likewise.
1212         * config/arm/unknown-elf.h: Likewise.
1213         * config/avr/avrlibc.h: Likewise.
1214         * config/bfin/bfin.h: Likewise.
1215         * config/bfin/linux.h: Likewise.
1216         * config/bfin/uclinux.h: Likewise.
1217         * config/darwin.h: Likewise.
1218         * config/darwin10.h: Likewise.
1219         * config/darwin12.h: Likewise.
1220         * config/gnu-user.h: Likewise.
1221         * config/lm32/uclinux-elf.h: Likewise.
1222         * config/pa/pa-hpux11.h: Likewise.
1223         * config/pa/pa64-hpux.h: Likewise.
1224         * config/sparc/sparc.h: Likewise.
1226 2018-07-31  Olivier Hainque  <hainque@adacore.com>
1228         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1229         undefined variables.
1231 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
1233         PR target/86640
1234         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1235         instead of GEN_INT.
1237 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1239         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1240         terminated string literal.
1242 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
1244         PR rtl-optimization/85160
1245         * combine.c (is_just_move): New function.
1246         (try_combine): Allow combining two instructions into two if neither of
1247         the original instructions was a move.
1249 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
1251         PR target/86673
1252         * doc/extend.texi (Global Register Variables): Discourage use of type
1253         qualifiers.
1254         (Local Register Variables): Likewise.
1256 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
1258         PR tree-optimization/86506
1259         * hwint.h (ceil_log2): Resync with hwint.c implementation.
1261 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
1263         PR target/86547
1264         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1265         hard_regno, make sure no insn between `from` and `to` clobbers it.
1267 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
1268             Tom de Vries  <tdevries@suse.de>
1270         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1271         (PTX_DEFAULT_RUNTIME_DIM): ... this.
1272         (nvptx_goacc_validate_dims): Set default worker and gang dims to
1273         PTX_DEFAULT_RUNTIME_DIM.
1274         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1276 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
1278         * config/pa/pa.c (pa_output_addr_vec): Align address table.
1279         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1280         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1282 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
1284         * config/rs6000/constraints.md (wG constraint): Delete, no longer
1285         used.
1286         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1287         predicate to reflect toc fusion has been deleted.
1288         (toc_fusion_mem_raw): Delete, no longer used.
1289         (toc_fusion_mem_wrapped): Likewise.
1290         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1291         fusion mask bit.
1292         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1293         Delete, no longer used.
1294         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1295         meant to be used for toc fusion.
1296         (rs6000_debug_print_mode): Delete toc fusion debugging.
1297         (rs6000_debug_reg_global): Likewise.
1298         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1299         fusion and secondary reload support that were never used.
1300         (rs6000_option_override_internal): Delete TOC fusion, that was only
1301         partially defined, and it did not work unless you also used the
1302         -mcmodel= switch.
1303         (rs6000_legitimate_address_p): Delete TOC fusion support.
1304         (rs6000_opt_masks): Likewise.
1305         (fusion_wrap_memory_address): Delete function, no longer used.
1306         (fusion_split_address); Delete TOC fusion support.
1307         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1308         longer used with toc fusion being deleted.
1309         (TARGET_TOC_FUSION_FP): Likewise.
1310         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1311         UNSPEC.
1312         (toc fusion spliter): Delete TOC fusion support.
1313         (toc_fusionload_<mode>): Likewise.
1314         (toc_fusionload_di): Likewise.
1315         (fusion_gpr_load_<mode>): Delete generator function, this insn no
1316         longer needs to be named.  Rename predicate to delete TOC fusion.
1317         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1318         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1319         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1320         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1321         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1323 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1325         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1326         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
1327         __int128 in built-in function prototypes.
1328         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1329         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1331 2018-07-27  Martin Sebor  <msebor@redhat.com>
1333         PR tree-optimization/86696
1334         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1335         types, including enums.
1336         (handle_char_store): Be prepared for the above function to fail.
1338 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
1340         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1341         when optimization level is lower than 2 or optimize for size.
1343 2018-07-26  Martin Sebor  <msebor@redhat.com>
1345         PR tree-optimization/86043
1346         PR tree-optimization/86042
1347         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1348         (get_string_cst_length): Rename...
1349         (get_min_string_length): ...to this.  Add argument.
1350         (handle_char_store): Extend to handle multi-character stores by
1351         MEM_REF.
1352         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
1353         * tree.h (initializer_zerop): Add argument.
1355 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
1357         PR middle-end/86660
1358         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1359         declare target to variables if they have always,{to,from,tofrom} map
1360         kinds.
1362 2018-07-26  Martin Liska  <mliska@suse.cz>
1364         PR lto/86548
1365         * lto-wrapper.c: Add linker_output as prefix
1366         for ltrans_output_file.
1368 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
1370         PR rtl-optimization/85805
1371         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1372         value for hard registers if that was written in the same mode.
1374 2018-07-26  Martin Liska  <mliska@suse.cz>
1376         PR gcov-profile/86536
1377         * gcov.c (format_gcov): Use printf format %.*f directly
1378         and do not handle special values.
1380 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1382         * common/config/arc/arc-common.c (arc_option_optimization_table):
1383         Update default optimizations for size.
1385 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1387         * config/arc/arc.md (movsf_insn): Add short instruction selection.
1388         * config/arc/constraints.md (CfZ): New constraint.
1389         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1390         (subsf3_fpu): Likewise.
1391         (cmpsf_fpu): Likewise.
1392         (cmpsf_fpu_uneq): Likewise.
1394 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1396         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1397         accesses as well.
1398         (arc_is_uncached_mem_p): uncached applies to both the variable and
1399         the pointer.
1401 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
1403         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1404         register names.
1406 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
1408         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1409         field "m_scopes" from vec to auto_vec.
1411 2018-07-25  Martin Liska  <mliska@suse.cz>
1413         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1414         return type.
1416 2018-07-25  Richard Biener  <rguenther@suse.de>
1418         PR debug/86654
1419         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1420         special wrt context_die late.
1421         (gen_subprogram_die): Re-use DIEs in local scope.
1423 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
1425         PR tree-optimization/86644
1426         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
1428 2018-07-25  Martin Liska  <mliska@suse.cz>
1430         PR middle-end/86645
1431         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1432         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1434 2018-07-25  Martin Liska  <mliska@suse.cz>
1436         PR sanitizer/79635
1437         * params.def: Explain ASan abbreviation and provide
1438         a documentation link.
1440 2018-07-24  Martin Sebor  <msebor@redhat.com>
1442         PR tree-optimization/86622
1443         PR tree-optimization/86532
1444         * builtins.h (string_length): Declare.
1445         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
1446         (check_access): Be prepared for non-constant length ranges.
1447         (string_length): Make extern.
1448         * expr.c (string_constant): Only handle the minor non-constant
1449         array index.  Use string_constant to compute the length of
1450         a generic string constant.
1452 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
1454         PR tree-optimization/86618
1455         * tree-vect-stmts.c (vectorizable_call): Don't take the address
1456         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1458 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
1460         PR tree-optimization/86636
1461         * json.cc (json::object::set): Fix comment.  Add assertions.
1462         (json::array::append): Move here from json.h.  Add comment and an
1463         assertion.
1464         (json::string::string): Likewise.
1465         * json.h (json::array::append): Move to json.cc.
1466         (json::string::string): Likewise.
1467         * optinfo-emit-json.cc
1468         (optrecord_json_writer::impl_location_to_json): Assert that we
1469         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1470         wrapper around it.  Expand the location once, rather than three
1471         times.
1472         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1473         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1474         wrappers.
1475         (optrecord_json_writer::optinfo_to_json): Likewise, in four
1476         places.  Fix some overlong lines.
1478 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
1480         * config/aarch64/aarch64-simd.md
1481         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1482         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1483         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1484         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1485         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1486         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1487         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1488         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1489         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1491 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
1493         PR middle-end/86627
1494         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1495         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
1496         and abs_d == d, do the power of two handling if profitable.
1498 2018-07-24  Richard Biener  <rguenther@suse.de>
1500         * match.pd: Add BIT_FIELD_REF canonicalizations.
1502 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1504         PR c/86617
1505         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1507 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1509         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1510         terminated STRING_CST object.
1512 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1514         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1516 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
1518         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1519         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1520         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1521         the elements into a register.
1522         (rs6000_split_v4si_init_di_reg): Delete.
1523         (rs6000_split_v4si_init): Delete.
1524         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1525         (vsx_init_v4si): Rewrite as a define_expand.
1527 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
1529         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1530         zero_extend argument from memory): New.
1532 2018-07-22  Martin Sebor  <msebor@redhat.com>
1534         PR bootstrap/86621
1535         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1536         diagnosing calls with unknown arguments unless -Walloca-larger-than
1537         is restricted to less than PTRDIFF_MAX bytes.
1539 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
1541         * doc/gcov.texi (Invoking Gcov): Editorial changes.
1543 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
1545         * pretty-print.c (text_info::set_location): Remove redundant
1546         "line_table" parameter from call to rich_location::set_range.
1548 2018-07-20  Martin Sebor  <msebor@redhat.com>
1550         PR middle-end/82063
1551         * builtins.c (expand_builtin_alloca): Adjust.
1552         * calls.c (alloc_max_size): Simplify.
1553         * cgraphunit.c (cgraph_node::expand): Adjust.
1554         * common.opt (larger_than_size, warn_frame_larger_than): Remove
1555         variables.
1556         (frame_larger_than_size): Same.
1557         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1558         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1559         Initialize.
1560         * doc/invoke.texi (GCC Command Options): Document option arguments.
1561         Explain byte-size arguments and suffixes.
1562         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1563         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1564         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1565         * doc/options.texi (UInteger): Expand.
1566         (Host_Wide_Int, ByteSize): Document new properties.
1567         * final.c (final_start_function_1): Include sizes in an error message.
1568         * function.c (frame_offset_overflow): Same.
1569         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1570         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1571         Diagnose unbounded alloca calls only for limits of less than
1572         PTRDIFF_MAX.
1573         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
1574         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
1575         for alloca(0).
1576         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
1577         only for limits of less than PTRDIFF_MAX.
1578         * langhooks-def.h (lhd_handle_option): Change function argument
1579         to HOST_WIDE_INT.
1580         * langhooks.c (lhd_handle_option): Same.
1581         * langhooks.h (handle_option): Same.
1582         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1583         ByteSize flags.
1584         (var_type, var_type_struct): Same.
1585         (var_set): Handle ByteSize flag.
1586         * optc-gen.awk: Add comments to output to ease debugging.  Make
1587         use of HOST_WIDE_INT where appropriate.
1588         * opts-gen-save.awk:  Use %lx to format unsigned long.
1589         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1590         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1591         arguments.  Parse bytes-size suffixes.
1592         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1593         (enum_value_to_arg): Same.
1594         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
1595         (handle_option): Adjust.
1596         (generate_option): Change function argument to HOST_WIDE_INT.
1597         (cmdline_handle_error): Adjust.
1598         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1599         (set_option): Change function argument to HOST_WIDE_INT.
1600         (option_enabled): Handle cl_host_wide_int.
1601         (get_option_state): Handle CLVC_SIZE.
1602         (control_warning_option): Same.
1603         * opts.c (common_handle_option): Change function argument to
1604         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
1605         OPT_Wvla_larger_than_.
1606         * opts.h (enum cl_var_type): Add an enumerator.
1607         * stor-layout.c (layout_decl): Print a more meaningful warning.
1608         * toplev.c (output_stack_usage): Adjust.
1610 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
1612         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1613         call to inline_expand_builtin_string_cmp.
1614         (expand_builtin_strcmp): Likewise.
1615         (expand_builtin_strncmp): Likewise.
1616         (inline_string_cmp): Delete the last parameter, change char_type_node
1617         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1618         two operands.
1619         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1620         the inlining expansion on target where the type of the call has same or 
1621         narrower precision than unsigned char.
1623 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
1625         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1626         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1627         * common.opt (fsave-optimization-record): New option.
1628         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1629         * doc/invoke.texi (-fsave-optimization-record): New option.
1630         * dumpfile.c: Include "optinfo-emit-json.h".
1631         (struct kv_pair): Move to coretypes.h.
1632         (optgroup_options): Make non-static.
1633         (dump_context::end_scope): Call
1634         optimization_records_maybe_pop_dump_scope.
1635         * dumpfile.h (optgroup_options): New decl.
1636         * json.cc: New file.
1637         * json.h: New file.
1638         * optinfo-emit-json.cc: New file.
1639         * optinfo-emit-json.h: New file.
1640         * optinfo.cc: Include "optinfo-emit-json.h".
1641         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1642         (optinfo_enabled_p): Check optimization_records_enabled_p.
1643         (optinfo_wants_inlining_info_p): Likewise.
1644         * optinfo.h: Update comment.
1645         * profile-count.c (profile_quality_as_string): New function.
1646         * profile-count.h (profile_quality_as_string): New decl.
1647         (profile_count::quality): New accessor.
1648         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1649         and optinfo_emit_json_cc_tests.
1650         * selftest.h (selftest::json_cc_tests): New decl.
1651         (selftest::optinfo_emit_json_cc_tests): New decl.
1652         * toplev.c: Include "optinfo-emit-json.h".
1653         (compile_file): Call optimization_records_finish.
1654         (do_compile): Call optimization_records_start.
1655         * tree-ssa-live.c: Include optinfo.h.
1656         (remove_unused_scope_block_p): Retain inlining information if
1657         optinfo_wants_inlining_info_p returns true.
1659 2018-07-20  Richard Biener  <rguenther@suse.de>
1661         PR debug/86585
1662         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1663         to cover -flto-partition=none.
1665 2018-07-20  Martin Liska  <mliska@suse.cz>
1667         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1668         (get_decl_source_range): Remove unused function.
1670 2018-07-20  Richard Biener  <rguenther@suse.de>
1672         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1673         (struct vn_phi_s): Likewise.
1674         (struct vn_reference_s): Likewise.
1675         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1676         for searching the slot of an entry known to be in the hash itself.
1677         (vn_phi_hasher::equal): Likewise.
1678         (vn_reference_hasher::equal): Likewise.
1679         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1680         globals.
1681         (optimistic_info, current_info): Remove, keeping only valid_info.
1682         (vn_reference_lookup_1): Remove fallback lookup.
1683         (vn_reference_lookup_2): Likewise.
1684         (vn_nary_op_lookup_1): Likewise.
1685         (vn_phi_lookup): Likewise.
1686         (vn_nary_build_or_lookup_1): Make sure to not chain the built
1687         hash element.
1688         (vn_reference_insert): Adjust, chain the inserted hash element
1689         at last_inserted_ref.
1690         (vn_reference_insert_pieces): Likewise.
1691         (visit_reference_op_call): Likewise.
1692         (vn_nary_op_insert_into): Chain the inserted hash element at
1693         last_inserted_nary.
1694         (vn_nary_op_insert_pieces): Adjust.
1695         (vn_nary_op_insert): Likewise.
1696         (vn_nary_op_insert_stmt): Likewise.
1697         (vn_phi_insert): Adjust, chain the inserted hash element at
1698         last_inserted_phi.
1699         (process_scc): Remove clearing and copying the optimistic
1700         table.  Instead remove elements inserted during an optimistic
1701         iteration from the single table we maintain.
1702         (init_scc_vn): Adjust.
1703         (free_scc_vn): Likewise.
1704         (sccvn_dom_walker::record_cond): Likewise.
1705         (sccvn_dom_walker::after_dom_children): Likewise.
1707 2018-07-19  Martin Sebor  <msebor@redhat.com>
1709         PR tree-optimization/84047
1710         PR tree-optimization/83776
1711         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1712         (check_array_bounds): Call it.
1714 2018-07-19  Martin Sebor  <msebor@redhat.com>
1716         * align.h (align_flags): Use member initialization.
1718 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
1720         * Makefile.in (OBJS): Add optinfo.o.
1721         * coretypes.h (class symtab_node): New forward decl.
1722         (struct cgraph_node): New forward decl.
1723         (class varpool_node): New forward decl.
1724         * dump-context.h: New file.
1725         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1726         "tree-pass.h".
1727         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1728         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1729         (set_alt_dump_file): Likewise.
1730         (dump_context::~dump_context): New dtor.
1731         (dump_gimple_stmt): Move implementation to...
1732         (dump_context::dump_gimple_stmt): ...this new member function.
1733         Add the stmt to any pending optinfo, creating one if need be.
1734         (dump_gimple_stmt_loc): Move implementation to...
1735         (dump_context::dump_gimple_stmt_loc): ...this new member function.
1736         Start a new optinfo and add the stmt to it.
1737         (dump_gimple_expr): Move implementation to...
1738         (dump_context::dump_gimple_expr): ...this new member function.
1739         Add the stmt to any pending optinfo, creating one if need be.
1740         (dump_gimple_expr_loc): Move implementation to...
1741         (dump_context::dump_gimple_expr_loc): ...this new member function.
1742         Start a new optinfo and add the stmt to it.
1743         (dump_generic_expr): Move implementation to...
1744         (dump_context::dump_generic_expr): ...this new member function.
1745         Add the tree to any pending optinfo, creating one if need be.
1746         (dump_generic_expr_loc): Move implementation to...
1747         (dump_context::dump_generic_expr_loc): ...this new member
1748         function.  Add the tree to any pending optinfo, creating one if
1749         need be.
1750         (dump_printf): Move implementation to...
1751         (dump_context::dump_printf_va): ...this new member function.  Add
1752         the text to any pending optinfo, creating one if need be.
1753         (dump_printf_loc): Move implementation to...
1754         (dump_context::dump_printf_loc_va): ...this new member function.
1755         Start a new optinfo and add the stmt to it.
1756         (dump_dec): Move implementation to...
1757         (dump_context::dump_dec): ...this new member function.  Add the
1758         value to any pending optinfo, creating one if need be.
1759         (dump_context::dump_symtab_node): New member function.
1760         (dump_context::get_scope_depth): New member function.
1761         (dump_context::begin_scope): New member function.
1762         (dump_context::end_scope): New member function.
1763         (dump_context::ensure_pending_optinfo): New member function.
1764         (dump_context::begin_next_optinfo): New member function.
1765         (dump_context::end_any_optinfo): New member function.
1766         (dump_context::s_current): New global.
1767         (dump_context::s_default): New global.
1768         (dump_scope_depth): Delete global.
1769         (dumpfile_ensure_any_optinfo_are_flushed): New function.
1770         (dump_symtab_node): New function.
1771         (get_dump_scope_depth): Reimplement in terms of dump_context.
1772         (dump_begin_scope): Likewise.
1773         (dump_end_scope): Likewise.
1774         (selftest::temp_dump_context::temp_dump_context): New ctor.
1775         (selftest::temp_dump_context::~temp_dump_context): New dtor.
1776         (selftest::verify_item): New function.
1777         (ASSERT_IS_TEXT): New macro.
1778         (ASSERT_IS_TREE): New macro.
1779         (ASSERT_IS_GIMPLE): New macro.
1780         (selftest::test_capture_of_dump_calls): New test.
1781         (selftest::dumpfile_c_tests): Call it.
1782         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1783         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1784         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1785         descriptive comment.
1786         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1787         (dump_node, dump_bb): Move these unrelated decls.
1788         (class dump_manager): Add leading comment.
1789         * optinfo.cc: New file.
1790         * optinfo.h: New file.
1792 2018-07-19  Michael Collison  <michael.collison@arm.com>
1793             Richard Henderson <rth@redhat.com>
1795         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1796         (subti): Handle op1 zero.
1797         (subvti4, usub4ti4): New.
1798         (*sub<GPI>3_compare1_imm): New.
1799         (sub<GPI>3_carryinCV): New.
1800         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1801         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1803 2018-07-19  Michael Collison  <michael.collison@arm.com>
1804             Richard Henderson <rth@redhat.com>
1806         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1807         (addti3): Create simpler code if low part is already known to be 0.
1808         (addvti4, uaddvti4): New.
1809         (*add<GPI>3_compareC_cconly_imm): New.
1810         (*add<GPI>3_compareC_cconly): New.
1811         (*add<GPI>3_compareC_imm): New.
1812         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1813         handle constants within this pattern..
1814         (*add<GPI>3_compareV_cconly_imm): New.
1815         (*add<GPI>3_compareV_cconly): New.
1816         (*add<GPI>3_compareV_imm): New.
1817         (add<GPI>3_compareV): New.
1818         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1819         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1820         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1821         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1822         with 'comparison' operator.
1823         (*add<GPI>3_compareV_cconly_imm): Ditto.
1824         (*add<GPI>3_compareV_cconly): Ditto.
1825         (*add<GPI>3_compareV_imm): Ditto.
1826         (add<GPI>3_compareV): Ditto.
1827         (add<mode>3_carryinC): Ditto.
1828         (*add<mode>3_carryinC_zero): Ditto.
1829         (*add<mode>3_carryinC): Ditto.
1830         (add<mode>3_carryinV): Ditto.
1831         (*add<mode>3_carryinV_zero): Ditto.
1832         (*add<mode>3_carryinV): Ditto.
1834 2018-07-19  Michael Collison  <michael.collison@arm.com>
1835             Richard Henderson <rth@redhat.com>
1837         * config/aarch64/aarch64-modes.def (CC_V): New.
1838         * config/aarch64/aarch64-protos.h
1839         (aarch64_addti_scratch_regs): Declare
1840         (aarch64_subvti_scratch_regs): Declare.
1841         (aarch64_expand_subvti): Declare.
1842         (aarch64_gen_unlikely_cbranch): Declare
1843         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1844         for signed overflow using CC_Vmode.
1845         (aarch64_get_condition_code_1): Handle CC_Vmode.
1846         (aarch64_gen_unlikely_cbranch): New function.
1847         (aarch64_addti_scratch_regs): New function.
1848         (aarch64_subvti_scratch_regs): New function.
1849         (aarch64_expand_subvti): New function.
1851 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1853         * config/aarch64/aarch64-option-extensions.def: New entry for profile
1854         extension.
1855         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1856         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1857         extension.
1859 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1861         PR target/83009
1862         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1863         address check not strict.
1865 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1867         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1868         Umq with Umn.
1869         (store_pair_lanes<mode>): Likewise.
1870         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1871         enum value 'ADDR_QUERY_LDP_STP_N'.
1872         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1873         (aarch64_print_address_internal): Add declaration.
1874         (aarch64_print_ldpstp_address): Remove.
1875         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1876         (aarch64_print_operand): Change printing of 'y'.
1877         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1878         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1879         'true' rather than '1'.
1880         * config/aarch64/constraints.md (Uml): Likewise.
1881         (Uml): Rename to Umn.
1882         (Umq): Remove.
1884 2018-07-19  Richard Biener  <rguenther@suse.de>
1886         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1887         a trailing array.
1888         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1889         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1890         (vn_reference_hasher): Likewise.
1891         (struct vn_tables_s): Remove obstack and alloc-pool members.
1892         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1893         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1894         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1895         (vn_reference_insert_pieces): Likewise.
1896         (alloc_vn_nary_op_noinit): Adjust.
1897         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1898         (vn_phi_eq): Adjust.
1899         (shared_lookup_phiargs): Remove.
1900         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1901         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1902         (visit_reference_op_call): Likewise.
1903         (copy_nary, copy_phi, copy_reference): Remove.
1904         (process_scc): Rewind the obstack when iterating.  Do not
1905         copy the elements to valid_info but just move them from one
1906         hashtable to the other.
1907         (allocate_vn_table): Adjust.
1908         (free_vn_table): Likewise.
1909         (init_scc_vn): Likewise.
1910         (free_scc_vn): Likewise.
1912 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
1914         PR target/86560
1915         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1916         indirect_return as function type attribute.
1917         (ix86_attribute_table): Change indirect_return to function
1918         type attribute.
1919         * doc/extend.texi: Update indirect_return attribute.
1921 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
1923         * wide-int.h (widest2_int): New.
1924         * gimple-fold.c (arith_overflowed_p): Use it.
1925         * tree.h (widest2_int_cst): New.
1926         * tree-vrp.c (wide_int_binop_overflow): Rename from
1927         vrp_int_const_binop.
1928         Rewrite to work on trees.
1929         (extract_range_from_multiplicative_op_1): Abstract code to...
1930         (wide_int_range_min_max): ...here.
1931         (wide_int_range_cross_product): ...and here.
1932         (extract_range_from_binary_expr_1): Abstract overflow code to...
1933         (wide_int_range_mult_wrapping): ...here.
1934         * tree-vrp.h (wide_int_range_cross_product): New.
1935         (wide_int_range_mult_wrapping): New.
1937 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
1938             Julia Koval  <julia.koval@intel.com>
1940         * config/i386/x86-tune-costs.h (skylake_memcpy,
1941         skylake_memset): Replace rep_prefix with unrolling for size 512.
1943 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
1945         PR middle-end/86544
1946         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1947         in last stmt.
1949 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1951         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1952         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1953         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1954         previously known as "PowerPC AltiVec Built-in Functions".  Move
1955         some material to new subsubsections "PowerPC AltiVec Built-in
1956         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1957         ISA 2.07".
1958         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1959         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1960         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1961         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1963 2018-07-18  Richard Biener  <rguenther@suse.de>
1965         PR tree-optimization/86557
1966         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1967         EXACT_DIV_EXPR.
1969 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
1971         * config/s390/s390.c (s390_function_profiler): Generate CFI.
1973 2018-07-17  Jeff Law  <law@redhat.com>
1975         * config/arm/arm.c (get_label_padding): Update for recent
1976         changes to label_to_alignment.
1978         PR tree-optimization/86010
1979         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1981         * config/mips/mips.c (vr4130_align_insns): Update for recent
1982         changes to label_to_alignment.
1984         * config/frv/frv.c (frv_label_align): Update for recent changes
1985         to label_to_alignment.
1987         * config/nios2/nios2.c (nios2_label_align): Update for recent
1988         changes which dropped ALIGN_LABELS_LOG.
1990 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
1992         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1993         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1995 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
1997         * config/arc/arc.c (arc_label_align): Use align_labels instead of
1998         deprecated align_labels_log.
2000 2018-07-17  Richard Biener  <rguenther@suse.de>
2002         PR lto/86456
2003         * dwarf2out.c (init_sections_and_labels): Always generate
2004         a debug_line_str_section for early LTO debug.
2005         (dwarf2out_finish): Reset debug_line_str_hash output early.
2006         Bump counter for extra dwarf5 .debug_loc labels to not conflict
2007         with fat LTO part.
2008         (dwarf2out_early_finish): Output debug_line_str.
2010 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
2012         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2013         index register on z196 or later.
2015 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
2017         * config/s390/s390.c (s390_default_align): Set default function
2018         alignment to 16.
2019         (s390_override_options_after_change): Call s390_default align.
2020         (s390_option_override_internal): Call s390_default_align.
2021         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2023 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
2025         PR middle-end/86542
2026         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2027         to _looptemp_ clauses, other than the first two.
2029 2018-07-17  Martin Liska  <mliska@suse.cz>
2031         * opts.c: Do not enable OPT_falign_* for -Os.
2033 2018-07-17  Martin Liska  <mliska@suse.cz>
2035         * align.h (MAX_CODE_ALIGN): New.
2036         (MAX_CODE_ALIGN_VALUE): New.
2037         * common/config/i386/i386-common.c (ix86_handle_option):
2038         (MAX_CODE_ALIGN): Moved to align.h.
2039         * final.c (MAX_CODE_ALIGN): Likewise.
2040         * opts.c (parse_and_check_align_values):
2041         (MAX_CODE_ALIGN): Likewise.
2042         (MAX_CODE_ALIGN_VALUE): Likewise.
2044 2018-07-17  Martin Liska  <mliska@suse.cz>
2046         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2047         in order to fulfil coding style.
2048         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2049         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2050         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2051         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2052         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2053         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2054         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2055         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2056         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2058 2018-07-17  Martin Liska  <mliska@suse.cz>
2060         * align.h: New file.
2061         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2062         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2063         align_flags of label_to_alignment.
2064         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2065         class.
2066         * config/m68k/m68k.c: Do not use removed align_labels_value and
2067         align_loops_value.
2068         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2069         (LOOP_ALIGN): Likewise.
2070         (LABEL_ALIGN): Likewise.
2071         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2072         Remove not used macro.
2073         (rs6000_loop_align): Change return type to align_flags.
2074         (rs6000_loop_align_max_skip): Remove.
2075         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2076         Change return type to align_flags.
2077         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2078         Remove not used macro.
2079         (rs6000_loop_align):  Change return type to align_flags.
2080         (rs6000_loop_align_max_skip): Remove.
2081         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2082         * config/rx/rx-protos.h (rx_align_for_label): Make it
2083         static function.
2084         * config/rx/rx.c (rx_align_for_label): Change return type
2085         to align_flags.
2086         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2087         macro definitions.
2088         into align_flags class.
2089         (LABEL_ALIGN): Likewise.
2090         (LOOP_ALIGN): Likewise.
2091         * config/s390/s390.c (s390_label_align): Use align_flags
2092         class member.
2093         (s390_asm_output_function_label): Likewise.
2094         * config/sh/sh.c (sh_override_options_after_change):
2095         Use align_flags class directly without macros.
2096         (find_barrier): Likewise.
2097         (barrier_align): Likewise.
2098         (sh_loop_align): Likewise.
2099         * config/spu/spu.c (spu_option_override):
2100         Use align_flags_tuple::get_value instead of removed macros.
2101         (spu_sched_init): Likewise.
2102         * config/spu/spu.h (GTY): Likewise.
2103         * config/visium/visium.c (visium_option_override):
2104         Set "8" as default secondary alignment.
2105         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2106         in order to guarantee secondary alignment of 8.
2107         * coretypes.h: Include align.h header file.
2108         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2109         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2110         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2111         * doc/tm.texi.in: Likewise.
2112         * final.c (struct label_alignment): Remove not used structure.
2113         (LABEL_ALIGN): Change type to align_flags.
2114         (LOOP_ALIGN): Likewise.
2115         (JUMP_ALIGN): Likewise.
2116         (default_loop_align_max_skip): Remove.
2117         (default_label_align_max_skip): Likewise.
2118         (default_jump_align_max_skip): Likewise.
2119         (default_label_align_after_barrier_max_skip):
2120         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2121         (LABEL_TO_MAX_SKIP): Remove.
2122         (label_to_alignment): Return align_flags type instead of integer.
2123         (label_to_max_skip): Remove.
2124         (align_fuzz): Use align_flags type.
2125         (compute_alignments): Use align_flags type and use align_flags::max
2126         to combine multiple alignments.
2127         (grow_label_align): Grow vec instead of C array.
2128         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2129         (shorten_branches):  Use align_flags type and use align_flags::max
2130         to combine multiple alignments.
2131         (final_scan_insn_1): Remove usage of secondary alignment that comes
2132         from label alignment, but instead use proper secondary alignment
2133         which is computed in grow_label_align.
2134         * flags.h (struct align_flags_tuple): Move to align.h.
2135         (struct align_flags): Likewise.
2136         (state_align_loops): Rename to align_loops.
2137         (state_align_jumps): Rename to align_jumps.
2138         (state_align_labels): Rename to align_labels.
2139         (state_align_functions): Rename to align_functions.
2140         (align_loops_log): Remove.
2141         (align_jumps_log): Remove.
2142         (align_labels_log): Remove.
2143         (align_functions_log): Remove.
2144         (align_loops_max_skip): Remove.
2145         (align_jumps_max_skip): Remove.
2146         (align_labels_max_skip): Remove.
2147         (align_functions_max_skip): Remove.
2148         (align_loops_value): Remove.
2149         (align_jumps_value): Remove.
2150         (align_labels_value): Remove.
2151         (align_functions_value): Remove.
2152         * output.h (label_to_alignment): Change return type to align_flags.
2153         (label_to_max_skip): Remove.
2154         * target.def: Remove loop_align_max_skip, label_align_max_skip,
2155         jump_align_max_skip macros.
2156         * targhooks.h (default_loop_align_max_skip): Remove.
2157         (default_label_align_max_skip): Likewise.
2158         (default_jump_align_max_skip): Likewise.
2159         (default_label_align_after_barrier_max_skip): Remove.
2160         * toplev.c (read_log_maxskip): Use ::normalize function.
2161         (parse_N_M): Remove not used argument and also call ::normalize.
2162         (parse_alignment_opts): Do not pass unused arguments.
2163         * varasm.c (assemble_start_function): Use directly align_functions
2164         instead of removed macros.
2165         * system.h: Do not poison removed macros.
2167 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
2169         PR middle-end/86539
2170         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2171         and cond temporaries don't have reference type if iterator has
2172         pointer type.  For init use &for_pre_body instead of pre_p if
2173         for_pre_body is non-empty.
2175 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
2177         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2178         double-double modes to SFmode directly directly.
2179         (trunc<mode>sf2_fprs): Delete.
2181 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
2183         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2184         for conversions between IFmode and the decimal floating point modes.
2185         (init_float128_ieee): Use the correct names for conversions between
2186         KFmode and the decimal floating point modes.
2188 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
2190         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2191         for the conversions between TDmode and IFmode.
2192         (init_float128_ieee): Use more correct names for the conversions
2193         between TDmode and KFmode.
2195 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
2197         PR tree-optimization/86526
2198         * builtins.c (expand_builtin_memcmp): Formatting fixes.
2199         (inline_expand_builtin_string_cmp): Likewise.
2200         (inline_string_cmp): Likewise.  Use c_readstr instead of
2201         builtin_memcpy_read_str.  Add unit_mode temporary.
2203 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2205         PR middle-end/86528
2206         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2207         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2209 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2211         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2212         Alphabetize prototypes of built-in functions, separating out
2213         built-in functions that are listed in this section but should be
2214         described elsewhere.
2216 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
2218         PR target/86511
2219         * expmed.c (emit_store_flag): Do not emit setcc followed by a
2220         conditional move when trapping comparison was split to a
2221         non-trapping one (and vice versa).
2223 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2225         * config/s390/s390.c (s390_function_profiler): Generate nops
2226         instead of profiler call sequences.
2227         * config/s390/s390.opt: Add the new option.
2229 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2231         * config/s390/s390.c (s390_function_profiler): Generate
2232         __mcount_loc section.
2233         * config/s390/s390.opt: Add the new option.
2235 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2237         * common.opt: Add the new warning.
2238         * config/s390/s390.c (s390_function_profiler): Emit "brasl
2239         %r0,__fentry__" when -mfentry is specified.
2240         (s390_option_override_internal): Disallow -mfentry for 31-bit
2241         CPUs.
2242         * config/s390/s390.opt: Add the new option.
2244 2018-07-16  Richard Biener  <rguenther@suse.de>
2246         PR lto/86523
2247         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2248         for function-local FUNCTION_DECL and RESULT_DECL immediately.
2250 2018-07-16  Martin Liska  <mliska@suse.cz>
2252         PR ipa/86529
2253         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2254         to ::get_create.
2256 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
2258         * config/arc/arcHS.md: Update ARCHS scheduling rules.
2260 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
2262         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2263         for ARCHS4x.
2264         * config/arc/arc-cpus.def (hs4x): New cpu.
2265         (hs4xd): Likewise.
2266         * config/arc/arc-tables.opt: Regenerate.
2267         * config/arc/arc.c (arc_sched_issue_rate): New function.
2268         (TARGET_SCHED_ISSUE_RATE): Define.
2269         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2270         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2271         fpu_cvt.
2272         (attr tune): Add ARCHS4x tune values.
2273         (attr tune_dspmpy): Define.
2274         (*tst): Correct instruction type.
2275         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2276         * config/arc/arcHS4x.md: New file.
2277         * config/arc/fpu.md: Update instruction type attributes.
2278         * config/arc/t-multilib: Regenerate.
2280 2018-07-16  Tom de Vries  <tdevries@suse.de>
2282         PR debug/86455
2283         * var-tracking.c (vt_initialize): Fix pre_dec handling.
2285 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2287         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2288         early clobber.
2290 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
2292         PR tree-optimization/86514
2293         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2294         conversion to a boolean type from a type with greater precision.
2296 2018-07-16  Tom de Vries  <tdevries@suse.de>
2298         * var-tracking.c (vt_initialize): Print adjusted insn slim if
2299         dump_flags request TDF_SLIM.
2301 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
2303         * fold-const.c (int_const_binop_1): Abstract...
2304         (wide_int_binop): ...wide int code here.
2305         (poly_int_binop): ...poly int code here.
2306         Abstract the rest of int_const_binop_1 into int_const_binop.
2307         * fold-const.h (wide_int_binop): New.
2308         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2309         Remove useless PLUS/MINUS_EXPR case.
2310         (zero_nonzero_bits_from_vr): Move wide int code...
2311         (zero_nonzero_bits_from_bounds): ...here.
2312         (extract_range_from_binary_expr_1): Move mask optimization code...
2313         (range_easy_mask_min_max): ...here.
2314         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2315         (range_easy_mask_min_max): New.
2317 2018-07-15  Jeff Law  <law@redhat.com>
2319         PR target/85993
2320         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2321         block.
2323 2018-07-14  Jim Wilson  <jimw@sifive.com>
2325         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2327 2018-07-14  Paul Koning  <ni1d@arrl.net>
2329         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2331 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
2333         * lto-streamer-out.c (copy_function_or_variable): Dump info about
2334         copying section.
2336 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
2337             Steve Munroe  <munroesj52@gmail.com>
2339         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2340         (_mm_andnot_si128): Likewise.
2341         (_mm_or_si128): Likewise.
2342         (_mm_xor_si128): Likewise.
2344 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
2346         PR middle-end/78809
2347         * builtins.c (expand_builtin_memcmp): Inline the calls first
2348         when result_eq is false.
2349         (expand_builtin_strcmp): Inline the calls first.
2350         (expand_builtin_strncmp): Likewise.
2351         (inline_string_cmp): New routine. Expand a string compare
2352         call by using a sequence of char comparison.
2353         (inline_expand_builtin_string_cmp): New routine. Inline expansion
2354         a call to str(n)cmp/memcmp.
2355         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2356         New option.
2357         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2359 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
2361         * config/arm/driver-arm.c: Include arm-native.h.
2362         (host_detect_local_cpu): Use auto-generated data tables.
2363         (vendors, arm_cpu_table): Delete.  Move part information to ...
2364         * config/arm/arm-cpus.in: ... here.
2365         * config/arm/parsecpu.awk (gen_native): New function.
2366         (vendor, part): New CPU fields.
2367         (END): Add support for building the native CPU detection tables.
2368         * config/arm/t-arm (arm-native.h): Add build rule.
2369         (driver-arm.o): Add dependency on arm-native.h.
2371 2018-07-13  Richard Biener  <rguenther@suse.de>
2373         PR middle-end/85974
2374         * match.pd (addr1 - addr2): Allow either of the operand to
2375         have a conversion.
2377 2018-07-13  Tom de Vries  <tdevries@suse.de>
2379         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2380         in remap_ssa_name.
2382 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
2384         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2385         arrays instead of numbered variables.
2387 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
2389         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2390         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2392 2018-07-13  Richard Biener  <rguenther@suse.de>
2394         PR debug/86452
2395         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2396         instead of get_context_die.
2398 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
2399             Richard Biener  <rguenther@suse.de>
2401         PR middle-end/86489
2402         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2403         that the loop latch destination where phi is defined.
2405 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
2407         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2408         (riscv_expand_epilogue): Add assertion to check interrupt mode.
2409         (riscv_set_current_function): Extract getting interrupt type to new
2410         function.
2411         (riscv_get_interrupt_type): New function.
2412         (riscv_merge_decl_attributes): New function, checking interrupt type is
2413         same.
2414         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2416 2018-07-12  Paul Koning  <ni1d@arrl.net>
2418         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2419         directive.
2421 2018-07-12  Paul Koning  <ni1d@arrl.net>
2423         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2424         zero reference, add doloop_end instead.
2425         * doc/md.texi (decrement_and_branch_until_zero): Remove.
2426         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
2427         detail for doloop_end.
2429 2018-07-12  Martin Sebor  <msebor@redhat.com>
2431         PR c/86453
2432         * attribs.c (decl_attributes): Reject conflicting attributes before
2433         calling attribute handlers.
2435 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
2437         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2438          parameter.
2439         (gcc::dump_manager::get_dump_file_name): likewise.
2440         (dump_begin): Likewise.
2441         * dumpfile.h (dump_begin): Update prototype.
2442         (gcc::dump_manager::get_dump_file_name,
2443         gcc::dump_manager::get_dump_file_name): Update prototype.
2445 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2447         * internal-fn.h (vectorizable_internal_fn_p): New function.
2448         * tree-vect-slp.c (compatible_calls_p): Likewise.
2449         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
2450         to internal functions.
2451         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2453 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2455         * fold-const.h (inverse_conditions_p): Declare.
2456         * fold-const.c (inverse_conditions_p): New function.
2457         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
2458         that test the inverse condition of a conditional internal function.
2459         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2460         * internal-fn.c (internal_fn_mask_index): Handle conditional
2461         internal functions.
2462         (vectorized_internal_fn_supported_p): New function.
2463         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2464         (any_pred_load_store): Replace with...
2465         (need_to_predicate): ...this new variable.
2466         (redundant_ssa_names): New variable.
2467         (ifcvt_can_use_mask_load_store): Move initial checks to...
2468         (ifcvt_can_predicate): ...this new function.  Handle tree codes
2469         for which a conditional internal function exists.
2470         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2471         instead of ifcvt_can_use_mask_load_store.  Update after variable
2472         name change.
2473         (predicate_load_or_store): New function, split out from
2474         predicate_mem_writes.
2475         (check_redundant_cond_expr): New function.
2476         (value_available_p): Likewise.
2477         (predicate_rhs_code): Likewise.
2478         (predicate_mem_writes): Rename to...
2479         (predicate_statements): ...this.  Use predicate_load_or_store
2480         and predicate_rhs_code.
2481         (combine_blocks, tree_if_conversion): Update after above name changes.
2482         (ifcvt_local_dce): Handle redundant_ssa_names.
2483         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2484         general conditional functions.
2485         * tree-vect-stmts.c (vectorizable_call): Likewise.
2487 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2488             Alan Hayward  <alan.hayward@arm.com>
2489             David Sherwood  <david.sherwood@arm.com>
2491         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2492         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2493         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2494         plus and minus and convert them into IFN_COND_FMA-based sequences.
2495         (convert_mult_to_fma): Handle conditional plus and minus.
2497 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2499         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2500         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2501         (cond_fnms_optab): New optabs.
2502         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2503         internal functions.
2504         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2505         * internal-fn.h (get_conditional_internal_fn): Declare.
2506         (get_unconditional_internal_fn): Likewise.
2507         * internal-fn.c (cond_ternary_direct): New macro.
2508         (expand_cond_ternary_optab_fn): Likewise.
2509         (direct_cond_ternary_optab_supported_p): Likewise.
2510         (FOR_EACH_COND_FN_PAIR): Likewise.
2511         (get_conditional_internal_fn): New function.
2512         (get_unconditional_internal_fn): Likewise.
2513         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2514         (gimple_match_op::gimple_match_op): Add a new overload for 5
2515         operands.
2516         (gimple_match_op::set_op): Likewise.
2517         (gimple_resimplify5): Declare.
2518         * genmatch.c (decision_tree::gen): Generate simplifications for
2519         5 operands.
2520         * gimple-match-head.c (gimple_simplify): Define an overload for
2521         5 operands.  Handle calls with 5 arguments in the top-level overload.
2522         (convert_conditional_op): Handle conversions from unconditional
2523         internal functions to conditional ones.
2524         (gimple_resimplify5): New function.
2525         (build_call_internal): Pass a fifth operand.
2526         (maybe_push_res_to_seq): Likewise.
2527         (try_conditional_simplification): Try converting conditional
2528         internal functions to unconditional internal functions.
2529         Handle 3-operand unconditional forms.
2530         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2531         Define ternary equivalents of the current rules for binary conditional
2532         internal functions.
2533         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2534         ternary operations.
2535         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2536         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2537         (optab): Handle them.
2538         (SVE_COND_FP_TERNARY): New int iterator.
2539         (sve_fmla_op, sve_fmad_op): New int attributes.
2540         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2541         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2542         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2544 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
2546         * target.def (preferred_else_value): New target hook.
2547         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2548         * doc/tm.texi: Regenerate.
2549         * targhooks.h (default_preferred_else_value): Declare.
2550         * targhooks.c (default_preferred_else_value): New function.
2551         * internal-fn.h (conditional_internal_fn_code): Declare.
2552         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2553         (get_conditional_internal_fn): Use it.
2554         (conditional_internal_fn_code): New function.
2555         * gimple-match.h (gimple_match_cond): New struct.
2556         (gimple_match_op): Add a cond member function.
2557         (gimple_match_op::gimple_match_op): Update all forms to take a
2558         gimple_match_cond.
2559         * genmatch.c (expr::gen_transform): Use the same condition as res_op
2560         for the suboperation, but don't specify a particular else_value.
2561         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2562         (visit_nary_op, visit_reference_op_load): Pass
2563         gimple_match_cond::UNCOND to the gimple_match_op constructor.
2564         * gimple-match-head.c: Include tree-eh.h
2565         (convert_conditional_op): New function.
2566         (maybe_resimplify_conditional_op): Likewise.
2567         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2568         (gimple_resimplify2): Likewise.
2569         (gimple_resimplify3): Likewise.
2570         (gimple_resimplify4): Likewise.
2571         (maybe_push_res_to_seq): Return null for conditional operations.
2572         (try_conditional_simplification): New function.
2573         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
2574         constructor.
2575         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2576         IFN_COND_* call.
2577         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2578         function.
2579         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2581 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
2583         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2584         DECL_FCONTEXT
2585         (hash_tree): Do not hash DECL_FCONTEXT
2586         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2587         Do not stream DECL_FCONTEXT.
2588         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2589         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2591 2018-07-12  Richard Biener  <rguenther@suse.de>
2593         PR debug/86462
2594         * dwarf2out.c (gen_block_die): Only output blocks when they have
2595         at least one !DECL_IGNORED_P variable.
2597 2018-07-12  Richard Biener  <rguenther@suse.de>
2599         PR target/84829
2600         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2601         Remove -mieee-fp handling.
2603 2018-07-12  Richard Biener  <rguenther@suse.de>
2605         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2606         left-over from last patch.
2608 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
2610         PR tree-optimization/86492
2611         * gimple-ssa-store-merging.c
2612         (imm_store_chain_info::coalesce_immediate_stores): Call
2613         check_no_overlap even for the merge_overlapping case.  Formatting fix.
2615 2018-07-12  Richard Biener  <rguenther@suse.de>
2617         PR middle-end/86479
2618         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2619         move possibly trapping operations into the conditional.
2621 2018-07-12  Richard Biener  <rguenther@suse.de>
2623         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2624         (vn_lookup_simplify_result): Remove recursion limit applied
2625         here.
2626         (vn_nary_build_or_lookup_1): Adjust.
2627         (try_to_simplify): Likewise.
2628         * gimple-match-head.c (gimple_resimplify1): Instead apply one
2629         here.
2630         (gimple_resimplify2): Likewise.
2631         (gimple_resimplify3): Likewise.
2632         (gimple_resimplify4): Likewise.
2634 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
2636         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2637         Use __mmask64 type instead of __mmask8 for __M argument.
2638         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2639         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2640         __U argument.
2641         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2642         __mmask16 for __M argument.
2643         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2644         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2645         to __mmask16 instead of __mmask8.
2646         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2647         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2648         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2649         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2650         instead of __mmask16 for __U argument.
2651         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2652         __mmask16 instead of __mmask8 for __U argument.
2653         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2654         __U argument.
2655         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2656         __mmask16.
2657         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2658         argument.
2659         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2660         __U argument.
2661         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2662         __mmask16.
2663         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2664         of __mmask16.
2665         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2666         __U argument.
2667         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2668         __U argument.
2669         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2670         __U argument.
2671         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2672         __U argument.
2673         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2674         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2675         return type as well as __M argument type and all casts from __mmask8
2676         to __mmask32.
2677         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2678         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2679         return type as well as __M argument type and all casts from __mmask8
2680         to __mmask16.
2681         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2682         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2683         return type as well as __M argument type and all casts from __mmask8
2684         to __mmask32.
2685         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2686         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2687         return type as well as __M argument type and all casts from __mmask8
2688         to __mmask16.
2689         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2690         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2691         __mmask16.
2693 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
2695         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2696         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2697         for __U argument.
2699 2018-07-11  Paul Koning  <ni1d@arrl.net>
2701         * doc/md.texi (define_subst): Document how multiple occurrences of
2702         the same argument in the replacement pattern are handled.
2704 2018-07-11  Paul Koning  <ni1d@arrl.net>
2706         * doc/extend.texi (Common Variable Attributes): Move "mode" into
2707         alphabetical order.
2708         (Common Type Attributes): Add "mode" attribute.
2710 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
2712         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2713         stream DECL_ORIGINAL_TYPE.
2714         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2715         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2716         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2717         Do not walk original type.
2718         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2719         external decls.
2720         (write_ts_decl_non_common_tree_pointers): Do not stream
2721         DECL_ORIGINAL_TYPE
2722         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2723         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2725 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
2727         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2728         thread twice from the same starting edge.
2730 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
2732         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2733         * gimple.c (gimple_call_nonnull_result_p): ...here...
2734         (gimple_call_nonnull_arg): ...and here.
2735         * gimple.h (gimple_call_nonnull_result_p): New.
2736         (gimple_call_nonnull_arg): New.
2738 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
2740         * config/arm/arm-cpus.in: Move information from fpu field of each
2741         cpu definition to the isa field.
2742         * config/arm/parsecpu.awk (fpu): Delete match rule.
2743         (gen_comm_data): Don't add bits from the CPU's FPU entry.
2745 2018-07-11  Richard Biener  <rguenther@suse.de>
2747         PR debug/86457
2748         * dwarf2out.c (init_sections_and_labels): Use
2749         output_asm_line_debug_info consistently.
2750         (dwarf2out_early_finish): Likewise.
2751         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2752         type units.
2754 2018-07-11  Richard Biener  <rguenther@suse.de>
2756         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2757         Rework father_bb setting in a way to avoid propagating constants
2758         multiple times on a loop body.
2760 2018-07-10  Mark Wielaard  <mark@klomp.org>
2762         PR debug/86459
2763         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2765 2018-07-10  Richard Biener  <rguenther@suse.de>
2767         * hash-map.h (hash_map::iterator::operator*): Return
2768         references to key and value.
2770 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
2772         PR c++/86443
2773         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2774         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2775         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2776         (gimplify_omp_for): For composite loops, move outer
2777         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2778         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
2779         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
2780         TREE_LIST for both the original class iterator and the "last" helper
2781         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
2782         loop, remember has_decl_expr from outer composite loops for the
2783         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2785 2018-07-09  Martin Sebor  <msebor@redhat.com>
2787         PR middle-end/77357
2788         PR middle-end/86428
2789         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2790         accessing implicitly initialized array elements.
2791         * expr.c (string_constant): Handle string initializers of
2792         character arrays within aggregates.
2793         * gimple-fold.c (fold_array_ctor_reference): Add argument.
2794         Store element offset.  As a special case, handle zero size.
2795         (fold_nonarray_ctor_reference): Same.
2796         (fold_ctor_reference): Add argument.  Store subobject offset.
2797         * gimple-fold.h (fold_ctor_reference): Add argument.
2799 2018-07-09  Paul Koning  <ni1d@arrl.net>
2801         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2802         (pdp11_insn_cost): New function.
2803         (pdp11_md_asm_adjust): New function.
2804         (TARGET_INVALID_WITHIN_DOLOOP): Define.
2805         (pdp11_rtx_costs): Update to match machine better.
2806         (output_addr_const_pdp11): Correct format mismatch warnings.
2807         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2808         * config/pdp11/pdp11.md: General change to add base_cost and/or
2809         length attributes for use by new pdp11_insn_cost function.
2810         (MIN_BRANCH): Correct definition.
2811         (MIN_SOB): Ditto.
2812         (doloop_end): Use standard pattern name for looping pattern.
2813         (doloop_end_nocc): New.
2814         (movsf): Add another constraint alternative.
2815         (zero_extendqihi2): Add constraint alternatives for not in place
2816         extend.
2817         (zero_extendhisi2): Remove.
2818         (shift patterns): Add CC handling variants.
2819         (bswaphi2): New.
2820         (bswapsi2): New.
2821         (rothi3): New.
2822         (define_peephole2): New peephole to recognize mov that sets CC for
2823         subsequent test.
2825 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2827         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2828         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2829         wi::add.
2831 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
2833         PR c/86420
2834         * real.c (real_nextafter): Return true if result is denormal.
2836 2018-07-09  Martin Liska  <mliska@suse.cz>
2838         * common.opt: Add back wrongly removed attribute.
2840 2018-07-09  Richard Biener  <rguenther@suse.de>
2842         PR debug/86413
2843         * dwarf2out.c (gen_block_die): For an early generated DIE
2844         always output high/low PC attributes.
2846 2018-07-09  Tom de Vries  <tdevries@suse.de>
2848         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2849         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2850         onto VAR_DECL with abstract origin.
2852 2018-07-07  Jim Wilson  <jimw@sifive.com>
2854         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2856 2018-07-07  Tom de Vries  <tdevries@suse.de>
2858         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2860 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
2862         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2863         overflow_type.
2864         (combine_bound): Use wide-int overflow calculation instead of
2865         rolling our own.
2866         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2867         overflow_type.
2868         * fold-const.c (int_const_binop_2): Same.
2869         (extract_muldiv_1): Same.
2870         (fold_div_compare): Same.
2871         (fold_abs_const): Same.
2872         * match.pd: Same.
2873         * poly-int.h (add): Same.
2874         (sub): Same.
2875         (neg): Same.
2876         (mul): Same.
2877         * predict.c (predict_iv_comparison): Same.
2878         * profile-count.c (slow_safe_scale_64bit): Same.
2879         * simplify-rtx.c (simplify_const_binary_operation): Same.
2880         * tree-chrec.c (tree_fold_binomial): Same.
2881         * tree-data-ref.c (split_constant_offset_1): Same.
2882         * tree-if-conv.c (idx_within_array_bound): Same.
2883         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2884         * tree-ssa-phiopt.c (minmax_replacement): Same.
2885         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2886         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2887         * vr-values.c (vr_values::adjust_range_with_scev): Same.
2888         * wide-int.cc (wi::add_large): Same.
2889         (wi::mul_internal): Same.
2890         (wi::sub_large): Same.
2891         (wi::divmod_internal): Same.
2892         * wide-int.h: Change overflow type to overflow_type for neg, add,
2893         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2894         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2895         mul_internal, divmod_internal.
2896         (overflow_type): New enum.
2897         (accumulate_overflow): New.
2899 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
2901         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2902         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2904 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
2906         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2907         argument is checked for zero before entering loop, avoid checking again.
2909 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
2911         * gimplify.h (generic_expr_could_trap_p): Set as global function.
2912         * gimplify.h (generic_expr_could_trap_p): Likwise.
2913         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2915 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
2917         PR tree-optimization/86401
2918         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2919         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2920         (fold_bit_and_mask): ... here.  New helper function for match.pd.
2921         * fold-const.h (fold_bit_and_mask): Declare.
2922         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2924 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
2926         PR target/86324
2927         * target.def (translate_mode_attribute): New hook.
2928         * targhooks.h (default_translate_mode_attribute): Declare.
2929         * targhooks.c (default_translate_mode_attribute): New function.
2930         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2931         * doc/tm.texi: Regenerate.
2932         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2933         (rs6000_translate_mode_attribute): New function.
2935 2018-07-06  Paul Koning  <ni1d@arrl.net>
2937         * doc/md.texi (define_split): Document DONE and FAIL.
2938         (define_peephole2): Ditto.
2940 2018-07-05  Jeff Law  <law@redhat.com>
2942         PR tree-optimization/86010
2943         * tree-ssa-dse.c (compute_trims): More aggressively trim at
2944         both the head and tail of mem* and str* calls.
2946 2018-07-05  Jim Wilson  <jimw@sifive.com>
2948         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2950 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
2952         * config/aarch64/aarch64-simd.md: correct flags text for
2953         MIN_EXPR replacement.
2955 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
2957         * configure: Regenerated.
2959 2018-07-05  Carl Love  <cel@us.ibm.com>
2961         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2962         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2963         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2964         VSX_BUILTIN_DOUBLEL_V4SF.
2966 2018-07-05  Martin Sebor  <msebor@redhat.com>
2968         PR c++/86400
2969         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2970         than its domain to compute its the upper bound of a char array.
2972 2018-07-05  Nathan Sidwell  <nathan@acm.org>
2974         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2975         * doc/cpp.texi: Update comment.
2976         * doc/tm.texi: Rebuilt.
2977         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2978         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2979         * doc/extend.texi (Backwards Compatibility): Clarify it is system
2980         headers affected by extern "C".
2981         * system.h: Poison NO_IMPLICIT_EXTERN_C.
2982         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2983         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2984         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2985         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2986         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2987         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2988         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2989         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2990         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2991         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2992         config/sparc/sp64-elf.h, config/spu/spu.h,
2993         config/stormy16/stormy16.h, config/v850/v850.h,
2994         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2995         define NO_IMPLICIT_EXTERN_C.
2996         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2998 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3000         PR target/84711
3001         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3002         instead of GET_MODE_SIZE when comparing Units.
3004 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3006         PR target/84711
3007         * rtlanal.c (set_noop_p): Constrain on mode change,
3008         include hard-reg-set.h
3010 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
3012         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3014 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
3016         Revert
3017         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
3019         PR sanitizer/84250
3020         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3021         libasan.
3022         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3024 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
3026         PR sanitizer/84250
3027         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3028         libasan.
3029         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3031 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
3033         PR middle-end/86380
3034         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3036 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
3038         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3039         neg_*_op* variables.
3041 2018-07-04  Martin Liska  <mliska@suse.cz>
3043         * tree-switch-conversion.c: Define
3044         max_ratio_for_speed and max_ratio_for_size constants.
3046 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
3047             Martin Liska  <mliska@suse.cz>
3049         PR middle-end/66240
3050         PR target/45996
3051         PR c/84100
3052         * common.opt: Rename align options with 'str_' prefix.
3053         * common/config/i386/i386-common.c (set_malign_value): New
3054         function.
3055         (ix86_handle_option): Use it to set -falign-* options/
3056         * config/aarch64/aarch64-protos.h (struct tune_params): Change
3057         type from int to string.
3058         * config/aarch64/aarch64.c: Update default values from int
3059         to string.
3060         * config/alpha/alpha.c (alpha_override_options_after_change):
3061         Likewise.
3062         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3063         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3064         max skip conditionally.
3065         * config/i386/freebsd.h (SUBALIGN_LOG): New.
3066         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3067         max skip conditionally.
3068         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3069         max skip conditionally.
3070         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3071         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3072         max skip conditionally.
3073         * config/i386/i386.c (struct ptt): Change type from int to
3074         string.
3075         (ix86_default_align): Set default values.
3076         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3077         max skip conditionally.
3078         * config/i386/iamcu.h (SUBALIGN_LOG): New.
3079         (ASM_OUTPUT_MAX_SKIP_ALIGN):
3080         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3081         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3082         max skip conditionally.
3083         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3084         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3085         * config/i386/x86-64.h (SUBALIGN_LOG): New.
3086         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3087         max skip conditionally.
3088         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3089         * config/ia64/ia64.c (ia64_option_override): Set default values
3090         for alignment options.
3091         * config/m68k/m68k.c: Handle new str_align_* options.
3092         * config/mips/mips.c (mips_set_compression_mode): Change
3093         type of constants.
3094         (mips_option_override): Set default values for options.
3095         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3096         Likewise.
3097         * config/rs6000/rs6000.c (rs6000_option_override_internal):
3098         Likewise.
3099         * config/rx/rx.c (rx_option_override): Likewise.
3100         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3101         (LABEL_ALIGN): Use align_labels_log.
3102         (LOOP_ALIGN): Use align_loops_align.
3103         * config/s390/s390.c (s390_asm_output_function_label): Use new
3104         macros.
3105         * config/sh/sh.c (sh_override_options_after_change):
3106         Change type of constants.
3107         * config/spu/spu.c (spu_sched_init): Likewise.
3108         * config/sparc/sparc.c (sparc_option_override): Set default
3109         values for options.
3110         * config/visium/visium.c (visium_option_override): Likewise.
3111         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3112         emit p2align format with last argument if it's not needed.
3113         * doc/invoke.texi: Document extended format of -falign-*.
3114         * final.c: Use align_labels alignment.
3115         * flags.h (struct target_flag_state): Change type to use
3116         align_flags.
3117         (struct align_flags_tuple): New.
3118         (struct align_flags): Likewise.
3119         (align_loops_log): Redefine macro to use new types.
3120         (align_loops_max_skip): Redefine macro to use new types.
3121         (align_jumps_log): Redefine macro to use new types.
3122         (align_jumps_max_skip): Redefine macro to use new types.
3123         (align_labels_log): Redefine macro to use new types.
3124         (align_labels_max_skip): Redefine macro to use new types.
3125         (align_functions_log): Redefine macro to use new types.
3126         (align_loops): Redefine macro to use new types.
3127         (align_jumps): Redefine macro to use new types.
3128         (align_labels): Redefine macro to use new types.
3129         (align_functions): Redefine macro to use new types.
3130         (align_functions_max_skip): Redefine macro to use new types.
3131         (align_loops_value): New macro.
3132         (align_jumps_value): New macro.
3133         (align_labels_value): New macro.
3134         (align_functions_value): New macro.
3135         * function.c (invoke_set_current_function_hook): Propagate
3136         alignment values from flags to global variables default in
3137         topleev.h.
3138         * ipa-icf.c (sem_function::equals_wpa): Use
3139         cl_optimization_option_eq instead of memcmp.
3140         * lto-streamer.h (cl_optimization_stream_out): Support streaming
3141         of string types.
3142         (cl_optimization_stream_in): Likewise.
3143         * optc-save-gen.awk: Support strings in cl_optimization.
3144         * opth-gen.awk: Likewise.
3145         * opts.c (finish_options): Remove error checking of invalid
3146         value ranges.
3147         (MAX_CODE_ALIGN): Remove.
3148         (MAX_CODE_ALIGN_VALUE): Likewise.
3149         (parse_and_check_align_values): New function.
3150         (check_alignment_argument): Likewise.
3151         (common_handle_option): Use check_alignment_argument.
3152         * opts.h (parse_and_check_align_values): Declare.
3153         * toplev.c (init_alignments): Remove.
3154         (read_log_maxskip): New.
3155         (parse_N_M): Likewise.
3156         (parse_alignment_opts): Likewise.
3157         (backend_init_target): Remove usage of init_alignments.
3158         * toplev.h (parse_alignment_opts): Declare.
3159         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3160         argument.
3161         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3162         * tree.c (cl_option_hasher::equal): New.
3163         * varasm.c: Use new global macros.
3165 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
3167         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3168         Use a simpler align directive also if MAXSKIP = ALIGN-1.
3169         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3170         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3171         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3172         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3173         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3174         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3175         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3176         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3177         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3178         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3179         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3181 2018-07-04  Martin Liska  <mliska@suse.cz>
3182             Jonathan Wakely  <jwakely@redhat.com>
3184         * coverage.c: Use correct type.
3185         * doc/invoke.texi: Language correction.
3187 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
3189         PR target/85620
3190         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3191         ENDBRANCH for non-tail call which may return via indirect branch.
3192         * doc/extend.texi: Document indirect_return attribute.
3194 2018-07-03  Martin Sebor  <msebor@redhat.com>
3196         PR tree-optimization/86274
3197         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3198         precondition.
3199         (format_floating): Correct handling of infinities and NaNs.
3201 2018-07-03  Martin Sebor  <msebor@redhat.com>
3203         * print-tree.c (print_real_cst): New function.
3204         (print_node_brief): Call it.
3205         (print_node): Ditto.
3207 2018-07-03  Jeff Law  <law@redhat.com>
3209         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3210         into a single pattern.
3212         * config/h8300/h8300.md (ors code_iterator): New.
3213         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3214         a single pattern and single splitter.
3215         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3216         (iorqi3_1, xorqi3_1): Likewise.
3217         (iorqi3, xorqi3 expanders): Similarly.
3219         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3220         (movmd_internal) into a single pattern using the P mode iterator.
3221         (movmd splitters): Similarly.
3222         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3223         (movsd splitters): Similarly.
3225         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3226         ADDB, ADDW and ADDL into a single ADD attribute which selects the
3227         right table based on the size of the operand.
3228         * config/h8300/h8300.md (length_table): Corresponding changes. All
3229         references to "addb", "addw" and "addl" changed to "add".
3230         (btst patterns): Merge two variants into a single pattern.
3231         (tstqi, tsthi): Likewise.
3232         (addhi3_incdec, addsi3_incdec): Likewise.
3233         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3234         (mulhi3, mulsi3): Likewise.
3235         (udivhi3, udivsi3): Likewise.
3236         (divhi3, divsi3): Likewise.
3237         (andorqi3, andorhi3, andorsi3): Likewise.
3239 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
3241         PR target/85694
3242         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3243         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3245 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3247         PR tree-optimization/85694
3248         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3249         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3250         UNSPEC_URHADD.
3251         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3252         (<u>avg<mode>3_ceil): New patterns.
3254 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
3256         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3257         scan-tree-dump directive.
3258         * gcc.dg/vect/slp-perm-2.c: Likewise.
3259         * gcc.dg/vect/slp-perm-3.c: Likewise.
3260         * gcc.dg/vect/slp-perm-5.c: Likewise.
3261         * gcc.dg/vect/slp-perm-6.c: Likewise.
3262         * gcc.dg/vect/slp-perm-7.c: Likewise.
3263         * gcc.dg/vect/slp-perm-8.c: Likewise.
3265 2018-07-03  Marek Polacek  <polacek@redhat.com>
3267         PR middle-end/86202
3268         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3270 2018-07-03  Richard Biener  <rguenther@suse.de>
3272         PR ipa/86389
3273         * tree-ssa-structalias.c (find_func_clobbers): Properly
3274         handle indirect calls.
3276 2018-07-03  Jeff Law  <law@redhat.com>
3278         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3279         (shifts): New code iterator.
3280         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3281         expander.  Fix HImode handling on H8/SX.
3282         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3283         (subqi3, subhi3, subsi3 expanders): Likewise.
3284         (andqi3, andhi3, andsi3 expanders): Likewise.
3285         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3286         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3287         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3288         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3289         (zero_extendqihi2, zero_extendqisi2): Likewise.
3290         (extendqihi2, extendqisi2): Likewise.
3291         (rotlqi3, rotlhi3, rotlsi3): Likewise.
3292         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3293         (rotlqi3_1, rotlhi3_1): Likewise.
3294         (logicalhi3_sn, logicalsi3_sn): Likewise.
3295         (logicalhi3, logicalsi3): Likewise.
3297 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3299         * tree-vect-patterns.c (vect_recog_rotate_pattern)
3300         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3301         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3302         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3303         type to append_pattern_def_seq instead of creating a stmt_vec_info
3304         directly.
3305         (build_mask_conversion): Likewise.  Remove vinfo argument.
3306         (vect_add_conversion_to_patterm): Likewise, renaming to...
3307         (vect_add_conversion_to_pattern): ...this.
3308         (vect_recog_mask_conversion_pattern): Update call to
3309         build_mask_conversion.  Pass the vector type to
3310         append_pattern_def_seq here too.
3311         (vect_recog_gather_scatter_pattern): Update call to
3312         vect_add_conversion_to_pattern.
3314 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3316         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3317         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3318         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3319         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3320         STMT_VINFO_PATTERN_DEF_SEQ to null here.
3321         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3322         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3323         append_pattern_def_seq instead of new_pattern_def_seq.
3324         (vect_recog_divmod_pattern): Do both of the above.
3325         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3326         is null.
3328 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3330         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3331         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3332         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3333         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3334         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3335         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3336         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3337         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3338         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3339         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3340         parameter with a single stmt_vec_info.
3341         (vect_recog_func_ptr): Likewise.
3342         (vect_recog_gather_scatter_pattern): Likewise, folding in...
3343         (vect_try_gather_scatter_pattern): ...this.
3344         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3345         the stmt_vec_info of the statement to be matched.  Don't clear
3346         STMT_VINFO_RELATED_STMT.
3347         (vect_pattern_recog): Update call accordingly.
3349 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3351         PR tree-optimization/85694
3352         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3353         (uavgM3_ceil): Document new optabs.
3354         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3355         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3356         functions.
3357         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3358         (savg_ceil_optab): New optabs.
3359         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3360         (vect_vect_recog_func_ptrs): Add it.
3361         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3362         constant directly from the associated lhs.
3364 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3366         * tree-vect-patterns.c (vect_split_statement): New function.
3367         (vect_convert_input): Use it to try to split an existing cast.
3369 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3371         * poly-int.h (print_hex): New function.
3372         * dumpfile.h (dump_dec, dump_hex): Declare.
3373         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3374         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3375         min_input_precision, operation_precision and operation_sign.
3376         * tree-vect-patterns.c (vect_get_range_info): New function.
3377         (vect_same_loop_or_bb_p, vect_single_imm_use)
3378         (vect_operation_fits_smaller_type): Delete.
3379         (vect_look_through_possible_promotion): Add an optional
3380         single_use_p parameter.
3381         (vect_recog_over_widening_pattern): Rewrite to use new
3382         stmt_vec_info infomration.  Handle one operation at a time.
3383         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3384         (vect_truncatable_operation_p, vect_set_operation_type)
3385         (vect_set_min_input_precision): New functions.
3386         (vect_determine_min_output_precision_1): Likewise.
3387         (vect_determine_min_output_precision): Likewise.
3388         (vect_determine_precisions_from_range): Likewise.
3389         (vect_determine_precisions_from_users): Likewise.
3390         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3391         (vect_vect_recog_func_ptrs): Put over_widening first.
3392         Add cast_forwprop.
3393         (vect_pattern_recog): Call vect_determine_precisions.
3395 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
3397         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3398         statements that have been replaced by further pattern statements.
3399         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3401 2018-07-03  Richard Biener  <rguenther@suse.de>
3403         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3404         always set *dt.  Dump vectype in vectype overload.
3405         * dumpfile.h (dump_gimple_expr): New function.
3406         (dump_gimple_expr_loc): Likewise.
3407         * dumpfile.c (dump_gimple_expr): New function.
3408         (dump_gimple_expr_loc): Likewise.
3410 2018-07-02  Jeff Law  <law@redhat.com>
3412         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3413         the H8/300, H8/300H and H8/S variants into a single pattern.
3414         (movhi_h8300, movqi_h8300hs): Similarly.
3415         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3416         (QHI mode iterator): New.
3418         * config/h8300/h8300.md: Remove trailing whitespace.
3420 2018-07-02  Jim Wilson  <jimw@sifive.com>
3422         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3423         instead of emit_insn for interrupt returns.
3424         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3425         (riscv_sret, riscv_uret): Likewise.
3427 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
3429         * pretty-print.c (selftest::test_pp_format): Move save and restore
3430         of quotes to class auto_fix_quotes, and add an instance.
3431         * selftest.c: Include "intl.h".
3432         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3433         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3434         * selftest.h (selftest::auto_fix_quotes): New class.
3436 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
3438         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3439         (aarch64_sve_prepare_conditional_op): Remove.
3440         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3441         Allow aarch64_simd_reg_or_zero as select operand; remove
3442         the aarch64_sve_prepare_conditional_op call.
3443         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3444         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3445         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3446         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3447         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3448         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3449         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3450         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3451         and a splitters to match all of the *_any patterns.
3452         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3454         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3455         (SVE_COND_FP_BINARY_REV): Remove.
3456         (sve_int_op_rev, sve_fp_op_rev): New.
3457         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3458         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3459         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3460         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3461         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3462         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3463         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3464         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3465         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3467         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3468         Remove match_dup 1 from the inner unspec.
3469         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3471         * config/aarch64/aarch64.md (movprfx): New attr.
3472         (length): Default movprfx to 8.
3473         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3474         (*madd<SVE_I>, *msub<SVE_I): Likewise.
3475         (*<su>mul<SVE_I>3_highpart): Likewise.
3476         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3477         (*v<ASHIFT><SVE_I>3): Likewise.
3478         (*<su><MAXMIN><SVE_I>3): Likewise.
3479         (*<su><MAXMIN><SVE_F>3): Likewise.
3480         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3481         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3482         (*div<SVE_F>4): Likewise.
3484 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
3486         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3487         in dump string.
3489 2018-07-02  Richard Biener  <rguenther@suse.de>
3491         PR tree-optimization/86363
3492         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3493         memset argument refers to a non-variable address.
3495 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
3497         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3498         {PLUS,MINUS}_EXPR code to...
3499         (adjust_symbolic_bound): ...here,
3500         (combine_bound): ...here,
3501         (set_value_range_with_overflow): ...and here.
3503 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
3505         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3506         code...
3507         (extract_range_from_abs_expr): ...here.
3509 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
3511         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3512         -fno-omit-frame-pointer when not optimizing.
3514 2018-07-02  Martin Liska  <mliska@suse.cz>
3516         PR ipa/86279
3517         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3518         (propagate_nothrow): Likewise.
3520 2018-07-02  Martin Liska  <mliska@suse.cz>
3522         PR ipa/86323
3523         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3525 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
3527         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3528         function in r262149, changing "loc" param from source_location to
3529         const dump_location_t &.
3530         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3531         declaration, as above.
3533 2018-07-01  Paul Koning  <ni1d@arrl.net>
3535         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3536         -munit-asm, -mgnu-asm, -mdec-asm.
3537         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3538         (pdp11_output_labelref): New.
3539         (pdp11_output_def): New.
3540         (pdp11_output_addr_vec_elt): New.
3541         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
3542         %# and %@ format codes.
3543         (pdp11_option_override): New.
3544         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3545         (pdp11_output_ident): New.
3546         (pdp11_asm_named_section): New.
3547         (pdp11_asm_init_sections): New.
3548         (pdp11_file_start): New.
3549         (pdp11_file_end): New.
3550         (output_ascii): Use .ascii/.asciz for -mdec-asm.
3551         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
3552         %o, like %c but octal.
3553         (pdp11_option_override): New.
3554         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3555         -mdec-asm.
3556         (DATA_SECTION_ASM_OP): Ditto.
3557         (READONLY_DATA_SECTION_ASM_OP): New.
3558         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3559         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3560         (ASM_OUTPUT_LABELREF): Ditto.
3561         (ASM_OUTPUT_DEF): Ditto.
3562         (ASM_OUTPUT_EXTERNAL): New.
3563         (ASM_OUTPUT_SOURCE_FILENAME): New.
3564         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3565         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3566         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
3567         %# and %@ format codes.
3568         * config/pdp11/pdp11.opt (mgnu-asm): New.
3569         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3570         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3571         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3573 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
3575         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3576         dereferencing path[] beyond its length.
3577         (debug_path): New.
3578         (debug_all_paths): New.
3579         (rewire_first_differing_edge): New.
3580         (adjust_paths_after_duplication): New.
3581         (duplicate_thread_path): Call adjust_paths_after_duplication.
3582         Add new argument.
3583         (thread_through_all_blocks): Add new argument to
3584         duplicate_thread_path.
3586 2018-06-30  Jim Wilson  <jimw@sifive.com>
3588         * config/riscv/predicates.md (p2m1_shift_operand): New.
3589         (high_mask_shift_operand): New.
3590         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3591         pattern using p2m1_shift_operand.
3592         (lshsi3_zero_extend_3+2): New combiner pattern using
3593         high_mask_shift_operand.
3595 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3597         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3598         split out from...
3599         (vect_recog_rotate_pattern): ...here.
3600         (vect_convert_input): Try to insert casts of invariants in the
3601         preheader.
3602         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3603         preheader to be empty.
3605 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3607         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3608         vector type.  If given, install it in the new statement's
3609         STMT_VINFO_VECTYPE.
3610         (vect_element_precision): New function.
3611         (vect_unpromoted_value): New struct.
3612         (vect_unpromoted_value::vect_unpromoted_value): New function.
3613         (vect_unpromoted_value::set_op): Likewise.
3614         (vect_look_through_possible_promotion): Likewise.
3615         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3616         (vect_widened_op_tree, vect_convert_input): Likewise.
3617         (vect_convert_inputs, vect_convert_output): Likewise.
3618         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3619         to handle the optional cast of the multiplication result and
3620         vect_widened_op_tree to detect the widened multiplication itself.
3621         Do not require the input and output of promotion casts to have
3622         the same sign, but base the signedness of the operation on the
3623         input rather than the result.  If the pattern includes two
3624         promotions, check that those promotions have the same sign.
3625         Do not restrict the MULT_EXPR handling to a double-width result;
3626         handle quadruple-width results and wider.  Use vect_convert_inputs
3627         to convert the inputs to the common type.
3628         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
3629         to handle the optional cast of the ABS result.  Also allow a sign
3630         change or a sign extension between the ABS and MINUS.
3631         Use vect_widened_op_tree to detect the widened subtraction and use
3632         vect_convert_inputs to convert the inputs to the common type.
3633         (vect_handle_widen_op_by_const): Delete.
3634         (vect_recog_widen_op_pattern): New function.
3635         (vect_recog_widen_mult_pattern): Use it.
3636         (vect_recog_widen_shift_pattern): Likewise.
3637         (vect_recog_widen_sum_pattern): Use
3638         vect_look_through_possible_promotion to handle the promoted
3639         PLUS_EXPR operand.
3641 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3643         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3644         the containing gimple_seq *.
3645         * gimple-iterator.h (gsi_for_stmt): Declare it.
3646         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3647         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3648         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3649         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3650         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3651         checks.
3652         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3653         split out from...
3654         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
3655         statement being replaced is part of an existing pattern
3656         definition sequence, inserting the new pattern statements before
3657         the original one.
3658         (vect_pattern_recog_1): Don't return a bool.  If the statement
3659         is already part of a pattern, instead apply pattern matching
3660         to the pattern definition statements.  Don't clear the
3661         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3662         (vect_pattern_recog): Don't break after the first match;
3663         continue processing the pattern definition statements instead.
3664         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3666 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3668         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3669         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3670         (vect_recog_widen_sum_pattern): Use it.
3672 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3674         * tree-vect-loop.c (vectorizable_reduction): Assert that the
3675         phi is not a pattern statement and has not been replaced by
3676         a pattern statement.
3677         * tree-vect-patterns.c (type_conversion_p): Don't check
3678         STMT_VINFO_IN_PATTERN_P.
3679         (vect_recog_vector_vector_shift_pattern): Likewise.
3680         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3681         the pattern statement rather than the original statement; check
3682         directly for a WIDEN_MULT_EXPR here.
3683         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3684         vect_is_simple_use to return the pattern statement rather
3685         than the original statement; use is_pattern_stmt_p to check
3686         for such a pattern statement.
3687         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3688         to return the pattern statement rather than the original statement;
3689         don't do the same transformation here.
3690         (vect_is_simple_use): If the defining statement has been replaced
3691         by a pattern statement, return the pattern statement instead.
3692         Remove the corresponding (local) transformation from the vectype
3693         overload.
3695 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3697         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3698         end and default to null.
3699         * tree-vect-loop.c (vect_create_epilog_for_reduction)
3700         (vectorizable_reduction): Update calls accordingly, dropping the
3701         gimple ** argument if the passed-back statement isn't needed.
3702         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3703         (vect_recog_rotate_pattern): Likewise.
3704         (vect_recog_mask_conversion_pattern): Likewise.
3705         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3706         (vect_mask_constant_operand_p): Likewise.
3707         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3708         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3709         (get_group_load_store_type, get_load_store_type): Likewise.
3710         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3711         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3712         (vectorizable_conversion, vectorizable_assignment): Likewise.
3713         (vectorizable_shift, vectorizable_operation): Likewise.
3714         (vectorizable_store, vect_is_simple_cond): Likewise.
3715         (vectorizable_condition, vectorizable_comparison): Likewise.
3716         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3717         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3718         and move it to the end.  Cope with null def_stmt_outs.
3720 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3722         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3724 2018-06-29  Jeff Law  <law@redhat.com>
3726         * config/v850/v850.c (v850_legitimate_address_p): Handle large
3727         displacements for TARGET_V850E2V3 and newer.
3728         (TARGET_LRA_P): Remove.  Defaults to LRA now.
3729         * config/v850/v850.md (sign23byte_load): Remove.
3730         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3731         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3733 2018-06-29  Martin Liska  <mliska@suse.cz>
3735         PR lto/85759
3736         * coverage.c (coverage_init): Mangle full path name.
3737         * doc/invoke.texi: Document the change.
3738         * gcov-io.c (mangle_path): New.
3739         * gcov-io.h (mangle_path): Likewise.
3740         * gcov.c (mangle_name): Use mangle_path for path mangling.
3742 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3744         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3745         if starting source register is not even.
3747 2018-06-29  Martin Liska  <mliska@suse.cz>
3749         PR tree-optimization/86263
3750         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3751         Make edge redirection.
3753 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
3755         * dumpfile.c (dump_loc): Add indentation based on scope depth.
3756         (dump_scope_depth): New variable.
3757         (get_dump_scope_depth): New function.
3758         (dump_begin_scope): New function.
3759         (dump_end_scope): New function.
3760         * dumpfile.h (get_dump_scope_depth): New declaration.
3761         (dump_begin_scope): New declaration.
3762         (dump_end_scope): New declaration.
3763         (class auto_dump_scope): New class.
3764         (AUTO_DUMP_SCOPE): New macro.
3765         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3766         AUTO_DUMP_SCOPE.
3768 2018-06-29  Richard Biener  <rguenther@suse.de>
3770         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3771         compute_all_dependences succeeds.
3772         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3773         exceed --param loop-max-datarefs-for-datadeps.
3775 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
3777         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3779 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
3781         PR target/86348
3782         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3783         alternative 0 in preferred_for_speed attribute.
3785 2018-06-28  Paul Koning  <ni1d@arrl.net>
3787         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3788         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3789         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3790         * config/pdp11/pdp11.md: Correct "length" attribute calculation
3791         for shift insn patterns.
3793 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
3795         * cgraph.c (cgraph_node::get_body): Replace assignments to
3796         "dump_file" with calls to set_dump_file.
3797         * dumpfile.c (alt_dump_file): Make static, and group with...
3798         (alt_flags): ...this definition.
3799         (dumps_are_enabled): New variable.
3800         (refresh_dumps_are_enabled): New function.
3801         (set_dump_file): New function.
3802         (set_alt_dump_file): New function.
3803         (gcc::dump_manager::dump_start): Replace assignments to
3804         "dump_file" and "alt_dump_file" with calls to set_dump_file and
3805         set_alt_dump_file.
3806         (gcc::dump_manager::dump_finish): Likewise.
3807         * dumpfile.h (alt_dump_file): Delete decl.
3808         (dumps_are_enabled): New variable decl.
3809         (set_dump_file): New function decl.
3810         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3811         global.
3812         * tree-nested.c (lower_nested_functions): Replace assignments to
3813         "dump_file" with calls to set_dump_file.
3815 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
3817         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3818         goto_locus of each outgoing edge of each basic block.
3820 2018-06-28  Richard Biener  <rguenther@suse.de>
3822         * dwarf2out.c (decl_scope_table): Remove.
3823         (push_decl_scope): Likewise.
3824         (pop_decl_scope): Likewise.
3825         (gen_type_die_for_member): Do not call push/pop_decl_scope.
3826         (gen_struct_or_union_type_die): Likewise.
3827         (gen_tagged_type_die): Likewise.
3828         (dwarf2out_init): Do not initialize decl_scope_table.
3829         (dwarf2out_c_finalize): Do not free it.
3831 2018-06-28  Richard Biener  <rguenther@suse.de>
3833         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3834         deciding whether to not re-use a DIE.
3836 2018-06-28  Richard Biener  <rguenther@suse.de>
3838         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3839         DW_AT_abstract_origin attribute.
3841 2018-06-28  Martin Liska  <mliska@suse.cz>
3843         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3844         Use newly introduced constants.
3845         * tree-switch-conversion.h (struct jump_table_cluster):
3846         Define max_ratio_for_size and max_ratio_for_speed.
3848 2018-06-28  Martin Liska  <mliska@suse.cz>
3850         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3851         Add new checking assert to catch invalid state.
3852         (jump_table_cluster::can_be_handled): Handle single case
3853         clusters.
3854         (jump_table_cluster::is_beneficial): Bail out for such case.
3855         (bit_test_cluster::find_bit_tests):
3856         Add new checking assert to catch invalid state.
3857         (bit_test_cluster::can_be_handled): Handle single case
3858         clusters.
3859         (bit_test_cluster::is_beneficial): Bail out for such case.
3860         (switch_decision_tree::analyze_switch_statement):
3861         Fix comment.
3863 2018-06-28  Martin Liska  <mliska@suse.cz>
3865         * common.opt: Introduce -completion option.
3866         * gcc.c (driver_handle_option): Handle it.
3867         (driver::main): Print completions if completion
3868         is set.
3869         * opt-suggestions.c (option_proposer::get_completions):
3870         New function.
3871         (option_proposer::suggest_completion): Likewise.
3872         (option_proposer::find_param_completions): Likewise.
3873         (verify_autocompletions): Likewise.
3874         (test_completion_valid_options): Likewise.
3875         (test_completion_valid_params): Likewise.
3876         (in_completion_p): Likewise.
3877         (empty_completion_p): Likewise.
3878         (test_completion_partial_match): Likewise.
3879         (test_completion_garbage): Likewise.
3880         (opt_proposer_c_tests): Likewise.
3881         * opt-suggestions.h: Declare new functions.
3882         * opts.c (common_handle_option): Handle OPT__completion_.
3883         * selftest-run-tests.c (selftest::run_tests): Add
3884         opt_proposer_c_tests.
3885         * selftest.c (assert_str_startswith): New.
3886         * selftest.h (assert_str_startswith): Likewise.
3887         (opt_proposer_c_tests): New.
3888         (ASSERT_STR_STARTSWITH): Likewise.
3890 2018-06-28  Martin Liska  <mliska@suse.cz>
3892         * Makefile.in: Add opt-suggestions.o.
3893         * gcc-main.c: Include opt-suggestions.h.
3894         * gcc.c (driver::driver): Likewise.
3895         (driver::~driver): Remove m_option_suggestions.
3896         (driver::build_option_suggestions): Moved to option_proposer.
3897         (driver::suggest_option): Likewise.
3898         (driver::handle_unrecognized_options): Use option_proposer.
3899         * gcc.h (class driver): Add new memver m_option_proposer.
3900         * opt-suggestions.c: New file.
3901         * opt-suggestions.h: New file.
3903 2018-06-28  Martin Liska  <mliska@suse.cz>
3905         * vec.h (class auto_string_vec): New (moved from auto_argvec).
3906         (auto_string_vec::~auto_string_vec): Likewise.
3908 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
3910         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3911         prevent_decl_creation_for_types fields up and add reset_location field.
3912         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3913         statement if id->reset_location is true.
3914         (copy_edges_for_bb): Do not set goto_locus on the new edges if
3915         id->reset_location is true.
3916         (copy_phis_for_bb): Force input_location on the arguments if
3917         id->reset_location is true.
3918         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3919         is set on the function to be inlined.
3921 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
3923         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3925 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
3927         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3928         registers for Pmode.
3929         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3930         hard registers for the clobbered pseudo.
3932 2018-06-27  Paul Koning  <ni1d@arrl.net>
3934         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3935         mutually exclusive options.
3936         * config/pdp11/constraints.md (h): New constraint.
3937         (O): Update definition to match shift code generation.
3938         (D): New constraint.
3939         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3940         (CCFP): Remove.
3941         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3942         function.
3943         (output_jump): Change arguments.
3944         (pdp11_fixed_cc_regs): New function.
3945         (pdp11_cc_mode): Ditto.
3946         (pdp11_expand_shift): Ditto.
3947         (pdp11_assemble_shift): Ditto.
3948         (pdp11_small_shift): Ditto.
3949         (pdp11_branch_cost): Remove.
3950         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3951         from output.
3952         (pdp11_register_move_cost): Update for CC registers.
3953         (pdp11_rtx_costs): Add case for LSHIFTRT.
3954         (pdp11_output_jump): Add CCNZ mode conditional branches.
3955         (notice_update_cc_on_set): Remove.
3956         (pdp11_cc_mode): New function.
3957         (simple_memory_operand): Correct pre/post decrement case.
3958         (no_side_effect_operand): New function.
3959         (pdp11_regno_reg_class): Add CC_REGS class.
3960         (pdp11_fixed_cc_regs): New function.
3961         (pdp11_small_shift): New function.
3962         (pdp11_expand_shift): New function to expand shift insns.
3963         (pdp11_assemble_shift): New function to output shifts.
3964         (pdp11_branch_cost): Remove.
3965         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3966         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3967         (WCHAR_TYPE): Ditto.
3968         (PTRDIFF_TYPE): Ditto.
3969         (ADJUST_INSN_LENGTH): New macro.
3970         (FIXED_REGISTERS): Add CC registers.
3971         (CALL_USED_REGISTERS): Ditto.
3972         (reg_class): Ditto.
3973         (REG_CLASS_NAMES): Ditto.
3974         (REG_CLASS_CONTENTS): Ditto.
3975         (SELECT_CC_MODE): Use new function.
3976         (TARGET_FLAGS_REGNUM): New macro.
3977         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3978         (cc0_reg_rtx): Remove.
3979         (CC_STATUS_MDEP): Remove.
3980         (CC_STATUS_MDEFP_INIT): Remove.
3981         (CC_IN_FPU): Remove.
3982         (NOTICE_UPDATE_CC): Remove.
3983         (REGISTER_NAMES): Add CC registers.
3984         (BRANCH_COST): Change to constant 1.
3985         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3986         handling.
3987         * config/pdp11/pdp11.opt (mbcopy): Remove.
3988         (mbcopy-builtin): Remove.
3989         (mbranch-cheap): Remove.
3990         (mbranch-expensive): Remove.
3991         * config/pdp11/predicates.md (expand_shift_operand): Update to
3992         match shift code generation.
3993         (ccnz_operator): New predicate.
3994         * doc/invoke.texi (PDP-11 Options): Remove deleted options
3995         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3996         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
3997         exclusive options.
3998         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
3999         description of O constraint.
4001 2018-06-27  Jeff Law  <law@redhat.com>
4002             Austin Law  <austinklaw@gmail.com>
4004         * config/v850/v850.md (addsi3_set_flags): New pattern.
4005         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4006         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4007         (zero_extendhisi2_v850_set_flags): Likewise.
4008         (zero_extendqisi2_v850_set_flags): Likewise.
4009         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4010         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4011         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4013         * config/v850/v850-protos.h (notice_update_cc): Remove.
4014         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4015         (v850_print_operand): Handle 'D' and "d".
4016         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4017         Add handling of arithmetic/logical operations compared against zero.
4018         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4019         Do not look at v850_compare_op, instead get mode from last argument.
4020         (v850_gen_compare): Remove
4021         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4022         after reload for prologue insns.
4023         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4024         patterns.
4025         (construct_save_jarl): Likewise.
4026         (TARGET_FLAGS_REGNUM): Define.
4027         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4028         (NOTICE_UPDATE_CC): Remove.
4029         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4030         than cc0.  Conditionalize on reload_completed.
4031         (cmpsi_insn, setfcc_insn): Likewise.
4032         (tst1 splitter): Turn into define_and_split which sets the flags
4033         after reload.
4034         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4035         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4036         (cstoresf4, cstoredf4): Clobber the flags.
4037         (cmpsi, cmpsf, cmpdf): Remove expanders.
4038         (setf_insn): Remove pattern.
4039         (addsi3): Turn into define_and_split which clobbers the flags after
4040         reload and a suitable pattern (addsi3_clobber_flags) for use after
4041         reload.
4042         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4043         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4044         (ashrsi3, ashrsi3_v850e2): Likewise.
4045         (bins): Clobber the flags.
4046         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4047         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4048         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4049         (call_value_internal_short, call_value_internal_long): Likewise.
4050         (callt_save_interrupt, callt_return_interrupt): Likewise.
4051         (save_interrupt, return_interrupt): Likewise.
4052         (callt_save_all_interrupt, save_all_interrupt): Likewise.
4053         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4054         (restore_all_interrupt, _restore_all_interrupt): Likewise.
4055         (All FP comparisons): Only allow after reload has completed.
4056         (trfsr): Likewise.
4057         (divh, divhu): Tweak output template.
4058         (branch_z_normal, branch_z_invert): Remove
4059         (branch_nz_normal, branch_nz_invert): Likewise.
4060         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4062         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4063         * config/v850/v850.c (notice_update_cc): Remove.
4064         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
4065         (CC_NO_CARRY): Likewise.
4066         (NOTICE_UPDATE_CC): Define to nothing.
4067         * config/v850/v850.md: Remove block comment on cc0 handling
4068         Remove "cc" attribute from all patterns.  Remove cc_status handling
4069         from all patterns.  Minor formatting fixes.
4071 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4073         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4074         (cortex-a76.cortex-a55): Likewise.
4075         * config/aarch64/aarch64-tune.md: Regenerate.
4076         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4077         cortex-a76.cortex-a55.
4079 2018-06-27  Jeff Law  <law@redhat.com>
4081         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4082         (MULTILIB_DIRNAMES): Similarly.
4084 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
4086         * gimple.h (gimple_return_retbnd): Delete.
4087         (gimple_return_set_retbnd): Likewise.
4088         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4089         gimple_return_set_retbnd.
4090         * gimple-pretty-print.c (dump_gimple_return): Remove call to
4091         gimple_return_retbnd and adjust.
4092         * tree-inline.h (struct copy_body_data): Remove retbnd field.
4093         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4094         Explicitly return NULL in a couple more cases.  Move assertion
4095         on debug statements and remove unreachable code.
4096         (reset_debug_binding): Do not test id->retbnd.
4097         (expand_call_inline): Do not set it.
4099 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
4101         * configure.ac: Add --disable-gcov option.
4102         * configure: Regenerate.
4103         * Makefile.in: Honour @enable_gcov@.
4104         * doc/install.texi: Document --disable-gcov.
4106 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4108         * config/arm/arm-cpus.in (cortex-a76): New entry.
4109         (cortex-a76.cortex-a55): Likewise.
4110         * config/arm/arm-tables.opt: Regenerate.
4111         * config/arm/arm-tune.md: Likewise.
4112         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4113         * doc/invoke.texi (ARM Options): Document cortex-a76 and
4114         cortex-a76.cortex-a55.
4116 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
4118         PR target/85769
4119         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4121 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4123         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4124         comment.
4125         (EPILOGUE_USES): Likewise.
4127 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
4129         * tree-inline.c (remap_location): New function extracted from...
4130         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
4131         (copy_phis_for_bb): ...here.  Call remap_location.
4132         (copy_cfg_body): Adjust call to copy_edges_for_bb.
4134 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
4136         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4137         unaligned vsx for 16B memset.
4139 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
4141         PR target/86285
4142         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4143         ieee128_float_type_node to long_double_type_node unless
4144         TARGET_LONG_DOUBLE_128 is set.
4146 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
4148         * cfgloop.c (get_loop_location): Convert return type from
4149         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4150         by implicit construction from rtx_insn *, and using
4151         dump_user_location_t::from_function_decl for the fallback case.
4152         * cfgloop.h (get_loop_location): Convert return type from
4153         location_t to dump_user_location_t.
4154         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4155         dump_printf_loc to pass in a dump_location_t rather than a
4156         location_t, via the gimple stmt.
4157         * coverage.c (get_coverage_counts): Update calls to
4158         dump_printf_loc to pass in dump_location_t rather than a
4159         location_t.
4160         * doc/optinfo.texi (Dump types): Convert example of
4161         dump_printf_loc from taking "locus" to taking "insn".  Update
4162         description of the "_loc" calls to cover dump_location_t.
4163         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4164         "selftest.h".
4165         (dump_user_location_t::dump_user_location_t): New constructors,
4166         from gimple *stmt and rtx_insn *.
4167         (dump_user_location_t::from_function_decl): New function.
4168         (dump_loc): Make static.
4169         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4170         const dump_location_t &.
4171         (dump_generic_expr_loc): Delete.
4172         (dump_printf_loc): Convert param "loc" from location_t to
4173         const dump_location_t &.
4174         (selftest::test_impl_location): New function.
4175         (selftest::dumpfile_c_tests): New function.
4176         * dumpfile.h: Include "profile-count.h".
4177         (class dump_user_location_t): New class.
4178         (struct dump_impl_location_t): New struct.
4179         (class dump_location_t): New class.
4180         (dump_printf_loc): Convert 2nd param from source_location to
4181         const dump_location_t &.
4182         (dump_generic_expr_loc): Delete.
4183         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4184         const dump_location_t &.
4185         * gimple-fold.c (fold_gimple_assign): Update call to
4186         dump_printf_loc to pass in a dump_location_t rather than a
4187         location_t, via the gimple stmt.
4188         (gimple_fold_call): Likewise.
4189         * gimple-loop-interchange.cc
4190         (loop_cand::analyze_iloop_reduction_var): Update for change to
4191         check_reduction_path.
4192         (tree_loop_interchange::interchange): Update for change to
4193         find_loop_location.
4194         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4195         change in return-type of find_loop_location.
4196         (graphite_regenerate_ast_isl): Likewise.
4197         * graphite-optimize-isl.c (optimize_isl): Likewise.
4198         * graphite.c (graphite_transform_loops): Likewise.
4199         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4200         pass in a dump_location_t rather than a location_t, via the
4201         gimple stmt.
4202         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4203         * ipa.c (walk_polymorphic_call_targets): Likewise.
4204         * loop-unroll.c (report_unroll): Convert "locus" param from
4205         location_t to dump_location_t.
4206         (decide_unrolling): Update for change to get_loop_location's
4207         return type.
4208         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4209         location_t to dump_user_location_t.
4210         (grid_find_single_omp_among_assignments_1): Updates calls to
4211         dump_printf_loc to pass in a dump_location_t rather than a
4212         location_t, via the gimple stmt.
4213         (grid_parallel_clauses_gridifiable): Convert "tloc" from
4214         location_t to dump_location_t.  Updates calls to dump_printf_loc
4215         to pass in a dump_location_t rather than a location_t, via the
4216         gimple stmt.
4217         (grid_inner_loop_gridifiable_p): Likewise.
4218         (grid_dist_follows_simple_pattern): Likewise.
4219         (grid_gfor_follows_tiling_pattern): Likewise.
4220         (grid_target_follows_gridifiable_pattern): Likewise.
4221         (grid_attempt_target_gridification): Convert initialization
4222         of local "grid" from memset to zero-initialization; FIXME: does
4223         this require C++11?  Update call to dump_printf_loc to pass in a
4224         optinfo_location rather than a location_t, via the gimple stmt.
4225         * profile.c (read_profile_edge_counts): Updates call to
4226         dump_printf_loc to pass in a dump_location_t rather than a
4227         location_t
4228         (compute_branch_probabilities): Likewise.
4229         * selftest-run-tests.c (selftest::run_tests): Call
4230         dumpfile_c_tests.
4231         * selftest.h (dumpfile_c_tests): New decl.
4232         * tree-loop-distribution.c (pass_loop_distribution::execute):
4233         Update for change in return type of find_loop_location.
4234         * tree-parloops.c (parallelize_loops): Likewise.
4235         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4236         "locus" from location_t to dump_user_location_t.
4237         (canonicalize_loop_induction_variables): Likewise.
4238         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4239         for change in return type of find_loop_location.
4240         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4241         to dump_printf_loc to pass in a dump_location_t rather than a
4242         location_t, via the stmt.
4243         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4244         Likewise.
4245         * tree-vect-loop-manip.c (find_loop_location): Convert return
4246         type from source_location to dump_user_location_t.
4247         (vect_do_peeling): Update for above change.
4248         (vect_loop_versioning): Update for change in type of
4249         vect_location.
4250         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4251         from location_t to dump_user_location_t.
4252         (vect_estimate_min_profitable_iters): Update for change in type
4253         of vect_location.
4254         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4255         location_t to dump_location_t.
4256         (vect_slp_bb): Update for change in type of vect_location.
4257         * tree-vectorizer.c (vect_location): Convert from source_location
4258         to dump_user_location_t.
4259         (try_vectorize_loop_1): Update for change in vect_location's type.
4260         (vectorize_loops): Likewise.
4261         (increase_alignment): Likewise.
4262         * tree-vectorizer.h (vect_location): Convert from source_location
4263         to dump_user_location_t.
4264         (find_loop_location): Convert return type from source_location to
4265         dump_user_location_t.
4266         (check_reduction_path): Convert 1st param from location_t to
4267         dump_user_location_t.
4268         * value-prof.c (check_counter): Update call to dump_printf_loc to
4269         pass in a dump_user_location_t rather than a location_t; update
4270         call to error_at for change in type of "locus".
4271         (check_ic_target): Update call to dump_printf_loc to
4272         pass in a dump_user_location_t rather than a location_t, via the
4273         call_stmt.
4275 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
4277         * config/s390/s390.h (enum processor_flags): Do not use
4278         default tune parameter when -march was specified.
4280 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
4282         PR target/86314
4283         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4284         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4285         operands.
4287 2018-06-26  Richard Biener  <rguenther@suse.de>
4289         PR tree-optimization/86287
4290         PR bootstrap/86316
4291         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4292         (vect_analyze_loop): Initialize n_stmts.
4294 2018-06-26  Richard Biener  <rguenther@suse.de>
4296         PR middle-end/86271
4297         * fold-const.c (fold_convertible_p): Pointer extension
4298         isn't valid.
4300 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
4302         PR debug/86064
4303         * dwarf2out.c (loc_list_has_views): Adjust comments.
4304         (dw_loc_list): Split single cross-partition range with
4305         nonzero locview.
4307 2018-06-25  Jeff Law  <law@redhat.com>
4309         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4310         on -mbig-switch by default.
4312         * config/v850/predicates.md (const_float_1_operand): Fix match_code
4313         test.
4314         (const_float_0_operand): Remove unused predicate.
4315         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4316         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4317         (recipsf2): New expander.  Original pattern now called
4318         (recipsf2_insn).
4319         (recipdf2, recipdf2_insn): Similarly.
4320         (rsqrtsf2, rsqrtsf2_insn): Similarly
4321         (rsqrtdf2, rsqrtdf2_insn): Similarly
4323 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
4325         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4326         Simplify logic for FreeBSD (twice).
4328 2018-06-25  Martin Sebor  <msebor@redhat.com>
4330         PR tree-optimization/86204
4331         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4332         a strnlen result if it's less than the length of the string.
4334 2018-06-25  Martin Sebor  <msebor@redhat.com>
4336         PR tree-optimization/85700
4337         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4338         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4339         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4341 2018-06-25  Martin Sebor  <msebor@redhat.com>
4343         * doc/extend.texi (Zero-length arrays): Update and clarify.
4345 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
4347         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4348         added IEEE/IBM long double multilib support on PowerPC little
4349         endian Linux systems.
4350         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4351         (MULTILIB_DEFAULTS): Likewise.
4352         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4353         Likewise.
4354         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4355         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4356         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4358 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
4360         PR middle-end/86311
4361         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4362         (REORDER_45): Likewise.
4364 2018-06-25  Jeff Law  <law@redhat.com>
4366         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4367         dividend to 32 bits.  Adjust length.
4368         (udivmodhi4): Cleanup output template.  Fix length.
4370 2018-06-25  Carl Love  <cel@us.ibm.com>
4372         * config/rs6000/vsx.md: Change word selector to prefered location.
4374 2018-06-25  Richard Biener  <rguenther@suse.de>
4376         PR tree-optimization/86304
4377         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4378         epilogue-if-converted loops as well.
4380 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
4382         * lto-section-out.c (lto_begin_section): Do not print section
4383         name for noaddr and unnumbered dumps.
4385 2018-06-25  Richard Biener  <rguenther@suse.de>
4387         * tree-vectorizer.h (struct vec_info_shared): New structure
4388         with parts split out from struct vec_info and loop_nest from
4389         struct _loop_vec_info.
4390         (struct vec_info): Adjust accordingly.
4391         (struct _loop_vec_info): Likewise.
4392         (LOOP_VINFO_LOOP_NEST): Adjust.
4393         (LOOP_VINFO_DATAREFS): Likewise.
4394         (LOOP_VINFO_DDRS): Likewise.
4395         (struct _bb_vec_info): Likewise.
4396         (BB_VINFO_DATAREFS): Likewise.
4397         (BB_VINFO_DDRS): Likewise.
4398         (struct _stmt_vec_info): Add dr_aux member.
4399         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4400         (DR_MISALIGNMENT_UNINITIALIZED): New.
4401         (set_dr_misalignment): Adjust.
4402         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4403         (vect_analyze_loop): Adjust prototype.
4404         (vect_analyze_loop_form): Likewise.
4405         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4406         Compute dependences lazily.
4407         (vect_record_base_alignments): Use shared datarefs/ddrs.
4408         (vect_verify_datarefs_alignment): Likewise.
4409         (vect_analyze_data_refs_alignment): Likewise.
4410         (vect_analyze_data_ref_accesses): Likewise.
4411         (vect_analyze_data_refs): Likewise.
4412         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4413         constructor parameter for shared part.
4414         (vect_analyze_loop_form): Pass in shared part and adjust.
4415         (vect_analyze_loop_2): Pass in storage for the number of
4416         stmts.  Move loop nest finding to the caller.  Compute
4417         datarefs lazily.
4418         (vect_analyze_loop): Pass in shared part.
4419         (vect_transform_loop): Verify shared datarefs are unchanged.
4420         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4421         constructor parameter for shared part.
4422         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4423         (vect_slp_bb): Verify shared datarefs are unchanged before
4424         transform.
4425         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4426         change.
4427         (new_stmt_vec_info): Initialize DR_AUX misalignment to
4428         DR_MISALIGNMENT_UNINITIALIZED.
4429         * tree-vectorizer.c (vec_info::vec_info): Add constructor
4430         parameter for shared part.
4431         (vec_info::~vec_info): Adjust.
4432         (vec_info_shared::vec_info_shared): New.
4433         (vec_info_shared::~vec_info_shared): Likewise.
4434         (vec_info_shared::save_datarefs): Likewise.
4435         (vec_info_shared::check_datarefs): Likewise.
4436         (try_vectorize_loop_1): Construct shared part live for analyses
4437         of a single loop for multiple vector sizes.
4438         * tree-parloops.c (gather_scalar_reductions): Adjust.
4440 2018-06-25  Richard Biener  <rguenther@suse.de>
4442         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4443         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4444         (vect_analyze_data_refs): Remove similar code from here and
4445         simplify accordingly.
4447 2018-06-25  Richard Biener  <rguenther@suse.de>
4449         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4450         for reverse storage order accesses rather than asserting
4451         they cannot happen here.
4453 2018-06-25  Tom de Vries  <tdevries@suse.de>
4455         PR debug/86257
4456         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4457         Use data16 instead of .byte for insn prefix.
4459 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
4461         PR C++/86082
4462         * parser.c (make_char_string_pack): Pass this literal chars
4463         through cpp_interpret_string.
4464         (cp_parser_userdef_numeric_literal): Check the result of
4465         make_char_string_pack.
4467 2018-06-24  Maya Rashish  <coypu@sdf.org>
4469         * ginclude/stddef.h: Simplify conditions around avoiding
4470         re-definition of __size_t.
4472 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
4474         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4475         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4477 2018-06-22  Maya Rashish  <coypu@sdf.org>
4479         * doc/invoke.texi (mno-fancy-math-387): Update for changes
4480         made to OpenBSD and NetBSD through the years.
4482 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4484         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4485         behavior of vec_pack (vector double, vector double) to match
4486         behavior of vec_float2 (vector double, vector double).
4488 2018-06-22  Olivier Hainque  <hainque@adacore.com>
4490         * gimplify.c (gimplify_function_tree): Prevent creation
4491         of a trampoline for the address of the current function
4492         passed to entry/exit instrumentation hooks.
4494 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
4496         PR target/86222
4497         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4498         correctly.
4500 2018-06-22  Martin Liska  <mliska@suse.cz>
4502         PR tree-optimization/86263
4503         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4504         Bail out if is_enabled is false.
4505         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4506         New declaration.
4507         (jump_table_cluster::is_enabled): New function.
4509 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
4511         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4512         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4513         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4514         (lto_input_ts_binfo_tree_pointers): Likewise.
4515         * tree-streamer-out.c (streamer_write_tree_bitfields,
4516         write_ts_binfo_tree_pointers): Likewise.
4517         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4519 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
4521         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4523 2018-06-22  Martin Liska  <mliska@suse.cz>
4525         * symbol-summary.h (get): Make it pure and inline move
4526         functionality from ::get function.
4527         (get): Remove and inline into ::get and ::get_create.
4528         (get_create): Move code from ::get function.
4530 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4532         PR target/85994
4533         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4534         -x assembler-with-cpp.
4536 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4538         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4539         _FILE_OFFSET_BITS=64 for C++.
4541 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
4543         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4544         conversion insn that shows up when pr85657-3.c is compiled using
4545         IEEE 128-bit long double.
4546         (neg<mode>2_internal): Use the correct mode to check whether the
4547         mode is IBM extended.
4548         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4549         multiply and divide external functions from being created more
4550         than once.
4552 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4554         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4555         functions.
4556         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
4557         the edge can be forwarded.
4558         (cfg_layout_merge_blocks): Likewise.
4560 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4562         * except.c (finish_eh_generation): Commit edge insertions only after
4563         the EH edges have been redirected from post-landing to landing pads.
4565 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4567         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4568         create_tmp_var_for to create the FRAME decl.
4569         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4571 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
4573         * tree-inline.c (copy_edges_for_bb): Minor tweak.
4574         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4575         debug statement when resetting its value.
4576         (expand_call_inline): Copy the locus of the call onto the assignment
4577         of the return value, if any.  Use local variable in more cases.
4579 2018-06-21  Martin Liska  <mliska@suse.cz>
4581         * ipa-pure-const.c (propagate_nothrow): Use
4582         funct_state_summaries->get.
4583         (dump_malloc_lattice): Likewise.
4584         (propagate_malloc): Likewise.
4586 2018-06-21  Richard Biener  <rguenther@suse.de>
4588         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4589         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4590         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4591         comment.
4592         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4593         BLOCK_ABSTRACT_ORIGIN unconditionally.
4595 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
4597         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4598         deleting it.
4599         * ipa-reference.c (ipa_reference_c_finalize): Delete
4600         ipa_ref_opt_sum_summaries and set it to NULL.
4602 2018-06-21  Tom de Vries  <tdevries@suse.de>
4604         PR tree-optimization/85859
4605         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4606         test with comment from bb_no_side_effects_p.
4608 2018-06-21  Richard Biener  <rguenther@suse.de>
4610         PR tree-optimization/86232
4611         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4612         max for constant niter.
4614 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4616         * config/aarch64/aarch64-simd.md
4617         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4619 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4621         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4622         Make opernads of the unspec commutative.
4624 2018-06-21  Richard Biener  <rguenther@suse.de>
4626         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4627         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4628         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4629         (vect_analyze_data_ref_dependence): Re-order checks to deal with
4630         NULL DR_STEP.
4631         (vect_record_base_alignments): Do not record base alignment
4632         for gathers or scatters.
4633         (vect_compute_data_ref_alignment): Drop return value that is always
4634         true.  Bail out early for gathers or scatters.
4635         (vect_enhance_data_refs_alignment): Bail out early for gathers
4636         or scatters.
4637         (vect_find_same_alignment_drs): Likewise.
4638         (vect_analyze_data_refs_alignment): Remove dead code.
4639         (vect_slp_analyze_and_verify_node_alignment): Likewise.
4640         (vect_analyze_data_refs): For possible gathers or scatters do
4641         not create an alternate DR, just check their possible validity
4642         and mark them.  Adjust DECL_NONALIASED handling to not rely
4643         on DR_BASE_ADDRESS.
4644         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4645         update inits of gathers or scatters.
4646         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4647         Also copy gather/scatter flag to pattern vinfo.
4649 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4651         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4652         behavior of vec_packsu (vector unsigned long long, vector unsigned
4653         long long) to match behavior of vec_packs with same signature.
4655 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
4656             Thomas Schwinge <thomas@codesourcery.com>
4657             Cesar Philippidis  <cesar@codesourcery.com>
4659         * gimplify.c (gimplify_scan_omp_clauses): Add support for
4660         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4661         (gimplify_adjust_omp_clauses): Likewise.
4662         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4663         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4664         (gimplify_omp_target_update): Update handling of acc update and
4665         enter/exit data.
4666         * omp-low.c (install_var_field): Remove unused parameter
4667         base_pointers_restrict.
4668         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4669         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4670         FINALIZE}
4671         (omp_target_base_pointers_restrict_p): Delete.
4672         (scan_omp_target): Update call to scan_sharing_clauses.
4673         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4674         FINALIZE}.
4675         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4676         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4677         (convert_local_omp_clauses): Likewise.
4678         * tree-pretty-print.c (dump_omp_clause): Likewise.
4679         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
4680         FINALIZE}.
4681         (omp_clause_code_name): Likewise.
4683 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
4685         PR debug/86194
4686         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4687         be narrowed.
4689         PR tree-optimization/86231
4690         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
4691         anti-range don't overwrite *vr0min before using it to compute *vr0max.
4693 2018-06-20  Tom de Vries  <tdevries@suse.de>
4695         PR tree-optimization/86097
4696         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4697         iv type if signedness of iv type is not the same as that of *nit.
4699 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
4701         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
4702         EDGE_EH edges, verify they are all EDGE_EH.
4704 2018-06-20  Maya Rashish  <coypu@sdf.org>
4706         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4708 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4710         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4711         * config/aarch64/aarch64.c (xgene1_tunings): Add
4712         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4713         (aarch64_mode_valid_for_sched_fusion_p):
4714         Allow 16-byte modes.
4715         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4716         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4717         128-bit modes.
4718         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4719         New pattern.
4720         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4721         * config/aarch64/iterators.md (VQ2): New mode iterator.
4723 2018-06-20  Martin Liska  <mliska@suse.cz>
4725         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4726         Change default ratio from 10 to 8.
4728 2018-06-20  Martin Liska  <mliska@suse.cz>
4730         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4731         New.
4732         (bit_test_cluster::find_bit_tests): Likewise.
4733         (switch_decision_tree::analyze_switch_statement): Find clusters.
4734         * tree-switch-conversion.h (struct jump_table_cluster): Document
4735         hierarchy.
4737 2018-06-20  Martin Liska  <mliska@suse.cz>
4739         * tree-switch-conversion.c (switch_conversion::collect):
4740         Record m_uniq property.
4741         (switch_conversion::expand): Bail out for special conditions.
4742         (group_cluster::~group_cluster): New.
4743         (group_cluster::group_cluster): Likewise.
4744         (group_cluster::dump): Likewise.
4745         (jump_table_cluster::emit): New.
4746         (switch_decision_tree::fix_phi_operands_for_edges): New.
4747         (struct case_node): Remove struct.
4748         (jump_table_cluster::can_be_handled): New.
4749         (case_values_threshold): Moved to header.
4750         (reset_out_edges_aux): Likewise.
4751         (jump_table_cluster::is_beneficial): New.
4752         (bit_test_cluster::can_be_handled): Likewise.
4753         (add_case_node): Remove.
4754         (bit_test_cluster::is_beneficial): New.
4755         (case_bit_test::cmp): New.
4756         (bit_test_cluster::emit): New.
4757         (expand_switch_as_decision_tree_p): Remove.
4758         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4759         (fix_phi_operands_for_edge): Likewise.
4760         (switch_decision_tree::analyze_switch_statement): New.
4761         (compute_cases_per_edge): Move ...
4762         (switch_decision_tree::compute_cases_per_edge): ... here.
4763         (try_switch_expansion): Likewise.
4764         (switch_decision_tree::try_switch_expansion): Likewise.
4765         (record_phi_operand_mapping): Likewise.
4766         (switch_decision_tree::record_phi_operand_mapping): Likewise.
4767         (emit_case_decision_tree): Likewise.
4768         (switch_decision_tree::emit): Likewise.
4769         (balance_case_nodes): Likewise.
4770         (switch_decision_tree::balance_case_nodes): Likewise.
4771         (dump_case_nodes): Likewise.
4772         (switch_decision_tree::dump_case_nodes): Likewise.
4773         (emit_jump): Likewise.
4774         (switch_decision_tree::emit_jump): Likewise.
4775         (emit_cmp_and_jump_insns): Likewise.
4776         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4777         (emit_case_nodes): Likewise.
4778         (switch_decision_tree::emit_case_nodes): Likewise.
4779         (conditional_probability): Remove.
4780         * tree-switch-conversion.h (enum cluster_type): New.
4781         (PRINT_CASE): New.
4782         (struct cluster): Likewise.
4783         (cluster::cluster): Likewise.
4784         (struct simple_cluster): Likewise.
4785         (simple_cluster::simple_cluster): Likewise.
4786         (struct group_cluster): Likewise.
4787         (struct jump_table_cluster): Likewise.
4788         (struct bit_test_cluster): Likewise.
4789         (struct min_cluster_item): Likewise.
4790         (struct case_tree_node): Likewise.
4791         (case_tree_node::case_tree_node): Likewise.
4792         (jump_table_cluster::case_values_threshold): Likewise.
4793         (struct case_bit_test): Likewise.
4794         (struct switch_decision_tree): Likewise.
4795         (struct switch_conversion): Likewise.
4796         (switch_decision_tree::reset_out_edges_aux): Likewise.
4798 2018-06-20  Martin Liska  <mliska@suse.cz>
4800         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4801         (hoist_edge_and_branch_if_true): Likewise.
4802         (expand_switch_using_bit_tests_p): Likewise.
4803         (struct case_bit_test): Likewise.
4804         (case_bit_test_cmp): Likewise.
4805         (emit_case_bit_tests): Likewise.
4806         (switch_conversion::switch_conversion): New class.
4807         (struct switch_conv_info): Remove old struct.
4808         (collect_switch_conv_info): More to ...
4809         (switch_conversion::collect): ... this.
4810         (check_range): Likewise.
4811         (switch_conversion::check_range): Likewise.
4812         (check_all_empty_except_final): Likewise.
4813         (switch_conversion::check_all_empty_except_final): Likewise.
4814         (check_final_bb): Likewise.
4815         (switch_conversion::check_final_bb): Likewise.
4816         (create_temp_arrays): Likewise.
4817         (switch_conversion::create_temp_arrays): Likewise.
4818         (free_temp_arrays): Likewise.
4819         (gather_default_values): Likewise.
4820         (switch_conversion::gather_default_values): Likewise.
4821         (build_constructors): Likewise.
4822         (switch_conversion::build_constructors): Likewise.
4823         (constructor_contains_same_values_p): Likewise.
4824         (switch_conversion::contains_same_values_p): Likewise.
4825         (array_value_type): Likewise.
4826         (switch_conversion::array_value_type): Likewise.
4827         (build_one_array): Likewise.
4828         (switch_conversion::build_one_array): Likewise.
4829         (build_arrays): Likewise.
4830         (switch_conversion::build_arrays): Likewise.
4831         (gen_def_assigns): Likewise.
4832         (switch_conversion::gen_def_assigns): Likewise.
4833         (prune_bbs): Likewise.
4834         (switch_conversion::prune_bbs): Likewise.
4835         (fix_phi_nodes): Likewise.
4836         (switch_conversion::fix_phi_nodes): Likewise.
4837         (gen_inbound_check): Likewise.
4838         (switch_conversion::gen_inbound_check): Likewise.
4839         (process_switch): Use the newly created class.
4840         (switch_conversion::expand): New.
4841         (switch_conversion::~switch_conversion): New.
4842         * tree-switch-conversion.h: New file.
4844 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4846         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4847         tree-vect-patterns.c.
4848         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4849         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
4850         (vect_recog_sad_pattern): Likewise.
4851         (vect_recog_widen_sum_pattern): Likewise.
4852         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
4853         (vect_recog_widen_shift_pattern): Remove the type_in argument.
4854         (vect_recog_rotate_pattern): Likewise.
4855         (vect_recog_mult_pattern): Likewise.
4856         (vect_recog_vector_vector_shift_pattern): Likewise.
4857         (vect_recog_divmod_pattern): Likewise.
4858         (vect_recog_mixed_size_cond_pattern): Likewise.
4859         (vect_recog_bool_pattern): Likewise.
4860         (vect_recog_mask_conversion_pattern): Likewise.
4861         (vect_try_gather_scatter_pattern): Likewise.
4862         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
4863         (vect_recog_over_widening_pattern): Likewise.
4864         (vect_recog_gather_scatter_pattern): Likewise.
4865         (vect_recog_func_ptr): Move from tree-vectorizer.h
4866         (vect_vect_recog_func_ptrs): Move further down the file.
4867         (vect_recog_func): Likewise.  Remove the third argument.
4868         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4869         (vect_pattern_recog_1): Expect the pattern function to do any
4870         necessary target tests.  Also expect it to provide a vector type.
4871         Remove the type_in handling.
4873 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4875         * tree-vect-patterns.c (vect_pattern_detected): New function.
4876         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4877         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4878         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4879         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4880         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4881         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4882         (vect_recog_mask_conversion_pattern)
4883         (vect_try_gather_scatter_pattern): Likewise.
4885 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4887         * tree-vect-patterns.c (vect_get_internal_def): New function.
4888         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4889         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4890         (search_type_for_mask_1): Use it.
4892 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4894         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4895         redundant WIDEN_SUM_EXPR handling.
4896         (vect_recog_sad_pattern): Likewise.
4898 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4900         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4901         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4902         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4903         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4904         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4906 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4908         * tree-vect-stmts.c (vectorizable_call): Make sure that we
4909         use the stmt_vec_info of the original bb statement for the
4910         new zero assignment, even if the call is part of a pattern.
4912 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4914         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4915         that the sequence is attached to the original statement rather
4916         than the pattern statement.
4917         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4918         PATTERN_DEF_SEQ from the original statement rather than
4919         the main pattern statement.
4920         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4921         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4922         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4924 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4926         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4927         definition statements before the early exit for statements that aren't
4928         live or relevant.
4929         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4930         split out from...
4931         (vect_transform_loop): ...here.  Process pattern definition
4932         statements without first checking whether the main pattern
4933         statement is live or relevant.
4935 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
4937         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4938         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4940 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
4942         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4943         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4944         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4945         (expand_block_compare): Change select_block_compare_mode call.
4946         (expand_strncmp_align_check): Use new functions, fix comment.
4947         (emit_final_str_compare_gpr): New function.
4948         (expand_strn_compare): Refactor and clean up code.
4949         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4951 2018-06-19  Tony Reix  <tony.reix@atos.com>
4952             Damien Bergamini  <damien.bergamini@atos.com>
4953             David Edelsohn  <dje.gcc@gmail.com>
4955         * collect2.c (static_obj): New variable.
4956         (static_libs): New variable.
4957         (is_in_list): Uncomment declaration.
4958         (main): Track AIX libraries linked statically.
4959         (is_in_list): Uncomment definition.
4960         (scan_prog_file): Don't add AIX shared libraries initializer
4961         to constructor list if linking statically.
4963 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
4965         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4966         constant.
4967         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4969 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
4971         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4972         blocks.
4974 2018-06-19  Martin Liska  <mliska@suse.cz>
4976         * config/i386/i386.c (ix86_can_inline_p): Do not use
4977         ipa_fn_summaries::get_create.
4978         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4979         get.
4980         (devirtualization_time_bonus): Likewise.
4981         (ipcp_propagate_stage): Likewise.
4982         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4983         (edge_set_predicate): Likewise.
4984         (evaluate_conditions_for_known_args): Likewise.
4985         (evaluate_properties_for_edge): Likewise.
4986         (ipa_call_summary::reset): Tranform to ...
4987         (ipa_call_summary::~ipa_call_summary): ... this.
4988         (ipa_fn_summary::reset): Transform to ...
4989         (ipa_fn_summary::~ipa_fn_summary): ... this.
4990         (ipa_fn_summary_t::remove): Rename to ...
4991         (ipa_fn_summary_t::remove_callees): ... this.
4992         (ipa_fn_summary_t::duplicate): Use placement new
4993         instead of memory copy.
4994         (ipa_call_summary_t::duplicate): Likewise.
4995         (ipa_call_summary_t::remove): Remove.
4996         (dump_ipa_call_summary): Change get_create to get.
4997         (ipa_dump_fn_summary): Dump only when summary exists.
4998         (analyze_function_body): Use symbol_summary::get instead
4999         of get_create.
5000         (compute_fn_summary): Likewise.
5001         (estimate_edge_devirt_benefit): Likewise.
5002         (estimate_edge_size_and_time): Likewise.
5003         (inline_update_callee_summaries): Likewise.
5004         (remap_edge_change_prob): Likewise.
5005         (remap_edge_summaries): Likewise.
5006         (ipa_merge_fn_summary_after_inlining): Likewise.
5007         (write_ipa_call_summary): Likewise.
5008         (ipa_fn_summary_write): Likewise.
5009         (ipa_free_fn_summary): Likewise.
5010         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5011         (struct ipa_call_summary): Likewise.
5012         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5013         of get_create.
5014         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5015         (estimate_size_after_inlining): Likewise.
5016         (estimate_growth): Likewise.
5017         (growth_likely_positive): Likewise.
5018         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5019         (inline_call): Likewise.
5020         * ipa-inline.c (caller_growth_limits): Likewise.
5021         (can_inline_edge_p): Likewise.
5022         (can_inline_edge_by_limits_p): Likewise.
5023         (compute_uninlined_call_time): Likewise.
5024         (compute_inlined_call_time): Likewise.
5025         (want_inline_small_function_p): Likewise.
5026         (edge_badness): Likewise.
5027         (update_caller_keys): Likewise.
5028         (update_callee_keys): Likewise.
5029         (inline_small_functions): Likewise.
5030         (inline_to_all_callers_1): Likewise.
5031         (dump_overall_stats): Likewise.
5032         (early_inline_small_functions): Likewise.
5033         (early_inliner): Likewise.
5034         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5035         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5036         * ipa-pure-const.c (malloc_candidate_p): Likewise.
5037         * ipa-split.c (execute_split_functions): Likewise.
5038         * symbol-summary.h: Likewise.
5039         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5041 2018-06-19  Richard Biener  <rguenther@suse.de>
5043         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5044         (vectorize_loops): ... here.  Fix dbgcnt handling.
5045         (try_vectorize_loop): Wrap try_vectorize_loop_1.
5047 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
5049         PR target/86197
5050         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5051         ieee128 argument takes up only one (vector) register, not two (floating
5052         point) registers.
5054 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
5056         * gimplify.c (gimplify_init_constructor): Really never clear for an
5057         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5059 2018-06-19  Richard Biener  <rguenther@suse.de>
5061         PR tree-optimization/86179
5062         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5063         after failed recognition.
5065 2018-06-18  Martin Sebor  <msebor@redhat.com>
5067         PR middle-end/85602
5068         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5069         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5070         Handle integer subtraction.
5071         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5072         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5074 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
5076         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5077         param from rtx to rtx_insn *.
5078         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5079         param.
5080         (frv_ifcvt_modify_insn): Likwise.
5081         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5082         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
5083         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5084         as_a <rtx_insn *> cast to local "unprotected_region" once
5085         it's been established that it's not NULL or pc_rtx.
5086         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5087         param "sethi" from rtx to rtx_insn *.
5088         (nds32_group_float_insns): Likewise for param "insn".
5089         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5090         param.
5091         (vax_output_int_subtract): Likewise.
5092         * config/vax/vax.c (vax_output_int_add): Likewise for param
5093         "insn".
5094         (vax_output_int_subtract): Likewise.
5095         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5096         (emit_pattern_after): Likewise for param "after".
5097         (emit_insn_after): Likewise.
5098         (emit_jump_insn_after): Likewise.
5099         (emit_call_insn_after): Likewise.
5100         (emit_debug_insn_after): Likewise.
5101         (emit_pattern_before): Likewise for param "before".
5102         (emit_insn_before): Likewise.
5103         (emit_jump_insn_before): Likewise.
5104         * final.c (get_insn_template): Likewise for param "insn", removing
5105         a cast.
5106         * output.h (get_insn_template): Likewise for 2nd param.
5107         * rtl.h (emit_insn_before): Likewise.
5108         (emit_jump_insn_before): Likewise.
5109         (emit_debug_insn_before_noloc): Likewise.
5110         (emit_insn_after): Likewise.
5111         (emit_jump_insn_after): Likewise.
5112         (emit_call_insn_after): Likewise.
5113         (emit_debug_insn_after): Likewise.
5114         (set_insn_deleted): Likewise for param.
5116 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
5118         PR target/85358
5119         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5120         floating point modes, so that IFmode is numerically greater than
5121         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5122         to declare the ordering.  This prevents IFmode from being
5123         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5124         machine.  Include rs6000-modes.h to share the fractional values
5125         between genmodes* and the rest of the compiler.
5126         (IFmode): Likewise.
5127         (KFmode): Likewise.
5128         (TFmode): Likewise.
5129         * config/rs6000/rs6000-modes.h: New file.
5130         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5131         meaning of rs6000_long_double_size so that 126..128 selects an
5132         appropriate 128-bit floating point type.
5133         (rs6000_option_override_internal): Likewise.
5134         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5135         (TARGET_LONG_DOUBLE_128): Change the meaning of
5136         rs6000_long_double_size so that 126..128 selects an appropriate
5137         128-bit floating point type.
5138         (LONG_DOUBLE_TYPE_SIZE): Update comment.
5139         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5140         source and destination to match the standard usage.
5141         (truncifkf2): Likewise.
5142         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5143         ISA 2.07 to use an explicit clobber, instead of passing in a
5144         temporary.
5145         (copysign<mode>3_soft): Likewise.
5147 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
5149         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5150         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5151         (vect_slp_analyze_instance_dependence): Likewise.
5152         (vect_enhance_data_refs_alignment): Likewise.
5153         (vect_analyze_data_refs_alignment): Likewise.
5154         (vect_slp_analyze_and_verify_instance_alignment
5155         (vect_analyze_data_ref_accesses): Likewise.
5156         (vect_prune_runtime_alias_test_list): Likewise.
5157         (vect_analyze_data_refs): Likewise.
5158         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5159         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5160         (vect_analyze_scalar_cycles_1): Likewise.
5161         (vect_get_loop_niters): Likewise.
5162         (vect_analyze_loop_form_1): Likewise.
5163         (vect_update_vf_for_slp): Likewise.
5164         (vect_analyze_loop_operations): Likewise.
5165         (vect_analyze_loop): Likewise.
5166         (vectorizable_induction): Likewise.
5167         (vect_transform_loop): Likewise.
5168         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5169         * tree-vect-slp.c (vect_analyze_slp): Likewise.
5170         (vect_make_slp_decision): Likewise.
5171         (vect_detect_hybrid_slp): Likewise.
5172         (vect_slp_analyze_operations): Likewise.
5173         (vect_slp_bb): Likewise.
5174         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5175         (vectorizable_bswap): Likewise.
5176         (vectorizable_call): Likewise.
5177         (vectorizable_simd_clone_call): Likewise.
5178         (vectorizable_conversion): Likewise.
5179         (vectorizable_assignment): Likewise.
5180         (vectorizable_shift): Likewise.
5181         (vectorizable_operation): Likewise.
5182         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5184 2018-06-18  Martin Sebor  <msebor@redhat.com>
5186         PR tree-optimization/81384
5187         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5188         * builtins.c (expand_builtin_strnlen): New function.
5189         (expand_builtin): Call it.
5190         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5191         * builtins.def (BUILT_IN_STRNLEN): New.
5192         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5193         Warn for bounds in excess of maximum object size.
5194         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5195         single-value ranges.  Handle strnlen.
5196         (handle_builtin_strlen): Handle strnlen.
5197         (strlen_check_and_optimize_stmt): Same.
5198         * doc/extend.texi (Other Builtins): Document strnlen.
5200 2018-06-18  Maya Rashish  <coypu@sdf.org>
5202         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5203         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5204         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5206         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5207         here to ...
5208         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5210 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5212         * tree.c (escaped_string::escape): Replace cast to char * by
5213         const_cast<char *> (unescaped).
5215 2018-06-18  Nick Clifton  <nickc@redhat.com>
5217         PR 84195
5218         * tree.c (escaped_string): New class.  Converts an unescaped
5219         string into its escaped equivalent.
5220         (warn_deprecated_use): Use the new class to convert the
5221         deprecation message, if present.
5222         (test_escaped_strings): New self test.
5223         (test_c_tests): Add test_escaped_strings.
5224         * doc/extend.texi (deprecated): Add a note that the
5225         deprecation message is affected by the -fmessage-length
5226         option, and that control characters will be escaped.
5227         (#pragma GCC error): Document this pragma.
5228         (#pragma GCC warning): Likewise.
5229         * doc/invoke.texi (-fmessage-length): Document this option's
5230         effect on the #warning and #error preprocessor directives and
5231         the deprecated attribute.
5233 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
5235         * tree.c (decl_value_expr_lookup): Revert latest change.
5236         (decl_value_expr_insert): Likewise.
5238 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
5240         * gimplify.c (nonlocal_vlas): Delete.
5241         (nonlocal_vla_vars): Likewise.
5242         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5243         referenced VLAs.
5244         (gimplify_body): Do not create and destroy nonlocal_vlas.
5245         * tree-nested.c: Include diagnostic.h.
5246         (use_pointer_in_frame): Tweak.
5247         (lookup_field_for_decl): Add assertion and declare the transformation.
5248         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5249         internal error when the reference is in a wrong context.  Do not
5250         create a debug decl by default.
5251         (note_nonlocal_block_vlas): Delete.
5252         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5253         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
5254         create a debug decl by default.
5255         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5256         call is in a wrong context.
5257         (fixup_vla_decls): New function.
5258         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
5259         debug variables were created.
5260         * tree.c (decl_value_expr_lookup): Add checking assertion.
5261         (decl_value_expr_insert): Likewise.
5263 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
5265         PR middle-end/82479
5266         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5267         * tree-scalar-evolution.c (interpret_expr): Likewise.
5268         (expression_expensive_p): Likewise.
5269         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5270         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5271         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5272         (ssa_defined_by_minus_one_stmt_p): New.
5274 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
5276         PR middle-end/64946
5277         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5278         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5279         * dojump.c (do_jump): Likewise.
5280         * expr.c (expand_expr_real_2): Check operand type's sign.
5281         * fold-const.c (const_unop): Handle ABSU_EXPR.
5282         (fold_abs_const): Likewise.
5283         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5284         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5285         (strip_sign_op_1): Likesise.
5286         * match.pd: Add new pattern to generate ABSU_EXPR.
5287         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5288         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5289         * tree-eh.c (operation_could_trap_helper_p): Likewise.
5290         * tree-inline.c (estimate_operator_cost): Likewise.
5291         * tree-pretty-print.c (dump_generic_node): Likewise.
5292         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5293         * tree.def (ABSU_EXPR): New.
5295 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
5297         PR middle-end/86095
5298         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5299         documented as preserved for backward compatibility only.
5300         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5302         PR rtl-optimization/86108
5303         * bb-reorder.c (create_forwarder_block): Renamed to ...
5304         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
5305         jump from new landing pad to the second part.
5306         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5307         Adjust callers.
5309 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
5311         PR middle-end/85878
5312         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5313         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5314         Only call store_expr for halves if the mode is the same.
5316         PR middle-end/86123
5317         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5318         Fix up comment formatting.
5320 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5322         * typed-splay-tree.h (typed_splay_tree::remove): New function.
5323         (typed_splay_tree::closure,
5324         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5325         (typed_splay_tree::typed_splay_tree,
5326         typed_splay_tree::operator =): Declared private.
5327         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5328         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5329         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5330         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5331         typed_splay_tree::splay_tree_splay,
5332         typed_splay_tree::splay_tree_foreach_helper,
5333         typed_splay_tree::splay_tree_insert,
5334         typed_splay_tree::splay_tree_remove,
5335         typed_splay_tree::splay_tree_lookup,
5336         typed_splay_tree::splay_tree_predecessor,
5337         typed_splay_tree::splay_tree_successor,
5338         typed_splay_tree::splay_tree_min,
5339         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5340         (typed_splay_tree::root, typed_splay_tree::comp,
5341         typed_splay_tree::delete_key,
5342         typed_splay_tree::delete_value): New data members.
5343         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5344         typed_splay_tree::remove.
5346 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
5348         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5349         -mginv and -mno-ginv to the assembler.
5350         * config/mips/mips.opt (-mcrc): New option.
5351         (-mginv): Likewise.
5352         * doc/invoke.text (-mcrc): Document.
5353         (-mginv): Likewise.
5355 2018-06-15  Nick Clifton  <nickc@redhat.com>
5357         PR 84195
5358         * tree.c (escaped_string): New class.  Converts an unescaped
5359         string into its escaped equivalent.
5360         (warn_deprecated_use): Use the new class to convert the
5361         deprecation message, if present.
5362         (test_escaped_strings): New self test.
5363         (test_c_tests): Add test_escaped_strings.
5364         * doc/extend.texi (deprecated): Add a note that the
5365         deprecation message is affected by the -fmessage-length
5366         option, and that control characters will be escaped.
5367         (#pragma GCC error): Document this pragma.
5368         (#pragma GCC warning): Likewise.
5369         * doc/invoke.texi (-fmessage-length): Document this option's
5370         effect on the #warning and #error preprocessor directives and
5371         the deprecated attribute.
5373 2018-06-15  Richard Biener  <rguenther@suse.de>
5375         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5376         here, also noting vector size used.
5377         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
5378         size used in MSG_OPTIMIZED_LOCATIONS dump.
5379         (pass_slp_vectorize::execute): Adjust.
5381 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
5383         PR target/85968
5384         * config/arc/arc.c (arc_return_address_register): Fix
5385         if-condition.
5387 2018-06-15  Richard Biener  <rguenther@suse.de>
5389         PR middle-end/86159
5390         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5391         leave useless conversion stripping to force_gimple_operand_gsi.
5392         (gimplify_build2): Likewise.
5393         (gimplify_build1): Likewise.
5395 2018-06-15  Richard Biener  <rguenther@suse.de>
5397         PR middle-end/86076
5398         * tree-cfg.c (move_stmt_op): unshare invariant addresses
5399         before adjusting their block.
5401 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5403         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5404         multilibs for *-*-rtems*.
5405         * config/riscv/t-rtems: New file.
5407 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
5409         PR middle-end/86122
5410         * match.pd ((A +- CST1) +- CST2): Punt if last resort
5411         unsigned_type_for returns NULL.
5413         PR target/85945
5414         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5415         subregs of multi-word pseudos unless the float mode has word size.
5417 2018-06-14  Richard Biener  <rguenther@suse.de>
5419         PR middle-end/86139
5420         * tree-vect-generic.c (build_word_mode_vector_type): Remove
5421         duplicate and harmful type_hash_canon.
5422         * tree.c (type_hash_canon): Assert we didn't find ourselves.
5424 2018-06-14  Richard Biener  <rguenther@suse.de>
5426         PR ipa/86124
5427         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5428         NULL cgraph_node.
5430 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5432         * config/rtems.h (STDINT_LONG32): Define.
5434 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
5435             Prachi Godbole  <prachi.godbole@imgtec.com>
5437         * config/mips/mips-cpus.def: Define P6600.
5438         * config/mips/mips-tables.opt: Regenerate.
5439         * config/mips/mips.c (mips_ucbranch_type): New enum.
5440         (mips_rtx_cost_data): Add support for P6600.
5441         (mips_issue_rate): Likewise.
5442         (mips_multipass_dfa_lookahead): Likewise.
5443         (mips_avoid_hazard): Likewise.
5444         (mips_reorg_process_insns): Likewise.
5445         (mips_classify_branch_p6600): New function.
5446         * config/mips/mips.h (TUNE_P6600): New define.
5447         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5448         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5449         * config/mips/mips.md: Include p6600.md.
5450         (processor): Add p6600.
5451         * config/mips/p6600.md: New file.
5452         * doc/invoke.texi: Add p6600 to supported architectures.
5454 2018-06-13  Martin Sebor  <msebor@redhat.com>
5456         PR tree-optimization/86114
5457         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5458         of integer types.
5459         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5461 2018-06-13  Richard Biener  <rguenther@suse.de>
5463         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5464         Properly set vector type of the intermediate stmt.
5465         * tree-vect-stmts.c (vectorizable_operation): The destination
5466         var always has vectype_out type.
5468 2018-06-13  Jeff Law  <law@redhat.com>
5470         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5471         integer 0 for argument to print_rtl_with_bb.
5472         (rl78_reorg): Likewise.
5474 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
5476         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5477         from rtx to rtx_insn *.
5478         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5479         "label".
5480         (add_sched_insns_for_speculation): Likewise for local "target",
5481         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5482         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5483         from rtx_insn ** to rtx_code_label **.
5484         (reorg_emit_nops): Likewise.
5485         (c6x_reorg): Likewise for local "call_labels".
5486         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5487         rtx to rtx_insn *.
5488         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5489         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5490         the loops over LABEL_REFS.
5491         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5492         braf_label.
5493         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5494         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5495         (split_branches): Strengthen local "olabel" from rtx to
5496         rtx_insn *, adding a safe_as_a cast.
5497         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5498         to "rtx_insn *".
5499         (add_insn_after): Likewise for first two params.
5500         (add_insn_before): Likewise.
5501         (remove_insn): Likewise for param.
5502         (emit_pattern_before_noloc): Likewise for second and third params.
5503         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5504         (emit_call_insn_before_noloc): Likewise.
5505         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5506         to "rtx_insn *".
5507         (emit_barrier_before): Likewise.
5508         (emit_label_before): Strengthen "label" param from "rtx" to
5509         "rtx_code_label *".  Strengthen "before" param from "rtx" to
5510         "rtx_insn *".
5511         (emit_insn_after_1): Strengthen "after" param from "rtx" to
5512         "rtx_insn *".
5513         (emit_pattern_after_noloc): Likewise.
5514         (emit_insn_after_noloc): Likewise.
5515         (emit_jump_insn_after_noloc): Likewise.
5516         (emit_call_insn_after_noloc): Likewise.
5517         (emit_debug_insn_after_noloc): Likewise.
5518         (emit_barrier_after): Likewise.
5519         (emit_label_after): Likewise for both params.
5520         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
5521         "loc" param from "int" to "location_t".
5522         (emit_insn_after_setloc): Likewise.
5523         (emit_jump_insn_after_setloc): Likewise.
5524         (emit_call_insn_after_setloc): Likewise.
5525         (emit_debug_insn_after_setloc): Likewise.
5526         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
5527         "loc" param from "int" to "location_t".
5528         (emit_pattern_before): Convert NULL_RTX to NULL.
5529         (emit_insn_before_setloc): Convert "loc" param from "int" to
5530         "location_t".
5531         (emit_jump_insn_before_setloc): Likewise.
5532         (emit_call_insn_before_setloc): Likewise.
5533         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5534         rtx_insn *.  Convert "loc" param from "int" to "location_t".
5535         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5536         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5537         Convert 3rd param from "int" to "location_t".
5538         (emit_barrier_before, emit_barrier_after, next_real_insn):
5539         Strengthen param from rtx to rtx_insn *.
5540         (emit_label_before): Strengthen 1st param from "rtx" to
5541         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
5542         "rtx_insn *".
5543         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5544         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5545         Strengthen 2nd param from "rtx" to "rtx_insn *".
5546         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5547         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5548         Likewise. Convert 3rd param from "int" to "location_t".
5549         (emit_label_after): Strengthen 1st param from "rtx" to
5550         "rtx_code_label *".
5551         (next_real_insn, remove_insn): Strengthen param from "rtx" to
5552         "rtx_insn *".
5553         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5554         from "rtx" to "rtx_insn *".
5556 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
5558         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5559         bodies streamed in with -Q.
5560         * dumpfile.c (dump_files): Add lto-stream-out dump file.
5561         * dumpfile.h (tree_dump_index): Add lto_stream_out.
5562         * gimple-streamer-out.c: Include gimple-pretty-print.h
5563         (output_bb): Dump stmts streamed.
5564         * lto-section-out.c: Include print-tree.h
5565         (lto_begin_section): Dump sections created.
5566         (lto_output_decl_index): Dump decl encoded.
5567         * lto-streamer-out.c: Include print-tree.h
5568         (create_output_block): Dump output block created.
5569         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5570         (output_function): Dump function output.
5571         (output_constructor): Dump constructor streamed.
5572         (write_global_stream): Output indexes encoded.
5573         (produce_asm_for_decls): Dump streams encoded.
5574         * lto-streamer.c (streamer_dump_file): New global var.
5575         * lto-streamer.h (streamer_dump_file): Declare.
5576         * passes.c (ipa_write_summaries): Initialize streamer dump.
5577         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5578         in.
5580 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
5582         PR target/86048
5583         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5584         offsets for register save directives.  Emit a second batch of save
5585         directives, if need be, when the function accesses prior frames.
5587 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5589         * config/arc/fpu.md (fmasf4): Force operand to register.
5590         (fnmasf4): Likewise.
5592 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5594         * config/arc/arc-protos.h (arc_pad_return): Remove.
5595         * config/arc/arc.c (machine_function): Remove force_short_suffix
5596         and size_reason.
5597         (arc_print_operand): Adjust printing of '&'.
5598         (arc_verify_short): Remove conditional printing of short suffix.
5599         (arc_final_prescan_insn): Remove reference to size_reason.
5600         (pad_return): New function.
5601         (arc_reorg): Call pad_return.
5602         (arc_pad_return): Remove.
5603         (arc_init_machine_status): Remove reference to force_short_suffix.
5604         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5605         (attr length): When attribute iscompact is true force to 2
5606         regardless; in the case of maybe check if we want to force the
5607         instruction to have 4 bytes length.
5608         (nopv): Change it to generate 4 byte long nop as well.
5609         (blockage): New pattern.
5610         (simple_return): Remove call to arc_pad_return.
5611         (p_return_i): Likewise.
5613 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5615         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5617 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5619         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5620         ARC cores.
5622 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5624         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5625         for ARC700 and ARCv2.
5627 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
5629         PR target/86076
5630         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5631         operands[2] instead of operands[1].
5634 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
5636         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5637         case, check whether the outer register overlaps an unallocatable
5638         register, not just whether it fits the required class.
5640 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
5642         * poly-int.h (can_div_trunc_p): Add new overload in which all values
5643         are poly_ints.
5644         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5645         (memrefs_conflict_p): Likewise.
5646         (init_alias_analysis): Likewise.
5647         * cfgexpand.c (expand_debug_expr): Likewise.
5648         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5649         * cse.c (fold_rtx): Likewise.
5650         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5651         * expr.c (emit_block_move_hints): Likewise.
5652         (clear_storage_hints, push_block, emit_push_insn): Likewise.
5653         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5654         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5655         (emit_group_store): Likewise.
5656         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
5657         to read the PRE/POST_MODIFY increment.
5658         * calls.c (store_one_arg): Use strip_offset.
5659         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5660         poly_int_rtx_p.
5661         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5662         by a VEC_SELECT.
5663         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5664         (simplify_binary_operation_1): Extend CONST_INT handling to
5665         poly_int_rtx_p.
5666         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5667         than a HOST_WIDE_INT.
5668         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5669         poly_int64.
5670         (adjust_mems, add_stores): Update accodingly.
5671         (vt_canonicalize_addr): Track polynomial offsets.
5672         (emit_note_insn_var_location): Likewise.
5673         (vt_add_function_parameter): Likewise.
5674         (vt_initialize): Likewise.
5676 2018-06-12  Jeff Law  <law@redhat.com>
5678         * config.gcc (alpha*-*-freebsd*): Remove.
5679         * config/alpha/freebsd.h: Remove.
5681 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
5683         PR other/69968
5684         * spellcheck-tree.c (levenshtein_distance): Rename to...
5685         (get_edit_distance): ...this, and update for underlying renaming.
5686         * spellcheck-tree.h (levenshtein_distance): Rename to...
5687         (get_edit_distance): ...this.
5688         * spellcheck.c (levenshtein_distance): Rename to...
5689         (get_edit_distance): ...this.  Convert from Levenshtein distance
5690         to Damerau-Levenshtein distance by supporting transpositions of
5691         adjacent characters.  Rename "v1" to "v_next" and "v0" to
5692         "v_one_ago".
5693         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5694         (selftest::test_edit_distance_unit_test_oneway): ...this, and
5695         update for underlying renaming.
5696         (selftest::levenshtein_distance_unit_test): Rename to...
5697         (selftest::test_get_edit_distance_unit): ...this, and update for
5698         underlying renaming.
5699         (selftest::test_find_closest_string): Add example from PR 69968
5700         where transposition helps
5701         (selftest::test_metric_conditions): Update for renaming.
5702         (selftest::test_metric_conditions): Likewise.
5703         (selftest::spellcheck_c_tests): Likewise.
5704         * spellcheck.h (levenshtein_distance): Rename both overloads to...
5705         (get_edit_distance): ...this.
5706         (best_match::consider): Update for renaming.
5708 2018-06-12  Martin Sebor  <msebor@redhat.com>
5710         PR tree-optimization/85259
5711         * builtins.c (compute_objsize): Handle constant offsets.
5712         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5713         true iff a warning has been issued.
5714         * gimple.h (gimple_nonartificial_location): New function.
5715         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5716         gimple_nonartificial_location and handle -Wno-system-headers.
5717         (handle_builtin_stxncpy): Same.
5719 2018-06-12  Martin Sebor  <msebor@redhat.com>
5721         PR c/85931
5722         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5724 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
5726         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5727         BUILTIN_VEC_XST entries for pointer to double and long long.
5729 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
5731         PR target/85990
5732         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5733         Update comments.
5734         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5735         Likewise.
5737 2018-06-12  Martin Liska  <mliska@suse.cz>
5739         * doc/options.texi: Document IntegerRange.
5741 2018-06-12  Martin Liska  <mliska@suse.cz>
5743         * config/i386/i386.opt: Make MPX-related options as Deprecated.
5744         * opt-functions.awk: Handle Deprecated flag.
5745         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5746         and report error.
5747         (read_cmdline_option): Report warning for a deprecated option.
5748         * opts.h (struct cl_option): Add new field cl_deprecated.
5749         (CL_ERR_DEPRECATED): New.
5751 2018-06-12  Martin Liska  <mliska@suse.cz>
5753         * doc/options.texi: Document Deprecated option flag.
5755 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5757         * config/arc/arc-arch.h (arc_extras): New enum.
5758         (arc_cpu_t):Add field extra.
5759         (arc_cpu_types): Consider the extras.
5760         * config/arc/arc-cpus.def: Add extras info.
5761         * config/arc/arc-opts.h (processor_type): Consider extra field.
5762         * config/arc/arc.c (arc_override_options): Handle extra field.
5764 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5766         * config/arc/arc-arch.h: Update ARC_OPTX macro.
5767         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5768         field.
5769         * config/arc/arc.c (arc_init): Update pic warning.
5770         (irq_range): Update irq range parsing warnings.
5771         (arc_override_options): Update various warning messages.
5772         (arc_handle_aux_attribute): Likewise.
5774 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
5776         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5778 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5780         * doc/sourcebuild.texi: Document usage of line number 0 in verify
5781         compiler messages directives.
5783 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
5785         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5786         * config/mips/mips-tables.opt: Regenerate.
5787         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5788         mips64r6.
5789         * doc/invoke.texi: Document -march=i6500.
5791 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
5793         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5794         (i6400_gpmul): Add cpu_unit.
5795         (i6400_gpdiv): Likewise.
5796         (i6400_msa_add_d): Update reservations.
5797         (i6400_msa_int_add) Likewise.
5798         (i6400_msa_short_logic3) Likewise.
5799         (i6400_msa_short_logic2) Likewise.
5800         (i6400_msa_short_logic) Likewise.
5801         (i6400_msa_move) Likewise.
5802         (i6400_msa_cmp) Likewise.
5803         (i6400_msa_short_float2) Likewise.
5804         (i6400_msa_div_d) Likewise.
5805         (i6400_msa_long_logic1) Likewise.
5806         (i6400_msa_long_logic2) Likewise.
5807         (i6400_msa_mult) Likewise.
5808         (i6400_msa_long_float2) Likewise.
5809         (i6400_msa_long_float4) Likewise.
5810         (i6400_msa_long_float5) Likewise.
5811         (i6400_msa_long_float8) Likewise.
5812         (i6400_fpu_fadd): Include frint type.
5813         (i6400_fpu_store): New define_insn_reservation.
5814         (i6400_fpu_load): Likewise.
5815         (i6400_fpu_move): Likewise.
5816         (i6400_fpu_fcmp): Likewise.
5817         (i6400_fpu_fmadd): Likewise.
5818         (i6400_int_mult): Include imul3nc type and update reservation.
5819         (i6400_int_div): Include idiv3 type and update reservation.
5820         (i6400_int_load): Update to check type not move_type.
5821         (i6400_int_store): Likewise.
5822         (i6400_int_prefetch): Set zero latency.
5824 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5826         * gcc.c: Document new %@{...} sequence.
5827         (LINK_COMMAND_SPEC): Use it for the -L switches.
5828         (cpp_unique_options): Use it for the -I switches.
5829         (at_file_argbuf): New global variable.
5830         (in_at_file): Likewise.
5831         (alloc_args): Create at_file_argbuf.
5832         (clear_args): Truncate at_file_argbuf.
5833         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5834         (open_at_file): New function.
5835         (close_at_file): Likewise.
5836         (create_at_file): Delete.
5837         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5838         <'o'>: Likewise.
5839         <'@'>: New case.
5840         (validate_switches_from_spec): Deal with %@{...} sequence.
5841         (validate_switches): Likewise.
5842         (driver::finalize): Call clear_args.
5844 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
5846         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5848 2018-06-11  Martin Sebor  <msebor@redhat.com>
5850         * doc/invoke.texi (-Wall): List -Wc++17-compat.
5851         (Wno-class-memaccess): Add @opindex.
5852         (Wno-templates, Wno-multiple-inheritance): Same.
5853         (Wno-virtual-inheritance, Wno-namespaces): Same.
5854         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5855         (Wno-format-overflow, Wno-format-truncation): Same.
5856         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5857         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5858         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5859         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5860         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5861         (Wno-misspelled-isr): Same.
5863 2018-06-11  Martin Sebor  <msebor@redhat.com>
5865         * PR tree-optimization/86083
5866         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5868 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5870         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5872 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
5874         PR target/85755
5875         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5876         on the correct operand.
5877         (*movdi_internal64): Ditto.
5879 2018-06-11  Martin Liska  <mliska@suse.cz>
5881         PR tree-optimization/86089
5882         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5884 2018-06-11  Julia Koval  <julia.koval@intel.com>
5886         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5887         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5888         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5890 2018-06-11  Olivier Hainque  <hainque@adacore.com>
5892         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5893         for Ada with strict dwarf2.
5895 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
5897         PR target/85755
5898         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5899         addresses.
5901 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
5903         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5905 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
5907         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5908         TARGET_ELF.
5910 2018-06-08  Martin Liska  <mliska@suse.cz>
5912         * tree-cfg.h (debug_function): Fix argument type to match
5913         implementation.
5915 2018-06-08  Martin Liska  <mliska@suse.cz>
5917         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5918         Remove usage of MPX-related (and removed) fields.
5919         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5921 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
5923         * cfg.c (debug): Use TDF_NONE rather than 0.
5924         * cfghooks.c (debug): Likewise.
5925         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5926         (struct dump_option_value_info): Convert to...
5927         (struct kv_pair): ...this template type.
5928         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5929         rather than 0.
5930         (optinfo_verbosity_options): Likewise.
5931         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5932         OPTGROUP_NONE.
5933         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5934         than int for "optgroup_flags" param.
5935         (dump_generic_expr_loc): Use dump_flags_t rather than int for
5936         "dump_kind" param.
5937         (dump_dec): Likewise.
5938         (dump_finish): Use TDF_NONE rather than 0.
5939         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5940         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
5941         than 0.  Update for change to option_ptr.
5942         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5943         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
5944         0.  Update for changes to optinfo_verbosity_options and
5945         optgroup_options.
5946         (opt_info_switch_p): Convert optgroup_flags from int to
5947         optgroup_flags_t.
5948         (dump_basic_block): Use dump_flags_t rather than int
5949         for "dump_kind" param.
5950         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5951         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5952         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5953         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5954         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5955         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5956         TDF_NONE): Convert from macros to...
5957         (enum dump_flag): ...this new enum.
5958         (dump_flags_t): Update to use enum.
5959         (operator|, operator&, operator~, operator|=, operator&=):
5960         Implement for dump_flags_t.
5961         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5962         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5963         Convert from macros to...
5964         (enum optgroup_flag): ...this new enum.
5965         (optgroup_flags_t): New typedef.
5966         (operator|, operator|=): Implement for optgroup_flags_t.
5967         (struct dump_file_info): Convert field "alt_flags" to
5968         dump_flags_t.  Convert field "optgroup_flags" to
5969         optgroup_flags_t.
5970         (dump_basic_block): Use dump_flags_t rather than int for param.
5971         (dump_generic_expr_loc): Likewise.
5972         (dump_dec): Likewise.
5973         (dump_register): Convert param "optgroup_flags" to
5974         optgroup_flags_t.
5975         (opt_info_enable_passes): Likewise.
5976         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5977         than 0.
5978         * gimple-pretty-print.c (debug): Likewise.
5979         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5980         (merged_store_group::apply_stores): Likewise.
5981         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5982         * gimple.c (verify_gimple_pp): Likewise.
5983         * graphite-poly.c (print_pbb_body): Likewise.
5984         * passes.c (pass_manager::register_one_dump_file): Convert
5985         local "optgroup_flags" to optgroup_flags_t.
5986         * print-tree.c (print_node): Use TDF_NONE rather than 0.
5987         (debug): Likewise.
5988         (debug_body): Likewise.
5989         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5990         to optgroup_flags_t.
5991         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5992         than 0.
5993         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5994         (convert_mult_to_fma): Likewise.
5995         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5996         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5997         * tree-vect-data-refs.c (dump_lower_bound): Convert param
5998         "dump_kind" to dump_flags_t.
6000 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
6002         * config/rs6000/rs6000.c (min, max): Delete.
6004 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
6006         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6007         -mabi=spe and -mabi=no-spe.
6009 2018-06-08  Martin Liska  <mliska@suse.cz>
6011         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6012         where we expect an existing summary.
6014 2018-06-08  Martin Liska  <mliska@suse.cz>
6016         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6017         * ipa-inline.h (estimate_edge_growth): Likewise.
6019 2018-06-08  Martin Liska  <mliska@suse.cz>
6021         * cgraph.c (function_version_hasher::hash): Use
6022         cgraph_node::get_uid ().
6023         (function_version_hasher::equal):
6024         * cgraph.h (cgraph_node::get_uid): New method.
6025         * ipa-inline.c (update_caller_keys): Use
6026         cgraph_node::get_uid ().
6027         (update_callee_keys): Likewise.
6028         * ipa-utils.c (searchc): Likewise.
6029         (ipa_reduced_postorder): Likewise.
6030         * lto-cgraph.c (input_node): Likewise.
6031         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6032         * symbol-summary.h (symtab_insertion): Likewise.
6033         (symtab_removal): Likewise.
6034         (symtab_duplication): Likewise.
6035         * tree-pretty-print.c (dump_function_header): Likewise.
6036         * tree-sra.c (convert_callers_for_node): Likewise.
6038 2018-06-08  Martin Liska  <mliska@suse.cz>
6040         * cgraph.c (symbol_table::create_edge): Always assign a new
6041         unique number.
6042         (symbol_table::free_edge): Do not recycle numbers.
6043         * cgraph.h (cgraph_edge::get): New method.
6044         * symbol-summary.h (symtab_removal): Use it.
6045         (symtab_duplication): Likewise.
6046         (call_summary::hashable_uid): Remove.
6048 2018-06-08  Martin Liska  <mliska@suse.cz>
6050         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6051         (initialize_growth_caches): Remove.
6052         (free_growth_caches): Likewise.
6053         (do_estimate_edge_time): Use edge_growth_cache.
6054         (do_estimate_edge_size): Likewise.
6055         (do_estimate_edge_hints): Likewise.
6056         * ipa-inline.c (reset_edge_caches): Likewise.
6057         (recursive_inlining): Likewise.
6058         (inline_small_functions): Likewise.
6059         * ipa-inline.h (initialize_growth_caches): Remove.
6060         (estimate_edge_size): Likewise.
6061         (estimate_edge_time): Likewise.
6062         (estimate_edge_hints): Likewise.
6063         (reset_edge_growth_cache): Likewise.
6064         * symbol-summary.h (call_summary::remove): New method.
6066 2018-06-08  Martin Liska  <mliska@suse.cz>
6068         * ipa-cp.c (class edge_clone_summary): New summary.
6069         (grow_edge_clone_vectors): Remove.
6070         (ipcp_edge_duplication_hook): Remove.
6071         (class edge_clone_summary_t): New call_summary class.
6072         (ipcp_edge_removal_hook): Remove.
6073         (edge_clone_summary_t::duplicate): New function.
6074         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6075         (create_specialized_node): Likewise.
6076         (ipcp_driver): Initialize edge_clone_summaries and do not
6077         register hooks.
6079 2018-06-08  Martin Liska  <mliska@suse.cz>
6081         * symbol-summary.h (get): New function.
6082         (call_summary::m_initialize_when_cloning): New class member.
6084 2018-06-08  Martin Liska  <mliska@suse.cz>
6086         * cgraph.c (cgraph_node::remove): Do not recycle uid.
6087         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6088         (symbol_table::allocate_cgraph_symbol): Do not set uid.
6089         * passes.c (uid_hash_t): Record removed_nodes by their uids.
6090         (remove_cgraph_node_from_order): Use the removed_nodes set.
6091         (do_per_function_toporder): Likwise.
6092         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6093         instead of summary_uid.
6094         (symtab_removal): Likewise.
6095         (symtab_duplication): Likewise.
6097 2018-06-08  Martin Liska  <mliska@suse.cz>
6099         * ipa-cp.c (ipcp_store_bits_results): Use
6100         ipcp_transformation_sum.
6101         (ipcp_store_vr_results): Likewise.
6102         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6103         to ...
6104         (ipcp_transformation_initialize): ... this.
6105         (ipa_set_node_agg_value_chain):
6106         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6107         (write_ipcp_transformation_info): Likewise.
6108         (read_ipcp_transformation_info): Likewise.
6109         (ipcp_update_bits): Likewise.
6110         (ipcp_update_vr): Likewise.
6111         (ipcp_transform_function): Likewise.
6112         * ipa-prop.h: Rename ipcp_transformation_summary to
6113         ipcp_transformation.
6114         (class ipcp_transformation_t): New function summary.
6115         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6116         (ipa_get_agg_replacements_for_node): Likewise.
6118 2018-06-08  Martin Liska  <mliska@suse.cz>
6120         * ipa-pure-const.c (struct funct_state_d): Do it class instead
6121         of struct.
6122         (class funct_state_summary_t): New function_summary class.
6123         (has_function_state): Remove.
6124         (get_function_state): Likewise.
6125         (set_function_state): Likewise.
6126         (add_new_function): Likewise.
6127         (funct_state_summary_t::insert): New function.
6128         (duplicate_node_data): Remove.
6129         (remove_node_data): Remove.
6130         (funct_state_summary_t::duplicate): New function.
6131         (register_hooks): Create new funct_state_summaries.
6132         (pure_const_generate_summary): Use it.
6133         (pure_const_write_summary): Likewise.
6134         (pure_const_read_summary): Likewise.
6135         (propagate_pure_const): Likewise.
6136         (propagate_nothrow): Likewise.
6137         (dump_malloc_lattice): Likewise.
6138         (propagate_malloc): Likewise.
6139         (execute): Do not register hooks, just remove summary
6140         instead.
6141         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6142         constructor.
6144 2018-06-08  Martin Liska  <mliska@suse.cz>
6146         * ipa-reference.c (remove_node_data): Remove.
6147         (duplicate_node_data): Likewise.
6148         (class ipa_ref_var_info_summary_t): New class.
6149         (class ipa_ref_opt_summary_t): Likewise.
6150         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6151         (get_reference_optimization_summary): Use
6152         ipa_ref_opt_sum_summaries.
6153         (set_reference_vars_info): Remove.
6154         (set_reference_optimization_summary): Likewise.
6155         (ipa_init): Create summaries.
6156         (init_function_info): Use function summary.
6157         (ipa_ref_opt_summary_t::duplicate): New function.
6158         (ipa_ref_opt_summary_t::remove): New function.
6159         (get_read_write_all_from_node): Fix GNU coding style.
6160         (propagate): Use function summary.
6161         (write_node_summary_p): Fix GNU coding style.
6162         (stream_out_bitmap): Likewise.
6163         (ipa_reference_read_optimization_summary): Use function summary.
6164         (ipa_reference_c_finalize): Do not release hooks.
6166 2018-06-08  Martin Liska  <mliska@suse.cz>
6168         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6169         (analyze_function_body): Extract multiple calls of get_create.
6170         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6171         * ipa-inline.c (recursive_inlining): Use ::get method.
6172         * ipa-inline.h (estimate_edge_growth): Likewise.
6174 2018-06-08  Martin Liska  <mliska@suse.cz>
6176         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6177         HSA_INVALID.
6178         (hsa_function_summary::hsa_function_summary): Use the new enum
6179         value.
6180         (hsa_gpu_implementation_p): Use hsa_summaries::get.
6181         * hsa-gen.c (hsa_get_host_function): Likewise.
6182         (get_brig_function_name): Likewise.
6183         * ipa-hsa.c (process_hsa_functions): Likewise.
6184         (ipa_hsa_write_summary): Likewise.
6185         * symbol-summary.h (symtab_duplication): Use ::get function/
6186         (get): New function.
6188 2018-06-08  Martin Liska  <mliska@suse.cz>
6190         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6191         of get.
6192         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6193         (hsa_register_kernel): Likewise.
6194         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6195         * hsa-gen.c (hsa_get_host_function): Likewise.
6196         (get_brig_function_name): Likewise.
6197         (generate_hsa): Likewise.
6198         (pass_gen_hsail::execute): Likewise.
6199         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6200         (devirtualization_time_bonus): Likewise.
6201         (ipcp_propagate_stage): Likewise.
6202         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6203         (edge_set_predicate): Likewise.
6204         (evaluate_conditions_for_known_args): Likewise.
6205         (evaluate_properties_for_edge): Likewise.
6206         (ipa_fn_summary::reset): Likewise.
6207         (ipa_fn_summary_t::duplicate): Likewise.
6208         (dump_ipa_call_summary): Likewise.
6209         (ipa_dump_fn_summary): Likewise.
6210         (analyze_function_body): Likewise.
6211         (compute_fn_summary): Likewise.
6212         (estimate_edge_devirt_benefit): Likewise.
6213         (estimate_edge_size_and_time): Likewise.
6214         (estimate_calls_size_and_time): Likewise.
6215         (estimate_node_size_and_time): Likewise.
6216         (inline_update_callee_summaries): Likewise.
6217         (remap_edge_change_prob): Likewise.
6218         (remap_edge_summaries): Likewise.
6219         (ipa_merge_fn_summary_after_inlining): Likewise.
6220         (ipa_update_overall_fn_summary): Likewise.
6221         (read_ipa_call_summary): Likewise.
6222         (inline_read_section): Likewise.
6223         (write_ipa_call_summary): Likewise.
6224         (ipa_fn_summary_write): Likewise.
6225         (ipa_free_fn_summary): Likewise.
6226         * ipa-hsa.c (process_hsa_functions): Likewise.
6227         (ipa_hsa_write_summary): Likewise.
6228         (ipa_hsa_read_section): Likewise.
6229         * ipa-icf.c (sem_function::merge): Likewise.
6230         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6231         (do_estimate_edge_time): Likewise.
6232         (estimate_size_after_inlining): Likewise.
6233         (estimate_growth): Likewise.
6234         (growth_likely_positive): Likewise.
6235         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6236         (inline_call): Likewise.
6237         * ipa-inline.c (caller_growth_limits): Likewise.
6238         (can_inline_edge_p): Likewise.
6239         (can_inline_edge_by_limits_p): Likewise.
6240         (compute_uninlined_call_time): Likewise.
6241         (compute_inlined_call_time): Likewise.
6242         (want_inline_small_function_p): Likewise.
6243         (edge_badness): Likewise.
6244         (update_caller_keys): Likewise.
6245         (update_callee_keys): Likewise.
6246         (recursive_inlining): Likewise.
6247         (inline_small_functions): Likewise.
6248         (inline_to_all_callers_1): Likewise.
6249         (dump_overall_stats): Likewise.
6250         (early_inline_small_functions): Likewise.
6251         (early_inliner): Likewise.
6252         * ipa-inline.h (estimate_edge_growth): Likewise.
6253         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6254         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6255         * ipa-prop.h (IPA_NODE_REF): Likewise.
6256         (IPA_EDGE_REF): Likewise.
6257         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6258         (propagate_malloc): Likewise.
6259         * ipa-split.c (execute_split_functions): Likewise.
6260         * symbol-summary.h: Rename get to get_create.
6261         (get): Likewise.
6262         (get_create): Likewise.
6263         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6265 2018-06-08  Martin Liska  <mliska@suse.cz>
6267         * symbol-summary.h (release): Move definition out of class
6268         declaration.
6269         (symtab_removal): Likewise.
6270         (symtab_duplication): Likewise.
6272 2018-06-08  Martin Liska  <mliska@suse.cz>
6274         * symbol-summary.h (function_summary): Move constructor
6275         implementation out of class declaration.
6276         (release): Likewise.
6277         (symtab_insertion): Likewise.
6278         (symtab_removal): Likewise.
6279         (symtab_duplication): Likewise.
6280         (get): Likewise.
6282 2018-06-08  Martin Liska  <mliska@suse.cz>
6284         * Makefile.in: Remove support for MPX (macros, related functions,
6285         fields in cgraph_node, ...).
6286         * builtin-types.def (BT_BND): Likewise.
6287         (BT_FN_BND_CONST_PTR): Likewise.
6288         (BT_FN_CONST_PTR_BND): Likewise.
6289         (BT_FN_VOID_PTR_BND): Likewise.
6290         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6291         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6292         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6293         (expand_builtin_mempcpy_with_bounds): Likewise.
6294         (expand_builtin_memset_with_bounds): Likewise.
6295         (expand_builtin_memset_args): Likewise.
6296         (std_expand_builtin_va_start): Likewise.
6297         (expand_builtin): Likewise.
6298         (expand_builtin_with_bounds): Likewise.
6299         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6300         (DEF_LIB_BUILTIN_CHKP): Likewise.
6301         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6302         (DEF_CHKP_BUILTIN): Likewise.
6303         (BUILT_IN_MEMCPY): Likewise.
6304         (BUILT_IN_MEMMOVE): Likewise.
6305         (BUILT_IN_MEMPCPY): Likewise.
6306         (BUILT_IN_MEMSET): Likewise.
6307         (BUILT_IN_STPCPY): Likewise.
6308         (BUILT_IN_STRCAT): Likewise.
6309         (BUILT_IN_STRCHR): Likewise.
6310         (BUILT_IN_STRCPY): Likewise.
6311         (BUILT_IN_STRLEN): Likewise.
6312         (BUILT_IN_MEMCPY_CHK): Likewise.
6313         (BUILT_IN_MEMMOVE_CHK): Likewise.
6314         (BUILT_IN_MEMPCPY_CHK): Likewise.
6315         (BUILT_IN_MEMSET_CHK): Likewise.
6316         (BUILT_IN_STPCPY_CHK): Likewise.
6317         (BUILT_IN_STRCAT_CHK): Likewise.
6318         (BUILT_IN_STRCPY_CHK): Likewise.
6319         * calls.c (store_bounds): Likewise.
6320         (emit_call_1): Likewise.
6321         (special_function_p): Likewise.
6322         (maybe_warn_nonstring_arg): Likewise.
6323         (initialize_argument_information): Likewise.
6324         (finalize_must_preallocate): Likewise.
6325         (compute_argument_addresses): Likewise.
6326         (expand_call): Likewise.
6327         * cfgexpand.c (expand_call_stmt): Likewise.
6328         (expand_return): Likewise.
6329         (expand_gimple_stmt_1): Likewise.
6330         (pass_expand::execute): Likewise.
6331         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6332         (cgraph_node::remove): Likewise.
6333         (cgraph_node::dump): Likewise.
6334         (cgraph_node::verify_node): Likewise.
6335         * cgraph.h (chkp_function_instrumented_p): Likewise.
6336         (symtab_node::get_alias_target): Likewise.
6337         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6338         (cgraph_local_p): Likewise.
6339         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6340         (cgraph_edge::rebuild_references): Likewise.
6341         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6342         (walk_polymorphic_call_targets): Likewise.
6343         (cgraph_node::expand_thunk): Likewise.
6344         (symbol_table::output_weakrefs): Likewise.
6345         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6346         (ix86_handle_option): Likewise.
6347         * config/i386/constraints.md: Likewise.
6348         * config/i386/i386-builtin-types.def (BND): Likewise.
6349         (VOID): Likewise.
6350         (PVOID): Likewise.
6351         (ULONG): Likewise.
6352         * config/i386/i386-builtin.def (BDESC_END): Likewise.
6353         (BDESC_FIRST): Likewise.
6354         (BDESC): Likewise.
6355         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6356         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6357         * config/i386/i386.c (enum reg_class): Likewise.
6358         (ix86_target_string): Likewise.
6359         (ix86_option_override_internal): Likewise.
6360         (ix86_conditional_register_usage): Likewise.
6361         (ix86_valid_target_attribute_inner_p): Likewise.
6362         (ix86_set_indirect_branch_type): Likewise.
6363         (ix86_set_current_function): Likewise.
6364         (ix86_function_arg_regno_p): Likewise.
6365         (init_cumulative_args): Likewise.
6366         (ix86_function_arg_advance): Likewise.
6367         (ix86_function_arg): Likewise.
6368         (ix86_pass_by_reference): Likewise.
6369         (ix86_function_value_regno_p): Likewise.
6370         (ix86_function_value_1): Likewise.
6371         (ix86_function_value_bounds): Likewise.
6372         (ix86_return_in_memory): Likewise.
6373         (ix86_setup_incoming_vararg_bounds): Likewise.
6374         (ix86_va_start): Likewise.
6375         (indirect_thunk_need_prefix): Likewise.
6376         (print_reg): Likewise.
6377         (ix86_print_operand): Likewise.
6378         (ix86_expand_call): Likewise.
6379         (ix86_output_function_return): Likewise.
6380         (reg_encoded_number): Likewise.
6381         (BDESC_VERIFYS): Likewise.
6382         (ix86_init_mpx_builtins): Likewise.
6383         (ix86_init_builtins): Likewise.
6384         (ix86_emit_cmove): Likewise.
6385         (ix86_emit_move_max): Likewise.
6386         (ix86_expand_builtin): Likewise.
6387         (ix86_builtin_mpx_function): Likewise.
6388         (ix86_get_arg_address_for_bt): Likewise.
6389         (ix86_load_bounds): Likewise.
6390         (ix86_store_bounds): Likewise.
6391         (ix86_load_returned_bounds): Likewise.
6392         (ix86_store_returned_bounds): Likewise.
6393         (ix86_class_likely_spilled_p): Likewise.
6394         (ix86_hard_regno_mode_ok): Likewise.
6395         (x86_order_regs_for_local_alloc): Likewise.
6396         (ix86_mitigate_rop): Likewise.
6397         (ix86_bnd_prefixed_insn_p): Likewise.
6398         (ix86_mpx_bound_mode): Likewise.
6399         (ix86_make_bounds_constant): Likewise.
6400         (ix86_initialize_bounds): Likewise.
6401         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6402         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6403         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6404         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6405         (TARGET_CHKP_BOUND_MODE): Likewise.
6406         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6407         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6408         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6409         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6410         * config/i386/i386.h (TARGET_MPX): Likewise.
6411         (TARGET_MPX_P): Likewise.
6412         (VALID_BND_REG_MODE): Likewise.
6413         (FIRST_BND_REG): Likewise.
6414         (LAST_BND_REG): Likewise.
6415         (enum reg_class): Likewise.
6416         (BND_REG_P): Likewise.
6417         (BND_REGNO_P): Likewise.
6418         (BNDmode): Likewise.
6419         (ADJUST_INSN_LENGTH): Likewise.
6420         * config/i386/i386.md: Likewise.
6421         * config/i386/i386.opt: Likewise.
6422         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6423         (defined): Likewise.
6424         (LINK_MPX): Likewise.
6425         (MPX_SPEC): Likewise.
6426         (LIBMPX_SPEC): Likewise.
6427         (LIBMPXWRAPPERS_SPEC): Likewise.
6428         (CHKP_SPEC): Likewise.
6429         * config/i386/predicates.md: Likewise.
6430         * dbxout.c (dbxout_type): Likewise.
6431         * doc/extend.texi: Likewise.
6432         * doc/invoke.texi: Likewise.
6433         * doc/md.texi: Likewise.
6434         * doc/tm.texi: Likewise.
6435         * doc/tm.texi.in: Likewise.
6436         * dwarf2out.c (is_base_type): Likewise.
6437         (gen_formal_types_die): Likewise.
6438         (gen_subprogram_die): Likewise.
6439         (gen_type_die_with_usage): Likewise.
6440         (gen_decl_die): Likewise.
6441         (dwarf2out_late_global_decl): Likewise.
6442         * expr.c (expand_assignment): Likewise.
6443         (emit_storent_insn): Likewise.
6444         (store_expr_with_bounds): Likewise.
6445         (store_expr): Likewise.
6446         (expand_expr_real_1): Likewise.
6447         * expr.h (store_expr_with_bounds): Likewise.
6448         * function.c (use_register_for_decl): Likewise.
6449         (struct bounds_parm_data): Likewise.
6450         (assign_parms_augmented_arg_list): Likewise.
6451         (assign_parm_find_entry_rtl): Likewise.
6452         (assign_parm_is_stack_parm): Likewise.
6453         (assign_parm_load_bounds): Likewise.
6454         (assign_bounds): Likewise.
6455         (assign_parms): Likewise.
6456         (expand_function_start): Likewise.
6457         * gcc.c (CHKP_SPEC): Likewise.
6458         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6459         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6460         (wrestrict_dom_walker::check_call): Likewise.
6461         * gimple.c (gimple_build_call_from_tree): Likewise.
6462         * gimple.h (enum gf_mask): Likewise.
6463         (gimple_call_with_bounds_p): Likewise.
6464         (gimple_call_set_with_bounds): Likewise.
6465         * gimplify.c (gimplify_init_constructor): Likewise.
6466         * ipa-cp.c (initialize_node_lattices): Likewise.
6467         (propagate_constants_across_call): Likewise.
6468         (find_more_scalar_values_for_callers_subset): Likewise.
6469         * ipa-hsa.c (process_hsa_functions): Likewise.
6470         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6471         * ipa-icf.c (sem_function::merge): Likewise.
6472         * ipa-inline.c (early_inliner): Likewise.
6473         * ipa-pure-const.c (warn_function_noreturn): Likewise.
6474         (warn_function_cold): Likewise.
6475         (propagate_pure_const): Likewise.
6476         * ipa-ref.h (enum GTY): Likewise.
6477         * ipa-split.c (find_retbnd): Likewise.
6478         (consider_split): Likewise.
6479         (split_function): Likewise.
6480         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6481         * ipa.c (walk_polymorphic_call_targets): Likewise.
6482         (symbol_table::remove_unreachable_nodes): Likewise.
6483         (process_references): Likewise.
6484         (cgraph_build_static_cdtor_1): Likewise.
6485         * lto-cgraph.c (lto_output_node): Likewise.
6486         (output_refs): Likewise.
6487         (compute_ltrans_boundary): Likewise.
6488         (input_overwrite_node): Likewise.
6489         (input_node): Likewise.
6490         (input_cgraph_1): Likewise.
6491         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6492         * passes.c (pass_manager::execute_early_local_passes): Likewise.
6493         (class pass_chkp_instrumentation_passes): Likewise.
6494         (make_pass_chkp_instrumentation_passes): Likewise.
6495         * passes.def: Likewise.
6496         * rtl.h (struct GTY): Likewise.
6497         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6498         * stor-layout.c (layout_type): Likewise.
6499         * symtab.c: Likewise.
6500         * target.def: Likewise.
6501         * targhooks.c (default_chkp_bound_type): Likewise.
6502         (default_chkp_bound_mode): Likewise.
6503         (default_builtin_chkp_function): Likewise.
6504         (default_chkp_function_value_bounds): Likewise.
6505         (default_chkp_make_bounds_constant): Likewise.
6506         (default_chkp_initialize_bounds): Likewise.
6507         * targhooks.h (default_chkp_bound_type): Likewise.
6508         (default_chkp_bound_mode): Likewise.
6509         (default_builtin_chkp_function): Likewise.
6510         (default_chkp_function_value_bounds): Likewise.
6511         (default_chkp_make_bounds_constant): Likewise.
6512         (default_chkp_initialize_bounds): Likewise.
6513         * toplev.c (compile_file): Likewise.
6514         (process_options): Likewise.
6515         * tree-core.h (DEF_BUILTIN): Likewise.
6516         (DEF_BUILTIN_CHKP): Likewise.
6517         * tree-inline.c (declare_return_variable): Likewise.
6518         (remap_gimple_stmt): Likewise.
6519         (copy_bb): Likewise.
6520         (initialize_inlined_parameters): Likewise.
6521         (expand_call_inline): Likewise.
6522         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6523         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6524         (make_pass_ipa_chkp_produce_thunks): Likewise.
6525         (make_pass_chkp): Likewise.
6526         (make_pass_chkp_opt): Likewise.
6527         (make_pass_chkp_instrumentation_passes): Likewise.
6528         * tree-pretty-print.c (dump_generic_node): Likewise.
6529         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6530         * tree-ssa-dce.c (propagate_necessity): Likewise.
6531         (eliminate_unnecessary_stmts): Likewise.
6532         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6533         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6534         * tree-ssa-sccvn.h: Likewise.
6535         * tree-ssa-strlen.c (get_string_length): Likewise.
6536         (valid_builtin_call): Likewise.
6537         (adjust_last_stmt): Likewise.
6538         (handle_builtin_strchr): Likewise.
6539         (handle_builtin_strcpy): Likewise.
6540         (handle_builtin_stxncpy): Likewise.
6541         (handle_builtin_memcpy): Likewise.
6542         (handle_builtin_strcat): Likewise.
6543         (strlen_check_and_optimize_stmt): Likewise.
6544         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6545         * tree-streamer-in.c: Likewise.
6546         * tree-streamer.c (record_common_node): Likewise.
6547         * tree.c (tree_code_size): Likewise.
6548         (wide_int_to_tree_1): Likewise.
6549         (type_contains_placeholder_1): Likewise.
6550         (build_common_tree_nodes): Likewise.
6551         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6552         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6553         (POINTER_BOUNDS_P): Likewise.
6554         (BOUNDED_TYPE_P): Likewise.
6555         (BOUNDED_P): Likewise.
6556         (CALL_WITH_BOUNDS_P): Likewise.
6557         (pointer_bounds_type_node): Likewise.
6558         * value-prof.c (gimple_ic): Likewise.
6559         * var-tracking.c (vt_add_function_parameters): Likewise.
6560         * varasm.c (make_decl_rtl): Likewise.
6561         (assemble_start_function): Likewise.
6562         (output_constant): Likewise.
6563         (maybe_assemble_visibility): Likewise.
6564         * varpool.c (ctor_for_folding): Likewise.
6565         * chkp-builtins.def: Remove.
6566         * ipa-chkp.c: Remove.
6567         * ipa-chkp.h: Remove.
6568         * rtl-chkp.c: Remove.
6569         * rtl-chkp.h: Remove.
6570         * tree-chkp-opt.c: Remove.
6571         * tree-chkp.c: Remove.
6572         * tree-chkp.h: Remove.
6574 2018-06-07  Carl Love  <cel@us.ibm.com>
6576         * config/rs6000/vsx.md (vextract_fp_from_shorth,
6577         vextract_fp_from_shortl): Add BE support.
6579 2018-06-07  Paul Koning  <ni1d@arrl.net>
6581         * compare-elim.c (try_merge_compare): Don't merge compare if
6582         address contains a side effect.
6583         (try_eliminate_compare): Likewise.
6585 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
6587         * config.gcc: Support "tremont".
6588         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6589         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6590         PROCESSOR_TREMONT.
6591         * config/i386/i386.c (m_TREMONT): Define.
6592         (processor_target_table): Add "tremont".
6593         (PTA_TREMONT): Define.
6594         (ix86_lea_outperforms): Add TARGET_TREMONT.
6595         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6596         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6597         and M_INTEL_GOLDMONT_PLUS.
6598         (fold_builtin_cpu): Add "tremont".
6599         (ix86_add_stmt_cost): Add TARGET_TREMONT.
6600         (ix86_option_override_internal): Add "tremont".
6601         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6602         (processor_type): Add PROCESSOR_TREMONT.
6603         * config/i386/x86-tune.def: Add m_TREMONT.
6604         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6606 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6608         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6609         symbol defined for msp430i* devices to be lower case.
6611 2018-06-07  Richard Biener  <rguenther@suse.de>
6613         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6614         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
6615         Properly wrap signed arithmetic if overflow wraps.
6617 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
6619         PR tree-optimization/69615
6620         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6621         of a cast from a same precision integral SSA_NAME in a bb dominated
6622         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
6623         cast to utype if rhs2 has already a compatible type.
6625 2018-06-07  Richard Biener  <rguenther@suse.de>
6627         PR tree-optimization/85935
6628         * graphite-scop-detection.c (find_params_in_bb): Analyze
6629         condition operands with respect to the correct loop.  Assert
6630         the analysis doesn't fail.
6632 2018-06-04  Carl Love  <cel@us.ibm.com>
6634         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6635         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
6636         as it is slightly cheaper.
6637         (first_match_or_eos_index_<mode>):
6638         Calculate index using natural element order.
6639         (first_match_index_<mode>):
6640         Calculate index using natural element order.
6641         (first_match_or_eos_index_<mode>):
6642         Calculate index using natural order.
6643         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6644         for BE and LE modes.
6645         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6646         P9V_BUILTIN_VCLZLSBB_V16QI.
6647         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6648         specific.
6650 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6652         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6653         indentation and line wrap for many prototypes.  Add missing
6654         @smallexample directives around block of prototypes for vec_xl and
6655         vec_xst.
6657 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
6659         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6660         track if we pass or return IEEE 128-bit floating point.
6661         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6662         C++ mangling that is compatible with GCC 8.1.
6663         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6664         (init_cumulative_args): Note if we pass or return IEEE 128-bit
6665         floating point types.
6666         (rs6000_function_arg_advance_1): Likewise.
6667         (rs6000_mangle_type): Optionally generate mangled names that match
6668         what GCC 8.1 generated for IEEE 128-bit floating point types.
6669         (rs6000_globalize_decl_name): If we have an external function that
6670         passes or returns IEEE 128-bit types, generate a weak reference
6671         from the mangled name used in GCC 8.1 to the current mangled
6672         name.
6673         (rs6000_init_builtins): Make __ibm128 use the long double type if
6674         long double is IBM extended double.  Make __float128 use the long
6675         double type if long double is IEEE 128-bit.
6677         PR target/85657
6678         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6679         macro for __ibm128 built-in functions.
6680         (PACK_IF): Add __ibm128 pack/unpack functions.
6681         (UNPACK_IF): Likewise.
6682         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6683         enable long double built-in functions if long double is IEEE
6684         128-bit floating point.
6685         (rs6000_invalid_builtin): Update long double built-in function
6686         error message.
6687         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6688         functions, adjust the built-in function to use the long double
6689         built-in function if __ibm128 and long double are the same type.
6690         * doc/extend.texi (PowerPC builtins): Update documention for
6691         __builtin_{,un}pack_longdouble.  Add documentation for
6692         __builtin_{,un}pack_ibm128.
6694 2018-06-06  Jim Wilson  <jimw@sifive.com>
6696         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6697         (struct machine_function): New field interrupt_mode.
6698         (riscv_handle_type_attribute): New function.  Add forward declaration.
6699         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6700         (riscv_expand_epilogue): Check interrupt_mode field.
6701         (riscv_set_current_function): Check interrupt attribute args and
6702         set interrupt_mode field.
6703         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6704         (riscv_sret, riscv_uret): New.
6705         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6706         new arguments to interrupt attribute.
6708 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
6710         PR target/63177
6711         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6712         Don't handle -mcpu=power8 if -mpower9-vector is also used.
6714 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6716         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6717         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6718         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6719         several redundant entries.
6721 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
6723         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6724         type from "rtx" to "rtx_insn *".
6725         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6726         for local "call_insn", removing cast.
6727         (ix86_expand_call): Likewise, introducing a "call_insn" local.
6729 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6731         PR tree-optimization/86066
6732         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6733         for BIT_INSERT_EXPR stores.
6735 2018-06-06  Richard Biener  <rguenther@suse.de>
6737         PR tree-optimization/86062
6738         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6739         component refs ontop
6740         of to be offsetted base.
6742 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6744         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6745         to be static and remove check on interrupt attribute name.
6747 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6749         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6750         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6752 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
6754         PR target/79924
6755         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6756         second argument.
6757         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6758         Remove second argument, change how error is called.
6759         (aarch64_layout_arg): Remove second argument from
6760         aarch64_err_no_fpadvsimd call.
6761         (aarch64_init_cumulative_args): Ditto.
6762         (aarch64_gimplify_va_arg_expr): Ditto.
6763         * config/aarch64/aarch64.md (mov<mode>): Ditto.
6765 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
6767         * config/i386/i386.md (simple_return_indirect_internal): New expander.
6768         (*simple_return_indirect_internal<mode>): Rename from
6769         simple_return_indirect_internal.  Use W mode iterator.
6770         (rstorssp): New expander.
6771         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
6772         (clrssbsy): New expander.
6773         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
6775 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6777         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6778         __typeof__.
6779         (cmse_check_pointed_object): Likewise.
6781 2018-06-05  Martin Liska  <mliska@suse.cz>
6783         PR gcov-profile/47618
6784         * doc/invoke.texi: Document how -fprofile-dir format
6785         is extended.
6787 2018-06-05  Richard Biener  <rguenther@suse.de>
6789         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6790         removal pretend DOM info isn't available so we do not update
6791         it and only remove edges, not dominated blocks.  Actually free
6792         DOM info in case we removed something.  Remove unreachable blocks.
6793         (mfb_keep_latches): Work with either DOM info or marked backedges.
6794         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6795         first.  Mark backedges if DOM info isn't available.
6796         (Re-)compute DOM info after cleanup_control_flow_pre.
6798 2018-06-05  Richard Biener  <rguenther@suse.de>
6800         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6801         (locus_discrim_hasher::hash): Adjust.
6802         (locus_discrim_hasher::equal): Likewise.
6803         (next_discriminator_for_locus): Work on line directly.
6804         (same_line_p): Pass in expanded locus1 as well.
6805         (assign_discriminators): Avoid redundant location expansions.
6807 2018-06-05  Richard Biener  <rguenther@suse.de>
6809         PR tree-optimization/86046
6810         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6811         if required after clearing TREE_ADDRESSABLE.
6813 2018-06-05  Richard Biener  <rguenther@suse.de>
6815         PR tree-optimization/86047
6816         * tree-ssa-loop.c (for_each_index): Glob handling of all
6817         decls and constants and really handle all of them.
6819 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6821         PR target/81497
6822         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6823         qualifier_void_pointer and qualifier_const_void_pointer.
6824         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6825         (arm_init_builtins): Handle the above.
6826         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6827         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6828         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6829         void intrinsics.
6831 2018-06-05  Martin Liska  <mliska@suse.cz>
6833         * auto-profile.c (read_autofdo_file): Do not use
6834         gcov_ctr_summary struct.
6835         (afdo_callsite_hot_enough_for_early_inline): Likewise.
6836         * coverage.c (struct counts_entry): Likewise.
6837         (read_counts_file): Read just single summary entry.
6838         (get_coverage_counts): Use gcov_summary struct.
6839         * coverage.h (get_coverage_counts): Likewise.
6840         * gcov-dump.c (dump_working_sets): Likewise.
6841         (tag_summary): Dump just single summary.
6842         * gcov-io.c (gcov_write_summary): Write just histogram
6843         summary.
6844         (gcov_read_summary): Read just single summary.
6845         (compute_working_sets): Use gcov_summary struct.
6846         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6847         of GCOV_COUNTERS_SUMMABLE.
6848         (GCOV_COUNTERS_SUMMABLE): Remove.
6849         (GCOV_FIRST_VALUE_COUNTER): Replace with
6850         GCOV_COUNTER_V_INTERVAL.
6851         (struct gcov_ctr_summary): Remove.
6852         (struct gcov_summary): Directly use fields of former
6853         gcov_ctr_summary.
6854         (compute_working_sets): Use gcov_summary struct.
6855         * gcov.c (read_count_file): Do not use ctrs fields.
6856         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6857         struct.
6858         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6859         struct.
6860         * profile.c: Likewise.
6861         * profile.h: Likewise.
6863 2018-06-05  Martin Liska  <mliska@suse.cz>
6865         PR gcov-profile/84846
6866         * gcov.c (output_lines): Print working directory only
6867         in intermediate format.
6869 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
6871         * config/s390/s390-builtin-types.def: Add void function type.
6872         * config/s390/s390-builtins.def: Use the function type for the
6873         tbeginc builtin.
6875 2018-06-04  Jim Wilson  <jimw@sifive.com>
6877         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6878         to int.
6879         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6880         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
6881         handle EH_RETURN_DATA_REGNO registers properly.
6882         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6883         (riscv_expand_epilogue): Update comment.  Change argument name and
6884         type.  Update code to use new name and type.  Pass new args to
6885         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
6886         EXCEPTION_RETURN.
6887         * config/riscv/riscv.md (NORMAL_RETURN): New.
6888         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6889         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6890         (eh_return): Call gen_eh_return_internal and emit barrier.
6891         (eh_return_internal): Call riscv_expand_epilogue.
6893 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
6895         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6896         bit_insertion field and declare can_be_merged_into method.
6897         (merged_store_group::can_be_merged_into): New method.
6898         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6899         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
6900         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6902 2018-06-04  Richard Biener  <rguenther@suse.de>
6904         PR tree-optimization/85955
6905         * builtins.c (fold_builtin_sincos): Convert pointers to
6906         destination to appropriate type before dereferencing.
6908 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
6910         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6912 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
6914         * expr.c (expand_expr_real_1): Force the operand into memory if
6915         its TYPE_MODE is BLKmode and if there is no integer mode for
6916         the number of bits being extracted.
6918 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
6920         PR target/85832
6921         PR target/86036
6922         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6923         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6925 2018-06-04  Richard Biener  <rguenther@suse.de>
6927         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6928         (cleanup_tree_cfg_noloop): ... single caller.  Do
6929         start_recording_case_labels later.
6931 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
6933         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6934         to _IMMINTRIN_H_INCLUDED.
6935         * config/i386/pconfigintrin.h: Ditto.
6936         * config/i386/waitpkgintrin.h: Ditto.
6937         * config/i386/immintrin.h: Add includes for sgxintrin.h,
6938         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6939         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6940         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6941         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6942         waitpkgintrin.h and cldemoteintrin.h.
6944 2018-06-04  Richard Biener  <rguenther@suse.de>
6946         PR tree-optimization/86038
6947         * tracer.c (find_best_successor): Check probability for
6948         being initialized, bail out if not.
6950 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
6952         PR target/86003
6953         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6954         of bits to ignore when comparing architectures.
6956 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
6958         PR tree-optimization/69615
6959         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6960         maximum or minimum of the type, try to merge it also as if
6961         range1 is + [-, x - 1] or + [x + 1, -].
6963         PR c++/86025
6964         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6966 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
6968         PR tree-optimization/86034
6969         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6970         the unsigned bitfield type in a bit insertion sequence if it does not
6971         have a larger precision than the bitfield size.
6972         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6974 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
6976         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6978 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6980         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6981         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6982         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6983         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6985 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6987         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6988         Disable -fdelete-null-pointer-checks for ELF toolchain.
6990 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
6991             Kito Cheng  <kito.cheng@gmail.com>
6993         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6994         (nds32le-*-*, nds32be-*-*): Integrate checking process.
6995         (nds32*-*-*): Add glibc and uclibc conditions.
6996         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6997         (TARGET_EXCEPT_UNWIND_INFO): Define.
6998         * config/nds32/elf.h: New file.
6999         * config/nds32/linux.h: New file.
7000         * config/nds32/nds32-elf.opt: New file.
7001         * config/nds32/nds32-linux.opt: New file.
7002         * config/nds32/nds32-fp-as-gp.c
7003         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7004         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7005         TARGET_LINUX_ABI.
7006         (nds32_asm_file_end): Ditto.
7007         (nds32_print_operand): Ditto.
7008         (nds32_insert_attributes): Ditto.
7009         (nds32_init_libfuncs): New function.
7010         (TARGET_HAVE_TLS): Define.
7011         (TARGET_INIT_LIBFUNCS): Define.
7012         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7013         spec content.
7014         (TARGET_ELF): Apply different mcmodel setting.
7015         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7016         been migrated into elf.h and linux.h files.
7017         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7018         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7019         (mcmodel): The content has been migrated into nds32-elf.opt and
7020         nds32-linux.opt files.
7021         * config/nds32/t-elf: New file.
7022         * config/nds32/t-linux: New file.
7024 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
7025             Shiva Chen  <shiva0217@gmail.com>
7027         * config/nds32/constants.md (unspec_volatile_element): Add
7028         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7029         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7030         optimization.
7031         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7032         (make_pass_nds32_fp_as_gp): Declare.
7033         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7034         optmization pass.
7035         (nds32_asm_function_end_prologue): Remove unused asm output.
7036         (nds32_asm_function_begin_epilogue): Remove unused asm output.
7037         (nds32_asm_file_start): Output necessary fp_as_gp information.
7038         (nds32_option_override): Adjust register usage.
7039         (nds32_expand_prologue): Consider fp_as_gp situation.
7040         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7041         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7042         (epilogue): Ditto.
7043         (return): Ditto.
7044         (simple_return): Ditto.
7045         (omit_fp_begin): Output special directive for fp_as_gp.
7046         (omit_fp_end): Output special directive for fp_as_gp.
7047         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7048         mforbid-fp-as-gp): New options.
7050 2018-06-01  Mark Wielaard  <mark@klomp.org>
7052         * dwarf2out.c (dwarf2out_finish): Remove generation of
7053         DW_AT_loclists_base.
7055 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
7057         * gimple-ssa-store-merging.c: Include gimple-fold.h.
7058         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7059         (struct merged_store_group): Add bit_insertion field.
7060         (dump_char_array): Use standard hexadecimal format.
7061         (merged_store_group::merged_store_group): Set bit_insertion to false.
7062         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
7063         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
7064         also print the mask in the dump file.
7065         (pass_store_merging::gate): Minor tweak.
7066         (imm_store_chain_info::coalesce_immediate): Fix wrong association
7067         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
7068         stores with INTEGER_CST stores.
7069         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7070         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7071         and use it throughout.  Generate bit insertion sequences if need be.
7072         (pass_store_merging::process_store): Remove redundant condition.
7073         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7075 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
7077         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7078         the 128-bit floating point types.  Fix function comment.
7080 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7082         * config/aarch64/aarch64-simd.md
7083         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7084         mnemonics.
7085         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7086         mnemonics.
7088 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
7090         PR tree-optimization/85989
7091         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7092         variable.
7093         (backprop::intersect_uses): Check it when deciding whether this
7094         is a backedge reference.
7095         (backprop::process_block): Add each phi to m_visited_phis
7096         after visiting it, then clear it at the end.
7098 2018-06-01  Richard Biener  <rguenther@suse.de>
7100         * tree-vectorizer.h (vect_dr_stmt): New function.
7101         (vect_get_load_cost): Adjust.
7102         (vect_get_store_cost): Likewise.
7103         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7104         Use vect_dr_stmt instead of DR_SMTT.
7105         (vect_record_base_alignments): Likewise.
7106         (vect_calculate_target_alignment): Likewise.
7107         (vect_compute_data_ref_alignment): Likewise and make static.
7108         (vect_update_misalignment_for_peel): Likewise.
7109         (vect_verify_datarefs_alignment): Likewise.
7110         (vector_alignment_reachable_p): Likewise.
7111         (vect_get_data_access_cost): Likewise.  Pass down
7112         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7113         (vect_get_peeling_costs_all_drs): Likewise.
7114         (vect_peeling_hash_get_lowest_cost): Likewise.
7115         (vect_enhance_data_refs_alignment): Likewise.
7116         (vect_find_same_alignment_drs): Likewise.
7117         (vect_analyze_data_refs_alignment): Likewise.
7118         (vect_analyze_group_access_1): Likewise.
7119         (vect_analyze_group_access): Likewise.
7120         (vect_analyze_data_ref_access): Likewise.
7121         (vect_analyze_data_ref_accesses): Likewise.
7122         (vect_vfa_segment_size): Likewise.
7123         (vect_small_gap_p): Likewise.
7124         (vectorizable_with_step_bound_p): Likewise.
7125         (vect_prune_runtime_alias_test_list): Likewise.
7126         (vect_analyze_data_refs): Likewise.
7127         (vect_supportable_dr_alignment): Likewise.
7128         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7129         (vect_gen_prolog_loop_niters): Likewise.
7130         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7131         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7132         modify DR_STMT.
7133         (vect_recog_mask_conversion_pattern): Likewise.
7134         (vect_try_gather_scatter_pattern): Likewise.
7135         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7136         to vect_get_store_cost.
7137         (vect_get_store_cost): Get stmt_info instead of DR.
7138         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7139         (vect_get_load_cost): Get stmt_info instead of DR.
7141 2018-06-01  Richard Biener  <rguenther@suse.de>
7143         PR middle-end/86017
7144         * gimple-fold.c (var_decl_component_p): Also allow offsetted
7145         vars wrapped in MEM_REFs.
7147 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
7149         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7150         Fix subreg tests so that we only return a choice between
7151         GENERAL_REGS and FP_REGS if the original classes included both.
7153 2018-06-01  Richard Biener  <rguenther@suse.de>
7155         PR ipa/85960
7156         * tree-ssa-structalias.c (get_function_part_constraint):
7157         Handle NULL fi->decl.
7158         (find_func_aliases_for_call): Properly handle indirect
7159         fi from direct call.
7160         (find_func_clobbers): Likewise.
7161         (ipa_pta_execute): Likewise.
7162         (create_variable_info_for): For functions that are ifunc_resolver
7163         resolve to a varinfo that contains the result of the resolver call.
7164         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7165         aliases.
7167 2018-05-31  Michael Collison  <michael.collison@arm.com>
7169         * config/aarch64/aarch64.md:
7170         (*fix_to_zero_extenddfdi2): New pattern.
7171         * gcc.target/aarch64/fix_extend1.c: New testcase.
7173 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
7175         PR middle-end/78809
7176         PR middle-end/83026
7177         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7178         and BUILT_IN_STRNCMP_EQ.
7179         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7180         BUILT_IN_STRNCMP_EQ.
7181         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7182         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7183         (gimple_fold_builtin): Likewise.
7184         * tree-ssa-strlen.c (compute_string_length): New function.
7185         (determine_min_obsize): New function.
7186         (handle_builtin_string_cmp): New function to handle calls to
7187         string compare functions.
7188         (strlen_optimize_stmt): Add handling to builtin string compare
7189         calls.
7190         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7191         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7192         * tree.c (build_common_builtin_nodes): Add new defines of
7193         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7195 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
7197         PR target/85984
7198         * bb-reorder.c (pass_partition_blocks::gate): Return false for
7199         functions with naked attribute.
7201 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7203         * config/i386/sse.md (avx_vec_concat<mode>):
7204         Substitute concat_tg_mode mode attribute with xtg_mode.
7205         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7206         (concat_tg_mode): Remove mode attribute.
7208 2018-05-31  Martin Sebor  <msebor@redhat.com>
7210         PR c/82063
7211         * calls.c (alloc_max_size): Correct a logic error/typo.
7212         Treat excessive arguments as infinite.  Warn for invalid arguments.
7213         * doc/invoke.texi (-Walloc-size-larger-than): Update.
7215 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
7217         PR target/85829
7218         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7219         and movx for Haswell.
7221 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
7222             Cesar Philippidis  <cesar@codesourcery.com>
7224         PR middle-end/85879
7225         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7226         when emitting error on private/firstprivate reductions.
7227         * omp-low.c (lower_omp_target): Avoid reference-type processing
7228         on pointers for firstprivate clause.
7230 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7232         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7233         (st1x2): Likewise.
7234         (st1x3): Likewise.
7235         * config/aarch64/aarch64-simd.md
7236         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7237         (aarch64_ld1_x3_<mode>): Likewise
7238         (aarch64_st1x2<VALLDIF:mode>): Likewise
7239         (aarch64_st1_x2_<mode>): Likewise
7240         (aarch64_st1x3<VALLDIF:mode>): Likewise
7241         (aarch64_st1_x3_<mode>): Likewise
7242         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7243         (vld1_s8_x3): Likewise.
7244         (vld1_u16_x3): Likewise.
7245         (vld1_s16_x3): Likewise.
7246         (vld1_u32_x3): Likewise.
7247         (vld1_s32_x3): Likewise.
7248         (vld1_u64_x3): Likewise.
7249         (vld1_s64_x3): Likewise.
7250         (vld1_f16_x3): Likewise.
7251         (vld1_f32_x3): Likewise.
7252         (vld1_f64_x3): Likewise.
7253         (vld1_p8_x3): Likewise.
7254         (vld1_p16_x3): Likewise.
7255         (vld1_p64_x3): Likewise.
7256         (vld1q_u8_x3): Likewise.
7257         (vld1q_s8_x3): Likewise.
7258         (vld1q_u16_x3): Likewise.
7259         (vld1q_s16_x3): Likewise.
7260         (vld1q_u32_x3): Likewise.
7261         (vld1q_s32_x3): Likewise.
7262         (vld1q_u64_x3): Likewise.
7263         (vld1q_s64_x3): Likewise.
7264         (vld1q_f16_x3): Likewise.
7265         (vld1q_f32_x3): Likewise.
7266         (vld1q_f64_x3): Likewise.
7267         (vld1q_p8_x3): Likewise.
7268         (vld1q_p16_x3): Likewise.
7269         (vld1q_p64_x3): Likewise.
7270         (vst1_s64_x2): Likewise.
7271         (vst1_u64_x2): Likewise.
7272         (vst1_f64_x2): Likewise.
7273         (vst1_s8_x2): Likewise.
7274         (vst1_p8_x2): Likewise.
7275         (vst1_s16_x2): Likewise.
7276         (vst1_p16_x2): Likewise.
7277         (vst1_s32_x2): Likewise.
7278         (vst1_u8_x2): Likewise.
7279         (vst1_u16_x2): Likewise.
7280         (vst1_u32_x2): Likewise.
7281         (vst1_f16_x2): Likewise.
7282         (vst1_f32_x2): Likewise.
7283         (vst1_p64_x2): Likewise.
7284         (vst1q_s8_x2): Likewise.
7285         (vst1q_p8_x2): Likewise.
7286         (vst1q_s16_x2): Likewise.
7287         (vst1q_p16_x2): Likewise.
7288         (vst1q_s32_x2): Likewise.
7289         (vst1q_s64_x2): Likewise.
7290         (vst1q_u8_x2): Likewise.
7291         (vst1q_u16_x2): Likewise.
7292         (vst1q_u32_x2): Likewise.
7293         (vst1q_u64_x2): Likewise.
7294         (vst1q_f16_x2): Likewise.
7295         (vst1q_f32_x2): Likewise.
7296         (vst1q_f64_x2): Likewise.
7297         (vst1q_p64_x2): Likewise.
7298         (vst1_s64_x3): Likewise.
7299         (vst1_u64_x3): Likewise.
7300         (vst1_f64_x3): Likewise.
7301         (vst1_s8_x3): Likewise.
7302         (vst1_p8_x3): Likewise.
7303         (vst1_s16_x3): Likewise.
7304         (vst1_p16_x3): Likewise.
7305         (vst1_s32_x3): Likewise.
7306         (vst1_u8_x3): Likewise.
7307         (vst1_u16_x3): Likewise.
7308         (vst1_u32_x3): Likewise.
7309         (vst1_f16_x3): Likewise.
7310         (vst1_f32_x3): Likewise.
7311         (vst1_p64_x3): Likewise.
7312         (vst1q_s8_x3): Likewise.
7313         (vst1q_p8_x3): Likewise.
7314         (vst1q_s16_x3): Likewise.
7315         (vst1q_p16_x3): Likewise.
7316         (vst1q_s32_x3): Likewise.
7317         (vst1q_s64_x3): Likewise.
7318         (vst1q_u8_x3): Likewise.
7319         (vst1q_u16_x3): Likewise.
7320         (vst1q_u32_x3): Likewise.
7321         (vst1q_u64_x3): Likewise.
7322         (vst1q_f16_x3): Likewise.
7323         (vst1q_f32_x3): Likewise.
7324         (vst1q_f64_x3): Likewise.
7325         (vst1q_p64_x3): Likewise.
7327 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7329         * config/msp430/msp430.c (msp430_output_labelref): Prepend
7330         user_label_prefix to name.
7332         * tree-core.h: Update comment about the format of NAME string
7333         passed to handler in attribute_spec.
7335         * config/msp430/msp430.md: Remove erroneous subreg expression from
7336         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7337         zero_extend{q,h}isi2.
7339 2018-05-30  Borislav Petkov  <bp@suse.de>
7341         * doc/extend.texi: Document some architecture specific
7342         constraints and sort entries.
7344 2018-05-30  Martin Sebor  <msebor@redhat.com>
7346         PR middle-end/85369
7347         * builtins.c (expand_builtin_stpcpy_1): New function.
7348         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7349         only if the former succeeds.
7351 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7353         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7354         in saphira.
7356 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7358         * doc/invoke.texi (-flinker-output): Document
7360 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7362         * passes.c (ipa_write_summaries): Only modify statements if body
7363         is in memory.
7364         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7365         incrementally linking.
7366         (ipa_passes): Likewise.
7367         * lto-cgraph.c (lto_output_node): When incrementally linking do not
7368         pass down resolution info.
7369         * common.opt (flag_incremental_link): Update info.
7370         * gcc.c (plugin specs): Turn flinker-output=* to
7371         -plugin-opt=-linker-output-known
7372         * toplev.c (compile_file): Also cut compilation when doing incremental
7373         link.
7374         * flag-types. (enum lto_partition_model): Add
7375         LTO_LINKER_OUTPUT_NOLTOREL.
7376         (invoke.texi): Add -flinker-output docs.
7377         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7378         link same way as WPA; do not stream in dead initializers.
7380         * dwarf2out.c (dwarf2out_die_ref_for_decl,
7381         darf2out_register_external_decl): Support incremental link.
7383 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7385         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7387 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
7389         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7390         it down to simple_object_copy_lto_debug_sections.
7391         (run_gcc): Determine incremental LTO link time and configure
7392         lto1 into non-wpa mode, disable renaming of debug sections.
7394 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7396         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7397         descriptions of various incorrectly documented functions.
7399 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7401         Revert:
7402         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7403         address check not strict.
7405 2018-05-30  Richard Biener  <rguenther@suse.de>
7407         PR tree-optimization/85964
7408         * tracer.c (better_p): Drop initialized count check, we only
7409         call the function with initialized counts now.
7410         (find_best_successor): Do find a best edge if one
7411         has uninitialized count.
7412         (find_best_predecessor): Likewise.  Do BB frequency check only
7413         if count is initialized.
7415 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
7417         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7418         (aarch64_ldrstr_offset_compare): New.
7419         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7420         load/store orderings.
7421         (aarch64_gen_adjusted_ldpstp): Likewise.
7423 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
7425         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7426         Check for subset of GENERAL_REGS and FP_REGS.
7427         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7428         r=w alternative.
7430 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
7432         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7433         and wi::to_poly_offset.  Add the current offset and then check
7434         whether the sum fits, rather than using an unchecked addition of
7435         a checked term.  Check for a shwi rather than a uhwi.
7436         * expr.c (get_bit_range): Use tree_to_poly_uint64.
7437         (store_constructor): Use poly_int_tree_p.
7438         (expand_expr_real_1): Likewise.
7439         * function.c (assign_temp): Likewise.
7440         * fold-const.c (const_binop): Use poly_int_tree_p and
7441         wi::to_poly_offset.
7442         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
7443         division.
7444         * ipa-icf-gimple.c (func_checker::compare_operand): Use
7445         to_poly_offset for MEM offsets.
7446         * ipa-icf.c (sem_variable::equals): Likewise.
7447         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7448         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7449         wi::to_poly_offset for BIT_FIELD_REF offsets.
7450         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7451         wi::to_poly_offset.
7452         * var-tracking.c (emit_note_insn_var_location): Use
7453         tree_to_poly_uint64.
7455 2018-05-29  Jim Wilson  <jimw@sifive.com>
7457         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7459 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
7461         PR target/85950
7462         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7463         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7464         sequence.
7465         (sse4_1_round<mode>2): Use nonimmediate_operand
7466         for operand 1 predicate.
7468 2018-05-29  Martin Sebor  <msebor@redhat.com>
7469             Richard Biener  <rguenther@suse.de>
7471         PR testsuite/85888
7472         * calls.c (get_size_range): Call determine_value_range instead
7473         of get_value_range..
7474         * tree-vrp.h (determine_value_range): Declared new function.
7475         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7477 2018-05-29  Richard Biener  <rguenther@suse.de>
7479         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7480         sure to use non-pattern stmts for get_earlier_stmt arguments.
7481         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7482         called on pattern stmts.
7483         (get_later_stmt): Likewise.
7485 2018-05-29  Martin Liska  <mliska@suse.cz>
7487         PR gcov-profile/85759
7488         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7489         env variables.
7491 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
7493         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7494         VEC_UNPACK_*_EXPR.
7495         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7496         VEC_PACK_*_EXPR.
7498         PR target/85918
7499         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7500         VEC_PACK_FLOAT_EXPR): New tree codes.
7501         * tree-pretty-print.c (op_code_prio): Handle
7502         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7503         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7504         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7505         * tree-inline.c (estimate_operator_cost): Likewise.
7506         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7507         * fold-const.c (const_binop): Likewise.
7508         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7509         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7510         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7511         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7512         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7513         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7514         * expr.c (expand_expr_real_2): Likewise.
7515         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7516         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7517         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7518         optabs.
7519         * optabs.c (expand_widen_pattern_expr): For
7520         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7521         sign from result type rather than operand's type.
7522         (expand_binop_directly): For vec_packu_float_optab and
7523         vec_packs_float_optab allow result type to be different from operand's
7524         type.
7525         * optabs-tree.c (optab_for_tree_code): Handle
7526         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7527         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
7528         * tree-vect-generic.c (expand_vector_operations_1):  Handle
7529         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7530         VEC_PACK_FLOAT_EXPR.
7531         * tree-vect-stmts.c (supportable_widening_operation): Handle
7532         FIX_TRUNC_EXPR.
7533         (supportable_narrowing_operation): Handle FLOAT_EXPR.
7534         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7535         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7536         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
7537         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7538         mode attributes.
7539         (vec_pack<floatprefix>_float_<mode>): New expander.
7540         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7541         attributes.
7542         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7543         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7544         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7545         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7546         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7547         Document.
7548         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7549         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7550         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7551         VEC_PACK_FLOAT_EXPR): Document.
7553 2018-05-29  Richard Biener  <rguenther@suse.de>
7555         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7556         member.
7557         (stmt_vec_info_vec): Make pointer.
7558         (init_stmt_vec_info_vec): Remove.
7559         (free_stmt_vec_info_vec): Likewise.
7560         (set_stmt_vec_info_vec): New function.
7561         (free_stmt_vec_infos): Likewise.
7562         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7563         (set_vinfo_for_stmt): Likewise.
7564         (get_earlier_stmt): Likewise.
7565         (get_later_stmt): Likewise.
7566         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7567         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7568         (vec_info::~vec_info): Free stmt_vec_infos.
7569         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7570         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7571         (pass_slp_vectorize::execute): Likewise.
7572         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7573         (free_stmt_vec_info_vec): Likewise.
7574         (set_stmt_vec_info_vec): New function.
7575         (free_stmt_vec_infos): Likewise.
7576         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7577         the global stmt_vec_info_vec.
7578         * tree-parloops.c (gather_scalar_reductions): Use
7579         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7580         vector.
7582 2018-05-29  Richard Biener  <rguenther@suse.de>
7584         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7586 2018-05-29  Martin Liska  <mliska@suse.cz>
7587             David Malcolm  <dmalcolm@redhat.com>
7589         * vec.c (test_reverse): New.
7590         (vec_c_tests): Add new test.
7591         * vec.h (vl_ptr>::reverse): New function.
7593 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
7595         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7597         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7598         and later.
7600 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7602         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7604 2018-05-28  Richard Biener  <rguenther@suse.de>
7606         PR tree-optimization/85933
7607         * tree-vect-data-refs.c (vect_record_base_alignments): Only
7608         look at stmts marked as vectorizable.
7610 2018-05-28  Richard Biener  <rguenther@suse.de>
7612         PR tree-optimization/85934
7613         * tree-vect-generic.c (expand_vector_operations_1): Hoist
7614         vector boolean check before scalar optimization.
7616 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
7618         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7619         for armv5te.
7621 2018-05-28  Mark Wielaard  <mark@klomp.org>
7623         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7624         if it is an expression containing a minus sign.
7626 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
7628         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7630 2018-05-27  Paul Koning  <ni1d@arrl.net>
7632         * config/pdp11/pdp11.md (truncsihi2): Remove.
7634 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
7635             Chung-Ju Wu  <jasonwucj@gmail.com>
7637         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7638         implementation.
7639         (unaligned_store_dw): Ditto.
7640         * config/nds32/nds32-memory-manipulation.c
7641         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7642         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7643         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7644         (emit_setmem_word_loop): Rename to ...
7645         (emit_setmem_doubleword_loop): ... this.
7646         (nds32_gen_dup_4_byte_to_word_value): New function.
7647         (nds32_gen_dup_8_byte_to_double_word_value): New function.
7648         (nds32_expand_setmem_loop): Refine implementation.
7649         (nds32_expand_setmem_loop_v3m): Ditto.
7650         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7651         pattern.
7653 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
7655         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7657 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
7659         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7660         (nds32_init_machine_status): Initialize machine->attr_naked_p and
7661         machine->attr_no_prologue_p.
7662         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7663         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7664         (nds32_expand_epilogue): Consider attr_naked_p.
7665         (nds32_expand_epilogue_v3pop): Likewise.
7666         (nds32_can_use_return_insn): Likewise.
7667         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7668         attr_no_prologue_p fields.
7669         * config/nds32/nds32.opt (mret-in-naked-func): New option.
7671 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
7673         PR target/85918
7674         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7675         attributes.
7676         * config/i386/sse.md
7677         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7678         Rename to ...
7679         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7680         ... this.
7681         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7682         Rename to ...
7683         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7684         ... this.
7685         (*<floatsuffix>floatv2div2sf2): Rename to ...
7686         (*float<floatunssuffix>v2div2sf2): ... this.
7687         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7688         (float<floatunssuffix>v2div2sf2_mask): ... this.
7689         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7690         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7691         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7692         to ...
7693         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7694         ... this.
7695         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7696         Rename to ...
7697         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7698         ... this.
7699         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7700         Rename to ...
7701         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7702         ... this.
7703         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7704         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7705         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7706         gen_ufix_truncv8dfv8si2.
7707         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7708         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7709         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7710         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7711         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7712         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7713         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7714         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7716 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
7718         PR target/85900
7719         PR target/85345
7720         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7722 2018-05-25  Jim Wilson  <jimw@sifive.com>
7724         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7725         * config/riscv/riscv.c (struct machine_function): Add
7726         interrupt_handler_p and attribute_checked_p fields.
7727         (riscv_attribute_table): Add interrupt.
7728         (riscv_interrupt_type_p): New.
7729         (riscv_save_reg_p): Save extra regs for interrupt handler.
7730         (riscv_use_save_libcall): Return false  for interrupt handler.
7731         (riscv_first_stack_step): Add forward declaration.
7732         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
7733         for interrupt handler with large frame.  Use it for saved reg list.
7734         (riscv_expand_prologue): Move flag_stack_usage_info support to
7735         eliminate duplication.
7736         (riscv_expand_epilogue): Generate mret for interrupt handler.
7737         (riscv_epilogue_uses): New.
7738         (riscv_can_use_return_insn): Return false for interrupt handler.
7739         (riscv_function_ok_for_sibcall): Likewise.
7740         (riscv_set_current_function): Add interrupt handler support.
7741         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7742         * config/riscv/riscv.md (UNSPECV_MRET): New.
7743         (GP_REGNUM): New.
7744         (riscv_frflags, riscv_fsflags): Use tab after opcode.
7745         (riscv_mret): New.
7746         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7748 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
7750         PR tree-optimization/85712
7751         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7752         this candidate has already been replaced in-situ by a copy.
7754 2018-05-25  Jason Merrill  <jason@redhat.com>
7756         PR c++/80485 - inline function non-zero address.
7757         * symtab.c (nonzero_address): Check DECL_COMDAT.
7759 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
7761         PR target/83628
7762         * config/alpha/alpha.md (ashlsi3): New insn pattern.
7763         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
7764         extension of SImode operation.  Use const123_operand predicate.
7765         (*saddsi_1): Remove.
7766         (*saddl_se_1): Ditto.
7767         (*ssubsi_1): Ditto.
7768         (*ssubl_se_1): Ditto.
7769         * config/alpha/predicates.md (const123_operand): New predicate.
7770         * config/alpha/constraints.md (P): Use IN_RANGE.
7772 2018-05-25  Richard Biener  <rguenther@suse.de>
7774         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7775         defaulted to true.
7776         (ref_maybe_used_by_stmt_p): Likewise.
7777         (stmt_may_clobber_ref_p): Likewise.
7778         (stmt_may_clobber_ref_p_1): Likewise.
7779         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7780         and pass it along.
7781         (ref_maybe_used_by_stmt_p): Likewise.
7782         (stmt_may_clobber_ref_p): Likewise.
7783         (stmt_may_clobber_ref_p_1): Likewise.
7784         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7785         the alias oracle to disambiguate DRs with stmts DR analysis
7786         couldn't handle.
7787         (vect_analyze_data_refs): Do not give up on not analyzable
7788         DRs for BB vectorization.  Remove code truncating the dataref
7789         vector.
7791 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
7793         PR target/85832
7794         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7795         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
7796         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7798 2018-05-25  Richard Biener  <rguenther@suse.de>
7800         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7801         function, combining stmt data ref gathering and fatal analysis
7802         parts.
7803         (vect_analyze_data_refs): Remove now redudnant code and simplify.
7804         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7805         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7806         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7807         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7809 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7811         PR tree-optimization/85720
7812         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7813         SCC if all partitions are builtins.
7814         (version_loop_by_alias_check): New parameter.  Generate cancelable
7815         runtime alias check if all partitions are builtins.
7816         (distribute_loop): Update call to above function.
7818 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7820         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7821         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7822         (parm_default_def_partition_arg): Ditto.
7823         (set_parm_default_def_partition): Ditto.
7824         (get_parm_default_def_partitions): Ditto and make it static.
7825         (get_undefined_value_partitions): Ditto and make it static.
7826         (remove_ssa_form): Refactor call to init_var_map here.
7827         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7828         computation for loop region.
7829         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7830         (register_default_def): Delete.
7831         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7832         (parm_default_def_partition_arg): Ditto.
7833         (set_parm_default_def_partition): Ditto.
7834         (get_parm_default_def_partitions): Ditto and make it static.
7835         (get_undefined_value_partitions): Ditto and make it static.
7836         (coalesce_with_default, coalesce_with_default): Update comment.
7837         (create_coalesce_list_for_region): New func factored out from
7838         create_outofssa_var_map.
7839         (populate_coalesce_list_for_outofssa): New func factored out from
7840         create_outofssa_var_map and coalesce_ssa_name.
7841         (create_outofssa_var_map): Delete.
7842         (coalesce_ssa_name): Refactor to support live range computation.
7843         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7844         (get_parm_default_def_partitions): Delete.
7845         (get_undefined_value_partitions): Ditto.
7846         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7847         computation for loop region.
7848         (new_tree_live_info, loe_visit_block): Ditto.
7849         (live_worklist, set_var_live_on_entry): Ditto.
7850         (calculate_live_on_exit, verify_live_on_entry): Ditto.
7851         * tree-ssa-live.h (struct _var_map): New fields.
7852         (init_var_map): Change decl.
7853         (region_contains_p): New.
7855 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7857         * tree-ssa-live.h (live_merge_and_clear): Delete.
7859 2018-05-25  Richard Biener  <rguenther@suse.de>
7861         PR c++/85912
7862         * tree-dump.c (dequeue_and_dump): Remove access to removed
7863         operand 2 of a SWITCH_EXPR.
7865 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7867         * doc/sourcebuild.texi (vect_double_cond_arith): Include
7868         multiplication and division.
7869         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7870         (cond_udiv@var{m}, cond_umod@var{m}): Document.
7871         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7872         (cond_udiv_optab, cond_umod_optab): New optabs.
7873         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7874         (IFN_COND_RDIV): New internal functions.
7875         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7876         TRUNC_MOD_EXPR and RDIV_EXPR.
7877         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7878         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7879         New unspecs.
7880         (SVE_INT_BINARY): Include mult.
7881         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7882         (optab, sve_int_op): Handle mult.
7883         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7884         UNSPEC_COND_DIV.
7885         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7886         for SVE_INT_BINARY_SD.
7888 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7890         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7891         (optab, sve_int_op): Handle div and udiv.
7892         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7893         for SVE_INT_BINARY_SD.
7894         (*<optab><mode>3): New insn for the same.
7896 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7898         * tree-vect-patterns.c: Include predict.h.
7899         (vect_recog_divmod_pattern): Restrict check for division support
7900         to when optimizing for size.
7902 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7904         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7905         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7906         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7907         (gimple_match_op::set_op): Likewise.
7908         (gimple_resimplify4): Declare.
7909         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7910         (expr::gen_transform): Likewise.
7911         (decision_tree::gen): Generate a simplification routine for 4 operands.
7912         * gimple-match-head.c (gimple_simplify): Add an overload for
7913         4 operands.  In the top-level function, handle up to 4 call
7914         arguments and call gimple_resimplify4.
7915         (gimple_resimplify4): New function.
7916         (build_call_internal): Pass a fourth operand.
7917         (maybe_push_to_seq): Likewise.
7918         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7919         Fold VEC_COND_EXPRs of an operation and a default value into
7920         an IFN_COND_* function if possible.
7921         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7922         New unspecs.
7923         (SVE_COND_FP_BINARY): Include them.
7924         (optab, sve_fp_op): Handle them.
7925         (SVE_INT_BINARY_REV): New code iterator.
7926         (SVE_COND_FP_BINARY_REV): New int iterator.
7927         (commutative): New int attribute.
7928         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7929         Declare.
7930         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7931         function.
7932         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7933         (*cond_<optab><mode>): New patterns for reversed operands.
7935 2018-05-25  Richard Biener  <rguenther@suse.de>
7937         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7938         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7939         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7940         (STMT_VINFO_GROUPED_ACCESS): Adjust.
7941         * tree-vect-data-refs.c (everywhere): Adjust users.
7942         * tree-vect-loop.c (everywhere): Likewise.
7943         * tree-vect-slp.c (everywhere): Likewise.
7944         * tree-vect-stmts.c (everywhere): Likewise.
7945         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7947 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7949         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7950         Rename to...
7951         (gcc_cv_as_section_exclude): ... this.
7952         Try Solaris as #exclude syntax.
7953         * configure: Regenerate.
7954         * config.in: Regenerate.
7955         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7956         SECTION_EXCLUDE.
7957         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7958         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7960         * varasm.c (default_elf_asm_named_section): Don't check if
7961         HAVE_GAS_SECTION_EXCLUDE is defined.
7963 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7965         * doc/md.texi: Update the documentation of the cond_* optabs
7966         to mention the new final operand.  Fix GET_MODE_NUNITS call.
7967         Describe the scalar case too.
7968         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7969         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7970         instead of 2.
7971         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7972         (get_conditional_internal_fn): Update comment.
7973         * tree-vect-loop.c (vectorizable_reduction): Pass the original
7974         accumulator value as a final argument to conditional functions.
7975         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7976         a define_expand and add an "else" operand.  Assert for now that
7977         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
7978         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7979         (*cond_<optab><mode>): New patterns.
7980         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7981         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7982         (UNSPEC_COND_EOR): Delete.
7983         (optab): Remove associated mappings.
7984         (SVE_INT_BINARY): New code iterator.
7985         (sve_int_op): Remove int attribute and add "minus" to the code
7986         attribute.
7987         (SVE_COND_INT_OP): Delete.
7988         (SVE_COND_FP_OP): Rename to...
7989         (SVE_COND_FP_BINARY): ...this.
7991 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7993         * optabs.c (can_reuse_operands_p): New function.
7994         (maybe_legitimize_operands): Try to reuse the results for
7995         earlier operands.
7997 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
7999         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8000         Add {q} suffix to insn mnemonic.
8002 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8004         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8005         (msp430_warn_func_return): New.
8007 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
8009         * fold-const.c (tree_nonzero_bits): New function.
8010         * fold-const.h (tree_nonzero_bits): Likewise.
8011         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8012         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8014 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8016         PR target/85900
8017         PR target/85345
8018         * varasm.c (assemble_alias): Check ifunc_resolver only on
8019         FUNCTION_DECL.
8021 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
8023         PR target/85903
8024         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8025         when memory input operand is handled.
8027 2018-05-24  Luis Machado  <luis.machado@linaro.org>
8029         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8030         global.
8031         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8033 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
8035         * match.pd: Delay FMA folds until after vectorization.
8037 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8039         PR target/83009
8040         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8041         address check not strict.
8043 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
8045         * gimple-match.h (gimple_match_op): New class.
8046         (mprts_hook): Replace parameters with a gimple_match_op *.
8047         (maybe_build_generic_op): Likewise.
8048         (gimple_simplified_result_is_gimple_val): Replace parameters with
8049         a const gimple_match_op *.
8050         (gimple_simplify): Replace code_helper * and tree * parameters with
8051         a gimple_match_op * parameter.
8052         (gimple_resimplify1): Replace code_helper *, tree and tree *
8053         parameters with a gimple_match_op * parameter.
8054         (gimple_resimplify2): Likewise.
8055         (gimple_resimplify3): Likewise.
8056         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8057         parameters with a gimple_match_op * parameter.
8058         * gimple-match-head.c (gimple_simplify): Change prototypes of
8059         auto-generated functions to take a gimple_match_op * instead of
8060         separate code_helper * and tree * parameters.  Make the same
8061         change in the top-level overload and update calls to the
8062         gimple_resimplify routines.  Update calls to the auto-generated
8063         functions and to maybe_push_res_to_seq in the publicly-facing
8064         operation-specific gimple_simplify overloads.
8065         (gimple_match_op::MAX_NUM_OPS): Define.
8066         (gimple_resimplify1): Replace rcode and ops with a single res_op
8067         parameter.  Update call to gimple_simplify.
8068         (gimple_resimplify2): Likewise.
8069         (gimple_resimplify3): Likewise.
8070         (mprts_hook): Replace parameters with a gimple_match_op *.
8071         (maybe_build_generic_op): Likewise.
8072         (build_call_internal): Replace type, nargs and ops with
8073         a gimple_match_op *.
8074         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8075         with a single gimple_match_op *.  Update calls to mprts_hook,
8076         build_call_internal and gimple_simplified_result_is_gimple_val.
8077         Factor out code that is common to the tree_code and combined_fn cases.
8078         * genmatch.c (expr::gen_transform): Replace tem_code and
8079         tem_ops with a gimple_match_op called tem_op.  Update calls
8080         to the gimple_resimplify functions and maybe_push_res_to_seq.
8081         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8082         res_ops.  Update call to the gimple_resimplify functions.
8083         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8084         (decision_tree::gen): Make the functions take a gimple_match_op *
8085         called res_op instead of separate res_code and res_ops parameters.
8086         Update call accordingly.
8087         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8088         and ops with a single res_op parameter.  Update calls to
8089         maybe_build_generic_op and maybe_push_res_to_seq.
8090         (fold_stmt_1): Update calls to gimple_simplify and
8091         replace_stmt_with_simplification.
8092         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8093         and gimple_simplified_result_is_gimple_val.
8094         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8095         gimple_simplify.
8096         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8097         with a gimple_match_op *.
8098         (vn_nary_build_or_lookup): Likewise.  Update call to
8099         vn_nary_build_or_lookup_1.
8100         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8101         gimple_match_op *.  Update calls to the gimple_resimplify routines
8102         and to gimple_simplified_result_is_gimple_val.
8103         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8104         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8105         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8106         (visit_nary_op): Likewise.
8107         (visit_reference_op_load): Likewise.
8109 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8111         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8112         modifier for printing the step amount.
8114 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
8116         PR target/78849
8117         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8118         types.
8120 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
8122         * doc/sourcebuild.texi (Endianness): New subsubsection.
8124 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8126         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8127         <prefetch_dynamic_strides>: New const bool field.
8128         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8129         prefetch_dynamic_strides.
8130         (exynosm1_prefetch_tune): Likewise.
8131         (thunderxt88_prefetch_tune): Likewise.
8132         (thunderx_prefetch_tune): Likewise.
8133         (thunderx2t99_prefetch_tune): Likewise.
8134         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8135         false.
8136         (aarch64_override_options_internal): Update to set
8137         PARAM_PREFETCH_DYNAMIC_STRIDES.
8138         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8139         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8140         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8141         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8142         prefetch-dynamic-strides setting.
8144 2018-05-23  Luis Machado  <luis.machado@linaro.org>
8146         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8147         <minimum_stride>: New const int field.
8148         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8149         minimum_stride field defaulting to -1.
8150         (exynosm1_prefetch_tune): Likewise.
8151         (thunderxt88_prefetch_tune): Likewise.
8152         (thunderx_prefetch_tune): Likewise.
8153         (thunderx2t99_prefetch_tune): Likewise.
8154         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8155         <default_opt_level>: Set to 3.
8156         (aarch64_override_options_internal): Update to set
8157         PARAM_PREFETCH_MINIMUM_STRIDE.
8158         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8159         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8160         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8161         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8162         stride is constant and is below the minimum stride threshold.
8164 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8166         * config/arm/arm-cpus.in (mode26): Delete.
8167         (armv4): Delete mode26 reference.
8168         * config/arm/arm.c (arm_configure_build_target): Delete use of
8169         isa_bit_mode26.
8171 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
8173         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8174         New insn pattern.
8175         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8176         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
8177         for non-SSE modes.
8178         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
8179         (floatunsdidf2): Ditto.
8181 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
8183         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8184         (fixuns_trunc<mode>si2_avx512f): Ditto.
8185         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8186         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8187         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8189 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
8191         PR rtl-optimization/79985
8192         * df-scan.c (df_insn_refs_collect): Remove special case for
8193         global registers and asm statements.
8195 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
8197         * extend.texi (Global Register Variables): Rewrite the bullet list.
8198         Note that the register is available for allocation. Note that access
8199         via inline asm must use constraints. Add note about async-signal
8200         handlers. Remove paragraph about automagic register selection.
8202 2018-05-23  Richard Biener  <rguenther@suse.de>
8204         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8205         of fixed offset from memset VN.
8207 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
8209         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8210         first_interp field.
8211         (alloc_cand_and_find_basis): Initialize first_interp field.
8212         (slsr_process_mul): Modify first_interp field.
8213         (slsr_process_add): Likewise.
8214         (slsr_process_cast): Modify first_interp field for each new
8215         interpretation.
8216         (slsr_process_copy): Likewise.
8217         (dump_candidate): Dump first_interp field.
8218         (replace_mult_candidate): Process all interpretations, not just
8219         subsequent ones.
8220         (replace_rhs_if_not_dup): Likewise.
8221         (replace_one_candidate): Likewise.
8223 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
8225         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8226         Add new boolean.
8227         (aarch64_needs_frame_chain): New function.
8228         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8230 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
8232         PR target/84882
8233         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8234         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8235         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8236         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8237         as true for strict-align.
8238         (aarch64_can_inline_p): Perform checks even when callee has no
8239         attributes to check for strict alignment.
8240         * doc/extend.texi (AArch64 Function Attributes): Document
8241         no-strict-align.
8242         * doc/invoke.texi: (AArch64 Options): Likewise.
8244 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
8246         PR tree-optimization/85853
8247         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8248         the handling of the root of the node to...
8249         (vect_slp_analyze_node_operations_1): ...this new function,
8250         and run the whole thing with the child nodes' def types
8251         set according to their SLP node's def type.
8253 2018-05-23  Richard Biener  <rguenther@suse.de>
8255         PR middle-end/85874
8256         * tree-data-ref.c (create_runtime_alias_checks): Defer
8257         and ignore overflow warnings.
8259 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
8261         PR tree-optimization/85822
8262         * tree-vrp.c (is_masked_range_test): Fix handling of negative
8263         constants.
8265 2018-05-23  Richard Biener  <rguenther@suse.de>
8267         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8268         memset constants via native_interpret_expr.
8270 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
8272         PR target/85345
8273         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8274         attribute.
8275         (cgraph_node::create_alias): Likewise.
8276         (cgraph_node::get_availability): Check ifunc_resolver instead
8277         of looking up ifunc attribute.
8278         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8279         * varasm.c (do_assemble_alias): Likewise.
8280         (assemble_alias): Likewise.
8281         (default_binds_local_p_3): Likewise.
8282         * cgraph.h (cgraph_node): Add ifunc_resolver.
8283         (cgraph_node::only_called_directly_or_aliased_p): Return false
8284         for IFUNC resolver.
8285         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8286         attribute.
8287         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8288         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8289         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8290         instead of looking up ifunc attribute.
8292 2018-05-22  Luis Machado  <luis.machado@linaro.org>
8294         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8296 2018-05-22  Martin Sebor  <msebor@redhat.com>
8298         PR middle-end/85359
8299         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8300         only when expasion succeeds.
8301         (expand_builtin_strcmp): Same.
8302         (expand_builtin_strncmp): Same.
8304 2018-05-22  Martin Sebor  <msebor@redhat.com>
8306         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8308 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
8309             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8311         * config/aarch64/aarch64-ldpstp.md: Replace uses of
8312         aarch64_mem_pair_operand with memory_operand and delete operand swapping
8313         code.
8314         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8315         Add check for legitimate_address.
8316         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8317         (aarch64_swap_ldrstr_operands): New.
8318         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8319         Define prototype.
8321 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
8322             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8324         * config/aarch64/aarch64.md: New patterns to generate stp
8325         and ldp.
8326         (store_pair_sw, store_pair_dw): New patterns to generate stp for
8327         single words and double words.
8328         (load_pair_sw, load_pair_dw): Likewise.
8329         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8330         Delete.
8331         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8332         Delete.
8333         * config/aarch64/aarch64-ldpstp.md: Modify peephole
8334         for different mode ldpstp and add peephole for merged zero stores.
8335         Likewise for loads.
8336         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8337         Add size check.
8338         (aarch64_gen_store_pair): Rename calls to match new patterns.
8339         (aarch64_gen_load_pair): Rename calls to match new patterns.
8340         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8341         (load_pair<DREG:mode><DREG2:mode>): ... This.
8342         (store_pair<mode>): Rename to...
8343         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8344         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8345         New mode iterators.
8346         (V_INT_EQUIV): Handle SImode.
8347         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8348         New predicate.
8350 2018-05-22  Martin Sebor  <msebor@redhat.com>
8352         PR c/85623
8353         * calls.c (maybe_warn_nonstring_arg): Use string length to set
8354         or ajust the presumed bound on an operation to avoid unnecessary
8355         warnings.
8357 2018-05-22  Martin Sebor  <msebor@redhat.com>
8359         PR tree-optimization/85826
8360         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8361         assuming that a DECL necesarily has a constant size.
8363 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
8365         PR middle-end/85862
8366         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8368 2018-05-22  Richard Biener  <rguenther@suse.de>
8370         PR tree-optimization/85834
8371         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8372         non-constant and non-zero memset arguments.
8374 2018-05-22  Martin Liska  <mliska@suse.cz>
8376         PR ipa/85607
8377         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8379 2018-05-22  Richard Biener  <rguenther@suse.de>
8381         PR tree-optimization/85863
8382         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8383         comparisons when vectype is specified.
8384         (vectorizable_condition): Do not specify vectype for
8385         vect_is_simple_cond when SLP vectorizing.
8387 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
8389         PR target/85657
8390         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8391         define __ibm128 as long double.
8392         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8393         as a distinct type when IEEE 128-bit support is enabled.
8394         (init_float128_ieee): Fix up conversions between IFmode and IEEE
8395         128-bit types to use the correct functions.
8396         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8397         convert between 128-bit floating point types that have different
8398         modes but the same representation, instead of using gen_lowpart to
8399         makean alias.
8400         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8401         KFmode.
8402         (IFKF_reg): New attributes to give the register constraints for
8403         IFmode and KFmode.
8404         (extend<mode>tf2_internal): New insns to mark an explicit
8405         conversion between 128-bit floating point types that have a
8406         different mode but share the same representation.
8408 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
8410         PR tree-optimization/85814
8411         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8412         a null return from get_strinfo when unsharing the next
8413         strinfo in the chain.
8415 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8417         PR gcc/84923
8418         * varasm.c (weak_finish): Clean up weak_decls.
8420 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8422         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8423         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8424         UNSPEC_UADALP values.
8425         * config/aarch64/iterators.md (ABAL): New int iterator.
8426         (ABDL2): Likewise.
8427         (ADALP): Likewise.
8428         (sur): Add mappings for the above.
8429         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8430         New define_insn.
8431         (aarch64_<sur>abal<mode>_4): Likewise.
8432         (aarch64_<sur>adalp<mode>_3): Likewise.
8433         (<sur>sadv16qi): New define_expand.
8435 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
8437         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8438         (*movdf_internal): Ditto.
8439         (*rcpsf2_sse): Ditto.
8440         (*rsqrtsf2_sse): Ditto.
8441         (*sqrt<mode>2_sse): Ditto.
8443 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
8445         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8446         eor3q<mode>4.
8447         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8448         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8449         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8450         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8451         vbcaxq_s64): New.
8452         * config/aarch64/arm_neon.h: Likewise.
8453         * config/aarch64/iterators.md (VQ_I): New.
8455 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
8457         * config.gcc: Add arc/t-multilib-linux to tmake_file for
8458         arc*-*-linux*.
8459         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8460         MULTILIB_DIRNAMES
8462 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
8464         * config/nds32/constraints.md (S): New constraint.
8465         * config/nds32/nds32.md (call_internal): Use constraint S.
8466         (call_value_internal): Likewise.
8467         (sibcall_internal): Likewise.
8468         (sibcall_value_internal): Likewise.
8470 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
8471             Chung-Ju Wu  <jasonwucj@gmail.com>
8473         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8474         into consideration.
8476 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
8477             Chung-Ju Wu  <jasonwucj@gmail.com>
8479         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8480         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8481         (nds32_rtx_costs_impl): Simplify.
8482         (nds32_address_cost_impl): Simplify.
8483         (nds32_init_rtx_costs): New function.
8484         (nds32_rtx_costs_speed_prefer): Likewise.
8485         (nds32_rtx_costs_size_prefer): Likewise.
8486         (nds32_address_cost_speed_prefer): Likewise.
8487         (nds32_address_cost_speed_fwprop): Likewise.
8488         (nds32_address_cost_size_prefer): Likewise.
8489         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8490         * config/nds32/nds32.c (nds32_option_override): Use
8491         nds32_init_rtx_costs function.
8493 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
8495         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8496         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8497         (TARGET_PIPELINE_N8): Likewise.
8498         (TARGET_PIPELINE_N10): Likewise.
8499         (TARGET_PIPELINE_N13): Likewise.
8500         (TARGET_PIPELINE_GRAYWOLF): Likewise.
8502 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
8504         * config/nds32/nds32-fpu.md: Update copyright year.
8506 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8508         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8510 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8512         * config/nds32/nds32.c
8513         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8514         * config/nds32/nds32.opt (minline-asm-r15): New option.
8516 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8518         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8519         MASK_HW_ABS.
8520         * config/nds32/nds32.md (abssi2): New pattern.
8522 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
8524         * config/i386/i386.md (rex64namesuffix): New mode attribute.
8525         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8526         Merge insn pattern from sse_cvtsi2ss<round_name> and
8527         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8528         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8529         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8530         using SWI48 mode iterator.
8531         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8532         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8533         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8534         pattern from sse_cvttss2si<round_saeonly_name>
8535         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8536         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8537         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8538         using SWI48 mode iterator.
8539         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8540         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8541         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8542         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8543         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8544         using SWI48 mode iterator.
8545         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8546         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8547         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8548         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8549         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8550         SWI48 mode iterator.
8551         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8552         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8553         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8554         pattern from sse_cvttsd2si<round_saeonly_name>
8555         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8557 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8559         * config/nds32/nds32-md-auxiliary.c
8560         (nds32_valid_smw_lwm_base_p): Refine.
8561         (nds32_output_smw_single_word): Refine.
8562         (nds32_output_smw_double_word): New.
8563         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8565 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8567         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8568         (nds32_output_stack_pop): Refine.
8569         (nds32_expand_unaligned_load): Refine.
8570         (nds32_expand_unaligned_store): Refine.
8572 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
8573             Chung-Ju Wu  <jasonwucj@gmail.com>
8575         * config/nds32/constants.md: Add TP_REGNUM constant.
8576         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8577         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8578         UNSPEC_ADD32.
8579         * config/nds32/nds32-doubleword.md: Consider flag_pic.
8580         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8581         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8582         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8583         and PIC code generation.
8584         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8585         code generation.
8586         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8587         optimization.
8588         * config/nds32/nds32.md: Support TLS and PIC.
8589         * config/nds32/nds32.c: Support TLS and PIC.
8590         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8591         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8592         predicate.
8594 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8596         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8597         mode with E_ prefix.
8599 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
8600             Chung-Ju Wu  <jasonwucj@gmail.com>
8602         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8603         * config/nds32/nds32-md-auxiliary.c
8604         (symbolic_reference_mentioned_p): New.
8605         (nds32_legitimize_ict_address): New.
8606         (nds32_expand_ict_move): New.
8607         (nds32_indirect_call_referenced_p): New.
8608         (nds32_symbol_binds_local_p): Delete.
8609         (nds32_long_call_p): Modify.
8610         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8611         * config/nds32/nds32-protos.h
8612         (symbolic_reference_mentioned_p): Declare.
8613         (nds32_legitimize_ict_address): Declare.
8614         (nds32_expand_ict_move): Declare.
8615         (nds32_indirect_call_referenced_p): Declare.
8616         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8617         (nds32_relax_group): Use nds32_ict_const_p as condition.
8618         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8619         (nds32_asm_file_start): Output ict_model directive in asm code.
8620         (nds32_legitimate_address_p): Consider indirect call.
8621         (nds32_print_operand): Consider indirect call.
8622         (nds32_print_operand_address): Consider indirect call.
8623         (nds32_insert_attributes): Handle "indirect_call" attribute.
8624         (TARGET_LEGITIMATE_ADDRESS_P): Define.
8625         (TARGET_LEGITIMATE_CONSTANT_P): Define.
8626         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8627         (TARGET_DELEGITIMIZE_ADDRESS): Define.
8628         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8629         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8630         (TARGET_ICT_MODEL_SMALL): Define.
8631         (TARGET_ICT_MODEL_LARGE): Define.
8632         * config/nds32/nds32.md (movsi): Consider ict model.
8633         (call, call_value): Consider ict model.
8634         (sibcall, sibcall_value): Consider ict model.
8635         * config/nds32/nds32.opt (mict-model): New option.
8636         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8637         model.
8639 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
8640             Monk Chiang  <sh.chiang04@gmail.com>
8641             Jim Wilson <jimw@sifive.com>
8643         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8644         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
8645         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8646         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8647         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
8648         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8649         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8650         compute save_libcall_adjustment properly.
8651         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8652         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8653         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8654         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8655         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8656         (ABI_SPEC): Handle mabi=ilp32e.
8657         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8658         (RVE): Add RVE mask.
8659         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8660         <-march>: Add rv32e as an example.
8662 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
8664         PR c++/82899
8665         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8666         (intra_create_variable_infos): Handle C++ constructors.
8668 2018-05-18  Martin Liska  <mliska@suse.cz>
8670         * passes.def: Remove a redundant pass.
8672 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8674         PR bootstrap/85838
8675         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8677 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8679         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8680         (ARMv4): Update.
8681         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8682         (ARMv6m): Update.
8683         (armv2, armv2a, armv3, armv3m): Delete architectures.
8684         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8685         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8686         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8687         Delete cpus.
8688         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8689         (*mulsidi3adddi): Likewise.
8690         (mulsidi3): Likewise.
8691         (*mulsidi3_nov6): Likewise.
8692         (umulsidi3): Likewise.
8693         (umulsidi3_nov6): Likewise.
8694         (umaddsidi4): Likewise.
8695         (*umulsidi3adddi): Likewise.
8696         (smulsi3_highpart): Likewise.
8697         (*smulsi3_highpart_nov6): Likewise.
8698         (umulsi3_highpart): Likewise.
8699         (*umulsi3_highpart_nov6): Likewise.
8700         * config/arm/arm.h (arm_arch3m): Delete.
8701         * config/arm/arm.c (arm_arch3m): Delete.
8702         (arm_option_override_internal): Update armv3-related comment.
8703         (arm_configure_build_target): Delete use of isa_bit_mode32.
8704         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8705         (arm_rtx_costs_internal): Delete check of arm_arch3m.
8706         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8707         (mulsa3): Likewise.
8708         (mulusa3): Likewise.
8709         * config/arm/arm-protos.h (arm_arch3m): Delete.
8710         * config/arm/arm-tables.opt: Regenerate.
8711         * config/arm/arm-tune.md: Likewise.
8712         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8713         deleted architectures.
8715 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8717         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8718         (armv5t, armv5te): New features.
8719         (ARMv5, ARMv5e): Delete fgroups.
8720         (ARMv5t, ARMv5te): Adjust for above changes.
8721         (ARMv6m): Likewise.
8722         (armv5, armv5e): Delete arches.
8723         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8724         arm_arch5.
8725         (*call_reg_arm): Likewise.
8726         (*call_value_reg_armv5): Likewise.
8727         (*call_value_reg_arm): Likewise.
8728         (*call_symbol): Likewise.
8729         (*call_value_symbol): Likewise.
8730         (*sibcall_insn): Likewise.
8731         (*sibcall_value_insn): Likewise.
8732         (clzsi2): Likewise.
8733         (prefetch): Likewise.
8734         (define_split and define_peephole2 dependent on arm_arch5):
8735         Likewise.
8736         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8737         arm_arch5e.
8738         (TARGET_ARM_QBIT): Likewise.
8739         (TARGET_DSP_MULTIPLY): Likewise.
8740         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8741         (arm_arch5, arm_arch5e): Delete.
8742         (arm_arch5t, arm_arch5te): Declare.
8743         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8744         (arm_arch5t): Declare.
8745         (arm_option_reconfigure_globals): Update for the above.
8746         (arm_options_perform_arch_sanity_checks): Update comment, replace
8747         use of arm_arch5 with arm_arch5t.
8748         (use_return_insn): Likewise.
8749         (arm_emit_call_insn): Likewise.
8750         (output_return_instruction): Likewise.
8751         (arm_final_prescan_insn): Likewise.
8752         (arm_coproc_builtin_available): Likewise.
8753         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8754         arm_arch5e with arm_arch5t and arm_arch5te.
8755         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8756         (arm_arch5t, arm_arch5te): Declare.
8757         * config/arm/arm-tables.opt: Regenerate.
8758         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8759         * config/arm/t-multilib: Likewise.
8760         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8761         instead of arm_arch5.
8762         (*call_reg_thumb1): Likewise.
8763         (*call_value_reg_thumb1_v5): Likewise.
8764         (*call_value_reg_thumb1): Likewise.
8765         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8766         unreachable path.
8767         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8769 2018-05-18  Martin Liska  <mliska@suse.cz>
8771         PR gcov-profile/84846
8772         * doc/gcov.texi: Document -t option of gcov tool.
8774 2018-05-18  Martin Liska  <mliska@suse.cz>
8776         PR gcov-profile/84846
8777         * gcov.c (print_usage): Add new -t option.
8778         (process_args): Handle the option.
8779         (generate_results): Use stdout as output when requested by
8780         the option.
8782 2018-05-18  Martin Liska  <mliska@suse.cz>
8784         PR gcov-profile/84846
8785         * coverage.c (coverage_init): Write PWD to .gcno file.
8786         * doc/gcov.texi: Document how working directory is printed.
8787         * gcov-dump.c (dump_gcov_file): Print PWD.
8788         * gcov.c (output_intermediate_file): Likewise.
8789         (read_graph_file): Read PWD string.
8790         (output_lines): Print PWD.
8792 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8794         PR middle-end/85817
8795         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8796         for retval and return false if all args to phi are zero.
8798 2018-05-18  Richard Biener  <rguenther@suse.de>
8800         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8801         method.
8802         (evrp_dom_walker::before_dom_children): Call it.
8804 2018-05-18  Richard Biener  <rguenther@suse.de>
8806         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8807         results when processing array refs with variable index.
8809 2018-05-18  Toon Moene  <toon@moene.org>
8811         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8812         directly after that of -floop-interchange. Indicate that both
8813         options are enabled by default when specifying -O3.
8815 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8817         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8818         iterator.  Delete separate integer-mode vec_set<mode> expander.
8819         (aarch64_simd_vec_setv2di): Delete.
8820         (vec_setv2di): Delete.
8821         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8822         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
8823         the "w, r" alternative.
8825 2018-05-18  Martin Liska  <mliska@suse.cz>
8827         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8828         * tree-pass.h (make_pass_lower_switch_O0): New function.
8829         * tree-switch-conversion.c (node_has_low_bound): Remove.
8830         (node_has_high_bound): Likewise.
8831         (node_is_bounded): Likewise.
8832         (class pass_lower_switch): Make it a template type and create
8833         two instances.
8834         (pass_lower_switch::execute): Add template argument.
8835         (make_pass_lower_switch): New function.
8836         (make_pass_lower_switch_O0): New function.
8837         (do_jump_if_equal): Remove.
8838         (emit_case_nodes): Simplify to just handle all 3 cases and leave
8839         all the hard work to tree optimization passes.
8841 2018-05-18  Martin Liska  <mliska@suse.cz>
8843         * dbgcnt.c (limit_low): Renamed from limit.
8844         (limit_high): New variable.
8845         (dbg_cnt_is_enabled): Check for upper limit.
8846         (dbg_cnt): Adjust dumping.
8847         (dbg_cnt_set_limit_by_index): Add new argument for high
8848         value.
8849         (dbg_cnt_set_limit_by_name): Likewise.
8850         (dbg_cnt_process_single_pair): Parse new format.
8851         (dbg_cnt_process_opt): Use strtok.
8852         (dbg_cnt_list_all_counters): Remove 'value' and add
8853         'limit_high'.
8854         * doc/invoke.texi: Document changes.
8856 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
8858         * doc/sourcebuild.texi (scalar_all_fma): Document.
8859         * tree.def (FMA_EXPR): Delete.
8860         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8861         * internal-fn.c (ternary_direct): New macro.
8862         (expand_ternary_optab_fn): Likewise.
8863         (direct_ternary_optab_supported_p): Likewise.
8864         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8865         * builtins.c (fold_builtin_fma): Delete.
8866         (fold_builtin_3): Don't call it.
8867         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8868         * expr.c (expand_expr_real_2): Likewise.
8869         * fold-const.c (operand_equal_p): Likewise.
8870         (fold_ternary_loc): Likewise.
8871         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8872         * gimple.c (DEFTREECODE): Likewise.
8873         * gimplify.c (gimplify_expr): Likewise.
8874         * optabs-tree.c (optab_for_tree_code): Likewise.
8875         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8876         * tree-eh.c (operation_could_trap_p): Likewise.
8877         (stmt_could_throw_1_p): Likewise.
8878         * tree-inline.c (estimate_operator_cost): Likewise.
8879         * tree-pretty-print.c (dump_generic_node): Likewise.
8880         (op_code_prio): Likewise.
8881         * tree-ssa-loop-im.c (stmt_cost): Likewise.
8882         * tree-ssa-operands.c (get_expr_operands): Likewise.
8883         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8884         * fold-const-call.h (fold_fma): Delete.
8885         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8886         CFN_FNMA and CFN_FNMS.
8887         (fold_fma): Delete.
8888         * genmatch.c (combined_fn): New enum.
8889         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8890         (commutative_op): New function.
8891         (commutate): Use it.  Handle more than 2 operands.
8892         (dt_operand::gen_gimple_expr): Use commutative_op.
8893         (parser::parse_expr): Allow :c to be used with non-binary
8894         operators if the commutative operand is known.
8895         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8896         CFN_FMS, CFN_FNMA and CFN_FNMS.
8897         (backprop::process_assign_use): Remove FMA_EXPR handling.
8898         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8899         (gen_hsa_fma): New function.
8900         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8901         IFN_FNMA and IFN_FNMS.
8902         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8903         * gimple-fold.h (follow_all_ssa_edges): Declare.
8904         * gimple-fold.c (follow_all_ssa_edges): New function.
8905         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8906         gimple_build interface and use follow_all_ssa_edges to fold the result.
8907         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8908         instead of checking for optabs directly.
8909         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8910         rather than FMA_EXPRs.
8911         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8912         call to IFN_FMA instead of an FMA_EXPR.
8914 2018-05-17  Jim Wilson  <jimw@sifive.com>
8916         * expr.c (do_tablejump): When converting index to Pmode, if we have a
8917         sign extended promoted subreg, and the range does not have the sign bit
8918         set, then do a sign extend.
8920         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8921         test, check for sign extended subreg and/or constant operands, and
8922         do a sign extend in that case.
8924 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
8926         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8927         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8928         Add untyped.
8929         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8930         Change logics_shift_reg to logics_shift_imm.
8931         (thunderx2t99_fp_loadpair_basic): Delete.
8932         (thunderx2t99_fp_storepair_basic): Delete.
8933         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8934         (thunderx2t99_asimd_polynomial): Delete.
8935         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8936         and neon_fp_mul_d_scalar_q.
8937         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8938         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8939         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8940         (thunderx2t99_asimd_lut): Add missing tbl types.
8941         (thunderx2t99_asimd_ext): Delete.
8942         (thunderx2t99_asimd_load1_1_mult): Delete.
8943         (thunderx2t99_asimd_load1_2_mult): Delete.
8944         (thunderx2t99_asimd_load1_ldp): New.
8945         (thunderx2t99_asimd_load1): New.
8946         (thunderx2t99_asimd_load2): Add missing *load2* types.
8947         (thunderx2t99_asimd_load3): New.
8948         (thunderx2t99_asimd_load4): New.
8949         (thunderx2t99_asimd_store1_1_mult): Delete.
8950         (thunderx2t99_asimd_store1_2_mult): Delete.
8951         (thunderx2t99_asimd_store2_mult): Delete.
8952         (thunderx2t99_asimd_store2_onelane): Delete.
8953         (thunderx2t99_asimd_store_stp): New.
8954         (thunderx2t99_asimd_store1): New.
8955         (thunderx2t99_asimd_store2): New.
8956         (thunderx2t99_asimd_store3): New.
8957         (thunderx2t99_asimd_store4): New.
8959 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
8961         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8962         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
8964 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
8965             Segher Boessenkool  <segher@kernel.crashing.org>
8967         PR target/85698
8968         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8969         operand.
8971 2018-05-17  Richard Biener  <rguenther@suse.de>
8973         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8974         for pruning loop and prune defs feeding only already visited PHIs.
8976 2018-05-17  Richard Biener  <rguenther@suse.de>
8978         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8980 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
8981             Richard Biener  <rguenther@suse.de>
8983         PR tree-optimization/85793
8984         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8985         for VMAT_ELEMENTWISE.
8987 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
8989         * internal-fn.h (lookup_internal_fn): Declare
8990         * internal-fn.c (lookup_internal_fn): New function.
8991         * gimple.c (gimple_build_call_from_tree): Handle calls to
8992         internal functions.
8993         * gimple-pretty-print.c (dump_gimple_call): Print "." before
8994         internal function names.
8995         * tree-pretty-print.c (dump_generic_node): Likewise.
8996         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8998 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
9000         * gimple-fold.h (gimple_build): Make the function forms take
9001         combined_fn rather than built_in_function.
9002         (gimple_simplify): Likewise.
9003         * gimple-match-head.c (gimple_simplify): Likewise.
9004         * gimple-fold.c (gimple_build): Likewise.
9005         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9006         rather than gimple_build_call_internal.
9007         (get_initial_defs_for_reduction): Likewise.
9008         (vect_create_epilog_for_reduction): Likewise.
9009         (vectorizable_live_operation): Likewise.
9011 2018-05-17  Martin Liska  <mliska@suse.cz>
9013         * gimple-ssa-sprintf.c (format_directive): Do not use
9014         space in between 'G_' and '('.
9016 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
9018         PR target/85323
9019         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9020         even if the mask is not all ones.
9022         PR target/85323
9023         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9024         vector.
9025         (ix86_gimple_fold_builtin): Likewise.
9027         PR target/85323
9028         * config/i386/i386.c: Include tree-vector-builder.h.
9029         (ix86_vector_shift_count): New function.
9030         (ix86_fold_builtin): Fold shift builtins by scalar count.
9031         (ix86_gimple_fold_builtin): Likewise.
9033         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9034         _mm512_setzero): New intrinsics.
9036 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
9037             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9039         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9040         code generation for cases where splatting a value is not useful.
9041         * simplify-rtx.c (simplify_ternary_operation): Simplify
9042         vec_merge across a vec_duplicate and a paradoxical subreg forming
9043         a vector mode to a vec_concat.
9045 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
9047         * config.gcc: Support "goldmont-plus".
9048         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9049         "goldmont-plus".
9050         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9051         PROCESSOR_GOLDMONT_PLUS.
9052         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9053         (processor_target_table): Add "goldmont-plus".
9054         (PTA_GOLDMONT_PLUS): Define.
9055         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9056         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9057         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9058         (fold_builtin_cpu): Add "goldmont-plus".
9059         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9060         (ix86_option_override_internal): Add "goldmont-plus".
9061         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9062         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9063         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9064         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9066 2018-05-17  Richard Biener  <rguenther@suse.de>
9068         PR tree-optimization/85757
9069         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9070         remove defs that only feed that PHI from further processing.
9072 2018-05-16  Jim Wilson  <jimw@sifive.com>
9074         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9075         asterisk to name.
9076         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9078 2018-05-16  Mark Wielaard  <mark@klomp.org>
9080         * dwarf2out.c (count_index_strings): New function.
9081         (output_indirect_strings): Call count_index_strings and generate
9082         header for dwarf_version >= 5.
9084 2018-05-16  Mark Wielaard  <mark@klomp.org>
9086         * dwarf2out.c (dwarf_FORM): New function.
9087         (set_indirect_string): Use dwarf_FORM.
9088         (reset_indirect_string): Likewise.
9089         (size_of_die): Likewise.
9090         (value_format): Likewise.
9091         (output_die): Likewise.
9092         (add_skeleton_AT_string): Likewise.
9093         (output_macinfo_op): Likewise.
9094         (index_string): Likewise.
9095         (output_index_string_offset): Likewise.
9096         (output_index_string): Likewise.
9097         (count_index_strings): Likewise.
9099 2018-05-16  Carl Love  <cel@us.ibm.com>
9101         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9102         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9104 2018-05-16  Martin Jambor  <mjambor@suse.cz>
9106         * ipa-prop.c (ipa_free_all_edge_args): Remove.
9107         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9109 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
9111         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9112         (fnma<mode>4): Likewise.
9113         (fms<mode>4): Likewise.
9114         (fnms<mode>4): Likewise.
9115         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9116         (aarch64_fnma<mode>4): Likewise.
9117         (aarch64_fms<mode>4): Likewise.
9118         (aarch64_fnms<mode>4): Likewise.
9119         (aarch64_fnmadd<mode>4): Likewise.
9121 2018-05-16  Jason Merrill  <jason@redhat.com>
9123         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
9125 2018-05-16  Richard Biener  <rguenther@suse.de>
9127         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9128         (dump_stmt_cost): Declare.
9129         (add_stmt_cost): Dump cost we add.
9130         (add_stmt_costs): New function.
9131         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9132         No longer exported.
9133         (vect_analyze_stmt): Adjust prototype.
9134         (vectorizable_condition): Likewise.
9135         (vectorizable_live_operation): Likewise.
9136         (vectorizable_reduction): Likewise.
9137         (vectorizable_induction): Likewise.
9138         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9139         cost vector to pass to vectorizable_ and record afterwards.
9140         (vect_model_reduction_cost): Take cost vector argument and adjust.
9141         (vect_model_induction_cost): Likewise.
9142         (vectorizable_reduction): Likewise.
9143         (vectorizable_induction): Likewise.
9144         (vectorizable_live_operation): Likewise.
9145         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9146         SLP_TREE_NUMBER_OF_VEC_STMTS.
9147         (vect_analyze_slp_cost_1): Remove.
9148         (vect_analyze_slp_cost): Likewise.
9149         (vect_slp_analyze_node_operations): Take visited args and
9150         a target cost vector.  Avoid processing already visited stmt sets.
9151         (vect_slp_analyze_operations): Use a local cost vector to gather
9152         costs and register those of non-discarded instances.
9153         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9154         (vect_schedule_slp_instance): Remove copying of
9155         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
9156         zero.
9157         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9158         adding cost.  Record cost entry location.
9159         (vect_prologue_cost_for_slp_op): Function to compute cost of
9160         a constant or invariant generated for SLP vect in the prologue,
9161         split out from vect_analyze_slp_cost_1.
9162         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
9163         (vect_model_promotion_demotion_cost): Likewise.
9164         (vect_model_store_cost): Likewise, make static.
9165         (vect_model_load_cost): Likewise.
9166         (vectorizable_bswap): Add cost vector arg and adjust.
9167         (vectorizable_call): Likewise.
9168         (vectorizable_simd_clone_call): Likewise.
9169         (vectorizable_conversion): Likewise.
9170         (vectorizable_assignment): Likewise.
9171         (vectorizable_shift): Likewise.
9172         (vectorizable_operation): Likewise.
9173         (vectorizable_store): Likewise.
9174         (vectorizable_load): Likewise.
9175         (vectorizable_condition): Likewise.
9176         (vectorizable_comparison): Likewise.
9177         (can_vectorize_live_stmts): Likewise.
9178         (vect_analyze_stmt): Likewise.
9179         (vect_transform_stmt): Adjust calls to vectorizable_*.
9180         * tree-vectorizer.c: Include gimple-pretty-print.h.
9181         (dump_stmt_cost): New function.
9183 2018-05-16  Richard Biener  <rguenther@suse.de>
9185         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9186         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9187         * tree-ssa-dse.c: Include tree-ssa-loop.h.
9188         (check_name): New callback.
9189         (dse_classify_store): Track cycles via a visited bitmap of PHI
9190         defs and simplify handling of in-loop and across loop dead stores
9191         and properly fail for loop-variant refs.  Handle byte-tracking with
9192         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9193         limiting the walk.
9195 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
9197         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9198         (vect_get_mask_type_for_stmt): Likewise.
9199         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9200         split out from...
9201         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
9202         to determine the statement's vector type and the vector type that
9203         should be used for calculating nunits.  Deal with cases in which
9204         the type has to be deferred.
9205         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9206         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9207         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9208         (vect_determine_vf_for_stmt): New functions, split out from...
9209         (vect_determine_vectorization_factor): ...here.
9210         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9211         (vect_get_mask_type_for_stmt): New functions, split out from
9212         vect_determine_vectorization_factor.
9214 2018-05-16  Richard Biener  <rguenther@suse.de>
9216         * tree-cfg.c (verify_gimple_assign_ternary): Properly
9217         verify the [VEC_]COND_EXPR embedded comparison.
9219 2018-05-15  Martin Sebor  <msebor@redhat.com>
9221         PR tree-optimization/85753
9222         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9223         RECORD_TYPE in addition to ARRAY_TYPE.
9225 2018-05-15  Martin Sebor  <msebor@redhat.com>
9227         PR middle-end/85643
9228         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9230 2018-05-15  Richard Biener  <rguenther@suse.de>
9232         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9233         add by_clobber_p one.  Change algorithm to collect all defs
9234         representing uses we need to walk and try reducing them to
9235         a single one before failing.
9236         (dse_dom_walker::dse_optimize_stmt): Adjust.
9238 2018-05-13  Mark Wielaard  <mark@klomp.org>
9240         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9241         (size_of_loc_descr): Likewise.
9242         (output_loc_operands): Likewise.
9243         (output_loc_operands_raw): Likewise.
9244         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9245         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9246         (hash_loc_operands): Likewise.
9247         (compare_loc_operands): Likewise.
9249 2018-05-14  Mark Wielaard  <mark@klomp.org>
9251         * dwarf2out.c (count_index_addrs): New function.
9252         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9254 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9256         PR tree-optimization/83648
9257         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9258         return value as malloc candidate.
9260 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9262         PR ipa/85734
9263         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9264         param as true in call to suggest_attribute.
9266 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
9268         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9269         -mreadonly-in-sdata.
9271 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9273         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9274         New pattern.
9275         (aarch64_crypto_aesd_fused): Likewise.
9277 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
9279         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9280         (movsi_aarch64): Likewise.
9281         (load_pairsi): Likewise.
9282         (load_pairdi): Likewise.
9283         (store_pairsi): Likewise.
9284         (store_pairdi): Likewise.
9285         (load_pairsf): Likewise.
9286         (load_pairdf): Likewise.
9287         (store_pairsf): Likewise.
9288         (store_pairdf): Likewise.
9289         (zero_extend): Likewise.
9290         (trunc): Swap alternatives.
9291         (fcvt_target): Add '?' to prefer w over r.
9293 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
9295         PR target/85756
9296         * config/i386/i386.md: Disallow non-commutative arithmetics in
9297         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9298         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
9299         in the peephole2 before it.
9301 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
9303         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9304         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9305         (ix86_handle_option): Handle -mcldemote.
9306         * config.gcc: New header.
9307         * config/i386/cldemoteintrin.h: New file.
9308         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9309         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9310         -mcldemote.
9311         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9312         OPTION_MASK_ISA_CLDEMOTE.
9313         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9314         (ix86_valid_target_attribute_inner_p): Ditto.
9315         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9316         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9317         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9318         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9319         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9320         (cldemote): New.
9321         * config/i386/i386.opt: Add -mcldemote.
9322         * config/i386/x86intrin.h: New header.
9323         * doc/invoke.texi: Add -mcldemote.
9325 2018-05-14  Richard Biener  <rguenther@suse.de>
9327         * doc/match-and-simplify.texi: Adjust :s documentation.
9329 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
9331         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9332         intended memcpy size.
9333         (REORDER_45): Likewise.
9335 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
9337         * sort.cc: New file.
9338         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9339         * vec.c (qsort_chk): Use gcc_qsort.
9340         * Makefile.in (OBJS-libcommon): Add sort.o.
9341         (build/sort.o): New target.  Use it...
9342         (BUILD_RTL): ... here, and...
9343         (build/gencfn-macros): ... here, and...
9344         (build/genmatch): ... here.
9346 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
9347             Chung-Ju Wu  <jasonwucj@gmail.com>
9349         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9350         * config/nds32/nds32-graywolf.md: New file.
9351         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9352         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9353         pipeline.
9354         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9355         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9356         * config/nds32/nds32.md (pipeline_model): Add graywolf.
9357         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9358         * config/nds32/pipelines.md: Include n15 settings.
9360 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
9361             Chung-Ju Wu  <jasonwucj@gmail.com>
9363         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9364         * config/nds32/nds32-n13.md: New file.
9365         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9366         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9367         pipeline.
9368         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9369         * config/nds32/nds32.md (pipeline_model): Add n13.
9370         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9371         * config/nds32/pipelines.md: Include n13 settings.
9373 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
9374             Chung-Ju Wu  <jasonwucj@gmail.com>
9376         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9377         * config/nds32/nds32-n10.md: New file.
9378         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9379         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9380         pipeline.
9381         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9382         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9383         * config/nds32/nds32.md (pipeline_model): Add n10.
9384         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9385         * config/nds32/pipelines.md: Include n10 settings.
9387 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
9388             Kito Cheng  <kito.cheng@gmail.com>
9389             Chung-Ju Wu  <jasonwucj@gmail.com>
9391         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9392         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9393         Add enum values for DSP extension instructions.
9394         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9395         New constraints.
9396         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9397         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9398         New code iterators.
9399         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9400         * config/nds32/nds32-dspext.md: New file for DSP implementation.
9401         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9402         * config/nds32/nds32-intrinsic.md: Likewise.
9403         * config/nds32/nds32_intrinsic.h: Likewise.
9404         * config/nds32/nds32-md-auxiliary.c: Likewise.
9405         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9406         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9407         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9408         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9409         * config/nds32/nds32-protos.h: New declarations for DSP extension.
9410         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9411         TYPE_DMAC in switch statement.
9412         * config/nds32/nds32.c: New checking and implementation for DSP
9413         extension instructions.
9414         * config/nds32/nds32.h: Likewise.
9415         * config/nds32/nds32.md: Likewise.
9416         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9417         * config/nds32/predicates.md: Implement new predicates for DSP
9418         extension.
9420 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
9422         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9423         Reformat alternatives and attributes so it is easier to identify
9424         which constraints/attributes go with which instruction.
9425         (mov<mode>_hardfloat32, FMOVE64): Likewise.
9426         (mov<mode>_softfloat32, FMOVE64): Likewise.
9427         (mov<mode>_hardfloat64, FMOVE64): Likewise.
9428         (mov<mode>_softfloat64, FMOVE64): Likewise.
9430 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9432         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9433         subsection.
9434         (Basic PowerPC Built-in Functions): The new name of the
9435         subsection previously known as "PowerPC Built-in Functions".
9436         (Basic PowerPC Built-in Functions Available on all Configurations):
9437         New subsubsection.
9438         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9439         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9440         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9441         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9443 2018-05-11  Martin Jambor  <mjambor@suse.cz>
9445         PR ipa/85655
9446         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9447         single const.
9449 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
9451         PR target/85733
9452         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9454 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
9456         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9457         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9458         (ix86_handle_option): Handle -mwaitpkg.
9459         * config.gcc: New header.
9460         * config/i386/cpuid.h (bit_WAITPKG): New bit.
9461         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9462         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9463         function type.
9464         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9465         OPTION_MASK_ISA_WAITPKG.
9466         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9467         (ix86_option_override_internal): Add PTA_WAITPKG.
9468         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9469         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9470         IX86_BUILTIN_TPAUSE.
9471         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9472         __builtin_ia32_umwait and __builtin_ia32_tpause.
9473         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9474         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9475         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9476         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9477         UNSPECV_TPAUSE): New.
9478         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9479         * config/i386/i386.opt: Add -mwaitpkg.
9480         * config/i386/waitpkgintrin.h: New file.
9481         * config/i386/x86intrin.h: New header.
9482         * doc/invoke.texi: Add -mwaitpkg.
9484 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
9486         PR target/85606
9487         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9488         equivalent.
9489         (cortex-m0): Use armv6s-m isa.
9490         (cortex-m0plus): Likewise.
9491         (cortex-m1): Likewise.
9492         (cortex-m0.small-multiply): Likewise.
9493         (cortex-m0plus.small-multiply): Likewise.
9494         (cortex-m1.small-multiply): Likewise.
9496 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
9497             Jakub Jelinek  <jakub@redhat.com>
9499         PR tree-optimization/85692
9500         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9501         source permute as well.
9503 2018-05-11  Martin Liska  <mliska@suse.cz>
9505         PR sanitizer/85556
9506         * doc/extend.texi: Document LLVM style format for no_sanitize
9507         attribute.
9509 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
9511         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9512         mode_supports_vsx_dform_quad to mode_supports_dq_form.
9513         (mode_supports_vsx_dform_quad): Likewise.
9514         (mode_supports_vmx_dform): Move these functions to be next to the
9515         other mode_supports functions.
9516         (mode_supports_dq_form): Likewise.
9517         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9518         mode_supports_dq_form.
9519         (reg_offset_addressing_ok_p): Likewise.
9520         (offsettable_ok_by_alignment): Likewise.
9521         (rs6000_legitimate_offset_address_p): Likewise.
9522         (legitimate_lo_sum_address_p): Likewise.
9523         (rs6000_legitimize_address): Likewise.
9524         (rs6000_legitimize_reload_address): Likewise.
9525         (rs6000_secondary_reload_inner): Likewise.
9526         (rs6000_preferred_reload_class): Likewise.
9527         (rs6000_output_move_128bit): Likewise.
9529 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
9531         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9532         Generate SImode target register for null target.
9533         <case IX86_BUILTIN_XGETBV>: Ditto.
9534         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9535         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9537 2018-05-10  Carl Love  <cel@us.ibm.com>
9539         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9540         dcbtt and dcbtstt if operands[2] is 0.
9542 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
9544         PR target/85693
9545         * config/i386/sse.md (usadv64qi): New expander.
9547 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
9549         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9550         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9551         -maltivec=be support.
9552         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9553         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9554         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9555         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9556         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9557         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9558         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9559         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9560         altivec_vsumsws): Adjust.
9561         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9562         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9563         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9564         support.
9565         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9566         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9567         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9568         (altivec_lve<VI_char>x): Delete expand.
9569         (*altivec_lve<VI_char>x_internal): Rename to...
9570         (altivec_lve<VI_char>x): ... this.
9571         (altivec_lvxl_<mode>): Delete expand.
9572         (*altivec_lvxl_<mode>_internal): Rename to ...
9573         (altivec_lvxl_<mode>): ... this.
9574         (altivec_stvxl_<mode>): Delete expand.
9575         (*altivec_stvxl_<mode>_internal): Rename to ...
9576         (altivec_stvxl_<mode>): ... this.
9577         (altivec_stve<VI_char>x): Delete expand.
9578         (*altivec_stve<VI_char>x_internal): Rename to ...
9579         (altivec_stve<VI_char>x): ... this.
9580         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9581         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9582         reduc_plus_scal_<mode>): Adjust.
9583         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9584         comment.
9585         (rs6000_cpu_cpp_builtins): Adjust.
9586         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9587         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9588         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9589         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9590         -maltivec=be support.
9591         (rs6000_split_vec_extract_var): Adjust.
9592         (rs6000_split_v4si_init): Adjust.
9593         (swap_selector_for_mode): Delete.
9594         (altivec_expand_lvx_be, altivec_expand_stvx_be,
9595         altivec_expand_stvex_be): Delete.
9596         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9597         -maltivec=be support.
9598         (rs6000_gimple_fold_builtin): Ditto.
9599         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9600         Adjust.
9601         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9602         (TARGET_DIRECT_MOVE_64BIT): Adjust.
9603         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9604         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9605         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9606         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9607         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9608         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9609         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9610         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9611         anonymous split): Adjust.
9612         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9613         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9615 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
9617         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9618         when --with-gxx-include-dir is also specified.
9619         * configure: Regenerate.
9621 2018-05-09  Jim Wilson  <jimw@sifive.com>
9623         PR target/84797
9624         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9625         * config/riscv/t-withmultilib: New.
9626         * config/riscv/withmultilib.h: New.
9627         * doc/install.texi: Document RISC-V --with-multilib-list support.
9629 2018-05-09  Richard Biener  <rguenther@suse.de>
9631         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9632         vector.
9633         (vect_bb_vectorization_profitable_p): Adjust.  Compute
9634         actual scalar cost using the cost vector and the add_stmt_cost
9635         machinery.
9637 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9639         PR rtl-optimization/85645
9640         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9641         in the REG_CFA_REGISTER note for LR, don't leave it empty.
9643 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9645         PR rtl-optimization/85645
9646         * shrink-wrap.c (spread_components): Return a boolean saying if
9647         anything was changed.
9648         (try_shrink_wrapping_separate): Iterate spread_components until
9649         nothing changes anymore.
9651 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9653         PR rtl-optimization/85645
9654         * regrename.c (build_def_use): Also kill the chains that include the
9655         destination of a REG_CFA_REGISTER note.
9657 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9659         PR rtl-optimization/85645
9660         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9661         insn that has a REG_CFA_REGISTER note.
9663 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
9665         * cfgexpand.c (expand_clobber): New function.
9666         (expand_gimple_stmt_1): Use it.
9667         * tree-vect-stmts.c (vect_clobber_variable): New function,
9668         split out from...
9669         (vectorizable_simd_clone_call): ...here.
9670         (vectorizable_store): Emit a clobber either side of an
9671         IFN_STORE_LANES sequence.
9672         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9674 2018-05-09  Tom de Vries  <tom@codesourcery.com>
9676         PR target/85626
9677         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9678         (define_insn "trap_if_false"): Add exit after trap.
9680 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
9682         PR rtl-optimization/85638
9683         * bb-reorder.c: Include common/common-target.h.
9684         (create_forwarder_block): New function extracted from...
9685         (fix_up_crossing_landing_pad): ...here.  Rename into...
9686         (dw2_fix_up_crossing_landing_pad): ...this.
9687         (sjlj_fix_up_crossing_landing_pad): New function.
9688         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9689         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9690         from both partitions and exit the loop after one iteration.
9692 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9694         Revert:
9695         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9696         subsection.
9697         (Basic PowerPC Built-in Functions): The new name of the
9698         subsection previously known as "PowerPC Built-in Functions".
9699         (Basic PowerPC Built-in Functions Available on all Configurations):
9700         New subsubsection.
9701         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9702         subsubsection.
9703         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9704         subsubsection.
9705         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9706         subsubsection.
9707         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9708         subsubsection.
9710 2018-05-08  Jim Wilson  <jimw@sifive.com>
9712         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9713         (LD_EMUL_SUFFIX): New.
9714         (LINK_SPEC): Use it.
9716 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9718         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9719         subsection.
9720         (Basic PowerPC Built-in Functions): The new name of the
9721         subsection previously known as "PowerPC Built-in Functions".
9722         (Basic PowerPC Built-in Functions Available on all Configurations):
9723         New subsubsection.
9724         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9725         subsubsection.
9726         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9727         subsubsection.
9728         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9729         subsubsection.
9730         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9731         subsubsection.
9733 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
9735         PR target/85683
9736         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9737         after cmpelim optimization.
9739 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
9741         * config.gcc: Support "goldmont".
9742         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9743         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9744         PROCESSOR_GOLDMONT.
9745         * config/i386/i386.c (m_GOLDMONT): Define.
9746         (processor_target_table): Add "goldmont".
9747         (PTA_GOLDMONT): Define.
9748         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9749         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9750         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9751         (fold_builtin_cpu): Add "goldmont".
9752         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9753         (ix86_option_override_internal): Add "goldmont".
9754         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9755         (processor_type): Add PROCESSOR_GOLDMONT.
9756         * config/i386/i386.md: Add CPU "glm".
9757         * config/i386/glm.md: New file.
9758         * config/i386/x86-tune.def: Add m_GOLDMONT.
9759         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9761 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
9763         PR target/85572
9764         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9765         E_V4DImode.
9766         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9767         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
9768         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
9770         PR target/85317
9771         * config/i386/i386.c (ix86_fold_builtin): Handle
9772         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9774         PR target/85480
9775         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9776         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9778 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
9780         PR target/85658
9781         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9782         (check_arch): Likewise.
9783         (check_fpu): Return the result rather than printing it.
9784         (end arch): Fix operator precedence.
9785         (end cpu): Likewise.
9786         (END): Print the result from check_fpu.
9788 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
9789             Alan Hayward  <alan.hayward@arm.com>
9790             David Sherwood  <david.sherwood@arm.com>
9792         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9793         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9794         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9795         (*fcmuo<mode>_and): New patterns.
9797 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
9799         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9800         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9801         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9802         (cmp_op, sve_imm_con): New code attributes.
9803         (SVE_COND_INT_CMP, imm_con): Delete.
9804         (cmp_op): Remove above unspecs from int attribute.
9805         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9806         to...
9807         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
9808         comparison-specific unspecs.
9809         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9810         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9811         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9812         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9813         (*vec_fcm<cmp_op><mode>): Rename to...
9814         (*fcm<cmp_op><mode>): ...this and adjust likewise.
9815         (*vec_fcmuo<mode>): Rename to...
9816         (*fcmuo<mode>): ...this and adjust likewise.
9817         (*pred_fcm<cmp_op><mode>): New pattern.
9818         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9819         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9820         functions.
9821         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9822         and UNORDERED.
9823         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9824         (aarch64_emit_sve_predicated_cond): New function.
9825         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9826         (aarch64_emit_unspec_cond_or): Replace with...
9827         (aarch64_emit_sve_or_conds): ...this new function.  Use
9828         aarch64_emit_sve_ptrue_op for the individual comparisons and
9829         aarch64_emit_binop to OR them together.
9830         (aarch64_emit_inverted_unspec_cond): Replace with...
9831         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
9832         aarch64_emit_sve_ptrue_op for the comparison and
9833         aarch64_emit_unop to invert the result.
9834         (aarch64_expand_sve_vec_cmp_float): Update after the above
9835         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
9837 2018-05-07  Nathan Sidwell  <nathan@acm.org>
9839         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9840         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9841         (Backwards Compatibility): Likewise.
9843 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9845         PR bootstrap/85681
9846         Revert:
9847         2018-05-07  Luis Machado  <luis.machado@linaro.org>
9849         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9850         <prefetch_dynamic_strides>: New const bool field.
9851         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9852         prefetch_dynamic_strides.
9853         (exynosm1_prefetch_tune): Likewise.
9854         (thunderxt88_prefetch_tune): Likewise.
9855         (thunderx_prefetch_tune): Likewise.
9856         (thunderx2t99_prefetch_tune): Likewise.
9857         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9858         to false.
9859         (aarch64_override_options_internal): Update to set
9860         PARAM_PREFETCH_DYNAMIC_STRIDES.
9861         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9862         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9863         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9864         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9865         prefetch-dynamic-strides setting.
9867         2018-05-07  Luis Machado  <luis.machado@linaro.org>
9869         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9870         <minimum_stride>: New const int field.
9871         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9872         minimum_stride field.
9873         (exynosm1_prefetch_tune): Likewise.
9874         (thunderxt88_prefetch_tune): Likewise.
9875         (thunderx_prefetch_tune): Likewise.
9876         (thunderx2t99_prefetch_tune): Likewise.
9877         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9878         (aarch64_override_options_internal): Update to set
9879         PARAM_PREFETCH_MINIMUM_STRIDE.
9880         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9881         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9882         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9883         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9884         stride is constant and is below the minimum stride threshold.
9886 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9888         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9889         to 512.
9891 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9893         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9894         <prefetch_dynamic_strides>: New const bool field.
9895         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9896         prefetch_dynamic_strides.
9897         (exynosm1_prefetch_tune): Likewise.
9898         (thunderxt88_prefetch_tune): Likewise.
9899         (thunderx_prefetch_tune): Likewise.
9900         (thunderx2t99_prefetch_tune): Likewise.
9901         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9902         to false.
9903         (aarch64_override_options_internal): Update to set
9904         PARAM_PREFETCH_DYNAMIC_STRIDES.
9905         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9906         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9907         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9908         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9909         prefetch-dynamic-strides setting.
9911 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9913         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9914         <minimum_stride>: New const int field.
9915         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9916         minimum_stride field.
9917         (exynosm1_prefetch_tune): Likewise.
9918         (thunderxt88_prefetch_tune): Likewise.
9919         (thunderx_prefetch_tune): Likewise.
9920         (thunderx2t99_prefetch_tune): Likewise.
9921         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9922         (aarch64_override_options_internal): Update to set
9923         PARAM_PREFETCH_MINIMUM_STRIDE.
9924         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9925         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9926         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9927         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9928         stride is constant and is below the minimum stride threshold.
9930 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
9932         PR c++/85659
9933         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9934         the type is addressable.  Don't force op into register if it has
9935         BLKmode.
9937 2018-05-05  Roland McGrath  <mcgrathr@google.com>
9939         PR other/77609
9940         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9941         any section for which we don't know a specific type it should have,
9942         regardless of name.  Previously this was done only for the exact
9943         names ".init_array", ".fini_array", and ".preinit_array".
9944         (default_elf_asm_named_section): Add comment about
9945         relationship with default_section_type_flags and SECTION_NOTYPE.
9946         (get_section): Don't consider it a type conflict if one side has
9947         SECTION_NOTYPE and the other doesn't, as long as neither has the
9948         SECTION_BSS et al used in the default_section_type_flags logic.
9950 2018-05-05  Tom de Vries  <tom@codesourcery.com>
9952         PR target/85653
9953         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9954         (workaround_barsyncs): New function.
9955         (nvptx_reorg): Use workaround_barsyncs.
9956         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9957         (define_expand "nvptx_membar_cta"): New define_expand.
9958         (define_insn "*nvptx_membar_cta"): New insn.
9960 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
9962         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9963         To improve optimization opportunities.
9964         * builtin-types.def: The new needed builtin types for the above.
9966 2018-05-04  Richard Biener  <rguenther@suse.de>
9968         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9969         * gimple-ssa-store-merging.c
9970         (imm_store_chain_info::output_merged_store): Remove redundant create,
9971         release split_store vector contents on failure.
9972         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9973         scalar stmt vector on cache hit.
9975 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
9977         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9978         Xilinx FP support.
9979         * config.gcc (powerpc-xilinx-eabi*): Remove.
9980         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9981         support.
9982         (fusion_addis_mem_combo_load): Ditto.
9983         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9984         FP support.
9985         (rs6000_cpu_cpp_builtins): Ditto.
9986         * config/rs6000/rs6000-linux.c
9987         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9988         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9989         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9990         support.
9991         (rs6000_setup_reg_addr_masks): Ditto.
9992         (rs6000_init_hard_regno_mode_ok): Ditto.
9993         (rs6000_option_override_internal): Ditto.
9994         (legitimate_lo_sum_address_p): Ditto.
9995         (rs6000_legitimize_address): Ditto.
9996         (rs6000_legitimize_reload_address): Ditto.
9997         (rs6000_legitimate_address_p): Ditto.
9998         (abi_v4_pass_in_fpr): Ditto.
9999         (setup_incoming_varargs): Ditto.
10000         (rs6000_gimplify_va_arg): Ditto.
10001         (rs6000_split_multireg_move): Ditto.
10002         (rs6000_savres_strategy): Ditto.
10003         (rs6000_emit_prologue_components): Ditto.
10004         (rs6000_emit_epilogue_components): Ditto.
10005         (rs6000_emit_prologue): Ditto.
10006         (rs6000_emit_epilogue): Ditto.
10007         (rs6000_elf_file_end): Ditto.
10008         (rs6000_function_value): Ditto.
10009         (rs6000_libcall_value): Ditto.
10010         * config/rs6000/rs6000.h: Ditto.
10011         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10012         (TARGET_MINMAX): ... this.  New.
10013         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10014         * config/rs6000/rs6000.md: Remove Xilinx FP support.
10015         (*movsi_internal1_single): Delete.
10016         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10017         mfpu=, mxilinx-fpu): Delete.
10018         * config/rs6000/singlefp.h: Delete.
10019         * config/rs6000/sysv4.h: Remove Xilinx FP support.
10020         * config/rs6000/t-rs6000: Ditto.
10021         * config/rs6000/t-xilinx: Delete.
10022         * config/rs6000/titan.md: Adjust for fp_type removal.
10023         * config/rs6000/vsx.md: Remove Xilinx FP support.
10024         (VStype_simple): Delete.
10025         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10026         * config/rs6000/xfpu.h: Delete.
10027         * config/rs6000/xfpu.md: Delete.
10028         * config/rs6000/xilinx.h: Delete.
10029         * config/rs6000/xilinx.opt: Delete.
10030         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10031         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10033 2018-05-04  Tom de Vries  <tom@codesourcery.com>
10035         PR libgomp/85639
10036         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10037         if ignore == 0.
10039 2018-05-04  Richard Biener  <rguenther@suse.de>
10041         PR middle-end/85627
10042         * tree-complex.c (update_complex_assignment): We are always in SSA form.
10043         (expand_complex_div_wide): Likewise.
10044         (expand_complex_operations_1): Likewise.
10045         (expand_complex_libcall): Preserve EH info of the original stmt.
10046         (tree_lower_complex): Handle removed blocks.
10047         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10048         on complex multiplication and division libcall builtins.
10050 2018-05-04  Richard Biener  <rguenther@suse.de>
10052         PR middle-end/85574
10053         * fold-const.c (negate_expr_p): Restrict negation of operand
10054         zero of a division to when we know that can happen without
10055         overflow.
10056         (fold_negate_expr_1): Likewise.
10058 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
10060         PR libstdc++/85466
10061         * real.h (real_nextafter): Declare.
10062         * real.c (real_nextafter): New function.
10063         * fold-const-call.c (fold_const_nextafter): New function.
10064         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10065         CASE_CFN_NEXTTOWARD.
10066         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10067         even when arg1_mode is different from arg0_mode.
10069 2018-05-03  Nathan Sidwell  <nathan@acm.org>
10071         * doc/extend.texi (Deprecated Features): Remove
10072         -ffriend-injection.
10073         (Backwards Compatibility): Likewise.
10074         * doc/invoke.texi (C++ Language Options): Likewise.
10075         (C++ Dialect Options): Likewise.
10077 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
10079         PR target/85530
10080         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10081         _mm512_mask_mullox_epi64): New intrinsics.
10083 2018-05-03  Tom de Vries  <tom@codesourcery.com>
10085         PR testsuite/85106
10086         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10087         dump files): Add offload-tree.
10089 2018-05-03  Richard Biener  <rguenther@suse.de>
10091         PR tree-optimization/85615
10092         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10093         to loops not nested in BBs loop father to avoid creating multi-entry
10094         loops.
10096 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10098         PR tree-optimization/70291
10099         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10100         arguments.  Change return type to tree.  Emit libcall as a new
10101         statement rather than replacing existing one when inplace_p is true.
10102         (expand_complex_multiplication_components): New function.
10103         (expand_complex_multiplication): Expand floating-point complex
10104         multiplication using the above.
10105         (expand_complex_division): Rename inner_type parameter to type.
10106         Update expand_complex_libcall call-site.
10107         (expand_complex_operations_1): Update expand_complex_multiplication
10108         and expand_complex_division call-sites.
10110 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
10112         PR target/85582
10113         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10114         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10115         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10116         the highest significant bit of the shift count mask is clear.  In
10117         check whether and[sq]i3 is needed verify that all significant bits
10118         of the shift count other than the highest are set.
10120 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10122         PR libgomp/82428
10123         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10124         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10125         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10126         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10127         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10128         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10129         __builtin_goacc_parlevel_size.
10131 2018-05-02  Richard Biener  <rguenther@suse.de>
10133         PR tree-optimization/85597
10134         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10135         do not use split vect_get_vec_defs call but call vect_get_slp_defs
10136         directly.
10138 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10140         PR testsuite/85106
10141         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10142         dump files): Add ltrans-tree.
10144 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10146         PR testsuite/85106
10147         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10148         dump files): Add wpa-ipa.
10150 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
10152         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
10153         powerpc*-*-linux*paired* target.
10154         * config/rs6000/750cl.h: Delete.
10155         * config/rs6000/paired.h: Delete.
10156         * config/rs6000/paired.md: Delete.
10157         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10158         float support.
10159         * config/rs6000/rs6000-builtin.def: Remove paired float support.
10160         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10161         comment.  Remove paired float support.
10162         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10163         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10164         VECTOR_PAIRED.
10165         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10166         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10167         declarations.
10168         * config/rs6000/rs6000.c: Remove paired float support.
10169         (paired_expand_vector_init, paired_expand_vector_move,
10170         paired_emit_vector_compare, paired_emit_vector_cond_expr,
10171         (paired_expand_lv_builtin, paired_expand_stv_builtin,
10172         paired_expand_builtin, paired_expand_predicate_builtin,
10173         paired_init_builtins): Delete.
10174         * config/rs6000/rs6000.h: Remove paired float support.
10175         * config/rs6000/rs6000.md: Remove paired float support.
10176         (move_from_CR_ov_bit): Delete.
10177         * config/rs6000/rs6000.opt (mpaired): Delete.
10178         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10179         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10181 2018-05-02  Richard Biener  <rguenther@suse.de>
10183         PR middle-end/85567
10184         * gimplify.c (gimplify_save_expr): When in SSA form allow
10185         SAVE_EXPRs to compute to SSA vars.
10187 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
10189         PR target/85582
10190         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10191         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10192         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10193         clobber operands[2], instead use a new pseudo.  Formatting fixes.
10195 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
10197         PR tree-optimization/85586
10198         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10199         exit early for statements in the same group if the accesses are
10200         not strided.
10202 2018-05-02  Tom de Vries  <tom@codesourcery.com>
10204         PR lto/85451
10205         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10206         error message.
10208 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
10210         PR tree-optimization/85143
10211         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10213 2018-05-01  Tom de Vries  <tom@codesourcery.com>
10215         PR lto/85451
10216         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10217         not found" error message.
10219 2018-05-01  Tom de Vries  <tom@codesourcery.com>
10221         PR other/83786
10222         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10223         * vec.c (test_ordered_remove_if): New function.
10224         (vec_c_tests): Call test_ordered_remove_if.
10225         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10226         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10227         * tree-vect-patterns.c (vect_pattern_recog_1): Use
10228         VEC_ORDERED_REMOVE_IF.
10230 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10232         PR tree-optimization/82665
10233         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10234         pointer subtraction where arguments come from a memchr call.
10236 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
10238         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10239         --push-state --as-needed and --pop-state instead of --as-needed and
10240         --no-as-needed if ld supports it.
10241         * configure: Regenerated.
10243         PR web/85578
10244         * doc/install.texi2html: Replace _002d with - and _002a with * in
10245         generated html files using sed.
10247 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10249         PR c++/85523
10250         * gcc-rich-location.c (blank_line_before_p): New function.
10251         (use_new_line): New function.
10252         (gcc_rich_location::add_fixit_insert_formatted): New function.
10253         * gcc-rich-location.h
10254         (gcc_rich_location::add_fixit_insert_formatted): New function.
10256 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10258         * selftest.c (assert_streq): Rename "expected" and "actual" to
10259         "val1" and "val2".  Extend NULL-handling to cover both inputs
10260         symmetrically, while still requiring both to be non-NULL for a pass.
10261         * selftest.h (assert_streq): Rename "expected" and "actual" to
10262         "val1" and "val2".
10263         (ASSERT_EQ): Likewise.
10264         (ASSERT_EQ_AT): Likewise.
10265         (ASSERT_KNOWN_EQ): Likewise.
10266         (ASSERT_KNOWN_EQ_AT): Likewise.
10267         (ASSERT_NE): Likewise.
10268         (ASSERT_MAYBE_NE): Likewise.
10269         (ASSERT_MAYBE_NE_AT): Likewise.
10270         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
10271         the assertion to pass.
10272         (ASSERT_STREQ_AT): Likewise.
10274 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
10276         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10277         interaction with -pie.
10279 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10281         * selftest.h: Fix alphabetization of per-source-file selftest
10282         declarations.
10284 2018-04-30  Jason Merrill  <jason@redhat.com>
10286         PR c++/61982 - dead stores to destroyed objects.
10287         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10288         of clobber.
10290 2018-04-30  Jason Merrill  <jason@redhat.com>
10292         * tree.c (build_clobber): New.
10293         * tree.h: Declare it.
10294         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10296 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10298         * diagnostic-show-locus.c (layout::layout): Update for
10299         location_get_source_line returning a char_span.
10300         (struct char_span): Move to input.h.
10301         (struct correction): Update for fields in char_span becoming
10302         private.
10303         (struct source_line): Update for location_get_source_line
10304         returning a char_span.
10305         (layout::print_line): Likewise.
10306         * edit-context.c (edited_file::print_content): Likewise.
10307         (edited_file::print_diff_hunk): Likewise.
10308         (edited_file::print_run_of_changed_lines): Likewise.
10309         (edited_file::get_num_lines): Likewise.
10310         (edited_line::edited_line): Likewise.
10311         * final.c (asm_show_source): Likewise.
10312         * input.c (location_get_source_line): Convert return type
10313         from const char * to char_span, losing the final "line_len"
10314         param.
10315         (dump_location_info): Update for the above.
10316         (get_substring_ranges_for_loc): Likewise.  Use a char_span
10317         when handling the literal within the line.
10318         (test_reading_source_line): Update for location_get_source_line
10319         returning a char_span.
10320         * input.h (class char_span): Move here from
10321         diagnostic-show-locus.c, converting from a struct to a class.
10322         Make data members private.
10323         (char_span::operator bool): New.
10324         (char_span::length): New.
10325         (char_span::get_buffer): New.
10326         (char_span::operator[]): New.
10327         (char_span::subspan): Make const.
10328         (char_span::xstrdup): New.
10329         (location_get_source_line): Convert return type from const char *
10330         to char_span, losing the final "line_size" param.
10332 2018-04-30  Jan Hubicka  <jh@suse.cz>
10334         * lto-wrapper.c (ltrans_priorities): New static var.
10335         (cmp_priority): New.
10336         (run_gcc): Read priorities and if doing parallel build order
10337         the Makefile by them.
10339 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
10341         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10343 2018-04-30  Richard Biener  <rguenther@suse.de>
10345         * tree-cfg.c (verify_address): Remove base argument, add
10346         flag whether to check TREE_ADDRESSABLE and do that.
10347         (verify_expr): Remove.
10348         (verify_types_in_gimple_reference): Add pieces from verify_expr.
10349         (verify_gimple_assign_single): Likewise.
10350         (verify_gimple_switch): Likewise.
10351         (verify_expr_location_1): Dereference tp once.  Add (disabled)
10352         piece from verify_expr.
10353         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10355 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
10357         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10359 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
10361         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10362         (small_data_pattern): Likewise.
10363         (arc_rewrite_small_data): Likewise.
10364         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10365         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10366         (get_symbol_alignment): New function.
10367         (legitimate_small_data_address_p): Likewise.
10368         (legitimate_scaled_address): Update, call
10369         legitimate_small_data_address_p.
10370         (output_sdata): New static variable.
10371         (arc_print_operand): Update how we handle small data operands.
10372         (arc_print_operand_address): Likewise.
10373         (arc_legitimate_address_p): Update, use
10374         legitimate_small_data_address_p.
10375         (arc_rewrite_small_data_p): Remove.
10376         (arc_rewrite_small_data_1): Likewise.
10377         (arc_rewrite_small_data): Likewise.
10378         (small_data_pattern): Likewise.
10379         (compact_sda_memory_operand): Update to use
10380         legitimate_small_data_address_p and get_symbol_alignment.
10381         (prepare_move_operands): Don't rewite sdata pattern.
10382         (prepare_extend_operands): Remove.
10383         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10384         pattern.
10385         (zero_extendqisi2): Likewise.
10386         (zero_extendhisi2): Likewise.
10387         (extendqihi2): Likewise.
10388         (extendqisi2): Likewise.
10389         (extendhisi2): Likewise.
10390         (addsi3): Likewise.
10391         (subsi3): Likewise.
10392         (andsi3): Likewise.
10393         * config/arc/constraints.md (Usd): Change it to memory constraint.
10395 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
10397         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10398         as source of std instructions.
10399         * config/arc/arc.md (movsi_insn): Update pattern predicate to
10400         allow 6-bit constants as source for store instructions.
10401         (movdi_insn): Update instruction pattern to allow 6-bit constants
10402         as source for store instructions.
10404 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
10406         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10408 2018-04-30  Nathan Sidwell  <nathan@acm.org>
10409             Sandra Loosemore <sandra@codesourcery.com>
10411         * dumpfile.c (dump_open): Allow '-' for stdout.
10412         * doc/invoke.texi (Developer Options): Document dump filename
10413         determination early.  Document stdin/stdout selection.
10415 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
10417         Microblaze Target: PIC data text relative
10419         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10420         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10421         Add declaration.
10422         * config/microblaze/microblaze.h (microblaze_constant_address_p):
10423         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10424         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10425         New addressing mode for data-text relative position indepenedent code.
10426         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10427         'ADDRESS_SYMBOLIC_TXT_REL'.
10428         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10429         (microblaze_legitimate_pic_operand): Exclude function calls from
10430         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10431         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10432         addresses cases.
10433         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10434         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10435         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10436         for 'address + offset'.
10437         (microblaze_expand_prologue): Add new function prologue call for
10438         'r20' assignation.
10439         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10440         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10441         table in case of TARGET_PIC_DATA_TEXT_REL.
10442         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10443         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10444         Add new macros 'UNSPEC_TEXT',
10445         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10446         + exclude function calls from 'UNSPEC_PLT' in case of data text
10447         relative mode.
10448         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10449         new target hook for generating address diff vector tables in case of
10450         flag_pic.
10451         * doc/tm.texi : Regenerate.
10452         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10453         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10454         of addr diff vector generation.
10455         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10456         target hook definition.
10457         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10458         Add default function for generate_pic_addr_diff_vec -> flag_pic.
10459         * doc/invoke.texi (Add new pic option): Add new microblaze pic
10460         option for data text relative.
10462 2018-04-30  Richard Biener  <rguenther@suse.de>
10464         * tree-chrec.h (evolution_function_is_constant_p): Remove
10465         redundant check.
10466         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10468 2018-04-30  Richard Biener  <rguenther@suse.de>
10470         PR bootstrap/85571
10471         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10473 2018-04-30  Richard Biener  <rguenther@suse.de>
10475         PR tree-optimization/28364
10476         PR tree-optimization/85275
10477         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10478         copying first exit test.
10480 2018-04-28  Mark Wielaard  <mark@klomp.org>
10482         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10483         dwarf_version >= 5.
10484         (dwarf_AT): Handle DW_AT_addr_base.
10485         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10487 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
10489         PR target/84431
10490         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10491         (*ashl<dwi>3_doubleword_mask_1): Ditto.
10492         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10493         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10495 2018-04-28  Richard Biener  <rguenther@suse.de>
10497         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10498         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10499         to reflect use.  Only add interesting stmts.
10501 2018-04-27  Martin Jambor  <mjambor@suse.cz>
10503         PR ipa/85549
10504         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10505         the jump function allows for passing through aggregate values.
10507 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
10509         * input.h (in_system_header_at): Convert from macro to inline
10510         function.
10511         (from_macro_expansion_at): Likewise.
10512         (from_macro_definition_at): Likewise.
10514 2018-04-27  Jeff Law  <law@redhat.com>
10516         * config.gcc: Mark tile* targets as deprecated/obsolete.
10518 2018-04-27  Richard Biener  <rguenther@suse.de>
10520         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10521         fix for ILP32.
10523 2018-04-27  Richard Biener  <rguenther@suse.de>
10525         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10527 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
10529         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10530         with Yd constraint. Set "preferred_for_speed" attribute from
10531         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10532         with Yd constraint.
10533         (*movdi_internal): Ditto.
10534         (movti_interunit splitters): Remove
10535         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10536         (movdi_interunit splitters): Ditto.
10537         * config/i386/constraints.md (Ye): Remove.
10538         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10540 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10542         PR target/85512
10543         * config/aarch64/constraints.md (Usg): Limit to 31.
10544         (Usj): Limit to 63.
10546 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
10548         PR tree-optimization/85529
10549         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10550         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10551         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10552         zero extension or masking of the MSB bit.
10553         (optimize_range_tests): Add FIRST_BB argument, pass it through
10554         to optimize_range_tests_var_bound.
10555         (maybe_optimize_range_tests, reassociate_bb): Adjust
10556         optimize_range_tests callers.
10558 2018-04-26  Richard Biener  <rguenther@suse.de>
10559             Jakub Jelinek  <jakub@redhat.com>
10561         * cgraph.h (symbol_table): Just declare debug method here.
10562         * symtab.c (symbol_table::debug): Define.
10564 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
10566         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10568 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
10570         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10571         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10572         (*movdi_internal): Substitute Yi and Yj constraint with x
10573         and Ym and Yn constraint with y constraint.  Update "isa"
10574         attribute and set "preferred_for_speed" attribute from
10575         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10576         (*movsi_internal): Ditto.
10577         (*movdf_internal): Ditto.
10578         (*movsf_internal): Ditto.
10579         (*zero_extendsidi2): Ditto.
10580         * config/i386/sse.md (vec_set<mode>_0): Ditto.
10581         (sse2_loadld): Ditto.
10582         (*vec_extract<ssevecmodelower>_0): Ditto.
10583         (*vec_extractv4si_0_zext_sse4): Ditto.
10584         (vec_concatv2di): Ditto.
10585         (*vec_dup<mode>): Ditto.
10586         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10587         * config/i386/constraints.md (Yi): Remove.
10588         (Yj): Remove.
10589         (Ym): Remove.
10590         (Yn): Remove.
10592 2018-04-26  Nathan Sidwell  <nathan@acm.org>
10594         * dumpfile.c (dump_open): New.
10595         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10596         (dump_finish): Detect stdio/stderr by value not name.
10598 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
10600         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10602 2018-04-26  Tom de Vries  <tom@codesourcery.com>
10604         PR target/84952
10605         * config/nvptx/nvptx.c (verify_neutering_jumps)
10606         (verify_neutering_labels): New function
10607         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10609 2018-04-26  Tom de Vries  <tom@codesourcery.com>
10611         PR target/84025
10612         * config/nvptx/nvptx.c (needs_neutering_p): New function.
10613         (nvptx_single): Use needs_neutering_p to skip over insns that do not
10614         need neutering.
10616 2018-04-26  Richard Biener <rguenther@suse.de>
10617             Tom de Vries  <tom@codesourcery.com>
10619         PR lto/85422
10620         * lto-streamer-out.c (output_function): Fixup loops if required to match
10621         discovery done in the reader.
10623 2018-04-26  Richard Biener  <rguenther@suse.de>
10625         PR tree-optimization/85116
10626         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10627         have a loop exit from the single latch predecessor.  Remove
10628         case of header with just condition.
10629         (ch_base::copy_headers): Exclude infinite loops from any
10630         processing.
10631         (pass_ch::execute): Record exits.
10633 2018-04-26  Richard Biener  <rguenther@suse.de>
10635         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10636         prologue cost vector and pass it to vect_get_load_cost.
10637         (vect_get_peeling_costs_all_drs): Likewise.
10638         (vect_peeling_hash_get_lowest_cost): Likewise.
10639         (vect_enhance_data_refs_alignment): Likewise.
10641 2018-04-26  Richard Biener  <rguenther@suse.de>
10643         PR middle-end/85450
10644         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10645         checking of integer<->pointer conversions.
10646         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10647         sign-/zero-extending pointer types.
10648         (expand_omp_for_static_chunk): Likewise.
10650 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
10651             Jean Lee  <xiaoyur347@gmail.com>
10653         * config/mips/mips.c (mips_asan_shadow_offset): New function.
10654         (TARGET_ASAN_SHADOW_OFFSET): Define.
10655         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10656         true for -fsanitize=address.
10658 2018-04-25  Mark Wielaard  <mark@klomp.org>
10660         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10661         shorter ones.
10663 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
10665         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10666         than "alu", remove explicit "memory" and "imm_disp" attributes.
10667         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10669         PR middle-end/85414
10670         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10671         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10672         gen_lowpart_no_emit.
10674 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
10676         PR target/85473
10677         * config/i386/i386.c (ix86_expand_builtin): Change memory
10678         operand to XI, extend p0 to Pmode.
10679         * config/i386/i386.md: Change unspec volatile and operand
10680         1 mode to XI, change operand 0 mode to P.
10682 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10684         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10685         GET_MODE_MASK before any checking.
10686         (nds32_can_use_bset_p): Likewise.
10687         (nds32_can_use_btgl_p): Likewise.
10689 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10691         * config/nds32/nds32-doubleword.md: New define_split pattern for
10692         illegal register number.
10694 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10696         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10698 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10700         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10702 2018-04-25  Richard Biener  <rguenther@suse.de>
10704         * lto-streamer.h (LTO_major_version): Bump to 8.
10706 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
10708         * BASE-VER: Set to 9.0.0.
10710 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
10712         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10713         in __abskf2 and __powikf2.
10715 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10717         PR target/85512
10718         * config/aarch64/constraints.md (Usg, Usj): New constraints.
10719         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10720         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10721         Use the above on operand 2.  Reindent.
10722         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10724 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
10726         PR target/85485
10727         * common/config/i386/i386-common.c (ix86_handle_option): Don't
10728         handle OPT_mcet.
10729         * config/i386/i386.opt (mcet): Removed.
10730         * doc/install.texi: Remove -mcet documentation.
10731         * doc/invoke.texi: Likewise.
10733 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
10735         PR target/85485
10736         * doc/install.texi: Remove -mcet from bootstrap-cet.
10738 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
10740         PR target/85511
10741         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10742         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10743         if TARGET_64BIT.
10745         PR target/85503
10746         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10747         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10748         containing a CONST_VECTOR.
10750 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
10752         * doc/install.texi: Update newlib dependency for nvptx.
10754 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
10756         PR target/85508
10757         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10758         instead of INTVAL when shifting x left.
10760 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
10762         PR tree-optimization/85478
10763         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10764         vect_grouped_store_supported for single element vectors.
10766 2018-04-24  Richard Biener  <rguenther@suse.de>
10768         PR target/85491
10769         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10770         load cost increase to the case of non-constant step.
10772 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
10774         PR target/84828
10775         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10776         destination if any_malformed_asm.
10778 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
10780         PR middle-end/85496
10781         * expr.c (store_field): In the bitfield case, if the value comes from
10782         a function call and is returned in registers by means of a PARALLEL,
10783         do not change the mode of the temporary unless BLKmode and VOIDmode.
10785 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
10787         PR rtl-optimization/85423
10788         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10789         dependencies to debug insns when the previous insn is non-debug.
10791 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
10793         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10794         enums into a single definition.
10795         (fls): Fix predicates and printing.
10796         (seti): Likewise.
10798 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
10800         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10801         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10802         and short u6 immediate.
10803         (check_if_valid_sleep_operand): Remove.
10804         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10806 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10808         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10809         flag_always_save_lp condition.
10810         * config/nds32/nds32.opt (malways-save-lp): New option.
10812 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10814         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10815         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10816         * config/nds32/nds32.h
10817         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10818         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10820 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10822         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10823         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10825 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10826             Chung-Ju Wu  <jasonwucj@gmail.com>
10828         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10829         Declare.
10830         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10831         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10833 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10835         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10837 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10839         * config/nds32/nds32-protos.h (nds32_data_alignment,
10840         nds32_local_alignment): Declare.
10841         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10842         nds32_local_alignment): New functions.
10843         (TARGET_CONSTANT_ALIGNMENT): Define.
10844         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10846 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10848         * config/nds32/nds32.c
10849         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10850         (TARGET_MODES_TIEABLE_P): Likewise.
10852 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10854         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10855         level Ofast and Og.
10857 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
10858             Chung-Ju Wu  <jasonwucj@gmail.com>
10860         * config/nds32/constants.md (unspec_volatile_element): Add enum values
10861         for unaligned access.
10862         * config/nds32/nds32-intrinsic.c: Implementation of expanding
10863         unaligned access.
10864         * config/nds32/nds32-intrinsic.md: Likewise.
10865         * config/nds32/nds32_intrinsic.h: Likewise.
10866         * config/nds32/nds32.h (nds32_builtins): Likewise.
10867         * config/nds32/nds32.opt (munaligned-access): New option.
10868         * config/nds32/nds32.c (nds32_asm_file_start): Display
10869         flag_unaligned_access status.
10871 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
10873         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10874         -mno-relax is present.
10875         * config/riscv/linux.h (LINK_SPEC): Ditto.
10877 2018-04-20  Martin Sebor  <msebor@redhat.com>
10879         PR c/85365
10880         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10881         for null pointers.
10882         (gimple_fold_builtin_stxcpy_chk): Same.
10883         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10885 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
10887         PR target/85456
10888         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10889         __powikf2 when long double is IEEE 128-bit.
10891 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
10893         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10894         step to make sure stack always aligned.
10896 2018-04-20  Carl Love  <cel@us.ibm.com>
10898         PR target/83402
10899         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10900         size check for arg0.
10902 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
10903             Tom de Vries  <tom@codesourcery.com>
10905         PR target/85445
10906         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10907         Emit insns for calls too.
10908         (nvptx_find_par): Always look for worker-level predecessor insn.
10909         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
10910         calls.
10911         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10912         (nvptx_process_pars): Propagate frames for calls.
10914 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
10916         PR target/85469
10917         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10918         Removed.
10919         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10920         (ix86_handle_option): Don't handle OPT_mibt.
10921         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10922         __SHSTK__.
10923         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10924         has_ibt and ibt.
10925         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10926         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10927         (ix86_target_macros): Define __CET__ with flag_cf_protection
10928         for -fcf-protection.
10929         * config/i386/i386.c (isa2_opts): Remove -mibt.
10930         * config/i386/i386.h (TARGET_IBT): Removed.
10931         (TARGET_IBT_P): Likewise.
10932         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10933         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10934         * config/i386/i386.opt (mcet): Update help message.
10935         (mshstk): Likewise.
10936         (mibt): Removed.
10937         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
10938         -mcet as an alias for -mshstk.
10940 2018-04-20  Richard Biener <rguenther@suse.de>
10942         PR middle-end/85475
10943         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10944         complexity by forcing a single use of the multiply operand.
10946 2018-04-20  Martin Jambor  <mjambor@suse.cz>
10948         ipa/85449
10949         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10950         recursion dependency to only apply to non-clones.
10952 2018-04-20  Martin Jambor  <mjambor@suse.cz>
10954         ipa/85447
10955         * ipa-cp.c (create_specialized_node): Check that clones of
10956         self-recursive edges exist during IPA-CP.
10958 2018-04-19  Toon Moene  <toon@moene.org>
10960         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10961         by -O3.
10963 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
10965         PR tree-optimization/85467
10966         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10967         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
10968         VECTOR_CST element to type.
10970 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10972         PR target/85397
10973         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10974         * config/i386/i386.md (builtin_setjmp_setup): Removed.
10975         (builtin_longjmp): Likewise.
10976         (save_stack_nonlocal): New pattern.
10977         (restore_stack_nonlocal): Likewise.
10979 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10981         PR target/85404
10982         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10983         Replace ASM_OUTPUT_LABEL with fprintf.
10985 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10987         PR target/85417
10988         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10989         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10990         * config/i386/i386-c.c (ix86_target_macros_internal): Also
10991         define __IBT__ and __SHSTK__ for -fcf-protection.
10992         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10993         TARGET_IBT.
10994         (ix86_trampoline_init): Likewise.
10995         (x86_output_mi_thunk): Likewise.
10996         (ix86_notrack_prefixed_insn_p): Likewise.
10997         (ix86_option_override_internal): Don't disallow -fcf-protection.
10998         * config/i386/i386.md (rdssp<mode>): Also enable for
10999         -fcf-protection.
11000         (incssp<mode>): Likewise.
11001         (nop_endbr): Likewise.
11002         * config/i386/i386.opt (mcet): Change help message to built-in
11003         functions only.
11004         (mibt): Likewise.
11005         (mshstk): Likewise.
11006         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11007         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
11008         enable CET built-in functions.
11010 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
11012         * common/config/i386/i386-common.c
11013         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11014         OPTION_MASK_ISA_MOVDIRI_UNSET,
11015         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11016         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11017         * config.gcc (movdirintrin.h): New header.
11018         * config/i386/cpuid.h (bit_MOVDIRI,
11019         bit_MOVDIR64B): New bits.
11020         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11021         and -mmvodir64b.
11022         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11023         (VOID, PVOID, PCVOID)): New function types.
11024         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11025         __builtin_ia32_directstoreu_u64,
11026         __builtin_ia32_movdir64b): New builtins.
11027         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11028         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11029         and -mmovdiri.
11030         (ix86_valid_target_attribute_inner_p): Ditto.
11031         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11032         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11033         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11034         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11035         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11036         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11037         (movdiri<mode>, movdir64b_<mode>): New.
11038         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11039         * config/i386/immintrin.h: Include movdirintrin.h.
11040         * config/i386/movdirintrin.h: New file.
11041         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11043 2018-04-19  Richard Biener  <rguenther@suse.de>
11045         PR middle-end/85455
11046         * cfg.c (clear_bb_flags): When loop state says we have
11047         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11049 2018-04-19  Richard Biener  <rguenther@suse.de>
11051         PR tree-optimization/84737
11052         * tree-vect-data-refs.c (vect_copy_ref_info): New function
11053         copying restrict info.
11054         (vect_setup_realignment): Use it.
11055         * tree-vectorizer.h (vect_copy_ref_info): Declare.
11056         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11057         the first DR to all generated stores.
11058         (vectorizable_load): Likewise for loads.
11060 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
11062         PR tree-optimization/85446
11063         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11064         the integral and pointer types to have the same precision.
11066         * doc/install.texi: Document --disable-cet being the default and
11067         --enable-cet=auto.
11069 2018-04-18  Martin Liska  <mliska@suse.cz>
11071         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11072         style.
11074 2018-04-18  Martin Liska  <mliska@suse.cz>
11076         Revert
11077         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
11079         PR ipa/83983
11080         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11081         arguments if they are comparable.
11083 2018-04-18  Martin Liska  <mliska@suse.cz>
11085         Revert
11086         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
11088         PR lto/84805
11089         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11090         incomplete types.
11092 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
11094         PR target/85388
11095         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11096         ENDBR after calling __morestack.
11098 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
11100         PR jit/85384
11101         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11102         by using gcc_base_ver to generate a gcc_driver_version, and use
11103         it when generating GCC_DRIVER_NAME.
11104         * configure: Regenerate.
11106 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
11108         PR target/81084
11109         * config.gcc: Obsolete powerpc*-*-*spe*.
11111 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11113         PR debug/84637
11114         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11115         (stabstr_D): Change type of unum from unsigned int to
11116         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
11117         type.
11119 2018-04-17  Jim Wilson  <jimw@sifive.com>
11121         PR 84856
11122         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11123         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11124         Set arg_pointer_offset after using pretend_args_size.
11126 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11128         PR rtl-optimization/85431
11129         * dse.c (record_store): Ignore zero width stores.
11131         PR sanitizer/85230
11132         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
11133         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11134         __builtin_stack_restore rather than after it.
11135         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11136         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11137         argument instead of virtual_dynamic_stack_rtx.
11139 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11141         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11142         New prototype.
11143         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11144         Add note to error message to explain internal mapping of overloaded
11145         built-in function name to non-overloaded built-in function name.
11146         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11147         function.
11149 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
11151         PR target/85424
11152         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11153         where the inputs overlap with the output.
11155 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11157         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11158         (=v, v) alternative and explicit "memory" attribute.
11159         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
11160         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11161         attributes.
11162         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11163         "sselog1" type instead of "sselog".
11164         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11165         "sselog".  Remove explicit "memory" attribute.
11166         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11167         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11168         attributes.
11169         (vec_extract_hi_v32hi): Merge all alternatives into one, use
11170         "sselog1" type instead of "sselog".  Remove explicit "memory"
11171         attribute.
11172         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11173         use "sselog1" type instead of "sselog".  Remove explicit "memory"
11174         attribute.
11175         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11176         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11177         attributes.
11178         (vec_extract_hi_v64qi): Merge all alternatives into one, use
11179         "sselog1" type instead of "sselog".  Remove explicit "memory"
11180         attribute.
11181         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11182         use "sselog1" type instead of "sselog".  Remove explicit "memory"
11183         attribute.
11185         PR target/85430
11186         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11188         PR middle-end/85414
11189         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11190         on a SUBREG.
11192 2018-04-17  Martin Jambor  <mjambor@suse.cz>
11194         PR ipa/85421
11195         * ipa-cp.c (create_specialized_node): Call
11196         expand_all_artificial_thunks if necessary.
11198 2018-04-17  Martin Liska  <mliska@suse.cz>
11200         PR lto/85405
11201         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11202         in message, remote space in between '_G' and '('.
11204 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
11206         PR target/85281
11207         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11208         avx512f_vmcmp<mode>3<round_saeonly_name>,
11209         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11210         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11211         avx512f_rndscale<mode><round_saeonly_name>,
11212         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11213         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11214         Use %<iptr>2 instead of %2 for -masm=intel.
11215         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11216         avx512f_vcvttss2usi<round_saeonly_name>,
11217         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11218         -masm=intel.
11219         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11220         avx512f_vcvttsd2usi<round_saeonly_name>,
11221         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11222         Use %q1 instead of %1 for -masm=intel.
11223         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11224         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11225         of %3 for -masm=intel.
11226         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11227         -masm=intel.
11228         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11229         -masm=intel.
11230         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11231         -masm=intel.
11232         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11233         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11234         %g1.
11235         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11236         -masm=intel.
11237         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11238         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11239         %g1 and one with %0 and %1.
11240         (avx512er_vmrcp28<mode><round_saeonly_name>,
11241         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11242         %1 for -masm=intel.
11243         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11244         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11245         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11246         of %0 and %{%4%} for -masm=intel.
11247         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11248         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11249         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11250         order of %0 and %{%5%}%{z%} for -masm=intel.
11252 2018-04-17  Jan Hubicka  <jh@suse.cz>
11254         PR lto/85405
11255         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11257 2018-04-17  Martin Liska  <mliska@suse.cz>
11259         PR ipa/85329
11260         * multiple_target.c (create_dispatcher_calls): Set apostrophes
11261         for target_clone error message.  Make default implementation
11262         clone to be a local declaration.
11263         (separate_attrs): Add new argument and check for an empty
11264         string.
11265         (expand_target_clones): Handle it.
11266         (ipa_target_clone): Make redirection just for target_clones
11267         functions.
11269 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
11270             Tom de Vries  <tom@codesourcery.com>
11272         PR middle-end/84955
11273         * omp-expand.c (expand_oacc_for): Add dummy false branch for
11274         tiled basic blocks without omp continue statements.
11276 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
11278         PR target/83660
11279         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11280         vec_extract expression as having side effects to make sure it gets
11281         a cleanup point.
11283 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
11285         PR target/85403
11286         * config/i386/i386.c (get_builtin_code_for_version): Check
11287         error_mark_node.
11289 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
11291         PR target/84331
11292         * config.gcc: Support "skylake".
11293         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11294         PROCESSOR_SKYLAKE.
11295         * config/i386/i386.c (m_SKYLAKE): Define.
11296         (processor_target_table): Add "skylake".
11297         (ix86_option_override_internal): Add "skylake".
11298         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11299         PROCESSOR_CANNONLAKE.
11300         (get_builtin_code_for_version): Fix priority for
11301         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11302         PROCESSOR_SKYLAKE-AVX512.
11303         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11304         (processor_type): Add PROCESSOR_SKYLAKE.
11306 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
11307             Jason Merrill  <jason@redhat.com>
11309         PR c++/85112
11310         * convert.c (convert_to_integer_1): Use direct recursion for
11311         enumeral types and types with a precision less than the number
11312         of bits in their mode.
11314 2018-04-16  Julia Koval  <julia.koval@intel.com>
11316         PR target/84413
11317         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11318         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11320 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
11322         PR target/85293
11323         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11324         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11325         and -mno-direct-move.
11327 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
11329         PR target/83402
11330         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11331         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11332         Ensure negative shifts result in {0}.
11334 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
11336         PR rtl-optimization/79916
11337         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11338         regs (if any) to define how to gnerate SD moves when LRA is in
11339         progress.
11341 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
11343         PR rtl-optimization/85393
11344         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11345         * except.c (expand_dw2_landing_pad_for_region): Make static.
11346         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11347         a label and unconditional jump to old_bb, rather than
11348         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11349         basic block.
11351         PR rtl-optimization/85376
11352         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11353         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11354         instead of a specific value.
11356 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
11357             Bin Cheng  <bin.cheng@arm.com>
11359         PR tree-optimization/82965
11360         PR tree-optimization/83991
11361         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11362         by_profile_only parameter.
11363         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11364         information if the loop was predicted to iterate too many times.
11365         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11367 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
11369         PR lto/71991
11370         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11371         always inline.
11373 2018-04-13  Martin Liska  <mliska@suse.cz>
11374             Jakub Jelinek  <jakub@redhat.com>
11376         PR middle-end/81657
11377         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11378         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11379         * builtins.c (expand_builtin_memory_copy_args): Use
11380         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11381         handle dest_addr == pc_rtx.
11383 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
11385         PR target/85291
11386         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11387         asked to not generate direct moves.
11388         (fix_trunc<mode>si2_stfiwx): Similar.
11389         (fix_trunc<mode>si2_internal): Similar.
11391 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
11393         PR debug/83157
11394         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11395         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11396         lookup if dest in some wider mode is known to be const0_rtx and
11397         if so, record permanent equivalence for it to be ZERO_EXTEND of
11398         the narrower mode destination.
11400 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
11402         * lto-streamer-out.c (output_function): Revert 259346.
11403         * omp-expand.c (expand_oacc_for): Likewise.
11405 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
11407         PR rtl-optimization/85354
11408         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11409         * sel-sched.c (sel_global_init): ... here.
11411 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
11413         PR target/85238
11414         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11415         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11416         mode for PE-COFF targets.
11417         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11418         (i386_pe_asm_lto_end): Likewise.
11419         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11420         (TARGET_ASM_LTO_END): Likewise.
11421         * config/i386/winnt.c (saved_debug_info_level): New static variable.
11422         (i386_pe_asm_lto_start): New function.
11423         (i386_pe_asm_lto_end): Likewise.
11425 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
11426             Richard Biener  <rguenther@suse.de>
11428         PR middle-end/84955
11429         * lto-streamer-out.c (output_function): Fix CFG loop state before
11430         streaming out.
11431         * omp-expand.c (expand_oacc_for): Handle calls to internal
11432         functions like regular functions.
11434 2018-04-12  Richard Biener  <rguenther@suse.de>
11436         PR lto/85371
11437         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11438         for the early LTO debug to properly generate references to it
11439         during DIE emission.  Do not re-use that for the skeleton for
11440         split-dwarf.
11441         (dwarf2out_early_finish): Likewise.
11443 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
11445         PR target/85328
11446         * config/i386/sse.md
11447         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11448         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11449         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11450         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11451         and output is a reg, avoid creating invalid lowpart subreg, but
11452         instead split into a 512-bit move.  Don't split if not AVX512VL,
11453         input is xmm16+ reg and output is a mem.
11454         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11455         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11456         xmm16+ reg and output is a mem.
11458 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11460         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11461         also for flag_dwarf2_cfi_asm.
11463 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
11465         PR rtl-optimization/85342
11466         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11467         a bool scalar var inside of the loop instead.  Don't try to update
11468         recog_data.operand after failed apply_change_group.
11470 2018-04-12  Tom de Vries  <tom@codesourcery.com>
11472         PR target/85296
11473         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11474         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
11475         array with flexible array member as array without given dimension.
11476         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11477         argument for undefined param to true.
11479 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
11481         PR target/85321
11482         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11483         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11484         from PowerPC section.
11485         * config/rs6000/sysv4.opt (mcall-): Improve help text.
11486         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11487         help text that is too long.
11488         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11489         help text that is too long.
11490         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11491         help text that is too long.
11493 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
11495         * config/alpha/alpha.md (stack_probe_internal): Rename
11496         from "probe_stack".  Update all callers.
11498 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
11500         PR rtl-optimization/84566
11501         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11502         sched_macro_fuse_insns.
11504 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
11506         PR target/84301
11507         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11508         (compute_block_dependences): ... from here.
11510 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
11512         PR tree-optimization/85331
11513         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11514         from int to HOST_WIDE_INT.
11516 2018-04-11  Martin Jambor  <mjambor@suse.cz>
11518         PR ipa/84149
11519         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11520         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11521         not the same as the source val.
11522         (cgraph_edge_brings_value_p): New parameter.
11523         (gather_edges_for_value): Pass destination value to
11524         cgraph_edge_brings_value_p.
11525         (perhaps_add_new_callers): Likewise.
11526         (get_info_about_necessary_edges): Likewise and exclude values brought
11527         only by self-recursive edges.
11528         (create_specialized_node): Redirect only clones of self-calling edges.
11529         (+self_recursive_pass_through_p): New function.
11530         (find_more_scalar_values_for_callers_subset): Use it.
11531         (find_aggregate_values_for_callers_subset): Likewise.
11532         (known_aggs_to_agg_replacement_list): Removed.
11533         (decide_whether_version_node): Re-calculate known constants for all
11534         remaining context clones.
11536 2018-04-11  Richard Biener  <rguenther@suse.de>
11538         PR lto/85339
11539         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11540         from early DWARF output.
11541         (dwarf2out_early_finish): Output line info unconditionally into
11542         early DWARF and add reference to it.
11544 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
11546         PR target/85281
11547         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11548         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11549         other than V2DFmode using iptr mode attribute.
11550         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11552 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
11554         PR rtl-optimization/84659
11555         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11557 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
11559         PR debug/85302
11560         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11561         SIZEP is NULL.
11562         (output_loc_list): Pass address of a dummy size variable even in the
11563         locview handling loop.
11564         (index_location_lists): Add comment on why skip_loc_list_entry can't
11565         call size_of_locs.
11567 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11569         PR target/85261
11570         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11571         into register.
11573 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
11575         PR target/85321
11576         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11577         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11578         and -mstring-compare-inline-limit.
11580 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
11582         PR target/85287
11583         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11584         for stack clash protection in a register whenever we need it to be in
11585         a register.
11587 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
11589         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11590         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11592 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
11594         PR target/85321
11595         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11596         the help text.
11597         (mlong-double-): Ditto.
11598         * config/rs6000/sysv4.opt (msdata=): Ditto.
11599         (mtls-size=): Ditto.
11601 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11603         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11604         erroneous entries for
11605         "vector int vec_ldl (int, long int *)", and
11606         "vector unsigned int vec_ldl (int, unsigned long int *)".
11607         Add comments and entries for
11608         "vector bool char vec_ldl (int, bool char *)",
11609         "vector bool short vec_ldl (int, bool short *)",
11610         "vector bool int vec_ldl (int, bool int *)",
11611         "vector bool long long vec_ldl (int, bool long long *)",
11612         "vector pixel vec_ldl (int, pixel *)",
11613         "vector long long vec_ldl (int, long long *)",
11614         "vector unsigned long long vec_ldl (int, unsigned long long *)".
11615         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11616         type tree bool_long_long_type_node and correct definition of
11617         bool_V2DI_type_node to make reference to this new type tree.
11618         (rs6000_mangle_type): Replace erroneous reference to
11619         bool_long_type_node with bool_long_long_type_node.
11620         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11621         comments to emphasize sign distinctions for char and int types and
11622         replace RS6000_BTI_bool_long constant with
11623         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
11624         use of RS6000_BTI_pixel.
11625         (bool_long_type_node): Remove this macro definition.
11626         (bool_long_long_type_node): New macro definition
11628 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
11630         PR rtl-optimization/85300
11631         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11632         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11633         simplify_unary_operation fails.
11635 2018-04-10  Martin Liska  <mliska@suse.cz>
11637         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11638         cgraph_edge and ipa_ref.
11640 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
11642         PR target/85177
11643         PR target/85255
11644         * config/i386/sse.md
11645         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11646         computation of the VEC_MERGE selector from mask.
11647         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11648         Fix decoding of the VEC_MERGE selector into mask.
11650 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
11652         PR tree-optimization/85286
11653         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11655 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
11657         * final.c (final_1): Set insn_last_address as well as
11658         insn_current_address.
11660 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11662         PR target/85173
11663         * explow.c (emit_stack_probe): Call validize_mem on memory location
11664         before passing it to gen_probe_stack.  Create address operand and
11665         legitimize it for the probe_stack_address case.
11667 2018-04-09  Jan Hubicka  <jh@suse.cz>
11669         PR lto/85078
11670         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11671         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11672         * tree.c (free_lang_data_in_type): Fix handling of binfos;
11673         walk basetypes.
11674         (free_lang_data): Rebuild type inheritance graph.
11676 2018-04-09  Martin Sebor  <msebor@redhat.com>
11678         * invoke.texi (-finline-small-functions): Mention other optimization
11679         options.
11680         (-findirect-inlining, -fpartial-inlining): Same.
11681         (-finline-functions-called-once): Same.
11682         (-freorder-blocks-and-partition): Same.
11684 2018-04-09  Jan Hubicka  <jh@suse.cz>
11686         PR rtl/84058
11687         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11688         jumps; choose last target that matches the criteria (i.e.
11689         no partition changes for non-crossing jumps).
11690         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11691         support for redirecting crossing jumps to non-crossing.
11693 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
11695         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11696         also for naked functions.
11698 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
11700         * config/arc/arc.md (add_shift): New pattern.
11701         (add_shift2): Likewise.
11702         (sub_shift): Likewise.
11703         (sub_shift_cmp0_noout): Likewise.
11704         (compare_si_ashiftsi): Likewise.
11705         (xbfu_cmp0_noout): New combine pattern.
11706         (xbfu_cmp0"): Likewise.
11707         (movsi_set_cc_insn): Place the predicable variant first.
11708         (commutative_binary_cmp0_noout): Remove clobber.
11709         (commutative_binary_cmp0): New pattern.
11710         (noncommutative_binary_cmp0): Likewise.
11711         (noncommutative_binary_cmp0_noout): Likewise.
11712         (noncommutative_binary_comparison_result_used): Removed.
11713         (rsub_cmp0): New pattern.
11714         (rsub_cmp0_noout): Likewise.
11715         (extzvsi): Changed, keep only meaningful variants.
11716         (SQH, SEZ): New iterators.
11717         (SQH_postfix): New mode attribute.
11718         (SEZ_prefix): New code attribute.
11719         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11720         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11721         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11722         of numerical value.
11723         (noncommutative_operator): Check the availability of barrel
11724         shifter option.
11726 2018-04-09  Richard Biener  <rguenther@suse.de>
11728         PR tree-optimization/85284
11729         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11730         Only use the niter constraining form of simple_iv when the exit
11731         is always executed.
11733 2018-04-09  Tom de Vries  <tom@codesourcery.com>
11735         PR target/84041
11736         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11737         (define_expand "*memory_barrier"): New define_expand.
11738         (define_insn "memory_barrier"): New insn.
11740 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11742         PR rtl-optimization/80463
11743         PR rtl-optimization/83972
11744         PR rtl-optimization/83480
11746         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11747         correct producer for the insn.
11748         (tidy_control_flow): Fixup seqnos in case of debug insns.
11750 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11752         PR rtl-optimization/83913
11754         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11755         different sched-times when merging exprs.
11757 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11759         PR rtl-optimization/83962
11761         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11762         tidy_fallthru_edge and tidy_control_flow.
11764 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11766         PR rtl-optimization/83530
11768         * sel-sched.c (force_next_insn): New global variable.
11769         (remove_insn_for_debug): When force_next_insn is true, also leave only
11770         next insn in the ready list.
11771         (sel_sched_region): When the region wasn't scheduled, make another pass
11772         over it with force_next_insn set to 1.
11774 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
11776         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11777         into tm_file.
11778         * config/nds32/constants.md (unspec_volatile_element): Add enum values
11779         for interrupt control.
11780         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11781         functions for interrupt control.
11782         * config/nds32/nds32-intrinsic.md: Likewise.
11783         * config/nds32/nds32_intrinsic.h: Likewise.
11784         * config/nds32/nds32.h (nds32_builtins): Likewise.
11786 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
11788         * config/nds32/nds32.c (nds32_init_machine_status,
11789         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11790         strict_aligned_p field.
11791         (nds32_expand_to_rtl_hook): New function.
11792         (TARGET_EXPAND_TO_RTL_HOOK): Define.
11793         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11795 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11796             Chung-Ju Wu  <jasonwucj@gmail.com>
11798         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11799         * config/nds32/nds32-n7.md: New file.
11800         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11801         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11802         pipeline.
11803         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11804         * config/nds32/nds32.md (pipeline_model): Add n7.
11805         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11806         * config/nds32/pipelines.md: Include n7 settings.
11808 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11809             Chung-Ju Wu  <jasonwucj@gmail.com>
11811         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11812         * config/nds32/nds32-e8.md: New file.
11813         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11814         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11815         pipeline.
11816         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11817         * config/nds32/nds32.md (pipeline_model): Add e8.
11818         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11819         * config/nds32/pipelines.md: Include e8 settings.
11821 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11822             Chung-Ju Wu  <jasonwucj@gmail.com>
11824         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11825         * config/nds32/nds32-n8.md: New file.
11826         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11827         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11828         pipeline.
11829         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11830         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11831         * config/nds32/nds32.md (pipeline_model): Add n8.
11832         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11833         * config/nds32/pipelines.md: Include n8 settings.
11835 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11836             Chung-Ju Wu  <jasonwucj@gmail.com>
11838         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11839         * config/nds32/nds32-n9-2r1w.md: New file.
11840         * config/nds32/nds32-n9-3r2w.md: New file.
11841         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11842         nds32_register_ports): New or modify for cpu n9.
11843         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11844         pipeline.
11845         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11846         * config/nds32/nds32-utils.c: New file.
11847         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11848         TARGET_MUL_SLOW): Define.
11849         * config/nds32/nds32.md (pipeline_model): New attribute.
11850         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11851         New options that support cpu n9.
11852         * config/nds32/pipelines.md: Include n9 settings.
11853         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11855 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
11857         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11858         information if necessary.
11859         (output_cond_branch_compare_zero): Likewise.
11860         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11861         (nds32_target_alignment): Refine for alignment.
11862         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11863         (FUNCTION_BOUNDARY): Modify.
11864         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11865         align case.
11866         * config/nds32/nds32.opt (malways-align, malign-functions): New.
11868 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
11870         * config/nds32/constants.md (unspec_volatile_element): Add values for
11871         TLB operation and data prefetch.
11872         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11873         functions for TLB operation and data prefetch.
11874         * config/nds32/nds32-intrinsic.md: Likewise.
11875         * config/nds32/nds32_intrinsic.h: Likewise.
11876         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11877         (nds32_print_operand): Likewise.
11878         * config/nds32/nds32.h (nds32_builtins): Likewise.
11880 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
11881         Andrew Pinski <pinsika@gcc.gnu.org>
11883         PR middle-end/82976
11884         * match.pd: Use constant_boolean_node of correct type instead of
11885         boolean_true_node or boolean_false_node for simplifying
11886         pointer comparisons to zero.
11888 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
11890         PR tree-optimization/80021
11891         * tree.c (verify_type_variant): Make error call in verify_variant_match
11892         translatable and remove final full stop.
11894 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11896         * config/nds32/constants.md (unspec_volatile_element): Add
11897         UNSPEC_VOLATILE_EH_RETURN.
11898         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11899         nds32_output_stack_pop): Support dwarf exception handling process.
11900         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11901         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11902         exception handling process.
11903         (nds32_compute_stack_frame): Likewise.
11904         (nds32_return_addr_rtx): Likewise.
11905         (nds32_initial_elimination_offset): Likewise.
11906         (nds32_expand_prologue): Likewise.
11907         (nds32_expand_epilogue): Likewise.
11908         (nds32_dynamic_chain_address): New function.
11909         * config/nds32/nds32.h (machine_function): Add fields for dwarf
11910         exception handling.
11911         (DYNAMIC_CHAIN_ADDRESS): Define.
11912         (EH_RETURN_DATA_REGNO): Define.
11913         (EH_RETURN_STACKADJ_RTX): Define.
11914         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11915         patterns for dwarf exception handling.
11917 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11919         * config/nds32/nds32.h: Clean up obsolete macros.
11921 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11923         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11924         Add enum values for particular instructions.
11925         * config/nds32/nds32-intrinsic.c: Implementation of expanding
11926         particular intrinsic functions.
11927         * config/nds32/nds32-intrinsic.md: Likewise.
11928         * config/nds32/nds32_intrinsic.h: Likewise.
11929         * config/nds32/nds32.h (nds32_builtins): Likewise.
11930         * config/nds32/nds32.md (type): Add pbsad and pbsada.
11931         (btst, ave): New patterns for particular instructions.
11933 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11935         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11936         Add enum values for atomic load/store and memory sync.
11937         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11938         and memory sync.
11939         * config/nds32/nds32-intrinsic.md: Likewise.
11940         * config/nds32/nds32_intrinsic.h: Likewise.
11941         * config/nds32/nds32.h (nds32_builtins): Likewise.
11943 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
11945         PR tree-optimization/85257
11946         * fold-const.c (native_encode_vector): If not all elts could fit
11947         and off is -1, return 0 rather than offset.
11948         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11949         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11950         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
11951         adjust buffer in native_interpret_expr call.
11953 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11955         * config/nds32/constants.md (unspec_volatile_element): Add cache
11956         control enum values.
11957         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11958         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11959         * config/nds32/nds32.c (nds32_cctl_names): New.
11960         (nds32_print_operand): Handle cache control register names.
11961         * config/nds32/nds32.h (nds32_builtins): New enum values.
11962         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11963         macros.
11964         * config/nds32/nds32.md (type): Add mmu.
11965         * config/nds32/pipelines.md (simple_insn): Add mmu.
11967 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11969         * config/nds32/nds32.md (type): Remove call.
11970         * config/nds32/pipelines.md (simple_insn): Likewise.
11972 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11974         * config/nds32/constants.md (unspec_volatile_element): Add
11975         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11976         UNSPEC_VOLATILE_FMFCFG.
11977         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11978         description for fmfcfg and fmfcsr.
11979         (bdesc_1arg): Add fmtcsr.
11980         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11981         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11982         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11983         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11984         unspec_fmfcfg): New patterns.
11985         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11986         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11987         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11988         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11989         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11990         __nds32__fmfcfg): Define.
11992 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11994         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11995         intrinsic register names.
11996         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11997         intrinsic register enum values and macros.
11999 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
12001         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12002         for load/store addressing form.
12003         (nds32_print_operand_address): Likewise.
12005 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
12007         PR target/85196
12008         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12009         based on LABEL_REF.  Remove useless assertion.
12010         (pic_address_needs_scratch): Fix formatting.
12011         (sparc_legitimize_pic_address): Minor tweaks.
12012         (sparc_delegitimize_address): Adjust assertion accordingly.
12013         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12014         into symbolic_operand.
12015         (movsi_high_pic_label_ref): Likewise.
12016         (movsi_lo_sum_pic_label_ref): Likewise.
12017         (movdi_pic_label_ref): Likewise.
12018         (movdi_high_pic_label_ref): Likewise.
12019         (movdi_lo_sum_pic_label_ref): Likewise.
12021 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
12023         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12024         custom LIB_SPEC setup.
12026 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
12027             Kito Cheng  <kito.cheng@gmail.com>
12029         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12030         * config/riscv/freebsd.h: New.
12032 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12034         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12035         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12036         file.
12038 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12039             Kito Cheng  <kito.cheng@gmail.com>
12041         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12042         nds32_output_call, nds32_symbol_binds_local_p): New functions.
12043         * config/nds32/nds32-protos.h (nds32_output_call,
12044         nds32_output_return): Declare.
12045         * config/nds32/nds32.md: Refine all the call and return patterns.
12047 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
12049         PR debug/85252
12050         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12051         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12053         PR rtl-optimization/84872
12054         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12055         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12056         EDGE_CROSSING edge.
12058 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
12060         * expr.c (copy_blkmode_to_reg): Revert 254862.
12061         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12063 2018-04-06  Richard Biener  <rguenther@suse.de>
12065         PR middle-end/85244
12066         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12067         after seeing a component reference with an adjacent field.  Treat
12068         refs to arrays at struct end of external decls similar to
12069         refs to unconstrained commons.
12071 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
12073         PR sanitizer/85213
12074         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12075         look through SAVE_EXPRs with non-side-effects argument.  Adjust
12076         recursive calls.
12077         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12078         save_p here.
12080 2018-04-06  Richard Biener  <rguenther@suse.de>
12082         PR middle-end/85180
12083         * alias.c (find_base_term): New wrapper around find_base_term
12084         unwinding CSELIB_VAL_PTR changes.
12085         (find_base_term): Do not restore CSELIB_VAL_PTR during the
12086         recursion.
12088 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12090         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12091         instructions.
12092         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12093         constant definitions.
12094         ("nop"): lr 0,0 -> nopr r0
12095         ("nop_lr0", "nop_lr1"): New insn definitions.
12097 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
12099         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12100         NDS32_V3PUSH_AVAILABLE_P macro.
12102 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
12103             Chung-Ju Wu  <jasonwucj@gmail.com>
12105         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12106         (nds32*-*-*): Add float and fpu_config into supported_defaults.
12107         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12108         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12109         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12110         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12111         * config/nds32/constraints.md: New constraints and checking for hard
12112         float configuration.
12113         * config/nds32/iterators.md: New mode iterator and attribute for hard
12114         float configuration.
12115         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12116         patterns.
12117         * config/nds32/nds32-fpu.md: New file.
12118         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12119         deal with hard float code generation.
12120         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12121         ARCH_V3S.
12122         (abi_type, float_reg_number): New enum type.
12123         * config/nds32/nds32-predicates.c: New predicates for hard float.
12124         * config/nds32/nds32-protos.h: Declare functions for hard float.
12125         * config/nds32/nds32.c: Implementation for hard float configuration.
12126         * config/nds32/nds32.h: Definitions for hard float configuration.
12127         * config/nds32/nds32.md: Include hard float machine description and
12128         modify patterns for hard float configuration.
12129         * config/nds32/nds32.opt: New options for hard float configuration.
12130         * config/nds32/predicates.md: New predicates for hard float
12131         configuration.
12133 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
12135         * common/config/nds32/nds32-common.c
12136         (nds32_option_optimization_table): Enable -mreleax-hint by default.
12138 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
12140         PR middle-end/85195
12141         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12142         CONSTRUCTOR_ELT (ctor, ...)->value.
12144 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
12146         PR target/85193
12147         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12149 2018-04-05  Tom de Vries  <tom@codesourcery.com>
12151         PR target/85204
12152         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12153         cond jump.
12155 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
12156             Kito Cheng  <kito.cheng@gmail.com>
12158         * config/nds32/constraints.md (U33): Fine-tune checking condition.
12159         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12160         * config/nds32/nds32.h (nds32_16bit_address_type): Add
12161         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12163 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
12164             Kito Cheng  <kito.cheng@gmail.com>
12166         * config/nds32/constraints.md (Ufe): New memory constraint.
12167         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12168         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12169         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12170         operands.
12171         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12172         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12174 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12176         * config/nds32/nds32.md: Use optimize_size in the condition for
12177         alu-shift instructions.
12179 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12181         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12183 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12185         * config/nds32/nds32.md (negsi2): Refine pattern.
12187 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
12188             Chung-Ju Wu  <jasonwucj@gmail.com>
12190         * config/nds32/iterators.md (shift_rotate): New code iterator.
12191         (shift): New code attribute.
12192         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12193         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12194         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12195         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12196         bit-wise operations.
12197         (andsi3, *andsi3): Ditto.
12198         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12199         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12200         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12201         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12202         nds32_ior_operand, nds32_xor_operand): New predicates.
12204 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12206         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12207         (addsi3, subsi3): ... this.
12209 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12211         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12213 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12215         * config/nds32/nds32.md: Adjust indention.
12217 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
12219         * config/nds32/nds32.md (feature): New attribute.
12221 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
12223         * config/nds32/nds32.md (subtype): New attribute.
12225 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12227         PR target/85203
12228         * config/arm/arm-builtins.c (arm_expand_builtin): Change
12229         expansion to perform a bitwise AND of the argument followed by a
12230         boolean negation of the result.
12232 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
12234         PR rtl-optimization/84878
12235         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12236         the basic block.  Assert the use reference is not artificial and that
12237         it has an associated insn.
12239 2018-04-04  Michael Matz  <matz@suse.de>
12241         * builtins.c (compute_objsize): Pass correct operand
12242         to array_at_struct_end_p.
12244 2018-04-04  Richard Biener  <rguenther@suse.de>
12246         PR lto/85176
12247         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12248         from contexts for DINFO_LEVEL_TERSE and below.
12250 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
12252         * config/nds32/nds32-doubleword.md (move_<mode>): Require
12253         resiter_operand condition.
12254         * config/nds32/nds32.md (*move<mode>): Ditto.
12256 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
12257             Monk Chiang  <sh.chiang04@gmail.com>
12259         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12261 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12263         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12265 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12266             Kito Cheng  <kito.cheng@gmail.com>
12268         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12269         nds32_cond_code_str, output_cond_branch,
12270         output_cond_branch_compare_zero, nds32_expand_cbranch,
12271         nds32_expand_cstore, nds32_expand_movcc,
12272         nds32_output_cbranchsi4_equality_zero,
12273         nds32_output_cbranchsi4_equality_reg,
12274         nds32_output_cbranchsi4_equality_reg_or_const_int,
12275         nds32_output_cbranchsi4_greater_less_zero: New functions.
12276         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12277         nds32_expand_cstore, nds32_expand_movcc,
12278         nds32_output_cbranchsi4_equality_zero,
12279         nds32_output_cbranchsi4_equality_reg,
12280         nds32_output_cbranchsi4_equality_reg_or_const_int,
12281         nds32_output_cbranchsi4_greater_less_zero): Declare.
12282         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12283         nds32_rimm11s_operand): New predicates.
12284         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12285         * config/nds32/nds32.md: Rewrite all the branch and conditional move
12286         patterns.
12288 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
12290         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12291         * config/nds32/nds32.md: Ditto.
12292         * config/nds32/pipelines.md: Ditto.
12294 2018-04-04  Richard Biener  <rguenther@suse.de>
12296         PR tree-optimization/85168
12297         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12298         propagating abnormals.
12300 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12302         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12304 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
12305             Kito Cheng  <kito.cheng@gmail.com>
12307         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12308         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12309         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12310         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12311         * config/nds32/nds32.md (sibcall_internal): New.
12312         (sibcall_register): Remove.
12313         (sibcall_immediate): Remove.
12314         (sibcall_value_internal): New.
12315         (sibcall_value_register): Remove.
12316         (sibcall_value_immediate): Remove.
12317         * config/nds32/predicates.md (nds32_general_register_operand): New.
12318         (nds32_call_address_operand): New.
12320 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
12322         PR rtl-optimization/85167
12323         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12324         bb_defs if *split_p, instead preinitialize it to NULL.
12326         PR tree-optimization/85156
12327         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12328         evaluating the argument multiple times.
12330 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
12332         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12333         than vector.
12334         (_mm_cvtpd_ps): Likewise.
12335         (_mm_cvttpd_epi32): Likewise.
12336         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12337         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12338         vector, pixel, and bool following altivec.h include.
12340 2018-04-03  Martin Sebor  <msebor@redhat.com>
12342         * doc/extend.texi (Common Function Attributes): Clarify.
12343         (const attribute): Likewise.
12344         (pure attribute): Likewise.
12346 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
12348         PR target/85169
12349         * config/i386/i386.c (ix86_expand_vector_set): Use
12350         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
12352 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
12354         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12355         instructions when changing rounding bits to preserve precision bits
12356         in the x87 control word.
12358 2018-04-03  Martin Liska  <mliska@suse.cz>
12360         PR tree-optimization/82491
12361         * rtl.h (strip_offset_and_add): Replace += suboffset with
12362         poly_uint64 () + suboffset.
12364 2018-03-29  Martin Liska  <mliska@suse.cz>
12365             Martin Jambor  <mjambor@suse.cz>
12367         PR ipa/84947
12368         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12369         param_type is not an integral or pointer type.
12371 2018-04-03  Richard Biener  <rguenther@suse.de>
12373         * sese.h (recompute_all_dominators): Remove.
12375 2018-04-02  Martin Sebor  <msebor@redhat.com>
12377         * doc/invoke.texi (-Wrestrict): Fix typos.
12379 2018-04-02  Jim Wilson  <jimw@sifive.com>
12381         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12382         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12383         (<optab>di3, <optab>si3_extend): Likewise.
12384         (<optab>si3_mask, <optab>si3_mask_1): New.
12385         (<optab>di3_mask, <optab>di3_mask_1): New.
12386         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12387         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12388         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12390 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
12392         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12393         example.
12395 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
12397         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12398         (nds32_canonicalize_comparison): New function.
12400 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
12401             Kito Cheng  <kito.cheng@gmail.com>
12402             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
12404         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12405         * config/nds32/constants.md (unspec_volatile_element): Add
12406         UNSPEC_VOLATILE_RELAX_GROUP.
12407         * config/nds32/nds32-relax-opt.c: New file.
12408         * config/nds32/nds32-predicates.c
12409         (nds32_symbol_load_store_p): New function.
12410         * config/nds32/nds32-protos.h
12411         (nds32_symbol_load_store_p): Declare function.
12412         (make_pass_nds32_relax_opt): Declare new rtl pass function.
12413         * config/nds32/nds32.c
12414         (nds32_register_pass): New function to register pass.
12415         (nds32_register_passes): New function to register passes.
12416         * config/nds32/nds32.md (relax_group): New pattern.
12417         * config/nds32/nds32.opt (mrelax-hint): New option.
12418         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12420 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
12422         * config/nds32/t-nds32: Modify files dependency.
12424 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
12426         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12427         (PROFILE_HOOK): Define its implementation.
12429 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
12431         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12432         type and 32-bit size.
12434 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
12436         PR middle-end/85090
12437         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12438         (V_128_256): New mode iterator.
12439         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12440         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12441         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12442         of V.
12443         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12444         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12446 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
12448         PR target/83315
12449         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12450         NaN inputs correctly.
12452 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
12454         PR target/80546
12455         * config/rs6000/vsx.md (??r): New mode attribute.
12456         (*vsx_mov<mode>_64bit): Use it.
12457         (*vsx_mov<mode>_32bit): Likewise.
12459 2018-03-30  Martin Sebor  <msebor@redhat.com>
12461         PR tree-optimization/84818
12462         * builtins.c (check_access): Use warning_n.
12464 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12466         PR target/83822
12467         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12468         condition.
12469         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12470         condition.
12472 2018-03-30  Julia Koval  <julia.koval@intel.com>
12474         PR target/84413
12475         * x86-tune.def (movx, partial_reg_dependency): Enable for
12476         m_SKYLAKE_AVX512.
12478 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
12480         PR inline-asm/84985
12481         * lra-constraints.c (process_alt_operands): Move setting
12482         this_alternative_matches below.
12484 2018-03-29  Martin Liska  <mliska@suse.cz>
12486         PR lto/84995.
12487         * doc/invoke.texi: Document how LTO works with debug info.
12488         Describe auto-load support of binutils.  Mention 'x86-64'
12489         as valid option value of -march option.
12491 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
12493         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12495         PR c/85094
12496         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12497         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12498         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12499         checking.
12501 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
12503         PR target/84912
12504         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12505         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12506         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12507         for RS6000_BTM_POWERPC64.
12508         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12509         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12510         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12511         definition.
12512         (DIVDE): Use it.
12513         (DIVDEU): Likewise.
12515 2018-03-28 Carl Love  <cel@us.ibm.com>
12517         Revert
12518         2017-09-27  Carl Love  <cel@us.ibm.com>
12520         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12521         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12522         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12523         fctiw instruction.
12525 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12527         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12528         instead of __vector bool.
12529         (_mm_max_pu8): Likewise.
12530         (_mm_min_pi16): Likewise.
12532 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
12534         PR target/84912
12535         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12536         (DIVWEUO): Likewise.
12537         (DIVDEO): Likewise.
12538         (DIVDEUO): Likewise.
12539         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12540         DIVWEUO and DIVDEUO.
12541         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12542         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12543         (div_extend): Likewise.
12544         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12545         builtin function.
12546         (__builtin_divweuo): Likewise.
12547         (__builtin_divdeo): Likewise.
12548         (__builtin_divdeuo): Likewise.
12550 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
12552         PR target/85095
12553         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12554         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12556         PR tree-optimization/82004
12557         * gimple-match-head.c (optimize_pow_to_exp): New function.
12558         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12559         Don't fold to exp if optimize_pow_to_exp is false.
12561 2018-03-28  Martin Liska  <mliska@suse.cz>
12563         PR other/84819
12564         * calls.c (initialize_argument_information): Fix trailing space.
12565         * common.opt: Fix typo and provide better explanation for
12566         -fsanitize-coverage option.
12567         * config/i386/i386.opt: Fix typo.
12569 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
12570             Martin Liska  <mliska@suse.cz>
12572         PR sanitizer/85081
12573         * gimplify.c (asan_poison_variable): Don't do the check for
12574         gimplify_omp_ctxp here.
12575         (gimplify_decl_expr): Do it here.
12576         (gimplify_target_expr): Likewise.
12578 2018-03-28  Martin Liska  <mliska@suse.cz>
12580         PR target/84988
12581         * config/i386/i386.c (ix86_function_arg_advance): Do not call
12582         chkp_type_bounds_count if MPX is not enabled.
12584 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
12586         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12588 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
12590         PR target/84914
12591         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12592         function to create the function decl for complex long double
12593         multiply and divide for -mabi=ieeelongdouble.
12594         (init_float128_ieee): Call it.
12596 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
12598         PR target/85044
12599         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12600         -fcf-protection=branch -mibt.
12601         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12603 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12605         PR target/81863
12606         * config/arm/arm.c (arm_valid_symbolic_address): Handle
12607         arm_word_relocations.
12609 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
12611         PR target/85056
12612         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12613         extern array declarations.
12615 2018-03-27  Richard Biener  <rguenther@suse.de>
12617         PR middle-end/84067
12618         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12619         explicit single_use checks.
12621 2018-03-27  Richard Biener  <rguenther@suse.de>
12623         PR tree-optimization/85082
12624         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12625         Valueize the VUSE.
12627 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12629         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12630         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12631         Turn on fasynchronous-unwind-tables and funwind-tables.
12633 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
12635         PR target/85073
12636         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12637         (*bmi_blsr_<mode>_ccz): Ditto.
12639 2018-03-26  Tom de Vries  <tom@codesourcery.com>
12641         PR tree-optimization/85063
12642         * omp-general.c (offloading_function_p): New function.  Factor out
12643         of ...
12644         * omp-offload.c (pass_omp_target_link::gate): ... here.
12645         * omp-general.h (offloading_function_p): Declare.
12646         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12647         with attribute omp declare target for offloading functions.
12649 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
12651         PR tree-optimization/84005
12652         * tree-data-ref.h (get_base_for_alignment): Declare.
12653         * tree-data-ref.c (get_base_for_alignment_1): New function.
12654         (get_base_for_alignment): Likewise.
12655         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12656         get_base_for_alignment to find a suitable base object, instead
12657         of always using drb->base_address.
12659 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
12661         PR inline-asm/85022
12662         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12663         known size by default.
12665 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
12667         PR inline-asm/85030
12668         * lra-constraints.c (process_alt_operands): Don't match BLKmode
12669         and non BLKmode operands.
12671 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12673         PR target/85026
12674         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12675         Clean up attributes.
12677 2018-03-23  Richard Biener  <rguenther@suse.de>
12679         PR debug/85020
12680         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12681         we are going to emit early debug for LTO.
12683 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
12685         PR inline-asm/85034
12686         * function.c (match_asm_constraints_1): Don't optimize if input
12687         doesn't satisfy general_operand predicate for output's mode.
12689         PR inline-asm/85022
12690         * alias.c (write_dependence_p): Don't require for x_canonicalized
12691         non-VOIDmode if x has VOIDmode.
12693         PR sanitizer/85029
12694         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12695         just don't try to optimize it rather than assert it never happens.
12697 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12699         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12700         macro expansions for definition of ST_INTERNAL_<mode> and
12701         LD_INTERNAL_<mode> builtins.
12702         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12703         Remove prototype.
12704         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12705         function.
12706         (altivec_expand_st_builtin): Likewise.
12707         (altivec_expand_builtin): Remove calls to deleted functions.
12708         (rs6000_address_for_altivec): Delete this function.
12709         * config/rs6000/vector.md: Remove expands for
12710         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12712 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
12714         PR target/84826
12715         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12716         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12717         re-computing once computed.
12718         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12719         (arm_init_machine_status): Initialize
12720         machine->static_chain_stack_bytes.
12722 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12724         PR target/84760
12725         * doc/extend.texi: Add four new prototypes for vec_ld.
12726         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12727         definitions for more logical presentation.
12728         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12729         entries for V1TI variants of __builtin_altivec_ld builtin.
12730         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12731         handling of V1TI variant of LVX icode pattern.
12732         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12733         (rs6000_gimple_fold_builtin): Likewise.
12734         (altivec_init_builtins): Add code to define
12735         __builtin_altivec_lvx_v1ti function.
12737 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
12739         PR inline-asm/84941
12740         * function.c (match_asm_constraints_1): Don't do the optimization
12741         if input isn't a REG, SUBREG, MEM or constant.
12743 2018-03-22  Tom de Vries  <tom@codesourcery.com>
12745         PR tree-optimization/84956
12746         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12747         bb_has_abnormal_pred.
12749 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
12751         PR sanitizer/85018
12752         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12753         DECL_INITIAL (decl) to decl at the end.
12754         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12755         adjust the comment.
12757 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
12759         * doc/extend.texi (__builtin_tgmath): Document when complex
12760         integer types are treated as _Complex _Float64.
12762 2018-03-21  Tom de Vries  <tom@codesourcery.com>
12764         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12766 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12768         PR tree-optimization/84960
12769         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12770         if it is ENTRY block, move them into single succ of ENTRY in that case.
12772 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
12774         PR tree-optimization/84811
12775         * poly-int.h (poly_span_traits): Remove the T3 parameter and
12776         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12777         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12778         (known_subrange_p): Update accordingly.  Cast each value involved
12779         in the size comparison, rather than casting the result of the
12780         subtraction.
12782 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12784         PR tree-optimization/84982
12785         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12786         by flipping the least significant bit rather than all bits from
12787         bitpos to bitpos + bitsize - 1.
12789 2018-03-21  Nathan Sidwell  <nathan@acm.org>
12791         * doc/extend.texi (Deprecated Features): Remove mention of
12792         long-deleted deprecations.
12794 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12796         PR jit/84288
12797         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12798         * configure: Regenerate.
12800 2018-03-21  Tom de Vries  <tom@codesourcery.com>
12802         PR tree-optimization/83126
12803         * tree-parloops.c (num_phis): New function.
12804         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12806 2018-03-21  Nathan Sidwell  <nathan@acm.org>
12808         * doc/extend.texi (Deprecated Features): Update deprecated flags,
12809         mention anon-struct/union members and trailing attributes.
12811 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
12813         PR tree-optimization/84969
12814         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12815         builtin memset partitions if they set different rhs values.
12817 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12819         PR rtl-optimization/84989
12820         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12821         VEC_DUPLICATE with scalar result mode.
12823 2018-03-21  Martin Liska  <mliska@suse.cz>
12825         PR ipa/84963
12826         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12827         not intended return statement.
12829 2018-03-21  Martin Liska  <mliska@suse.cz>
12831         PR target/84988
12832         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12833         (chkp_find_bound_slots_1): Limit number of iterations.
12835 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
12837         PR target/84838
12838         * Minor grammar fixes for x86 options.
12840 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12842         PR debug/84875
12843         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12844         holding REG_CFA_RESTORE notes, instead turn them into a USE.
12846 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
12848         PR target/83789
12849         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12850         (altivec_lvx_<mode>_1op): Likewise.
12851         (altivec_stvx_<mode>_2op): Likewise.
12852         (altivec_stvx_<mode>_1op): Likewise.
12853         (altivec_lvx_<VM2:mode>): New define_expand.
12854         (altivec_stvx_<VM2:mode>): Likewise.
12855         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12856         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12857         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12858         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12859         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12860         (rs6000_gen_lvx): Likewise.
12861         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12862         (altivec_expand_stv_builtin): Likewise.
12863         (altivec_expand_builtin): Likewise.
12864         * config/rs6000/vector.md: Likewise.
12866 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12868         PR target/82518
12869         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12870         BYTES_BIG_ENDIAN.
12872 2018-03-20  Richard Biener  <rguenther@suse.de>
12874         PR target/84986
12875         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12876         sign-conversions as zero, fall back to standard scalar_stmt
12877         cost for the rest.
12879 2018-03-20  Martin Liska  <mliska@suse.cz>
12881         PR ipa/84825
12882         * predict.c (rebuild_frequencies): Handle case when we have
12883         PROFILE_ABSENT, but flag_guess_branch_prob is false.
12885 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12887         PR target/84990
12888         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12889         flag_section_anchors.
12890         * varasm.c (use_blocks_for_decl_p): Remove hack for
12891         dw2_force_const_mem.
12893         PR target/84845
12894         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12895         to ...
12896         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
12897         be created, use lowpart_subreg of operands[0] rather than operands[0]
12898         itself.
12899         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12900         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12901         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12902         and n constraint instead of aarch64_shift_imm_di and Usd.
12903         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12904         (*aarch64_<optab>_reg_minus<mode>3): ... this.
12906 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
12908         PR target/82989
12909         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12910         to favor GPR over NEON registers.
12911         (<shift>di3_neon): Likewise.
12913 2018-03-20  Tom de Vries  <tom@codesourcery.com>
12915         PR target/84952
12916         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12917         (nvptx_process_pars): Emit bar.sync asap and alap.
12919 2018-03-20  Tom de Vries  <tom@codesourcery.com>
12921         PR target/84954
12922         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12923         seen_label if seen_label is already set.
12925 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12927         PR target/84945
12928         * config/i386/i386.c (fold_builtin_cpu): For features above 31
12929         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12930         Use 1U instead of 1.  Formatting fixes.
12932         PR c/84953
12933         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12934         instead of TREE_TYPE (s1) for the return value.
12936 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
12938         PR tree-optimization/84946
12939         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12940         bitsize + bitsize in poly_uint64 rather than poly_int64.
12942         PR sanitizer/78651
12943         * dwarf2asm.c: Include fold-const.c.
12944         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12945         of decl rather than decl itself.
12947         PR rtl-optimization/84643
12948         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12950 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
12952         PR sanitizer/78651
12953         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12954         calling assemble_variable.
12956 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
12958         PR target/81647
12959         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12960         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12962 2018-03-19  Jim Wilson  <jimw@sifive.com>
12964         PR bootstrap/84856
12965         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12966         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12967         (riscv_first_stack_step): Likewise.
12968         (riscv_option_override): Use STACK_BOUNDARY instead of
12969         MIN_STACK_BOUNDARY.
12970         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12971         MIN_STACK_BOUNDARY.
12972         (BIGGEST_ALIGNMENT): Set to 128.
12973         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12974         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12975         STACK_BOUNDARY.
12977 2018-03-19  Richard Biener  <rguenther@suse.de>
12979         PR tree-optimization/84933
12980         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12981         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12983 2018-03-19  Richard Biener  <rguenther@suse.de>
12985         PR tree-optimization/84859
12986         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12987         (cond_if_else_store_replacement): Perform sinking operation on
12988         single-store BBs regardless of MAX_STORES_TO_SINK setting.
12989         Generalize what a BB with a single eligible store is.
12991 2018-03-19  Richard Biener  <rguenther@suse.de>
12993         PR tree-optimization/84929
12994         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12995         chrec_is_positive against non-chrec arg.
12997 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
12999         PR target/84711
13000         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13002 2018-03-18  Martin Liska  <mliska@suse.cz>
13004         PR rtl-optimization/84635
13005         * regrename.c (build_def_use): Use matches_mode only when
13006         matches >= 0.
13008 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
13010         PR tree-optimization/84913
13011         * tree-vect-loop.c (vectorizable_reduction): Don't try to
13012         vectorize chains of COND_EXPRs.
13014 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13016         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13018 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13020         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13022 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
13024         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13026 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
13027             Kito Cheng  <kito.cheng@gmail.com>
13029         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13030         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13031         (nds32_adjust_reg_alloc_order): New function.
13032         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13034 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
13036         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13037         nds32_print_operand, nds32_print_operand_address): Use
13038         HOST_WIDE_INT_PRINT_DEC instead.
13040 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
13042         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13044 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
13046         PR target/84902
13047         * config/i386/i386.c (initial_ix86_tune_features,
13048         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13049         unsigned long long.
13050         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13051         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13052         rather than 1u << ix86_tune.  Formatting fix.
13053         (ix86_option_override_internal): Change ix86_arch_mask from
13054         unsigned int to unsigned HOST_WIDE_INT, initialize to
13055         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13056         (ix86_function_specific_restore): Likewise.
13058 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13060         PR target/84899
13061         * postreload.c (reload_combine_recognize_pattern): Perform
13062         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13063         truncate_int_for_mode the result for the destination's mode.
13065         PR c/84909
13066         * hsa-gen.c (mem_type_for_type): Fix comment typo.
13067         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13068         Likewise.
13069         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13070         Likewise.
13072 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
13074         PR target/84876
13075         * lra-assigns.c (lra_split_hard_reg_for): Don't use
13076         regno_allocno_class_array and sorted_pseudos.
13077         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13078         insns where regno is used.
13080 2018-03-16  Martin Liska  <mliska@suse.cz>
13082         PR ipa/84833
13083         * multiple_target.c (create_dispatcher_calls): Redirect
13084         reference in the symbol table.
13086 2018-03-16  Martin Liska  <mliska@suse.cz>
13088         PR ipa/84722
13089         * multiple_target.c (create_dispatcher_calls): Redirect also
13090         an alias.
13092 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13094         PR c++/79937
13095         PR c++/82410
13096         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13097         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13098         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13100 2018-03-16  Julia Koval  <julia.koval@intel.com>
13102         * doc/invoke.texi (Skylake Server): Add CLWB.
13103         Cannonlake): Remove CLWB.
13105 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
13107         PR tree-optimization/84841
13108         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13109         1 << 3.
13110         (FLOAT_ONE_CONST_TYPE): Define.
13111         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13112         (sort_by_operand_rank): Put entries with higher constant_type last
13113         rather than first to match comments.
13115 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
13117         * config/nios2/nios2.md (movsi_internal): Fix thinko in
13118         split predicate.
13120 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
13122         PR c++/79085
13123         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13124         check and use address of target always.
13126 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
13128         PR target/84574
13129         * config/i386/i386.c (indirect_thunk_needed): Update comments.
13130         (indirect_thunk_bnd_needed): Likewise.
13131         (indirect_thunks_used): Likewise.
13132         (indirect_thunks_bnd_used): Likewise.
13133         (indirect_return_needed): New.
13134         (indirect_return_bnd_needed): Likewise.
13135         (output_indirect_thunk_function): Add a bool argument for
13136         function return.
13137         (output_indirect_thunk_function): Don't generate alias for
13138         function return thunk.
13139         (ix86_code_end): Call output_indirect_thunk_function to generate
13140         function return thunks.
13141         (ix86_output_function_return): Set indirect_return_bnd_needed
13142         and indirect_return_needed instead of indirect_thunk_bnd_needed
13143         and indirect_thunk_needed.
13145 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
13147         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13148         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13149         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13151 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
13152             Paul Hua <paul.hua.gm@gmail.com>
13154         PR c/84852
13155         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13157 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
13159         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13160         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13161         resp. SFmode cases.
13163 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
13165         PR target/84711
13166         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13167         instead of GET_MODE_SIZE when comparing Units.
13169 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
13171         PR target/68256
13172         * varasm.c (hash_section): Return an unchangeble hash value
13173         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13174         Return !aarch64_can_use_per_function_literal_pools_p ().
13176 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
13178         PR target/84860
13179         * optabs.c (emit_conditional_move): Pass address of cmode's copy
13180         rather than address of cmode as last argument to prepare_cmp_insn.
13182 2018-03-15  Julia Koval  <julia.koval@intel.com>
13184         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13185         F_AVX512VNNI, F_AVX512BITALG): New.
13187 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
13189         PR target/83451
13190         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
13191         insn for floating-point loads and stores.
13193 2018-03-14  Carl Love  <cel@us.ibm.com>
13195         * config/rs6000/rs6000-c.c: Add macro definitions for
13196         ALTIVEC_BUILTIN_VEC_PERMXOR.
13197         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13198         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13199         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13200         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13201         UNSPEC_VPERMXOR.
13202         * config/doc/extend.texi: Add prototypes for vec_permxor.
13204 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
13206         PR c/84852
13207         * diagnostic-show-locus.c (class layout_point): Convert m_line
13208         from int to linenum_type.
13209         (line_span::comparator): Use linenum "compare" function when
13210         comparing line numbers.
13211         (test_line_span): New function.
13212         (layout_range::contains_point): Convert param "row" from int to
13213         linenum_type.
13214         (layout_range::intersects_line_p): Likewise.
13215         (layout::will_show_line_p): Likewise.
13216         (layout::print_source_line): Likewise.
13217         (layout::should_print_annotation_line_p): Likewise.
13218         (layout::print_annotation_line): Likewise.
13219         (layout::print_leading_fixits): Likewise.
13220         (layout::annotation_line_showed_range_p): Likewise.
13221         (struct line_corrections): Likewise for field m_row.
13222         (line_corrections::line_corrections): Likewise for param "row".
13223         (layout::print_trailing_fixits): Likewise.
13224         (layout::get_state_at_point): Likewise.
13225         (layout::get_x_bound_for_row): Likewise.
13226         (layout::print_line): Likewise.
13227         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13228         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13229         * input.c (selftest::test_linenum_comparisons): New function.
13230         (selftest::input_c_tests): Call it.
13231         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13232         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13233         * selftest.h (ASSERT_GT): New macro.
13234         (ASSERT_GT_AT): New macro.
13235         (ASSERT_LT): New macro.
13236         (ASSERT_LT_AT): New macro.
13238 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
13240         PR rtl-optimization/84780
13241         * combine.c (distribute_links): Don't make a link based on pc_rtx.
13243 2018-03-14  Martin Liska  <mliska@suse.cz>
13245         * tree.c (record_node_allocation_statistics): Use
13246         get_stats_node_kind.
13247         (get_stats_node_kind): New function extracted from
13248         record_node_allocation_statistics.
13249         (free_node): Use get_stats_node_kind.
13251 2018-03-14  Richard Biener  <rguenther@suse.de>
13253         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13254         that the value-set of ANTIC_IN doesn't grow.
13256         Revert
13257         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13258         member.
13259         (BB_VISITED_WITH_VISITED_SUCCS): New define.
13260         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13262 2018-03-14  Julia Koval  <julia.koval@intel.com>
13264         * config.gcc (icelake-client, icelake-server): New.
13265         (icelake): Remove.
13266         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13267         (initial_ix86_arch_features): Ditto.
13268         (PTA_SKYLAKE): Add SGX.
13269         (PTA_ICELAKE): Remove.
13270         (PTA_ICELAKE_CLIENT): New.
13271         (PTA_ICELAKE_SERVER): New.
13272         (ix86_option_override_internal): Split up icelake on icelake client and
13273         icelake server.
13274         (get_builtin_code_for_version): Ditto.
13275         (fold_builtin_cpu): Ditto.
13276         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13277         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13278         * config/i386/i386.h (processor_type): Ditto.
13279         * doc/invoke.texi: Ditto.
13281 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
13283         PR sanitizer/83392
13284         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13285         INTEGER_CST offset, add it together with bitpos / 8 and
13286         sign extend based on POINTER_SIZE.
13288         PR target/84844
13289         Revert
13290         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
13292         PR target/78090
13293         * config/i386/constraints.md (Yc): New register constraint.
13294         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13295         Use Yc constraint for alternative 2 of operand 0.  Remove
13296         preferred_for_speed attribute.
13298 2018-03-14  Richard Biener  <rguenther@suse.de>
13300         PR tree-optimization/84830
13301         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13302         with the old one to avoid oscillations.
13304 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
13306         PR target/83712
13307         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13308         pseudos.
13309         (assign_by_spills): Return a flag of reload assignment failure.
13310         Do not process the reload assignment failures.  Do not spill other
13311         reload pseudos if they has the same reg class.  Update n if
13312         necessary.
13313         (lra_assign): Add a return arg.  Set up from the result of
13314         assign_by_spills call.
13315         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13316         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
13317         usage_insns if it is not NULL.
13318         (spill_hard_reg_in_range): New function.
13319         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13320         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13321         function prototypes.
13322         (lra_assign): Change prototype.
13323         * lra.c (lra): Add code to deal with fails by splitting hard reg
13324         live ranges.
13326 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
13328         * config/riscv/riscv.opt (mrelax): New option.
13329         * config/riscv/riscv.c (riscv_file_start): Emit ".option
13330         "norelax" when riscv_mrelax is disabled.
13331         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13333 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13335         PR target/84743
13336         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13337         reassociation for int modes.
13339 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
13341         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13342         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13343         for big-endian.
13344         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13345         * config/aarch64/aarch64-sve.md
13346         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13347         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13348         (*extend<mode><Vwide>2): Rename to...
13349         (aarch64_sve_extend<mode><Vwide>2): ...this.
13350         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13351         renaming the old pattern to...
13352         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
13353         unsigned packs.
13354         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13355         define_expand, renaming the old pattern to...
13356         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13357         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13358         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13359         account when deciding which SVE instruction the optab should use.
13360         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13362 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
13364         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13365         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13366         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13367         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13368         (tlsdesc_small_<mode>): Turn a define_expand and use
13369         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
13370         (tlsdesc_small_advsimd_<mode>): ...this.
13371         (tlsdesc_small_sve_<mode>): New pattern.
13373 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
13375         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13376         (UNSPEC_UMUL_HIGHPART): New constants.
13377         (MUL_HIGHPART): New int iteraor.
13378         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13379         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13380         define_expand.
13381         (*<su>mul<mode>3_highpart): New define_insn.
13383 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
13385         PR lto/84805
13386         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13387         incomplete types.
13389 2018-03-13  Martin Liska  <mliska@suse.cz>
13391         PR ipa/84658.
13392         * (sem_item_optimizer::sem_item_optimizer): Initialize new
13393         vector.
13394         (sem_item_optimizer::~sem_item_optimizer): Release it.
13395         (sem_item_optimizer::merge_classes): Register variable aliases.
13396         (sem_item_optimizer::fixup_pt_set): New function.
13397         (sem_item_optimizer::fixup_points_to_sets): Likewise.
13398         * ipa-icf.h: Declare new variables and functions.
13400 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
13402         PR middle-end/84834
13403         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13404         integer_pow2p@2 and test integer_pow2p in condition.
13405         (A < 0 ? C : 0): Similarly for @1.
13407         PR middle-end/84831
13408         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13409         characters starting at p contain '\0' character, don't look beyond
13410         that.
13412         PR target/84827
13413         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13414         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13416         PR target/84828
13417         * reg-stack.c (change_stack): Change update_end var from int to
13418         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13419         also call set_block_for_insn on the newly added insns and rescan.
13421         PR target/84786
13422         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13423         on the last operand.
13425         PR c++/84704
13426         * tree.c (stabilize_reference_1): Return save_expr (e) for
13427         STATEMENT_LIST even if it doesn't have side-effects.
13429 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
13431         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13433 2018-03-12  Renlin Li  <renlin.li@arm.com>
13435         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13436         aarch64_output_scalar_simd_mov_immediate.
13438 2018-03-12  Martin Sebor  <msebor@redhat.com>
13440         PR tree-optimization/83456
13441         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13442         for perfectly overlapping calls to memcpy.
13443         (gimple_fold_builtin_memory_chk): Same.
13444         (gimple_fold_builtin_strcpy): Handle no-warning.
13445         (gimple_fold_builtin_stxcpy_chk): Same.
13446         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13448 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
13450         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13451         parameter.  Use it for SFmode.
13452         (rs6000_function_arg_advance_1): Adjust.
13453         (rs6000_function_arg): Adjust.
13454         (rs6000_gimplify_va_arg): Pass false for that new parameter.
13456 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
13458         PR rtl-optimization/84169
13459         PR rtl-optimization/84780
13460         * combine.c (can_combine_p): Check for a 2-insn combination whether
13461         the destination register is used between the two insns, too.
13463 2018-03-12  Richard Biener  <rguenther@suse.de>
13465         PR tree-optimization/84803
13466         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13467         for refs DR analysis didn't process.
13469 2018-03-12  Richard Biener  <rguenther@suse.de>
13471         PR tree-optimization/84777
13472         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13473         force-vectorize loops ignore whether we are optimizing for size.
13475 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
13477         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13478         (TARGET_MD_ASM_ADJUST): Define.
13480 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
13481             Kito Cheng  <kito.cheng@gmail.com>
13482             Chung-Ju Wu  <jasonwucj@gmail.com>
13484         * config/nds32/nds32.c (nds32_compute_stack_frame,
13485         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13486         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13487         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13488         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13489         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13490         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13491         * config/nds32/nds32.md (prologue, epilogue): Use macro
13492         NDS32_V3PUSH_AVAILABLE_P to do checking.
13494 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
13496         PR debug/58150
13497         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13498         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13499         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
13500         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
13501         addition of most attributes on !orig_type_die or the attribute not
13502         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13504 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
13505             Chung-Ju Wu  <jasonwucj@gmail.com>
13507         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13508         __NDS32_VH__ macro.
13509         * config/nds32/nds32.opt (mvh): New option.
13511 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
13512             Chung-Ju Wu  <jasonwucj@gmail.com>
13514         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13515         function.
13516         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13517         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13518         definition.
13520 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
13521             Chung-Ju Wu  <jasonwucj@gmail.com>
13523         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13524         function.
13525         * config/nds32/nds32-multiple.md (strlensi): New pattern.
13526         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13528 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
13529             Kito Cheng  <kito.cheng@gmail.com>
13530             Chung-Ju Wu  <jasonwucj@gmail.com>
13532         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13533         UNSPEC_FFMISM and UNSPEC_FLMISM.
13534         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13535         for ffb, ffmism and flmism.
13536         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13537         (unspec_ffmism): Ditto.
13538         (unspec_flmism): Ditto.
13539         (nds32_expand_builtin_impl): Check if string extension is available.
13540         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13541         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13543 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
13545         Reverting patch:
13546         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
13548         PR target/83712
13549         * lra-assigns.c (assign_by_spills): Return a flag of reload
13550         assignment failure.  Do not process the reload assignment
13551         failures.  Do not spill other reload pseudos if they has the same
13552         reg class.
13553         (lra_assign): Add a return arg.  Set up from the result of
13554         assign_by_spills call.
13555         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13556         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
13557         usage_insns if it is not NULL.
13558         (spill_hard_reg_in_range): New function.
13559         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13560         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13561         function prototypes.
13562         (lra_assign): Change prototype.
13563         * lra.c (lra): Add code to deal with fails by splitting hard reg
13564         live ranges.
13566 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
13568         PR target/84807
13569         * config/i386/i386.opt: Replace Enforcment with Enforcement.
13571 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
13573         PR debug/84620
13574         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13575         (dw_val_node): Add val_symbolic_view.
13576         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13577         (symview_upper_bound): New.
13578         (new_line_info_table): Initialize symviews_since_reset.
13579         (dwarf2out_source_line): Count symviews_since_reset and set
13580         symview_upper_bound.
13581         (dw_val_equal_p): Handle symview.
13582         (add_AT_symview): New.
13583         (print_dw_val): Handle symview.
13584         (attr_checksum, attr_checksum_ordered): Likewise.
13585         (same_dw_val_p, size_of_die): Likewise.
13586         (value_format, output_die): Likewise.
13587         (add_high_low_attributes): Use add_AT_symview for entry_view.
13588         (dwarf2out_finish): Reset symview_upper_bound, clear
13589         zero_view_p.
13591 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
13593         PR target/83969
13594         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13595         Add strict argument and use it.
13596         (rs6000_split_multireg_move): Update for new strict argument.
13597         (mem_operand_gpr): Disallow all non-offsettable addresses.
13598         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13600 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
13602         PR target/84772
13603         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13604         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13605         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13607         PR c++/84767
13608         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13609         decl, use remap_type if we want to use the type.
13611 2018-03-09  Martin Sebor  <msebor@redhat.com>
13613         PR tree-optimization/84526
13614         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13615         Remove dead code.
13616         (builtin_access::generic_overlap): Be prepared to handle non-array
13617         base objects.
13619 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
13621         PR rtl-optimization/84682
13622         * lra-constraints.c (process_address_1): Check is_address flag
13623         for address constraints.
13624         (process_alt_operands): Likewise.
13625         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13626         preprocess_constraints.
13627         * recog.h (preprocess_constraints): Add oploc parameter.
13628         Adjust callers.
13629         * recog.c (preprocess_constraints): Test address_operand for
13630         CT_ADDRESS constraints.
13632 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
13634         PR target/83712
13635         * lra-assigns.c (assign_by_spills): Return a flag of reload
13636         assignment failure.  Do not process the reload assignment
13637         failures.  Do not spill other reload pseudos if they has the same
13638         reg class.
13639         (lra_assign): Add a return arg.  Set up from the result of
13640         assign_by_spills call.
13641         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13642         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
13643         usage_insns if it is not NULL.
13644         (spill_hard_reg_in_range): New function.
13645         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13646         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13647         function prototypes.
13648         (lra_assign): Change prototype.
13649         * lra.c (lra): Add code to deal with fails by splitting hard reg
13650         live ranges.
13652 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13654         PR target/83193
13655         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13656         Accept complain bool parameter.  Only emit errors if it is true.
13657         (arm_parse_cpu_option_name): Likewise.
13658         (arm_target_thumb_only): Adjust callers of the above.
13659         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13660         prototype to take a default true bool parameter.
13661         (arm_parse_arch_option_name): Likewise.
13663 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
13664             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
13666         PR jit/64089
13667         PR jit/84288
13668         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13669         * configure: Regenerate.
13670         * configure.ac ("linker --version-script option"): New.
13671         ("linker soname option"): New.
13673 2018-03-09  Richard Biener  <rguenther@suse.de>
13675         PR tree-optimization/84775
13676         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13677         immediate uses of predicate stmts and mark them modified.
13679         Revert
13680         PR tree-optimization/84178
13681         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13682         to caller.
13683         (version_loop_for_if_conversion): Delay update_ssa call.
13684         (tree_if_conversion): Delay update_ssa until after predicate
13685         insertion.
13687 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
13689         PR target/84763
13690         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13691         when the function accesses prior frames.
13693 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
13695         PR debug/84456
13696         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13697         gen_llsym, otherwise call maybe_gen_llsym.
13699         PR inline-asm/84742
13700         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13701         has ',' character inside of it.
13703 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13705         PR target/84748
13706         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13707         as clobbering CC_REGNUM.
13709 2018-03-08  Richard Biener  <rguenther@suse.de>
13711         PR middle-end/84552
13712         * tree-scalar-evolution.c: Include tree-into-ssa.h.
13713         (follow_copies_to_constant): Do not follow SSA names registered
13714         for update.
13716 2018-03-08  Richard Biener  <rguenther@suse.de>
13718         PR tree-optimization/84178
13719         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13720         to caller.
13721         (version_loop_for_if_conversion): Delay update_ssa call.
13722         (tree_if_conversion): Delay update_ssa until after predicate
13723         insertion.
13725 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
13727         PR tree-optimization/84178
13728         * tree-if-conv.c (release_bb_predicate): Remove the
13729         the assertion that the stmts have NULL use_ops.
13730         Discard the statements, asserting that they haven't
13731         yet been added to a BB.
13733 2018-03-08  Richard Biener  <rguenther@suse.de>
13735         PR tree-optimization/84746
13736         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13737         (phi_translate): Pass in destination ANTIC_OUT set.
13738         (phi_translate_1): Likewise.  For a simplified result lookup
13739         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13740         (phi_translate_set): Adjust.
13741         (do_pre_regular_insertion): Likewise.
13742         (do_pre_partial_partial_insertion): Likewise.
13744 2018-03-08  Martin Liska  <mliska@suse.cz>
13746         PR gcov-profile/84735
13747         * doc/gcov.texi: Document usage of profile files.
13748         * gcov-io.h: Document changes in the format.
13750 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
13752         PR debug/84404
13753         PR debug/84408
13754         * dwarf2out.c (struct dw_line_info_table): Update comments for
13755         view == -1.
13756         (FORCE_RESET_NEXT_VIEW): New.
13757         (FORCE_RESETTING_VIEW_P): New.
13758         (RESETTING_VIEW_P): Check for -1 too.
13759         (ZERO_VIEW_P): Likewise.
13760         (new_line_info_table): Force-reset next view.
13761         (dwarf2out_begin_function): Likewise.
13762         (dwarf2out_source_line): Simplify zero_view_p initialization.
13763         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13764         view directly.  Omit view when omitting .loc at line 0.
13766 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
13768         PR tree-optimization/84740
13769         * tree-switch-conversion.c (process_switch): Call build_constructors
13770         only if info.phi_count is non-zero.
13772         PR tree-optimization/84739
13773         * tree-tailcall.c (find_tail_calls): Check call arguments against
13774         DECL_ARGUMENTS (current_function_decl) rather than
13775         DECL_ARGUMENTS (func) when checking for tail recursion.
13777 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
13779         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13780         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13781         Volker Reichelt's entry and add entries for people that perform
13782         GCC fuzzy testing and report numerous bugs.
13784 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
13786         PR target/82411
13787         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13788         readonly data in sdata, if that is disabled.
13789         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13790         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13791         -mreadonly-in-sdata option.
13793 2018-03-07  Martin Sebor  <msebor@redhat.com>
13795         PR tree-optimization/84468
13796         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13797         basic block when looking for nul assignment.
13799 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
13801         PR target/84277
13802         * except.h (output_function_exception_table): Adjust prototype.
13803         * except.c (output_function_exception_table): Remove FNNAME parameter
13804         and add SECTION parameter.  Ouput one part of the table at a time.
13805         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13806         the first part of the exception table and emit unwind directives.
13807         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13808         (i386_pe_seh_cold_init): Likewise.
13809         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13810         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13811         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13812         (ix86_output_call_insn): Emit a nop in one more case for SEH.
13813         * config/i386/winnt.c: Include except.h.
13814         (struct seh_frame_state): Add reg_offset, after_prologue and
13815         in_cold_section fields.
13816         (i386_pe_seh_end_prologue): Set seh->after_prologue.
13817         (i386_pe_seh_cold_init): New function.
13818         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13819         to seh->in_cold_section.
13820         (seh_emit_push): Record the offset of the push.
13821         (seh_emit_save): Record the offet of the save.
13822         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13823         Test seh->after_prologue to disregard the epilogue.
13824         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13825         (i386_pe_end_cold_function): New function.
13827 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
13829         PR fortran/84565
13830         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13831         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13833         PR c++/84704
13834         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13835         on tmp_var.
13836         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13837         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13839         PR middle-end/84723
13840         * multiple_target.c: Include tree-inline.h and intl.h.
13841         (expand_target_clones): Diagnose and fail if node->definition and
13842         !tree_versionable_function_p (node->decl).
13844 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
13846         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13847         sprint_ul.
13848         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13849         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13850         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13852 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
13854         PR target/84710
13855         * combine.c (try_combine): Use reg_or_subregno instead of handling
13856         just paradoxical SUBREGs and REGs.
13858 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
13860         * config/arc/arc.c (arc_finalize_pic): Remove function.
13861         (arc_must_save_register): We use single base PIC register, remove
13862         checks to save/restore the PIC register.
13863         (arc_expand_prologue): Likewise.
13864         * config/arc/arc-protos.h (arc_set_default_type_attributes):
13865         Remove.
13866         (arc_verify_short): Likewise.
13867         (arc_attr_type): Likewise.
13868         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13869         (walk_stores): Likewise.
13870         (arc_address_cost): Make it static.
13871         (arc_verify_short): Likewise.
13872         (branch_dest): Likewise.
13873         (arc_attr_type): Likewise.
13874         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13875         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13876         (arc_final_prescan_insn): Remove inserting the nops due to
13877         hardware hazards.  It is done in reorg step.
13878         (insn_length_variant_t): Remove.
13879         (insn_length_parameters_t): Likewise.
13880         (arc_insn_length_parameters): Likewise.
13881         (arc_get_insn_variants): Likewise.
13882         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13884 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
13886         PR inline-asm/84683
13887         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13888         assertion failure.
13890         PR tree-optimization/84687
13891         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13892         on new_node->decl.
13893         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13895 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13897         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13898         Rename to ppc_speculation_barrier.
13899         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13900         __builtin_ppc_speculation_barrier.
13902 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
13904         PR target/84700
13905         * combine.c (combine_simplify_rtx): Don't try to simplify if
13906         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13907         are equal to x.
13909 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
13911         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13912         to 32 bytes when compiling for POWER9.
13914 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
13916         PR target/84564
13917         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13918         regparm >= 3 with no arg reg available also for calls with
13919         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
13921         PR target/84524
13922         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13923         orig,vex.
13924         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
13926 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
13928         PR target/84264
13929         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13931 2018-03-05  Richard Biener  <rguenther@suse.de>
13933         PR tree-optimization/84486
13934         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13935         When inserting a __builtin_assume_aligned call set the LHS
13936         SSA name alignment info accordingly.
13938 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
13940         PR tree-optimization/84114
13941         * config/aarch64/aarch64.c (aarch64_reassociation_width)
13942         Avoid reassociation of FLOAT_MODE addition.
13944 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
13946         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13947         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13948         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13949         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13950         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13951         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13952         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13953         and -mwbnoinvd.
13954         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13955         __builtin_ia32_wbinvd): New builtins.
13956         (SPECIAL_ARGS2): New.
13957         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13958         (SPECIAL_ARGS2): New.
13959         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13960         (ix86_valid_target_attribute_inner_p): Ditto.
13961         (ix86_init_mmx_sse_builtins): Add special_args2.
13962         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13963         TARGET_WBNOINVD_P): New.
13964         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13965         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13966         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13967         * config/i386/immintrin.h (_wbinvd): New intrinsic.
13968         * config/i386/pconfigintrin.h: New file.
13969         * config/i386/wbnoinvdintrin.h: Ditto.
13970         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13971         wbnoinvdintrin.h.
13972         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13974 2018-03-05  Richard Biener  <rguenther@suse.de>
13976         PR tree-optimization/84670
13977         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13978         member.
13979         (BB_VISITED_WITH_VISITED_SUCCS): New define.
13980         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13981         (compute_antic_aux): Only assert the number of values in ANTIC_IN
13982         doesn't grow if all successors (recursively) were visited at least
13983         once.
13985 2018-03-05  Richard Biener  <rguenther@suse.de>
13987         PR tree-optimization/84650
13988         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13989         if executed in the loop pipeline.
13991 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
13993         * doc/configfiles.texi (Configuration Files): Move info about
13994         conditionalizing $target-protos.h to...
13995         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
13996         differs from $target-protos.h.
13998 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
13999             Chung-Ju Wu  <jasonwucj@gmail.com>
14001         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14002         * config/nds32/nds32-multiple.md (setmemsi): Define.
14003         * config/nds32/nds32-memory-manipulation.c
14004         (nds32_gen_dup_4_byte_to_word_value): New.
14005         (emit_setmem_word_loop): New.
14006         (emit_setmem_byte_loop): New.
14007         (nds32_expand_setmem_loop): New.
14008         (nds32_expand_setmem_loop_v3m): New.
14009         (nds32_expand_setmem_unroll): New.
14010         (nds32_expand_setmem): New.
14012 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14013             Chung-Ju Wu  <jasonwucj@gmail.com>
14015         * config/nds32/nds32-memory-manipulation.c
14016         (nds32_emit_load_store): New.
14017         (nds32_emit_post_inc_load_store): New.
14018         (nds32_emit_mem_move): New.
14019         (nds32_emit_mem_move_block): New.
14020         (nds32_expand_movmemsi_loop_unknown_size): New.
14021         (nds32_expand_movmemsi_loop_known_size): New.
14022         (nds32_expand_movmemsi_loop): New.
14023         (nds32_expand_movmemsi_unroll): New.
14024         (nds32_expand_movmemqi): Rename ...
14025         (nds32_expand_movmemsi): ... to this.
14026         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14027         (movmemsi): ... to this.
14028         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14029         (nds32_expand_movmemsi): ... to this.
14031 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14032             Monk Chiang  <sh.chiang04@gmail.com>
14033             Chung-Ju Wu  <jasonwucj@gmail.com>
14035         * config/nds32/nds32-protos.h
14036         (nds32_expand_load_multiple): New arguments.
14037         (nds32_expand_store_multiple): Ditto.
14038         (nds32_valid_multiple_load_store): Rename ...
14039         (nds32_valid_multiple_load_store_p): ... to this.
14040         * config/nds32/nds32-memory-manipulation.c
14041         (nds32_expand_load_multiple): Refine implementation.
14042         (nds32_expand_store_multiple): Ditto.
14043         * config/nds32/nds32-multiple.md
14044         (load_multiple): Update nds32_expand_load_multiple interface.
14045         (store_multiple): Update nds32_expand_store_multiple interface.
14046         * config/nds32/nds32-predicates.c
14047         (nds32_valid_multiple_load_store): Rename ...
14048         (nds32_valid_multiple_load_store_p): ... to this and refine
14049         implementation.
14050         * config/nds32/predicates.md
14051         (nds32_load_multiple_and_update_address_operation): New predicate.
14052         (nds32_store_multiple_and_update_address_operation): New predicate.
14054 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
14055             Chung-Ju Wu  <jasonwucj@gmail.com>
14057         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14058         (combo): New attribute.
14059         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14061 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
14063         * config/nds32/nds32.opt: Change -mcmodel= default value.
14065 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
14066             Monk Chiang  <sh.chiang04@gmail.com>
14067             Chung-Ju Wu  <jasonwucj@gmail.com>
14069         * config/nds32/constants.md (unspec_element): New enum.
14070         * config/nds32/constraints.md (Umw): New constraint.
14071         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14072         * config/nds32/nds32-intrinsic.md: Likewise.
14073         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14074         (nds32_valid_smw_lwm_base_p): New.
14075         (nds32_output_smw_single_word): New.
14076         (nds32_output_lmw_single_word): New.
14077         (nds32_expand_unaligned_load): New.
14078         (nds32_expand_unaligned_store): New.
14079         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14080         (nds32_output_smw_single_word): Declare.
14081         (nds32_output_lmw_single_word): Declare.
14082         (nds32_expand_unaligned_load): Declare.
14083         (nds32_expand_unaligned_store): Declare.
14084         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14085         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14086         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14087         NDS32_BUILTIN_UASTORE_DW.
14088         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14089         predicate.
14091 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
14092             Kito Cheng  <kito.cheng@gmail.com>
14093             Chung-Ju Wu  <jasonwucj@gmail.com>
14095         * config/nds32/nds32-intrinsic.c
14096         (nds32_expand_builtin_null_ftype_reg): Delete.
14097         (nds32_expand_builtin_reg_ftype_imm): Ditto.
14098         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14099         (nds32_read_argument): New.
14100         (nds32_legitimize_target): Ditto.
14101         (nds32_legitimize_argument): Ditto.
14102         (nds32_check_constant_argument): Ditto.
14103         (nds32_expand_unop_builtin): Ditto.
14104         (nds32_expand_unopimm_builtin): Ditto.
14105         (nds32_expand_binop_builtin): Ditto.
14106         (nds32_builtin_decl_impl): Ditto.
14107         (builtin_description): Ditto.
14108         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14109         (nds32_init_builtins_impl): Ditto.
14110         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14111         (nds32_builtin_decl): New.
14112         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14113         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14115 2018-03-02  Jeff Law  <law@redhat.com>
14117         * reorg.c (stop_search_p): Handle DEBUG_INSN.
14118         (redundant_insn, fill_simple_delay_slots): Likewise.
14119         (fill_slots_from_thread): Likewise.
14120         * resource.c (mark_referenced_resources): Likewise.
14121         (mark_set_resources, find_dead_or_set_registers): Likewise.
14123 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14125         * substring-locations.h (format_warning_va): Formatting fix for
14126         ATTRIBUTE_GCC_DIAG.
14127         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14128         argument.
14129         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14130         * substring-locations.c: Include intl.h.
14131         (format_warning_va): Turned into small wrapper around
14132         format_warning_n_va, renamed to ...
14133         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14134         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14135         use ngettext.
14136         (format_warning_at_substring_n): New function.
14137         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14138         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
14139         format_warning_at_substring with just a shorter name instead of
14140         const function pointer.
14141         (fmtwarn_n): New function.
14142         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14143         appropriate, get rid of all the fmtstr temporaries, move conditionals
14144         with G_() wrapped string literals directly into fmtwarn arguments,
14145         cast dir.len to (int), formatting fixes.
14147 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
14149         * doc/invoke.texi: Remove "Cilk Plus" references.
14151 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14152             Richard Biener  <rguenther@suse.de>
14154         PR ipa/84628
14155         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14156         for error or warning attributes if CALL_FROM_THUNK_P is set.
14157         Formatting fixes.
14159 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14161         PR target/56540
14162         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14163         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14165         PR target/56540
14166         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14167         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14169         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14170         instead of -1U in last predictors element's probability member.
14172 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
14174         PR ipa/83983
14175         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14176         arguments if they are comparable.
14178 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
14180         PR tree-optimization/84634
14181         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14182         masks and masked_loop_p with a single loop_masks, making sure it's
14183         null for bb vectorization.
14185 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
14187         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14188         (vect_analyze_data_ref_access): Use loop->safe_len rather than
14189         loop->force_vectorize to check whether there is no alias.
14191 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
14193         PR target/84614
14194         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14195         prototypes.
14196         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14197         comments.
14198         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14199         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14200         instead of a loop around prev_real_insn.
14201         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14202         prev_real_insn.
14204         PR inline-asm/84625
14205         * config/i386/i386.c (ix86_print_operand): Use conditional
14206         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14207         zero vector.
14209 2018-03-02  Richard Biener  <rguenther@suse.de>
14211         PR tree-optimization/84427
14212         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14213         (bitmap_set_subtract_values): Rewrite to handle multiple
14214         exprs per value.
14215         (clean): Likewise.
14216         (prune_clobbered_mems): Likewise.
14217         (phi_translate): Take edge instead of pred/phiblock.
14218         (phi_translate_1): Likewise.
14219         (phi_translate_set): Likewise.  Insert all translated
14220         exprs for a value into the set, keeping possibly multiple
14221         expressions per value.
14222         (compute_antic_aux): Adjust for phi_translate changes.
14223         When intersecting union the expressions and prune those
14224         not in the final value set, keeping possibly multiple
14225         expressions per value.  Do not use value-insertion
14226         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14227         all expressions.  Add verification that the value-sets
14228         only shrink during iteration.
14229         (compute_partial_antic_aux): Adjust for the phi_translate changes.
14230         (do_pre_regular_insertion): Likewise.
14231         (do_pre_partial_partial_insertion): Likewise.
14233 2018-03-02  Richard Biener  <rguenther@suse.de>
14235         PR target/82005
14236         * config/darwin.c (saved_debug_info_level): New static global.
14237         (darwin_asm_lto_start): Disable debug info generation for LTO out.
14238         (darwin_asm_lto_end): Restore debug info generation settings.
14240 2018-03-01  Martin Liska  <mliska@suse.cz>
14242         PR sanitizer/82484
14243         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14244         volatile arguments.
14246 2018-03-01  Richard Biener  <rguenther@suse.de>
14248         PR debug/84645
14249         * dwarf2out.c (gen_variable_die): Properly handle late VLA
14250         type annotation with LTO when debug was disabled at compile-time.
14252 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
14254         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14255         XINT with INTVAL.
14256         (mips_final_postscan_insn): Likewise.
14258 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
14260         PR rtl-optimization/84528
14261         * alias.c (init_alias_target): Add commentary.
14262         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14263         a unique base value if the frame pointer is not eliminated
14264         to the stack pointer.
14266 2018-03-01  Tom de Vries  <tom@codesourcery.com>
14268         PR rtl-optimization/83327
14269         * lra-int.h (hard_regs_spilled_into): Declare.
14270         * lra.c (hard_regs_spilled_into): Define.
14271         (init_reg_info): Init hard_regs_spilled_into.
14272         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14273         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14274         (process_bb_lives): Handle hard_regs_spilled_into.
14275         (lra_create_live_ranges_1): Before doing liveness propagation, clear
14276         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14278 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
14280         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14281         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14282         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14283         * config/rs6000/aix72.h: New file.
14285 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
14287         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14288         instead of warning_at with conditional singular and plural messages
14289         where possible.
14291         PR target/52991
14292         * stor-layout.c (update_alignment_for_field): For
14293         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14294         && !DECL_PACKED (field), do the alignment update, just use
14295         only desired_align instead of MAX (type_align, desired_align)
14296         as the alignment.
14297         (place_field): Don't do known_align < desired_align handling
14298         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14299         is non-NULL, instead do it after rli->prev_field handling and
14300         only if not within a bitfield word.  For DECL_PACKED (field)
14301         use type_align of BITS_PER_UNIT.
14303 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
14305         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14306         superfluous parentheses and trailing spaces.
14308 2018-02-28  Richard Biener  <rguenther@suse.de>
14310         PR tree-optimization/84584
14311         * graphite-scop-detection.c (scop_detection::add_scop): Discard
14312         SCoPs with fake exit edge.
14314 2018-02-28  Martin Liska  <mliska@suse.cz>
14316         PR testsuite/84597
14317         * timevar.c (timer::print): Fix format to properly print 100%
14318         values.
14320 2018-02-28  Richard Biener  <rguenther@suse.de>
14322         PR middle-end/84607
14323         * genmatch.c (capture_info::walk_match): Do not mark
14324         captured expressions without operands as expr_p given
14325         they act more like predicates and should be subject to
14326         "lost tail" side-effect preserving.
14328 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
14330         PR rtl-optimization/81611
14331         * auto-inc-dec.c (attempt_change): Move dead note from
14332         mem_insn if it's the next use of regno
14333         (find_address): Take address use of reg holding
14334         non-incremented value.  Add parm to limit search to the named
14335         reg only.
14336         (merge_in_block): Attempt to use a mem insn that is the next
14337         use of the original regno.
14339 2018-02-27  Martin Sebor  <msebor@redhat.com>
14341         PR c++/83871
14342         * doc/invoke.texi (-Wmissing-attributes): New option.
14343         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14345 2018-02-27  Martin Sebor  <msebor@redhat.com>
14347         PR translation/84207
14348         * diagnostic-core.h (warning_n, error_n, inform_n): Change
14349         n argument to unsigned HOST_WIDE_INT.
14350         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14351         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
14352         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14353         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14355 2018-02-27  Richard Biener  <rguenther@suse.de>
14357         PR tree-optimization/84512
14358         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14359         Do not use the estimate returned from record_stmt_cost for
14360         the scalar iteration cost but sum properly using add_stmt_cost.
14362 2018-02-27  Richard Biener  <rguenther@suse.de>
14364         PR tree-optimization/84466
14365         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14366         Adjust last change to less strictly validate use operands.
14368 2018-02-27  Martin Liska  <mliska@suse.cz>
14370         PR gcov-profile/84548
14371         * gcov.c (process_file): Allow partial overlap and consider it
14372         also as group functions.
14373         (output_lines): Properly calculate range of lines for a group.
14375 2018-02-27  Martin Liska  <mliska@suse.cz>
14377         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14378         'ggc' suffixes.  Change first column width.
14379         (timer::print): Fix formatting of the column.
14381 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
14383         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14384         preserve inline entry blocks for the sake of debug inline
14385         entry point markers alone.
14386         (remove_unused_locals): Suggest in comments a better place to
14387         force the preservation of inline entry blocks that are
14388         otherwise unused, but do not preserve them.
14390 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
14392         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14394 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
14396         PR target/84039
14397         * config/i386/constraints.md (Bs): Replace
14398         ix86_indirect_branch_register with
14399         TARGET_INDIRECT_BRANCH_REGISTER.
14400         (Bw): Likewise.
14401         * config/i386/i386.md (indirect_jump): Likewise.
14402         (tablejump): Likewise.
14403         (*sibcall_memory): Likewise.
14404         (*sibcall_value_memory): Likewise.
14405         Peepholes of indirect call and jump via memory: Likewise.
14406         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14407         (*sibcall_value_GOT_32): Likewise.
14408         * config/i386/predicates.md (indirect_branch_operand): Likewise.
14409         (GOT_memory_operand): Likewise.
14410         (call_insn_operand): Likewise.
14411         (sibcall_insn_operand): Likewise.
14412         (GOT32_symbol_operand): Likewise.
14413         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14415 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
14417         PR rtl-optimization/83496
14418         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14419         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
14420         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14421         redundant insn, if any.
14422         (relax_delay_slots): Likewise.
14423         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14425 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
14427         PR tree-optimization/83965
14428         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14429         that grouped statements are part of a reduction chain.  Return
14430         true if the statement is not marked as a reduction itself but
14431         is part of a group.
14432         (vect_recog_dot_prod_pattern): Don't check whether the statement
14433         is part of a group here.
14434         (vect_recog_sad_pattern): Likewise.
14435         (vect_recog_widen_sum_pattern): Likewise.
14437 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
14439         PR debug/84545
14440         * final.c (rest_of_clean_state): Also look for calls inside sequences.
14442 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
14444         PR target/84530
14445         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14446         the bool argument.
14447         (ix86_output_indirect_function_return): New prototype.
14448         (ix86_split_simple_return_pop_internal): Likewise.
14449         * config/i386/i386.c (indirect_return_via_cx): New.
14450         (indirect_return_via_cx_bnd): Likewise.
14451         (indirect_thunk_name): Handle return va CX_REG.
14452         (output_indirect_thunk_function): Create alias for
14453         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14454         (ix86_output_indirect_jmp): Remove the bool argument.
14455         (ix86_output_indirect_function_return): New function.
14456         (ix86_split_simple_return_pop_internal): Likewise.
14457         * config/i386/i386.md (*indirect_jump): Don't pass false
14458         to ix86_output_indirect_jmp.
14459         (*tablejump_1): Likewise.
14460         (simple_return_pop_internal): Change it to define_insn_and_split.
14461         Call ix86_split_simple_return_pop_internal to split it for
14462         -mfunction-return=.
14463         (simple_return_indirect_internal): Call
14464         ix86_output_indirect_function_return instead of
14465         ix86_output_indirect_jmp.
14467 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
14469         PR bootstrap/84405
14470         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14471         memset and value initialization afterwards.
14473 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
14475         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14477 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14479         PR target/84521
14480         * common/config/aarch64/aarch64-common.c
14481         (aarch_option_optimization_table[]): Switch
14482         off fomit-frame-pointer
14484 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
14485             Chung-Ju Wu  <jasonwucj@gmail.com>
14487         * config/nds32/nds32-multiple.md (load_multiple): Disallow
14488         volatile memory.
14489         (store_multiple): Ditto.
14491 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
14493         * config.gcc: Add --with-cpu support for nds32 target.
14494         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14495         * config/nds32/nds32.opt: Add -mcpu= option.
14497 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
14499         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14500         isel=yes): Warn for these deprecated options.
14502 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
14504         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14505         ISA_2_5_MASKS_EMBEDDED.
14507 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
14509         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14510         p->max as pointers rather than using iterative_hash_expr.
14512 2018-02-23  Carl Love  <cel@us.ibm.com>
14514         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14515         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14516         BU_P8V_OVERLOAD_2.
14517         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14518         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14519         P8V_BUILTIN_VEC_VUNSIGNED2.
14521 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
14523         PR target/81572
14524         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14525         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14526         LRA_UNKNOWN_ALT.
14527         * lra-constraints.c (curr_insn_transform): Set up
14528         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
14529         LRA_UNKNOWN_ALT.
14530         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14531         * lra-eliminations.c (spill_pseudos): Ditto.
14532         (process_insn_for_elimination): Ditto.
14533         * lra-lives.c (reg_early_clobber_p): Use the new macros.
14534         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14535         LRA_NON_CLOBBERED_ALT.
14537 2018-02-22  Martin Sebor  <msebor@redhat.com>
14539         PR tree-optimization/84480
14540         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14541         to maybe_diag_stxncpy_trunc.  Call it.
14542         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14543         from gimple_fold_builtin_strcpy.  Print inlining stack.
14544         (handle_builtin_stxncpy): Print inlining stack.
14545         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14547 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
14549         PR target/84176
14550         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14551         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14552         and -fcheck-pointer-bounds are used together.
14553         (indirect_thunk_prefix): New enum.
14554         (indirect_thunk_need_prefix): New function.
14555         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
14556         "_nt" instead of "_bnd" for NOTRACK prefix.
14557         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14558         (output_indirect_thunk_function): Likewise.
14559         (): Likewise.
14560         (ix86_code_end): Update output_indirect_thunk_function calls.
14561         (ix86_output_indirect_branch_via_reg): Replace
14562         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14563         (ix86_output_indirect_branch_via_push): Likewise.
14564         (ix86_output_function_return): Likewise.
14565         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14566         incompatible with -fcf-protection=branch and
14567         -fcheck-pointer-bounds.
14569 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
14571         PR target/83335
14572         * config/aarch64/aarch64.c (aarch64_print_address_internal):
14573         Change gcc_assert call to output_operand_lossage.
14575 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
14577         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14579 2018-02-22  DJ Delorie  <dj@redhat.com>
14580             Sebastian Perta  <sebastian.perta@renesas.com>
14581             Oleg Endo  <olegendo@gcc.gnu.org>
14583         * config/rx/rx.c (rx_rtx_costs): New function.
14584         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14586 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14588         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14590 2018-02-22  Martin Liska  <mliska@suse.cz>
14592         PR driver/83193
14593         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14594         Add "native" as a possible value.
14596 2018-02-22  Martin Liska  <mliska@suse.cz>
14598         PR driver/83193
14599         * config/i386/i386.c (ix86_option_override_internal):
14600         Add "native" as a possible value for -march and -mtune.
14602 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
14604         PR target/84502
14605         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14606         to all type variants.
14608         PR tree-optimization/84503
14609         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14610         width as info->bitpos + info->bitsize - start.
14611         (merged_store_group::merge_overlapping): Simplify width computation.
14612         (check_no_overlap): New function.
14613         (imm_store_chain_info::try_coalesce_bswap): Compute expected
14614         start + width and last_order of the group, fail if check_no_overlap
14615         fails.
14616         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14617         to group if check_no_overlap fails.
14619 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
14621         * config/rs6000/altivec.md: Delete contraint arguments to
14622         define_expand, define_split, and define_peephole2, and in
14623         define_insn_and_split if always unused.
14624         * config/rs6000/darwin.md: Ditto.
14625         * config/rs6000/dfp.md: Ditto.
14626         * config/rs6000/rs6000.md: Ditto.
14627         * config/rs6000/sync.md: Ditto.
14628         * config/rs6000/vector.md: Ditto.
14629         * config/rs6000/vsx.md: Ditto.
14631 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
14633         * config/rs6000/altivec.md: Write output control strings as braced
14634         blocks instead of double-quoted strings.
14635         * config/rs6000/darwin.md: Ditto.
14636         * config/rs6000/rs6000.md: Ditto.
14637         * config/rs6000/vector.md: Ditto.
14638         * config/rs6000/vsx.md: Ditto.
14640 2018-02-21  Jason Merrill  <jason@redhat.com>
14642         PR c++/84314 - ICE with templates and fastcall attribute.
14643         * attribs.c (build_type_attribute_qual_variant): Remove assert.
14645 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
14647         * ipa-cp.c (determine_versionability): Fix comment typos.
14649 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
14651         PR c/84229
14652         * ipa-cp.c (determine_versionability): Do not version functions caling
14653         va_arg_pack.
14655 2018-02-21  Martin Liska  <mliska@suse.cz>
14657         PR driver/83193
14658         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14659         Add "native" as a possible value.
14660         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
14661         the macro when native cpu detection is available.
14663 2018-02-21  Martin Liska  <mliska@suse.cz>
14665         PR driver/83193
14666         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14667         Add "native" as a possible value.
14668         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14669         when native cpu detection is available.
14671 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
14672             Martin Sebor  <msebor@redhat.com>
14674         PR tree-optimization/84478
14675         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14676         false.
14677         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14678         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14679         support which is conservatively correct, for 2 only stay conservative
14680         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
14681         argument to the 2 argument get_range_strlen, adjust 6 arg
14682         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14683         false.
14684         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14685         (gimple_fold_builtin_strlen): Pass true as last argument to
14686         get_range_strlen.
14688 2018-02-20  Martin Sebor  <msebor@redhat.com>
14690         PR middle-end/84095
14691         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14692         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
14693         (builtin_memref::builtin_memref): Factor out parts into
14694         set_base_and_offset and call it.
14696 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
14698         PR middle-end/84406
14699         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14700         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14701         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
14702         search at the associated MODE_INT.
14704 2018-02-20  Jeff Law  <law@redhat.com>
14706         PR middle-end/82123
14707         PR tree-optimization/81592
14708         PR middle-end/79257
14709         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14710         for range data rather than using global data.
14711         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14712         range data rather than using global data.
14713         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14714         pass it to children as needed.
14715         (struct directive::fmtresult): Similarly.
14716         (struct directive::set_width): Similarly.
14717         (struct directive::set_precision): Similarly.
14718         (format_integer, format_directive, parse_directive): Similarly.
14719         (format_none): Accept unnamed vr_values parameter.
14720         (format_percent, format_floating, format_character): Similarly.
14721         (format_string, format_plain): Similarly.
14722         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14723         the EVRP range analyzer for range data rather than using global data.
14724         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14725         gimple-ssa-evrp-analyze.h
14726         (class sprintf_dom_walker): Add after_dom_children member function.
14727         Add evrp_range_analyzer member.
14728         (sprintf_dom_walker::before_dom_children): Call into the EVRP
14729         range analyzer as needed.
14730         (sprintf_dom_walker::after_dom_children): New member function.
14731         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14732         if not optimizing.
14733         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14734         (evrp_range_analyzer::pop_to_marker): Likewise.
14736 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
14738         PR tree-optimization/84419
14739         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14740         with the required type if its current type is compatible but
14741         different.
14743 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
14745         PR middle-end/82004
14746         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14747         after vectorization.
14749 2018-02-20  Martin Liska  <mliska@suse.cz>
14751         PR driver/83193
14752         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14753         possible values if we don't have a hint.
14755 2018-02-20  Martin Liska  <mliska@suse.cz>
14757         PR c/84310
14758         PR target/79747
14759         * final.c (shorten_branches): Build align_tab array with one
14760         more element.
14761         * opts.c (finish_options): Add alignment option limit check.
14762         (MAX_CODE_ALIGN): Likewise.
14763         (MAX_CODE_ALIGN_VALUE): Likewise.
14764         * doc/invoke.texi: Document maximum allowed option value for
14765         all -falign-* options.
14767 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
14769         PR target/84146
14770         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14771         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14772         * var-tracking.c (emit_note_insn_var_location): Remove all references
14773         to NOTE_INSN_CALL_ARG_LOCATION.
14774         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14775         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14776         Use copy_rtx_if_shared.
14777         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14778         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14779         (dwarf2out_var_location): Remove handling of
14780         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14781         on call_insn.
14782         * final.c (final_scan_insn): Remove all references to
14783         NOTE_INSN_CALL_ARG_LOCATION.
14784         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
14785         before dumping final insns.
14786         * except.c (emit_note_eh_region_end): Remove all references to
14787         NOTE_INSN_CALL_ARG_LOCATION.
14788         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14789         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14790         * config/arc/arc.c (hwloop_optimize): Likewise.
14791         * config/arm/arm.c (create_fix_barrier): Likewise.
14792         * config/s390/s390.c (s390_chunkify_start): Likewise.
14793         * config/sh/sh.c (find_barrier): Likewise.
14794         * config/i386/i386.c (rest_of_insert_endbranch,
14795         ix86_seh_fixup_eh_fallthru): Likewise.
14796         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14797         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14798         * config/frv/frv.c (frv_function_prologue): Likewise.
14799         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
14800         reg note.
14801         (note_outside_basic_block_p): Remove all references to
14802         NOTE_INSN_CALL_ARG_LOCATION.
14803         * gengtype.c (adjust_field_rtx_def): Likewise.
14804         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14805         Likewise.
14806         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14807         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14809         PR c++/84444
14810         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14811         is ADDR_EXPR.
14813         PR tree-optimization/84452
14814         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14815         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14816         is NULL.
14818 2018-02-19  Martin Liska  <mliska@suse.cz>
14820         PR sanitizer/82183
14821         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14823 2018-02-19  Martin Liska  <mliska@suse.cz>
14824             Richard Sandiford  <richard.sandiford@linaro.org>
14826         PR tree-optimization/82491
14827         * gimple-fold.c (get_base_constructor): Make earlier bail out
14828         to prevent ubsan.
14830 2018-02-19  Carl Love  <cel@us.ibm.com>
14832         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14833         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14834         BU_P8V_OVERLOAD_1.
14835         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14836         P8V_BUILTIN_VEC_NEG.
14838 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
14840         * config/rl78/rl78.md (movdf): New define expand.
14842 2018-02-19  Martin Liska  <mliska@suse.cz>
14844         PR other/80589
14845         * doc/invoke.texi: Fix typo.
14846         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14848 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
14850         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14851         handle rs6000_single_float and rs6000_double_float specially for
14852         e500 family CPUs.
14854 2018-02-16  Jeff Law  <law@redhat.com>
14856         * config/rx/rx.c (add_pop_cfi_notes): New function.;
14857         (pop_regs): Use it.
14859 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
14861         PR ipa/84425
14862         * ipa-inline.c (inline_small_functions): Fix a typo.
14864 2018-02-16  Nathan Sidwell  <nathan@acm.org>
14866         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14868 2018-02-16  Carl Love  <cel@us.ibm.com>
14870         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14871         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14872         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14873         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14874         expansion to P8V_BUILTIN_VEC_FLOAT2.
14876 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
14878         PR rtl-optimization/70023
14879         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14880         src_regno into account.
14882 2018-02-16  Carl Love  <cel@us.ibm.com>
14884         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14885         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14886         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14887         * config/rs6000/rs6000.c: Remove case statements for
14888         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14889         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14890         and P9V_BUILTIN_VEC_VINSERT4B.
14891         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14892         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14893         * config/rs6000/vsx.md:
14894         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14895         vec_insert4b.
14897 2018-02-16  Carl Love  <cel@us.ibm.com>
14899         * config/rs6000/altivec.h: Add builtin names vec_extract4b
14900         vec_insert4b.
14901         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14902         definitions.
14903         * config/rs6000/rs6000-c.c: Add the definitions for
14904         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14905         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14906         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14907         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
14908         definition for insert4b and define insn *insert3b_internal.
14909         * doc/extend.texi: Add documentation for vec_extract4b.
14911 2018-02-16  Nathan Sidwell  <nathan@acm.org>
14913         * doc/extend.texi (Backwards Compatibility): Mention friend
14914         injection.  Note for-scope is deprecated.
14915         * doc/invoke.texi (-ffriend-injection): Deprecate.
14917 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
14919         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14920         that moved to I2, also allow destinations that are a paradoxical
14921         subreg (instead of a normal reg).
14923 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
14925         PR target/83831
14926         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14927         to QImode.
14929 2018-02-16  Richard Biener  <rguenther@suse.de>
14931         PR tree-optimization/84037
14932         PR tree-optimization/84016
14933         PR target/82862
14934         * config/i386/i386.c (ix86_builtin_vectorization_cost):
14935         Adjust vec_construct for the fact we need additional higher latency
14936         128bit inserts for AVX256 and AVX512 vector builds.
14937         (ix86_add_stmt_cost): Scale vector construction cost for
14938         elementwise loads.
14940 2018-02-16  Richard Biener  <rguenther@suse.de>
14942         PR tree-optimization/84417
14943         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14944         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14945         (non_rewritable_lvalue_p): Likewise, use poly-ints.
14947 2018-02-16  Martin Liska  <mliska@suse.cz>
14949         PR sanitizer/84307
14950         * internal-fn.def (ASAN_CHECK): Set proper flags.
14951         (ASAN_MARK): Likewise.
14953 2018-02-16  Julia Koval  <julia.koval@intel.com>
14955         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14956         from PTA_CANNONLAKE.
14958 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
14960         PR target/84272
14961         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14962         Use ++iter rather than iter++ for std::list iterators.
14963         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
14964         defer deleting them until all nodes in the forest are processed.  Do
14965         free even leaf nodes.  Change to_process into auto_vec.
14967         PR bootstrap/84405
14968         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14969         * vec.h (vec_default_construct): Use memset instead of placement new
14970         if BROKEN_VALUE_INITIALIZATION is defined.
14971         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14972         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14973         is defined.
14975         PR rtl-optimization/83723
14976         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14977         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
14978         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
14979         recursive calls.
14980         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14981         callers.
14982         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14984 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
14986         PR rtl-optimization/81443
14987         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14988         from inner REGs to paradoxical SUBREGs.
14990 2018-02-16  Richard Biener  <rguenther@suse.de>
14992         PR tree-optimization/84399
14993         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14994         For operands we can analyze at their definition make sure we can
14995         analyze them at each use as well.
14997 2018-02-16  Richard Biener  <rguenther@suse.de>
14999         PR tree-optimization/84190
15000         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15001         volatile accesses if the decl isn't volatile.
15003 2018-02-15  Jason Merrill  <jason@redhat.com>
15005         PR c++/84314 - ICE with templates and fastcall attribute.
15006         * attribs.c (build_type_attribute_qual_variant): Don't clobber
15007         TYPE_CANONICAL on an existing type.
15009 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
15011         PR tree-optimization/84383
15012         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15013         dstoff nor call operand_equal_p if dstbase is NULL.
15015         PR tree-optimization/84334
15016         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15017         also a CONSTANT_CLASS_P, punt.
15019 2018-02-14  Jim Wilson  <jimw@sifive.com>
15021         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15022         first SMALL_OPERAND check.  New local min_second_step.  Move assert
15023         to where locals are set.  Add TARGET_RVC support.
15024         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15026 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
15028         * doc/invoke.texi: Correct -Wformat-overflow code sample.
15030 2018-02-14  Martin Sebor  <msebor@redhat.com>
15032         PR tree-optimization/83698
15033         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15034         arrays constrain the offset range to their bounds.
15035         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15036         (builtin_access::overlap): Avoid setting the size of overlap if it's
15037         already been set.
15038         (maybe_diag_overlap): Also consider arrays when deciding what values
15039         of offsets to include in diagnostics.
15041 2018-02-14  Martin Sebor  <msebor@redhat.com>
15043         PR c/84108
15044         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15045         that correspond to the kind of a declaration.
15047 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
15049         PR target/83984
15050         * config/pa/pa.md: Load address of PIC label using the linkage table
15051         if the label is nonlocal.
15053 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15055         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15056         warning message if user requests -maltivec=be.
15057         * doc/invoke.texi: Document deprecation of -maltivec=be.
15059 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
15061         PR target/84220
15062         * config/rs6000/rs6000-c.c: Update definitions for
15063         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15064         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15066 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
15068         PR target/84239
15069         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15070         add _get_ssp intrinsics. Remove argument from
15071         __builtin_ia32_rdssp[d|q].
15072         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15073         * config/i386/i386-builtin.def: Remove argument from
15074         __builtin_ia32_rdssp[d|q].
15075         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15076         ix86_expand_special_args_builtin for _rdssp[d|q].
15077         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15078         Clear register before usage.
15079         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15080         Add documentation for new _get_ssp and _inc_ssp intrinsics.
15082 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
15084         PR tree-optimization/84357
15085         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15086         operand 1 of an ARRAY_REF too.
15088 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
15090         PR target/83831
15091         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15092         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15093         declarations.
15094         (set_of_reg): New struct.
15095         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15096         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15097         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15098         functions.
15099         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15100         Split into bitclr, bitset, bitinvert patterns if appropriate.
15101         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15102         use rx_fuse_in_memory_bitop.
15103         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15104         to named insn, correct maximum insn length.
15106 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
15108         PR target/79242
15109         * machmode.def: Define a complex mode for PARTIAL_INT.
15110         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15111         MODE_PARTIAL_INT.
15112         * doc/rtl.texi: Document CSPImode.
15113         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15114         handling.
15115         (msp430_hard_regno_nregs_with_padding): Likewise.
15117 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
15119         PR target/84279
15120         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15122 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
15124         PR rtl-optimization/84169
15125         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
15126         we generated a parallel as new i3 and we split that to new i2 and i3
15127         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
15128         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
15129         those to i2, not i1.  Partially rewrite this scan code.
15131 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
15133         PR c/82210
15134         * stor-layout.c (place_field): For variable length fields, adjust
15135         offset_align afterwards not just based on the field's alignment,
15136         but also on the size.
15138         PR middle-end/84309
15139         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15140         of exps and logs in the use_exp2 case.
15142 2018-02-13  Jeff Law  <law@redhat.com>
15144         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15145         entry for "vector".
15147         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15148         ARGS as unused.
15150 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
15152         PR debug/84342
15153         PR debug/84319
15154         * common.opt (gas-loc-support, gas-locview-support): New.
15155         (ginline-points, ginternal-reset-location-views): New.
15156         * doc/invoke.texi: Document them.  Use @itemx where intended.
15157         (gvariable-location-views): Adjust.
15158         * target.def (reset_location_view): New.
15159         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15160         (TARGET_RESET_LOCATION_VIEW): New.
15161         * doc/tm.texi: Rebuilt.
15162         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15163         (dwarf2out_default_as_locview_support): New.
15164         (output_asm_line_debug_info): Use option variables.
15165         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15166         (output_loc_list): Likewise.
15167         (add_high_low_attributes): Check option variables.
15168         Don't output entry view attribute in strict mode.
15169         (gen_inlined_subroutine_die): Check option variables.
15170         (dwarf2out_inline_entry): Likewise.
15171         (init_sections_and_labels): Likewise.
15172         (dwarf2out_early_finish): Likewise.
15173         (maybe_reset_location_view): New, from...
15174         (dwarf2out_var_location): ... here.  Call it.
15175         * debug.h (dwarf2out_default_as_loc_support): Declare.
15176         (dwarf2out_default_as_locview_support): Declare.
15177         * hooks.c (hook_int_rtx_insn_0): New.
15178         * hooks.h (hook_int_rtx_insn_0): Declare.
15179         * toplev.c (process_options): Take -gas-loc-support and
15180         -gas-locview-support from dwarf2out.  Enable
15181         -gvariable-location-views by default only with locview
15182         assembler support.  Enable -ginternal-reset-location-views by
15183         default only if the target defines the corresponding hook.
15184         Enable -ginline-points by default if location views are
15185         enabled; force it disabled if statement frontiers are
15186         disabled.
15187         * tree-inline.c (expand_call_inline): Check option variables.
15188         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15190 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
15192         PR tree-optimization/84321
15193         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15194         handling.  Also check whether the anti-range contains any values
15195         that satisfy the mask; switch to a VR_RANGE if not.
15197 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
15199         PR sanitizer/84340
15200         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15202 2018-02-13  Martin Jambor  <mjambor@suse.cz>
15204         PR c++/83990
15205         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15206         of call statements, also set location of a load to a temporary.
15208 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
15210         * config/rl78/rl78.c (add_vector_labels): New function.
15211         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15212         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15213         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15214         which checks that no arguments are passed.
15215         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15216         * doc/extend.texi: Documentation for the new attribute.
15218 2018-02-13  Andreas Schwab  <schwab@suse.de>
15220         * config/riscv/linux.h (CPP_SPEC): Define.
15222 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
15224         PR target/84335
15225         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15226         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15227         OPTION_MASK_ISA_AES as first argument to def_builtin_const
15228         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15229         instead of OPTION_MASK_ISA_PCLMUL as first argument to
15230         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15231         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15232         temporarily for AES and PCLMUL builtins.
15234         PR tree-optimization/84339
15235         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15236         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15237         Formatting fixes.
15239         PR middle-end/84309
15240         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15241         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15242         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15243         inline function.
15244         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15245         inline function.
15246         * omp-simd-clone.h: New file.
15247         * omp-simd-clone.c: Include omp-simd-clone.h.
15248         (expand_simd_clones): No longer static.
15249         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15250         cgraph.h and omp-simd-clone.h.
15251         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15252         (vect_recog_widen_shift_pattern): Formatting fix.
15253         (vect_pattern_recog_1): Don't check optab for calls.
15255         PR target/84336
15256         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15257         operands[2] into a REG before using gen_lowpart on it.
15259 2018-02-12  Jeff Law  <law@redhat.com>
15261         PR target/83760
15262         * config/sh/sh.c (find_barrier): Consider a sibling call
15263         a barrier as well.
15265         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15266         successfully back substituting a reg.
15268 2018-02-12  Richard Biener  <rguenther@suse.de>
15270         PR tree-optimization/84037
15271         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15272         parameter, move visited init to caller.
15273         (vect_slp_analyze_operations): Separate cost from validity
15274         check, initialize visited once for all instances.
15275         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15276         for all instances.
15277         * tree-vect-stmts.c (vect_model_simple_cost): Make early
15278         out an assert.
15279         (vect_model_promotion_demotion_cost): Likewise.
15280         (vectorizable_bswap): Guard cost modeling with !slp_node
15281         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15282         SLP stmts.
15283         (vectorizable_call): Likewise.
15284         (vectorizable_conversion): Likewise.
15285         (vectorizable_assignment): Likewise.
15286         (vectorizable_shift): Likewise.
15287         (vectorizable_operation): Likewise.
15288         (vectorizable_store): Likewise.
15289         (vectorizable_load): Likewise.
15290         (vectorizable_condition): Likewise.
15291         (vectorizable_comparison): Likewise.
15293 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
15295         PR sanitizer/84307
15296         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15297         (ASAN_MARK): Fix fnspec to account for return value, change pointer
15298         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15300 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
15302         PR middle-end/83665
15303         * params.def (inline-min-speedup): Increase from 8 to 15.
15304         (max-inline-insns-auto): Decrease from 40 to 30.
15305         * ipa-split.c (consider_split): Add some buffer for function to
15306         be considered inlining candidate.
15307         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15308         default values.
15310 2018-02-12  Richard Biener  <rguenther@suse.de>
15312         PR tree-optimization/84037
15313         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15314         matched stmts if we cannot swap the non-matched ones.
15316 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
15318         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15319         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15320         _mm_maskz_scalef_round_ss): New intrinsics.
15321         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15322         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15323         __builtin_ia32_scalefss_round): Remove.
15324         (__builtin_ia32_scalefsd_mask_round,
15325         __builtin_ia32_scalefss_mask_round): New intrinsics.
15326         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15327         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15328         ((match_operand:VF_128 2 "<round_nimm_predicate>"
15329         "<round_constraint>")): Changed to ...
15330         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15331         "<round_scalar_constraint>")): ... this.
15332         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15333         %0, %1, %2<round_op3>}"): Changed to ...
15334         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15335         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15336         %2<round_scalar_mask_op3>}"): ... this.
15337         * config/i386/subst.md (round_scalar_nimm_predicate): New.
15339 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
15341         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15342         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15343         (_mm_maskz_sqrt_round_ss): New intrinsics.
15344         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15345         (__builtin_ia32_sqrtsd_mask_round)
15346         (__builtin_ia32_sqrtss_mask_round): New builtins.
15347         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15348         (__builtin_ia32_sqrtss_round): Remove.
15349         (__builtin_ia32_sqrtsd_mask_round)
15350         (__builtin_ia32_sqrtss_mask_round): New builtins.
15351         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15352         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15353         ((match_operand:VF_128 1 "vector_operand"
15354         "xBm,<round_constraint>")): Changed to ...
15355         ((match_operand:VF_128 1 "vector_operand"
15356         "xBm,<round_scalar_constraint>")): ... this.
15357         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15358         %0, %2, %<iptr>1<round_op3>}): Changed to ...
15359         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15360         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15361         %<iptr>1<round_scalar_mask_op3>}): ... this.
15362         ((set_attr "prefix" "<round_prefix>")): Changed to ...
15363         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15365 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
15367         PR target/84266
15368         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15369         Cast vec_cmpeq result to correct type.
15370         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15371         Cast vec_cmpgt result to correct type.
15373 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
15375         * final.c (final_scan_insn_1): Renamed from...
15376         (final_scan_insn): ... this.  New wrapper, to recover
15377         seen from the outermost call in recursive ones.
15378         * config/sparc/sparc.c (output_return): Drop seen from call.
15379         (output_sibcall): Likewise.
15380         * config/visium/visium.c (output_branch): Likewise.
15382 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
15384         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15385         function label.
15387 2018-02-10  Alan Modra  <amodra@gmail.com>
15389         PR target/84300
15390         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15391         Specify LR as an input.
15393 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
15395         PR sanitizer/83987
15396         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15397         remove_member_access_dummy_vars): New functions.
15398         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15399         lower_omp_1, execute_lower_omp): Use them.
15401         PR rtl-optimization/84308
15402         * shrink-wrap.c (spread_components): Release todo vector.
15404 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
15406         PR rtl-optimization/57193
15407         * ira-color.c (struct allocno_color_data): Add member
15408         conflict_allocno_hard_prefs.
15409         (update_conflict_allocno_hard_prefs): New.
15410         (bucket_allocno_compare_func): Add a preference based on
15411         conflict_allocno_hard_prefs.
15412         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15413         (color_allocnos): Remove a dead code.  Initiate
15414         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
15416 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
15418         PR target/84226
15419         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15420         constraint from =wa to wa.  Avoid a subreg on the output operand,
15421         instead use a pseudo and subreg it in a move.
15422         (p9_xxbrd_<mode>): Changed to ...
15423         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15424         (p9_xxbrd_v2df): New expander.
15425         (p9_xxbrw_<mode>): Changed to ...
15426         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15427         (p9_xxbrw_v4sf): New expander.
15429 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
15431         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15433 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
15435         PR target/83926
15436         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15437         multiply in 32-bit mode.
15438         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15439         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15440         mode.
15442 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
15444         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15445         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15446         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15447         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15449 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
15451         PR lto/84213
15452         * dwarf2out.c (is_trivial_indirect_ref): New function.
15453         (dwarf2out_late_global_decl): Do not generate a location
15454         attribute for variables that have a non-trivial DECL_VALUE_EXPR
15455         and that are not defined in the current unit.
15457 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
15459         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15460         instead of a libcall for UNORDERED.
15462 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
15464         PR target/82641
15465         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15466         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15468 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15470         PR target/PR84295
15471         * config/s390/s390.c (s390_set_current_function): Invoke
15472         s390_indirect_branch_settings also if fndecl didn't change.
15474 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
15476         * config/rs6000/rs6000.md (blockage): Set length to zero.
15478 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
15480         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15482 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
15484         PR sanitizer/84285
15485         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15486         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15487         -static-lib*san.
15489         PR debug/84252
15490         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15491         PARALLEL incoming that failed vt_get_decl_and_offset check.
15493         PR middle-end/84237
15494         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15495         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15496         TREE_READONLY bit.
15497         (get_variable_section): For decls in named .bss* sections pass true as
15498         second argument to bss_initializer_p.
15500 2018-02-09  Marek Polacek  <polacek@redhat.com>
15501             Jakub Jelinek  <jakub@redhat.com>
15503         PR c++/83659
15504         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15505         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
15506         Sync some changes from cxx_fold_indirect_ref.
15508 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
15510         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15511         markers.
15512         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15513         (BLOCK_INLINE_ENTRY_LABEL): New.
15514         (dwarf2out_var_location): Disregard inline entry markers.
15515         (inline_entry_data): New struct.
15516         (inline_entry_data_hasher): New hashtable type.
15517         (inline_entry_data_hasher::hash): New.
15518         (inline_entry_data_hasher::equal): New.
15519         (inline_entry_data_table): New variable.
15520         (add_high_low_attributes): Add DW_AT_entry_pc and
15521         DW_AT_GNU_entry_view attributes if a pending entry is found
15522         in inline_entry_data_table.  Add old entry_pc attribute only
15523         if debug nonbinding markers are disabled.
15524         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15525         markers are enabled.
15526         (block_within_block_p, dwarf2out_inline_entry): New.
15527         (dwarf2out_finish): Check that no entries remained in
15528         inline_entry_data_table.
15529         * final.c (reemit_insn_block_notes): Handle inline entry notes.
15530         (final_scan_insn, notice_source_line): Likewise.
15531         (rest_of_clean_state): Skip inline entry markers.
15532         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15533         markers.
15534         * gimple.c (gimple_build_debug_inline_entry): New.
15535         * gimple.h (enum gimple_debug_subcode): Add
15536         GIMPLE_DEBUG_INLINE_ENTRY.
15537         (gimple_build_debug_inline_entry): Declare.
15538         (gimple_debug_inline_entry_p): New.
15539         (gimple_debug_nonbind_marker_p): Adjust.
15540         * insn-notes.def (INLINE_ENTRY): New.
15541         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15542         inline entry marker notes.
15543         (print_insn): Likewise.
15544         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15545         (INSN_DEBUG_MARKER_KIND): Likewise.
15546         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15547         * tree-inline.c (expand_call_inline): Build and insert
15548         debug_inline_entry stmt.
15549         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15550         inline entry blocks early, if nonbind markers are enabled.
15551         (dump_scope_block): Dump fragment info.
15552         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15553         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15554         (gimple_build_debug_inline_entry): New.
15555         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15556         Enable/disable inline entry points too.
15557         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15558         (DEBUG_INSN): Describe inline entry markers.
15560         * common.opt (gvariable-location-views): New.
15561         (gvariable-location-views=incompat5): New.
15562         * config.in: Rebuilt.
15563         * configure: Rebuilt.
15564         * configure.ac: Test assembler for view support.
15565         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15566         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15567         * dwarf2out.c (var_loc_view): New typedef.
15568         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15569         (dwarf2out_locviews_in_attribute): New.
15570         (dwarf2out_locviews_in_loclist): New.
15571         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15572         (enum dw_line_info_opcode): Add LI_adv_address.
15573         (struct dw_line_info_table): Add view.
15574         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15575         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15576         (zero_view_p): New variable.
15577         (ZERO_VIEW_P): New macro.
15578         (output_asm_line_debug_info): New.
15579         (struct var_loc_node): Add view.
15580         (add_AT_view_list, AT_loc_list): New.
15581         (add_var_loc_to_decl): Add view param.  Test it against last.
15582         (new_loc_list): Add view params.  Record them.
15583         (AT_loc_list_ptr): Handle loc and view lists.
15584         (view_list_to_loc_list_val_node): New.
15585         (print_dw_val): Handle dw_val_class_view_list.
15586         (size_of_die): Likewise.
15587         (value_format): Likewise.
15588         (loc_list_has_views): New.
15589         (gen_llsym): Set vl_symbol too.
15590         (maybe_gen_llsym, skip_loc_list_entry): New.
15591         (dwarf2out_maybe_output_loclist_view_pair): New.
15592         (output_loc_list): Output view list or entries too.
15593         (output_view_list_offset): New.
15594         (output_die): Handle dw_val_class_view_list.
15595         (output_dwarf_version): New.
15596         (output_compilation_unit_header): Use it.
15597         (output_skeleton_debug_sections): Likewise.
15598         (output_rnglists, output_line_info): Likewise.
15599         (output_pubnames, output_aranges): Update version comments.
15600         (output_one_line_info_table): Output view numbers in asm comments.
15601         (dw_loc_list): Determine current endview, pass it to new_loc_list.
15602         Call maybe_gen_llsym.
15603         (loc_list_from_tree_1): Adjust.
15604         (add_AT_location_description): Create view list attribute if
15605         needed, check it's absent otherwise.
15606         (convert_cfa_to_fb_loc_list): Adjust.
15607         (maybe_emit_file): Call output_asm_line_debug_info for test.
15608         (dwarf2out_var_location): Reset views as needed.  Precompute
15609         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
15610         attribute.  Set view.
15611         (new_line_info_table): Reset next view.
15612         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15613         (dwarf2out_source_line): Likewise.  Output view resets and labels to
15614         the assembler, or select appropriate line info opcodes.
15615         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15616         (optimize_string_length): Catch it.  Adjust.
15617         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
15618         dw_val_class_view_list, and remove it if no longer needed.
15619         (hash_loc_list): Hash view numbers.
15620         (loc_list_hasher::equal): Compare them.
15621         (optimize_location_lists): Check whether a view list symbol is
15622         needed, and whether the locview attribute is present, and
15623         whether they match.  Remove the locview attribute if no longer
15624         needed.
15625         (index_location_lists): Call skip_loc_list_entry for test.
15626         (dwarf2out_finish): Call output_asm_line_debug_info for test.
15627         Use output_dwarf_version.
15628         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15629         (struct dw_val_node): Add val_view_list.
15630         * final.c (SEEN_NEXT_VIEW): New.
15631         (set_next_view_needed): New.
15632         (clear_next_view_needed): New.
15633         (maybe_output_next_view): New.
15634         (final_start_function): Rename to...
15635         (final_start_function_1): ... this.  Take pointer to FIRST,
15636         add SEEN parameter.  Emit param bindings in the initial view.
15637         (final_start_function): Reintroduce SEEN-less interface.
15638         (final): Rename to...
15639         (final_1): ... this.  Take SEEN parameter.  Output final pending
15640         next view at the end.
15641         (final): Reintroduce seen-less interface.
15642         (final_scan_insn): Output pending next view before switching
15643         sections or ending a block.  Mark the next view as needed when
15644         outputting variable locations.  Notify debug backend of section
15645         changes, and of location view changes.
15646         (rest_of_handle_final): Adjust.
15647         * toplev.c (process_options): Autodetect value for debug variable
15648         location views option.  Warn on incompat5 without -gdwarf-5.
15649         * doc/invoke.texi (gvariable-location-views): New.
15650         (gvariable-location-views=incompat5): New.
15651         (gno-variable-location-views): New.
15653 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
15655         PR tree-optimization/84136
15656         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15657         that the result of find_edge is non-NULL.
15659 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
15661         PR target/83008
15662         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15663         storing integer register in SImode.  Fix cost of 256 and 512
15664         byte aligned SSE register store.
15666 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
15668         * config/i386/i386.c (ix86_multiplication_cost): Fix
15669         multiplication cost for TARGET_AVX512DQ.
15671 2018-02-08  Marek Polacek  <polacek@redhat.com>
15673         PR tree-optimization/84238
15674         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15675         get_range_strlen.
15677 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15679         PR tree-optimization/84265
15680         * tree-vect-stmts.c (vectorizable_store): Don't treat
15681         VMAT_CONTIGUOUS accesses as grouped.
15682         (vectorizable_load): Likewise.
15684 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15686         PR tree-optimization/81635
15687         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15688         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15689         (test_round_for_mask): New functions.
15690         (wide_int_cc_tests): Call test_round_for_mask.
15691         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15692         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15693         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15694         range returned by get_range_info.
15696 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
15698         PR ipa/81360
15699         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15700         * symtab.c: Include builtins.h
15701         (symtab_node::output_to_lto_symbol_table_p): Move here
15702         from lto-streamer-out.c:output_symbol_p.
15703         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15704         (output_symbol_p): Move all logic to symtab.c
15705         (produce_symtab): Update.
15707 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15709         * config/s390/s390-opts.h (enum indirect_branch): Define.
15710         * config/s390/s390-protos.h (s390_return_addr_from_memory)
15711         (s390_indirect_branch_via_thunk)
15712         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15713         (enum s390_indirect_branch_type): Define.
15714         * config/s390/s390.c (struct s390_frame_layout, struct
15715         machine_function): Remove.
15716         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15717         (indirect_branch_table_label_no, indirect_branch_table_name):
15718         Define variables.
15719         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15720         (enum s390_indirect_branch_option): Define.
15721         (s390_return_addr_from_memory): New function.
15722         (s390_handle_string_attribute): New function.
15723         (s390_attribute_table): Add new attribute handler.
15724         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15725         (s390_indirect_branch_via_thunk): New function.
15726         (s390_indirect_branch_via_inline_thunk): New function.
15727         (s390_function_ok_for_sibcall): When jumping via thunk disallow
15728         sibling call optimization for non z10 compiles.
15729         (s390_emit_call): Force indirect branch target to be a single
15730         register.  Add r1 clobber for non-z10 compiles.
15731         (s390_emit_epilogue): Emit return jump via return_use expander.
15732         (s390_reorg): Handle JUMP_INSNs as execute targets.
15733         (s390_option_override_internal): Perform validity checks for the
15734         new command line options.
15735         (s390_indirect_branch_attrvalue): New function.
15736         (s390_indirect_branch_settings): New function.
15737         (s390_set_current_function): Invoke s390_indirect_branch_settings.
15738         (s390_output_indirect_thunk_function):  New function.
15739         (s390_code_end): Implement target hook.
15740         (s390_case_values_threshold): Implement target hook.
15741         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15742         macros.
15743         * config/s390/s390.h (struct s390_frame_layout)
15744         (struct machine_function): Move here from s390.c.
15745         (TARGET_INDIRECT_BRANCH_NOBP_RET)
15746         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15747         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15748         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15749         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15750         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15751         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15752         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15753         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15754         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15755         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15756         (mnemonic attribute): Add values which aren't recognized
15757         automatically.
15758         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15759         pattern for branch conversion.  Fix mnemonic attribute.
15760         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15761         indirect branch via thunk if requested.
15762         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15763         ("*indirect_jump"): Disable for branch conversion using out of
15764         line thunks.
15765         ("indirect_jump_via_thunk<mode>_z10")
15766         ("indirect_jump_via_thunk<mode>")
15767         ("indirect_jump_via_inlinethunk<mode>_z10")
15768         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15769         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15770         ("casesi_jump_via_inlinethunk<mode>_z10")
15771         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15772         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15773         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15774         ("*indirect2_jump"): Disable for branch conversion.
15775         ("casesi_jump"): Turn into expander and expand patterns for branch
15776         conversion.
15777         ("return_use"): New expander.
15778         ("*return"): Emit return via thunk and rename it to ...
15779         ("*return<mode>"): ... this one.
15780         * config/s390/s390.opt: Add new options and and enum for the
15781         option values.
15783 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15785         * lra-constraints.c (match_reload): Unconditionally use
15786         gen_lowpart_SUBREG, rather than selecting between that
15787         and equivalent gen_rtx_SUBREG code.
15789 2018-02-08  Richard Biener  <rguenther@suse.de>
15791         PR tree-optimization/84233
15792         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15793         changed flag instead of boguously re-using phi_inserted.
15795 2018-02-08  Martin Jambor  <mjambor@suse.cz>
15797         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15798         static local variables.
15800 2018-02-08  Richard Biener  <rguenther@suse.de>
15802         PR tree-optimization/84278
15803         * tree-vect-stmts.c (vectorizable_store): When looking for
15804         smaller vector types to perform grouped strided loads/stores
15805         make sure the mode is supported by the target.
15806         (vectorizable_load): Likewise.
15808 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
15810         * config/aarch64/aarch64.c (aarch64_components_for_bb):
15811         Increase LDP/STP opportunities by adding adjacent callee-saves.
15813 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
15815         PR rtl-optimization/84068
15816         PR rtl-optimization/83459
15817         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15819 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
15821         PR tree-optimization/84224
15822         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15823         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15824         non-zero arguments.
15826 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
15828         PR target/84113
15829         * config/rs6000/altivec.md (*restore_world): Remove LR use.
15830         * config/rs6000/predicates.md (restore_world_operation): Adjust op
15831         count, remove one USE.
15833 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
15835         * doc/install.texi (Configuration): Document the
15836         --with-long-double-format={ibm,ieee} PowerPC configuration
15837         options.
15839         PR target/84154
15840         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15841         Convert from define_expand to be define_insn_and_split.  Rework
15842         float/double/_Float128 conversions to QI/HI/SImode to work with
15843         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
15844         conversions to QI/HImode types did a store and then a load to
15845         truncate the value.  For conversions to VSX registers, don't split
15846         the insn, instead emit the code directly.  Use the code iterator
15847         any_fix to combine signed and unsigned conversions.
15848         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15849         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15850         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15851         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15852         (fix_<mode>di2_hw): Likewise.
15853         (fixuns_<mode>di2_hw): Likewise.
15854         (fix_<mode>si2_hw): Likewise.
15855         (fixuns_<mode>si2_hw): Likewise.
15856         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15857         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15858         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15859         fix<uns>_trunc<SFDF:mode>si2_p8.
15860         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15861         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15862         (fix<uns>_<mode>_mem): Likewise.
15863         (fctiw<u>z_<mode>_mem): Likewise.
15864         (fix<uns>_<mode>_mem): Likewise.
15865         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15866         the register allocator from doing a direct move to the GPRs to do
15867         a store, and instead use the ISA 3.0 store byte/half-word from
15868         vector register instruction.  For IEEE 128-bit floating point,
15869         also optimize stores of 32-bit ints.
15870         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15872 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
15874         * genextract.c (push_pathstr_operand): New function to support
15875         [a-zA-Z].
15876         (walk_rtx): Call push_pathstr_operand.
15877         (print_path): Support [a-zA-Z].
15879 2018-02-07  Richard Biener  <rguenther@suse.de>
15881         PR tree-optimization/84037
15882         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15883         (cse_and_gimplify_to_preheader): Declare.
15884         (vect_get_place_in_interleaving_chain): Likewise.
15885         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15886         ivexpr_map.
15887         (_loop_vec_info::~_loop_vec_info): Delete it.
15888         (cse_and_gimplify_to_preheader): New function.
15889         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15890         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15891         (vectorizable_load): Likewise.  For grouped stores always base
15892         the IV on the first element.
15893         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15894         condition before gimplifying.
15896 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
15898         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15899         *DIV_EXPR and *MOD_EXPR.
15901 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
15903         PR target/84248
15904         * config/i386/i386.c (ix86_option_override_internal): Mask out
15905         the CF_SET bit when checking -fcf-protection.
15907 2018-02-07  Tom de Vries  <tom@codesourcery.com>
15909         PR libgomp/84217
15910         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15911         enough.
15913 2018-02-07  Richard Biener  <rguenther@suse.de>
15915         PR tree-optimization/84204
15916         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15917         this place.
15919         PR tree-optimization/84205
15920         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15921         special-case isl_ast_op_zdiv_r.
15923         PR tree-optimization/84223
15924         * graphite-scop-detection.c (gather_bbs::before_dom_children):
15925         Only add conditions from within the region.
15926         (gather_bbs::after_dom_children): Adjust.
15928 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
15930         PR target/84209
15931         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15932         * config/avr/avr.md: Only post-reload split REG-REG moves if
15933         either register is GENERAL_REG_P.
15935 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
15937         PR tree-optimization/84235
15938         * tree-ssa-scopedtables.c
15939         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15940         if the subtraction is performed in floating point type where NaNs are
15941         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15942         build 1.  Formatting fix.
15944 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
15946         PR target/84146
15947         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15948         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15949         and skip it regardless of bb boundaries.  Use CALL_P macro,
15950         don't test INSN_P (insn) together with CALL_P or JUMP_P check
15951         unnecessarily, formatting fix.
15953 2018-02-06  Michael Collison  <michael.collison@arm.com>
15955         * config/arm/thumb2.md:
15956         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15957         (*thumb_mov_notscc): Ditto.
15959 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
15961         PR target/84154
15962         * config/rs6000/rs6000.md (su code attribute): Use "u" for
15963         unsigned_fix, not "s".
15965 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15967         * configure.ac (gcc_fn_eh_frame_ro): New function.
15968         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15969         correct .eh_frame permissions.
15970         * configure: Regenerate.
15972 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
15974         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15975         irrelevant options.
15977 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15979         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15980         Display warning message for -mno-speculate-indirect-jumps.
15982 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
15984         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15985         Undocumented.
15986         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15988 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
15990         PR tree-optimization/84225
15991         * tree-eh.c (find_trapping_overflow): Only call
15992         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15994 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
15996         PR target/84145
15997         * config/i386/i386.c: Reimplement the check of possible options
15998         -mibt/-mshstk conbination. Change error messages.
15999         * doc/invoke.texi: Fix a typo: remove extra '='.
16001 2018-02-06  Marek Polacek  <polacek@redhat.com>
16003         PR tree-optimization/84228
16004         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16006 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
16008         PR target/82641
16009         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16010         emitted arch directives.
16011         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16012         __ARM_FEATURE_COPROC before changing architectures.
16014 2018-02-06  Richard Biener  <rguenther@suse.de>
16016         * config/i386/i386.c (print_reg): Fix typo.
16017         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16019 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
16021         * configure: Regenerate.
16023 2018-02-05  Martin Sebor  <msebor@redhat.com>
16025         PR tree-optimization/83369
16026         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16027         inlining context.
16029 2018-02-05  Martin Liska  <mliska@suse.cz>
16031         * doc/invoke.texi: Cherry-pick upstream r323995.
16033 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
16035         * ira.c (ira_init_register_move_cost): Adjust comment.
16037 2018-02-05  Martin Liska  <mliska@suse.cz>
16039         PR gcov-profile/84137
16040         * doc/gcov.texi: Fix typo in documentation.
16042 2018-02-05  Martin Liska  <mliska@suse.cz>
16044         PR gcov-profile/83879
16045         * doc/gcov.texi: Document necessity of --dynamic-list-data when
16046         using dlopen functionality.
16048 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
16050         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16051         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16052         _mm_maskz_range_ss, _mm_mask_range_round_ss,
16053         _mm_maskz_range_round_ss): New intrinsics.
16054         (__builtin_ia32_rangesd128_round)
16055         (__builtin_ia32_rangess128_round): Remove.
16056         (__builtin_ia32_rangesd128_mask_round,
16057         __builtin_ia32_rangess128_mask_round): New builtins.
16058         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16059         __builtin_ia32_rangess128_round): Remove.
16060         (__builtin_ia32_rangesd128_mask_round,
16061         __builtin_ia32_rangess128_mask_round): New builtins.
16062         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16063         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16064         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16065         "<round_saeonly_constraint>")): Changed to ...
16066         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16067         "<round_saeonly_scalar_constraint>")): ... this.
16068         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16069         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16070         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16071         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16072         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16074 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
16076         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16077         options.
16078         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16079         Remove all values except native, 8540 and 8548.
16081 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
16083         * config/i386/i386.c (ix86_output_function_return): Pass
16084         INVALID_REGNUM, instead of -1, as invalid register number to
16085         indirect_thunk_name and output_indirect_thunk.
16087 2018-02-02  Julia Koval  <julia.koval@intel.com>
16089         * config.gcc: Add -march=icelake.
16090         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16091         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16092         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16093         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16094         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16095         (processor_target_table): Add icelake.
16096         (ix86_option_override_internal): Handle new PTAs.
16097         (get_builtin_code_for_version): Handle icelake.
16098         (M_INTEL_COREI7_ICELAKE): New.
16099         (fold_builtin_cpu): Handle icelake.
16100         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16101         * doc/invoke.texi: Add -march=icelake.
16103 2018-02-02  Julia Koval  <julia.koval@intel.com>
16105         * config/i386/i386.c (ix86_option_override_internal): Change flags type
16106         to wide_int_bitmask.
16107         * wide-int-bitmask.h: New.
16109 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16111         PR target/84066
16112         * config/i386/i386.md: Replace Pmode with word_mode in
16113         builtin_setjmp_setup and builtin_longjmp to support x32.
16115 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
16117         PR target/56010
16118         PR target/83743
16119         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16120         #include "opts.h".
16121         (rs6000_supported_cpu_names): New static variable.
16122         (linux_cpu_translation_table): Likewise.
16123         (elf_platform) <cpu>: Define new static variable and use it.
16124         Translate kernel AT_PLATFORM name to canonical name if needed.
16125         Error if platform name is unknown.
16127 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
16129         PR target/84089
16130         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16132 2018-02-01  Jeff Law  <law@redhat.com>
16134         PR target/84128
16135         * config/i386/i386.c (release_scratch_register_on_entry): Add new
16136         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
16137         the scratch if RELEASE_VIA_POP is false.
16138         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16139         If we have to save a temporary register, decrement SIZE appropriately.
16140         Pass new arguments to release_scratch_register_on_entry.
16141         (ix86_adjust_stack_and_probe): Likewise.
16142         (ix86_emit_probe_stack_range): Pass new arguments to
16143         release_scratch_register_on_entry.
16145 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
16147         PR rtl-optimization/84157
16148         * combine.c (change_zero_ext): Use REG_P predicate in
16149         front of HARD_REGISTER_P predicate.
16151 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
16153         * config/avr/avr.c (avr_option_override): Move disabling of
16154         -fdelete-null-pointer-checks to...
16155         * common/config/avr/avr-common.c (avr_option_optimization_table):
16156         ...here.
16158 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16160         PR tree-optimization/81635
16161         * tree-data-ref.c (split_constant_offset_1): For types that
16162         wrap on overflow, try to use range info to prove that wrapping
16163         cannot occur.
16165 2018-02-01  Renlin Li  <renlin.li@arm.com>
16167         PR target/83370
16168         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16169         TAILCALL_ADDR_REGS.
16170         (aarch64_register_move_cost): Likewise.
16171         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16172         TAILCALL_ADDR_REGS.
16173         (REG_CLASS_NAMES): Likewise.
16174         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16175         TAILCALL_ADDR_REGS. Remove IP registers.
16176         * config/aarch64/aarch64.md (Ucs): Update register constraint.
16178 2018-02-01  Richard Biener  <rguenther@suse.de>
16180         * domwalk.h (dom_walker::dom_walker): Add additional constructor
16181         for specifying RPO order and allow NULL for that.
16182         * domwalk.c (dom_walker::dom_walker): Likewise.
16183         (dom_walker::walk): Handle NULL RPO order.
16184         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16185         in RPO order.
16186         (rewrite_update_dom_walker): Likewise.
16187         (mark_def_dom_walker): Likewise.
16189 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16191         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16192         (aarch64_maybe_expand_sve_subreg_move): Declare.
16193         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16194         * config/aarch64/predicates.md (aarch64_any_register_operand): New
16195         predicate.
16196         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16197         that are semantically a reverse operation.
16198         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16199         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16200         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16201         functions.
16202         (aarch64_can_change_mode_class): For big-endian, forbid changes
16203         between two SVE modes if they have different element sizes.
16205 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16207         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16208         the TImode handling for big-endian targets.
16210 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16212         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16213         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
16214         not just bytes.
16215         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16216         Remove BSWAP handing for big-endian targets and use the form of
16217         LD1RQ appropariate for the mode.
16219 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16221         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16222         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16223         duplicated element.
16225 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
16227         PR tearget/83845
16228         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16229         check for operands that need to go through aarch64_sve_reload_be.
16231 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
16233         PR tree-optimization/81661
16234         PR tree-optimization/84117
16235         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16236         * tree-eh.c: Include gimplify.h.
16237         (find_trapping_overflow, replace_trapping_overflow,
16238         rewrite_to_non_trapping_overflow): New functions.
16239         * tree-vect-loop.c: Include tree-eh.h.
16240         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16241         * tree-data-ref.c: Include tree-eh.h.
16242         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16244 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
16246         PR rtl-optimization/84123
16247         * combine.c (change_zero_ext): Check if hard register satisfies
16248         can_change_dest_mode before calling gen_lowpart_SUBREG.
16250 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
16252         PR target/82444
16253         * ira.c (ira_init_register_move_cost): Remove assert.
16255 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
16257         PR rtl-optimization/84071
16258         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16259         * doc/tm.texi: Regenerate.
16261 2018-01-31  Richard Biener  <rguenther@suse.de>
16263         PR tree-optimization/84132
16264         * tree-data-ref.c (analyze_miv_subscript): Properly
16265         check whether evolution_function_is_affine_multivariate_p
16266         before calling gcd_of_steps_may_divide_p.
16268 2018-01-31  Julia Koval  <julia.koval@intel.com>
16270         PR target/83618
16271         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16272         * config/i386/i386.md (rdpid_rex64) New.
16273         (rdpid): Make 32bit only.
16275 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
16277         PR lto/84105
16278         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16279         an IDENTIFIER_NODE for FUNCTION_TYPE's.
16281 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
16283         Revert
16284         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16286         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16288 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
16290         PR rtl-optimization/84071
16291         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16292         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16294 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
16296         * config/arc/arc.c (arc_handle_aux_attribute): New function.
16297         (arc_attribute_table): Add 'aux' attribute.
16298         (arc_in_small_data_p): Consider aux like variables.
16299         (arc_is_aux_reg_p): New function.
16300         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16301         (arc_get_aux_arg): New function.
16302         (prepare_move_operands): Handle aux-register access.
16303         (arc_handle_aux_attribute): New function.
16304         * doc/extend.texi (ARC Variable attributes): Add subsection.
16306 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
16308         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16309         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16310         (arc_attribute_table): Add 'uncached' attribute.
16311         (arc_print_operand): Print '.di' flag for uncached memory
16312         accesses.
16313         (arc_in_small_data_p): Do not consider for small data the uncached
16314         types.
16315         (arc_is_uncached_mem_p): New function.
16316         * config/arc/predicates.md (compact_store_memory_operand): Check
16317         for uncached memory accesses.
16318         (nonvol_nonimm_operand): Likewise.
16319         * doc/extend.texi (ARC Type Attribute): New subsection.
16321 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
16323         PR c/84100
16324         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16325         falign-loops=): Add Optimization flag.
16327 2018-01-30  Jeff Law  <law@redhat.com>
16329         PR target/84064
16330         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16331         INT_REGISTERS_SAVED.  Check it prior to calling
16332         get_scratch_register_on_entry.
16333         (ix86_adjust_stack_and_probe): Similarly.
16334         (ix86_emit_probe_stack_range): Similarly.
16335         (ix86_expand_prologue): Corresponding changes.
16337 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16339         PR target/40411
16340         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16341         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16343 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
16345         PR target/84112
16346         * lra-constraints.c (curr_insn_transform): Process AND in the
16347         address.
16349 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
16351         PR rtl-optimization/83986
16352         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16353         dependence against last_pending_memory_flush in addition to
16354         pending_jump_insns.
16356 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
16358         PR tree-optimization/81611
16359         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16360         copies.
16362 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16364         PR target/83758
16365         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16366         a reg rtx.
16368 2018-01-30  Richard Biener  <rguenther@suse.de>
16369             Jakub Jelinek  <jakub@redhat.com>
16371         PR tree-optimization/84111
16372         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16373         inner loops added during recursion, as they don't have up-to-date
16374         SSA form.
16376 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
16378         PR ipa/81360
16379         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16380         (can_inline_edge_by_limits_p): ... here.
16381         (can_early_inline_edge_p, check_callers,
16382         update_caller_keys, update_callee_keys, recursive_inlining,
16383         add_new_edges_to_heap, speculation_useful_p,
16384         inline_small_functions,
16385         inline_small_functions, flatten_function,
16386         inline_to_all_callers_1): Update.
16388 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
16390         * profile-count.c (profile_count::combine_with_ipa_count): Handle
16391         zeros correctly.
16393 2018-01-30  Richard Biener  <rguenther@suse.de>
16395         PR tree-optimization/83008
16396         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16397         invariant and constant vector uses in stmts when they need
16398         more than one stmt.
16400 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16402         PR bootstrap/84017
16403         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16404         * configure: Regenerate.
16406 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
16408         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16409         pattern.
16410         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16411         Use gen_rtx_REG rather than gen_lowpart.
16413 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
16415         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16416         rather than 0 when creating partial subregs.
16418 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
16420         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16421         of usage.
16423 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
16425         PR target/81550
16426         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16427         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16428         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16429         flags.  This restores the settings used before the 2017-07-24.
16430         Turning off pre increment/decrement/modify allows IVOPTS to
16431         optimize DF/SF loops where the index is an int.
16433 2018-01-29  Richard Biener  <rguenther@suse.de>
16434             Kelvin Nilsen  <kelvin@gcc.gnu.org>
16436         PR bootstrap/80867
16437         * tree-vect-stmts.c (vectorizable_call): Don't call
16438         targetm.vectorize_builtin_md_vectorized_function if callee is
16439         NULL.
16441 2018-01-22  Carl Love  <cel@us.ibm.com>
16443         * doc/extend.tex: Fix typo in second arg in
16444         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16446 2018-01-29  Richard Biener  <rguenther@suse.de>
16448         PR tree-optimization/84086
16449         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16450         (flush_ssaname_freelist): When SSA names were released reset
16451         the SCEV hash table.
16453 2018-01-29  Richard Biener  <rguenther@suse.de>
16455         PR tree-optimization/84057
16456         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16457         removed paths when removing edges.
16459 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
16461         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16462         -mfunction-return=@var{choice}.
16464 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16466         PR diagnostic/84034
16467         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16468         Handle CR like TAB.
16469         (layout::print_source_line): Likewise.
16470         (test_get_line_width_without_trailing_whitespace): Add test cases.
16472 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
16474         PR middle-end/84040
16475         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16476         debug insns.
16478 2018-01-26  Jim Wilson  <jimw@sifive.com>
16480         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16482         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16483         specified.
16485 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16487         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16488         and CMP + SUB-immediate -> SUBS.
16490 2018-01-26  Martin Sebor  <msebor@redhat.com>
16492         PR tree-optimization/83896
16493         * tree-ssa-strlen.c (get_string_len): Rename...
16494         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
16495         Avoid assuming length is constant.
16496         (handle_char_store): Use HOST_WIDE_INT for string length.
16498 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
16500         PR target/81763
16501         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16502         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16504 2018-01-26  Richard Biener  <rguenther@suse.de>
16506         PR rtl-optimization/84003
16507         * dse.c (record_store): Only record redundant stores when
16508         the earlier store aliases at least all accesses the later one does.
16510 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
16512         PR rtl-optimization/83985
16513         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16514         REG_CFA_RESTORE insns.
16515         (delete_unmarked_insns): Don't ignore separate shrink wrapping
16516         REG_CFA_RESTORE insns here.
16518         PR c/83989
16519         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16520         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16522 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16524         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16525         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16526         (arc_init): Likewise.
16527         (arc_override_options): Likewise.
16528         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16529         value.
16530         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16531         support.
16532         * config/arc/arc.h (TARGET_DBNZ): Define.
16533         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16534         properly set the tune attribute.
16535         (dbnz): Use TARGET_DBNZ guard.
16536         * config/arc/arc.opt (mtune): Add core3 option.
16538 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16540         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16541         recognize new pic like addresses.
16542         (arc_delegitimize_address): Clean up.
16544 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16546         * config/arc/arc-arches.def: Option mrf16 valid for all
16547         architectures.
16548         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16549         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16550         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16551         * config/arc/arc-tables.opt: Regenerate.
16552         * config/arc/arc.c (arc_conditional_register_usage): Handle
16553         reduced register file case.
16554         (arc_file_start): Set must have build attributes.
16555         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16556         mrf16 option value.
16557         * config/arc/arc.opt (mrf16): Add new option.
16558         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16559         * config/arc/genmultilib.awk: Handle new mrf16 option.
16560         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16561         * config/arc/t-multilib: Regenerate.
16562         * doc/invoke.texi (ARC Options): Document mrf16 option.
16564 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16566         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16567         * config/arc/arc.c (arc_handle_secure_attribute): New function.
16568         (arc_attribute_table): Add 'secure_call' attribute.
16569         (arc_print_operand): Print secure call operand.
16570         (arc_function_ok_for_sibcall): Don't optimize tail calls when
16571         secure.
16572         (arc_is_secure_call_p): New function.  * config/arc/arc.md
16573         (call_i): Add support for sjli instruction.
16574         (call_value_i): Likewise.
16575         * config/arc/constraints.md (Csc): New constraint.
16577 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
16578             John Eric Martin  <John.Martin@emmicro-us.com>
16580         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16581         * config/arc/arc.c (_arc_jli_section): New struct.
16582         (arc_jli_section): New type.
16583         (rc_jli_sections): New static variable.
16584         (arc_handle_jli_attribute): New function.
16585         (arc_attribute_table): Add jli_always and jli_fixed attribute.
16586         (arc_file_end): New function.
16587         (TARGET_ASM_FILE_END): Define.
16588         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16589         (arc_add_jli_section): New function.
16590         (jli_call_scan): Likewise.
16591         (arc_reorg): Call jli_call_scan.
16592         (arc_output_addsi): Remove 'S' from printing asm operand.
16593         (arc_is_jli_call_p): New function.
16594         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16595         operand.
16596         (movhi_insn): Likewise.
16597         (movsi_insn): Likewise.
16598         (movsi_set_cc_insn): Likewise.
16599         (loadqi_update): Likewise.
16600         (load_zeroextendqisi_update): Likewise.
16601         (load_signextendqisi_update): Likewise.
16602         (loadhi_update): Likewise.
16603         (load_zeroextendhisi_update): Likewise.
16604         (load_signextendhisi_update): Likewise.
16605         (loadsi_update): Likewise.
16606         (loadsf_update): Likewise.
16607         (movsicc_insn): Likewise.
16608         (bset_insn): Likewise.
16609         (bxor_insn): Likewise.
16610         (bclr_insn): Likewise.
16611         (bmsk_insn): Likewise.
16612         (bicsi3_insn): Likewise.
16613         (cmpsi_cc_c_insn): Likewise.
16614         (movsi_ne): Likewise.
16615         (movsi_cond_exec): Likewise.
16616         (clrsbsi2): Likewise.
16617         (norm_f): Likewise.
16618         (normw): Likewise.
16619         (swap): Likewise.
16620         (divaw): Likewise.
16621         (flag): Likewise.
16622         (sr): Likewise.
16623         (kflag): Likewise.
16624         (ffs): Likewise.
16625         (ffs_f): Likewise.
16626         (fls): Likewise.
16627         (call_i): Remove 'S' asm letter, add jli instruction.
16628         (call_value_i): Likewise.
16629         * config/arc/arc.op (mjli-always): New option.
16630         * config/arc/constraints.md (Cji): New constraint.
16631         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16632         operand.
16633         (subsf3_fpx): Likewise.
16634         (mulsf3_fpx): Likewise.
16635         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16636         asm operand.
16637         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16638         function attrbutes.
16639         * doc/invoke.texi (ARC): Document mjli-always option.
16641 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
16643         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16644         avoid addition with 0 and use incw and decw where possible.
16646 2018-01-26  Richard Biener  <rguenther@suse.de>
16648         PR tree-optimization/81082
16649         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16650         association if it requires casting to unsigned.
16651         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16652         from fold_plusminus_mult_expr to catch important cases late when
16653         range info is available.
16655 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16657         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16658         * configure.ac (hidden_linkonce): New test.
16659         * configure: Regenerate.
16660         * config.in: Regenerate.
16662 2018-01-26  Julia Koval  <julia.koval@intel.com>
16664         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16665         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16666         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16667         _mm_mask_bitshuffle_epi64_mask): Fix type.
16668         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16669         USI_FTYPE_V4DI_V4DI_USI): Remove.
16670         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16671         __builtin_ia32_vpshufbitqmb256_mask,
16672         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16673         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16674         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16676 2018-01-26  Alan Modra  <amodra@gmail.com>
16678         PR target/84033
16679         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16680         UNSPEC_VBPERMQ.  Sort other unspecs.
16682 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
16684         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16686 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
16688         PR middle-end/83055
16689         * predict.c (drop_profile): Do not push/pop cfun; update also
16690         node->count.
16691         (handle_missing_profiles): Fix logic looking for zero profiles.
16693 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
16695         PR middle-end/83977
16696         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16697         on functions with #pragma omp declare simd or functions with simd
16698         attribute.
16699         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16700         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16701         Remove trailing \n from warning_at calls.
16703 2018-01-25  Tom de Vries  <tom@codesourcery.com>
16705         PR target/84028
16706         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16707         for neutered workers.
16709 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
16711         PR target/68467
16712         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16713         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16715 2018-01-24  Jeff Law  <law@redhat.com>
16717         PR target/83994
16718         * i386.c (get_probe_interval): Move to earlier point.
16719         (ix86_compute_frame_layout): If -fstack-clash-protection and
16720         the frame is larger than the probe interval, then use pushes
16721         to save registers rather than reg->mem moves.
16722         (ix86_expand_prologue): Remove conditional for int_registers_saved
16723         assertion.
16725 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
16727         PR target/84014
16728         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16729         min/max for never referenced object.
16731 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
16733         PR middle-end/83977
16734         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16735         here.
16736         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16737         attributes from DECL_ATTRIBUTES (decl) without affecting
16738         DECL_ATTRIBUTES (current_function_decl).
16739         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16740         functions with non-NULL DECL_ABSTRACT_ORIGIN.
16742 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
16744         PR tree-optimization/83979
16745         * fold-const.c (fold_comparison): Use constant_boolean_node
16746         instead of boolean_{true,false}_node.
16748 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
16750         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16751         with zero counts.
16753 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16755         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16756         Simplify the clause that sets the length attribute.
16757         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16758         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16759         clause that sets the length attribute.
16760         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16762 2018-01-24  Tom de Vries  <tom@codesourcery.com>
16764         PR target/83589
16765         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16766         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16767         Add strict parameter.
16768         (prevent_branch_around_nothing): Insert dummy insn between branch to
16769         label and label with no ptx insn inbetween.
16770         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16772 2018-01-24  Tom de Vries  <tom@codesourcery.com>
16774         PR target/81352
16775         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16776         for neutered threads in warp.
16777         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16779 2018-01-24  Richard Biener  <rguenther@suse.de>
16781         PR tree-optimization/83176
16782         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16783         operands.
16785 2018-01-24  Richard Biener  <rguenther@suse.de>
16787         PR tree-optimization/82819
16788         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16789         code generating pluses that are no-ops in the target precision.
16791 2018-01-24  Richard Biener  <rguenther@suse.de>
16793         PR middle-end/84000
16794         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16796 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16798         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16799         to merge probabilities.
16800         * predict.c (probably_never_executed): Also mark as cold functions
16801         with global 0 profile and guessed local profile.
16802         * profile-count.c (profile_probability::combine_with_count): New
16803         member function.
16804         * profile-count.h (profile_probability::operator*,
16805         profile_probability::operator*=, profile_probability::operator/,
16806         profile_probability::operator/=): Reduce precision to adjusted
16807         and set value to guessed on contradictory divisions.
16808         (profile_probability::combine_with_freq): Remove.
16809         (profile_probability::combine_wiht_count): Declare.
16810         (profile_count::force_nonzero):: Set to adjusted.
16811         (profile_count::probability_in):: Set quality to adjusted.
16812         * tree-ssa-tail-merge.c (replace_block_by): Use
16813         combine_with_count.
16815 2018-01-23  Andrew Waterman  <andrew@sifive.com>
16816             Jim Wilson  <jimw@sifive.com>
16818         * config/riscv/riscv.c (riscv_stack_boundary): New.
16819         (riscv_option_override): Set riscv_stack_boundary.  Handle
16820         riscv_preferred_stack_boundary_arg.
16821         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16822         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16823         (STACK_BOUNDARY): Set to riscv_stack_boundary.
16824         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16825         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16826         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16828 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
16830         PR target/83905
16831         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16832         of struct ix86_frame.
16833         (ix86_expand_epilogue): Likewise.  Add a local variable for
16834         the reg_save_offset field in struct ix86_frame.
16836 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
16838         PR tree-optimization/82604
16839         * tree-loop-distribution.c (enum partition_kind): New enum item
16840         PKIND_PARTIAL_MEMSET.
16841         (partition_builtin_p): Support above new enum item.
16842         (generate_code_for_partition): Ditto.
16843         (compute_access_range): Differentiate cases that equality can be
16844         proven at all loops, the innermost loops or no loops.
16845         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16846         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
16847         (finalize_partitions, distribute_loop): Don't fuse partition of
16848         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16849         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16850         parloop is enabled.
16852 2018-01-23  Martin Liska  <mliska@suse.cz>
16854         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16855         order to ignore the predictor.
16856         (PRED_POLYMORPHIC_CALL): Likewise.
16857         (PRED_RECURSIVE_CALL): Likewise.
16859 2018-01-23  Martin Liska  <mliska@suse.cz>
16861         * tree-profile.c (tree_profiling): Print function header to
16862         aware reader which function we are working on.
16863         * value-prof.c (gimple_find_values_to_profile): Do not print
16864         not interesting value histograms.
16866 2018-01-23  Martin Liska  <mliska@suse.cz>
16868         * profile-count.h (enum profile_quality): Add
16869         profile_uninitialized as the first value. Do not number values
16870         as they are zero based.
16871         (profile_count::verify): Update sanity check.
16872         (profile_probability::verify): Likewise.
16874 2018-01-23  Nathan Sidwell  <nathan@acm.org>
16876         * doc/invoke.texi (ffor-scope): Deprecate.
16878 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16880         PR tree-optimization/83510
16881         * domwalk.c (set_all_edges_as_executable): New function.
16882         (dom_walker::dom_walker): Convert bool param
16883         "skip_unreachable_blocks" to enum reachability.  Move setup of
16884         edge flags to set_all_edges_as_executable and only do it when
16885         reachability is REACHABLE_BLOCKS.
16886         * domwalk.h (enum dom_walker::reachability): New enum.
16887         (dom_walker::dom_walker): Convert bool param
16888         "skip_unreachable_blocks" to enum reachability.
16889         (set_all_edges_as_executable): New decl.
16890         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
16891         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16892         "reachability".
16893         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16894         but converting true to REACHABLE_BLOCKS.
16895         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16896         * tree-vrp.c
16897         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16898         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16899         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16900         REACHABLE_BLOCKS.
16901         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16902         if check_all_array_refs will be called.
16904 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16906         * tree.c (selftest::test_location_wrappers): Add more test
16907         coverage.
16909 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16911         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16912         (selftest::test_bit_in_range): Likewise.
16914 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
16916         PR testsuite/83888
16917         * doc/sourcebuild.texi (vect_float): Say that the selector
16918         only describes the situation when -funsafe-math-optimizations is on.
16919         (vect_float_strict): Document.
16921 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
16923         PR tree-optimization/83965
16924         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16925         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16926         instead of checking only for a reduction.
16927         (vect_recog_widen_sum_pattern): Likewise.
16929 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16931         * predict.c (probably_never_executed): Only use precise profile info.
16932         (compute_function_frequency): Skip after inlining hack since we now
16933         have quality checking.
16935 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16937         * profile-count.h (profile_probability::very_unlikely,
16938         profile_probability::unlikely, profile_probability::even): Set
16939         precision to guessed.
16941 2018-01-23  Richard Biener  <rguenther@suse.de>
16943         PR tree-optimization/83963
16944         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16945         Properly terminate dominator walk when crossing the exit edge not
16946         when visiting its source block.
16948 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
16950         PR c++/83918
16951         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16952         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16954 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
16956         PR tree-optimization/83957
16957         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
16958         semicolon after for body surrounded by braces.
16960         PR tree-optimization/83081
16961         * profile-count.h (profile_probability::split): New method.
16962         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16963         Use profile_probability::split.
16964         (do_compare_rtx_and_jump): Fix adjustment of probabilities
16965         when splitting a single conditional jump into 2.
16967 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
16969         PR tree-optimization/69452
16970         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16971         decl.
16973 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16975         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16976         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16977         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16979 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16981         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16982         declaration.
16983         * config/rl78/rl78.md (movdi): New define_expand.
16984         * config/rl78/rl78.c (rl78_split_movdi): New function.
16986 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
16988         PR target/83862
16989         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16990         no longer used.
16991         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16992         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16993         128-bit to produce an UNSPEC move to get the double word with the
16994         signbit and then a shift directly to do signbit.
16995         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16996         implementation with a new version that just does either a direct
16997         move or a regular move.  Move memory interface to separate insns.
16998         Move insns so they are next to the expander.
16999         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17000         with signbit move.  Split big and little endian case.
17001         (signbit<mode>2_dm_mem_le): Likewise.
17002         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17003         (signbit<mode>2_dm2): Likewise.
17005 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17007         * config/rl78/rl78.md (anddi3): New define_expand.
17009 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17011         * config/rl78/rl78.md (umindi3): New define_expand.
17013 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17015         * config/rl78/rl78.md (smindi3): New define_expand.
17017 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17019         * config/rl78/rl78.md (smaxdi3): New define_expand.
17021 2018-01-22  Carl Love  <cel@us.ibm.com>
17023         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17024         LVX_V1TI): Add macro expansion.
17025         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17026         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17027         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17028         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17029         Change check to determine if the instruction is a byte reversing
17030         entry.  Fix typo in comment.
17031         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17032         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17033         Add def_builtin calls for new builtins.
17034         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17035         Add define_insn expansion.
17037 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17039         * config/rl78/rl78.md (umaxdi3): New define_expand.
17041 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
17043         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17044         for non-QImode registers.
17046 2018-01-22  Richard Biener  <rguenther@suse.de>
17048         PR tree-optimization/83963
17049         * graphite-scop-detection.c (scop_detection::get_sese): Delay
17050         including the loop exit block.
17051         (scop_detection::merge_sese): Likewise.
17052         (scop_detection::add_scop): Do it here instead.
17054 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17056         * doc/sourcebuild.texi (arm_softfloat): Document.
17058 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
17060         PR gcc/77734
17061         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17062         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17063         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17065 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17066             David Edelsohn  <dje.gcc@gmail.com>
17068         PR target/83946
17069         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17070         Change "crset eq" to "crset 2".
17071         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17072         (*call_indirect_aix<mode>_nospec): Likewise.
17073         (*call_value_indirect_aix<mode>_nospec): Likewise.
17074         (*call_indirect_elfv2<mode>_nospec): Likewise.
17075         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17076         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17077         change assembly output from . to $.
17078         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17079         (indirect_jump<mode>_nospec): Change assembly output from . to $.
17080         (*tablejump<mode>_internal1_nospec): Likewise.
17082 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
17084         PR target/80870
17085         * config/sh/sh_optimize_sett_clrt.cc:
17086         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17088 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
17090         PR tree-optimization/83940
17091         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17092         offset_dt to vect_constant_def rather than vect_unknown_def_type.
17093         (vect_check_load_store_mask): Add a mask_dt_out parameter and
17094         use it to pass back the definition type.
17095         (vect_check_store_rhs): Likewise rhs_dt_out.
17096         (vect_build_gather_load_calls): Add a mask_dt argument and use
17097         it instead of a call to vect_is_simple_use.
17098         (vectorizable_store): Update calls to vect_check_load_store_mask
17099         and vect_check_store_rhs.  Use the dt returned by the latter instead
17100         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
17101         instead of calls to vect_is_simple_use.  Pass the scalar rather
17102         than the vector operand to vect_is_simple_use when handling
17103         second and subsequent copies of an rhs value.
17104         (vectorizable_load): Update calls to vect_check_load_store_mask
17105         and vect_build_gather_load_calls.  Use the cached mask_dt and
17106         gs_info.offset_dt instead of calls to vect_is_simple_use.
17108 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
17110         PR middle-end/83945
17111         * tree-emutls.c: Include gimplify.h.
17112         (lower_emutls_2): New function.
17113         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17114         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17115         it before further processing.
17117         PR target/83930
17118         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17119         UINTVAL (trueop1) instead of INTVAL (op1).
17121 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
17123         PR debug/81570
17124         PR debug/83728
17125         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17126         INCOMING_FRAME_SP_OFFSET if not defined.
17127         (scan_trace): Add ENTRY argument.  If true and
17128         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17129         emit a note to adjust the CFA offset.
17130         (create_cfi_notes): Adjust scan_trace callers.
17131         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17132         INCOMING_FRAME_SP_OFFSET in the CIE.
17133         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17134         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17135         Likewise.
17136         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17137         * doc/tm.texi: Regenerated.
17139 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17141         PR rtl-optimization/83147
17142         * lra-constraints.c (remove_inheritance_pseudos): Use
17143         lra_substitute_pseudo_within_insn.
17145 2018-01-19  Tom de Vries  <tom@codesourcery.com>
17146             Cesar Philippidis  <cesar@codesourcery.com>
17148         PR target/83920
17149         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17151 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
17153         PR target/83790
17154         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17155         spaces for function labels.
17157 2018-01-19  Martin Liska  <mliska@suse.cz>
17159         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17160         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17161         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17162         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17163         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17164         (PRED_CONST_RETURN): Change from 69 to 65.
17165         (PRED_NULL_RETURN): Change from 91 to 71.
17166         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17167         (PRED_LOOP_GUARD): Change from 66 to 73.
17169 2018-01-19  Martin Liska  <mliska@suse.cz>
17171         * predict.c (predict_insn_def): Add new assert.
17172         (struct branch_predictor): Change type to signed integer.
17173         (test_prediction_value_range): Amend test to cover
17174         PROB_UNINITIALIZED.
17175         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17176         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17177         (PRED_LOOP_ITERATIONS_MAX): Likewise.
17178         (PRED_LOOP_IV_COMPARE): Likewise.
17179         * predict.h (PROB_UNINITIALIZED): Define new constant.
17181 2018-01-19  Martin Liska  <mliska@suse.cz>
17183         * predict.c (dump_prediction): Add new format for
17184         analyze_brprob.py script which is enabled with -details
17185         suboption.
17186         * profile-count.h (precise_p): New function.
17188 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
17190         PR tree-optimization/83922
17191         * tree-vect-loop.c (vect_verify_full_masking): Return false if
17192         there are no statements that need masking.
17193         (vect_active_double_reduction_p): New function.
17194         (vect_analyze_loop_operations): Use it when handling phis that
17195         are not in the loop header.
17197 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
17199         PR tree-optimization/83914
17200         * tree-vect-loop.c (vectorizable_induction): Don't convert
17201         init_expr or apply the peeling adjustment for inductions
17202         that are nested within the vectorized loop.
17204 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17206         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17207         instead of NEG.
17209 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
17211         PR sanitizer/81715
17212         PR testsuite/83882
17213         * function.h (gimplify_parameters): Add gimple_seq * argument.
17214         * function.c: Include gimple.h and options.h.
17215         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17216         for the added local temporaries if needed.
17217         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17218         if there are any parameter cleanups, wrap whole body into a
17219         try/finally with the cleanups.
17221 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
17223         PR target/82964
17224         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17225         Use GET_MODE_CLASS for scalar floating point.
17227 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
17229         PR ipa/82256
17230         patch by PaX Team
17231         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17232         Fix call of call_cgraph_insertion_hooks.
17234 2018-01-18  Martin Sebor  <msebor@redhat.com>
17236         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17238 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
17240         PR ipa/83619
17241         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17242         frequencies.
17244 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
17246         PR other/70268
17247         * common.opt: (-ffile-prefix-map): New option.
17248         * opts.c (common_handle_option): Defer it.
17249         * opts-global.c (handle_common_deferred_options): Handle it.
17250         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17251         * file-prefix-map.h: New file.
17252         (remap_debug_filename, add_debug_prefix_map): ...here.
17253         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17254         * final.c (debug_prefix_map, add_debug_prefix_map
17255         remap_debug_filename): Move to...
17256         * file-prefix-map.c: New file.
17257         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17258         generalize, get rid of alloca(), use strrchr() instead of strchr().
17259         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17260         Implement in terms of add_prefix_map().
17261         (remap_macro_filename, remap_debug_filename): Implement in term of
17262         remap_filename().
17263         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17264         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17265         * dbxout.c: Include file-prefix-map.h.
17266         * varasm.c: Likewise.
17267         * vmsdbgout.c: Likewise.
17268         * xcoffout.c: Likewise.
17269         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17270         * doc/cppopts.texi (-fmacro-prefix-map): Document.
17271         * doc/invoke.texi (-ffile-prefix-map): Document.
17272         (-fdebug-prefix-map): Update description.
17274 2018-01-18  Martin Liska  <mliska@suse.cz>
17276         * config/i386/i386.c (indirect_thunk_name): Document that also
17277         lfence is emitted.
17278         (output_indirect_thunk): Document why both instructions
17279         (pause and lfence) are generated.
17281 2018-01-18  Richard Biener  <rguenther@suse.de>
17283         PR tree-optimization/83887
17284         * graphite-scop-detection.c
17285         (scop_detection::get_nearest_dom_with_single_entry): Remove.
17286         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17287         (scop_detection::merge_sese): Re-implement with a flood-fill
17288         algorithm that properly finds a SESE region if it exists.
17290 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
17292         PR c/61240
17293         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17294         pointer_diff optimizations use view_convert instead of convert.
17296 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17298         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17299         Generate different code for -mno-speculate-indirect-jumps.
17300         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17301         (*call_indirect_aix<mode>): Disable for
17302         -mno-speculate-indirect-jumps.
17303         (*call_indirect_aix<mode>_nospec): New define_insn.
17304         (*call_value_indirect_aix<mode>): Disable for
17305         -mno-speculate-indirect-jumps.
17306         (*call_value_indirect_aix<mode>_nospec): New define_insn.
17307         (*sibcall_nonlocal_sysv<mode>): Generate different code for
17308         -mno-speculate-indirect-jumps.
17309         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17311 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
17313         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17314         long double type, set the flags for noting the default long double
17315         type, even if we don't pass or return a long double type.
17317 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
17319         PR ipa/83051
17320         * ipa-inline.c (flatten_function): Do not overwrite final inlining
17321         failure.
17323 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
17325         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17326         support for merge[hl].
17327         (fold_mergehl_helper): New helper function.
17328         (tree-vector-builder.h): New #include for tree_vector_builder usage.
17329         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17330         (altivec_vmrglw_direct): Add xxmrglw insn.
17332 2018-01-17  Andrew Waterman  <andrew@sifive.com>
17334         * config/riscv/riscv.c (riscv_conditional_register_usage): If
17335         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17337 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
17339         PR lto/83121
17340         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17341         call the lto_location_cache before reading the
17342         DECL_SOURCE_LOCATION of the types.
17344 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
17345             Richard Sandiford  <richard.sandiford@linaro.org>
17347         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17348         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17349         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17350         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17351         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17352         Add declaration.
17353         * config/aarch64/constraints.md (aarch64_movti_operand):
17354         Limit immediates.
17355         * config/aarch64/predicates.md (Uti): Add new constraint.
17357 2018-01-17 Carl Love  <cel@us.ibm.com>
17359         * config/rs6000/vsx.md (define_expand xl_len_r,
17360         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17361         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17362         lxvll.
17363         (define_expand, define_insn): Move the shift left from  the
17364         define_insn to the define_expand for lxvl and stxvl instructions.
17365         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17366         and XL_LEN_R definitions to PURE.
17368 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
17370         * config/i386/i386.c (indirect_thunk_name): Declare regno
17371         as unsigned int.  Compare regno with INVALID_REGNUM.
17372         (output_indirect_thunk): Ditto.
17373         (output_indirect_thunk_function): Ditto.
17374         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
17375         in the call to output_indirect_thunk_function.
17377 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
17379         PR middle-end/83884
17380         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17381         rather than the size of inner_type to determine the stack slot size
17382         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17384 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
17386         PR target/83546
17387         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17388         to PTA_SILVERMONT.
17390 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
17392         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17393         endian Linux systems to optionally enable multilibs for selecting
17394         the long double type if the user configured an explicit type.
17395         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17396         have no long double multilibs if not defined.
17397         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17398         warn if the user used -mabi={ieee,ibm}longdouble and we built
17399         multilibs for long double.
17400         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17401         appropriate multilib option.
17402         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17403         multilib options.
17404         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17405         for building long double multilibs.
17406         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17408 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
17410         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17411         copies.
17413         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17414         64 bits.
17415         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17416         128 bits.
17418         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17419         variables.
17421         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17422         return value.
17424 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
17426         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17427         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17429 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17431         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17432         different rtl trees depending on TARGET_64BIT.
17433         (rs6000_gen_lvx): Likewise.
17435 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
17437         * config/visium/visium.md (nop): Tweak comment.
17438         (hazard_nop): Likewise.
17440 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17442         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17443         -mspeculate-indirect-jumps.
17444         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17445         for -mno-speculate-indirect-jumps.
17446         (*call_indirect_elfv2<mode>_nospec): New define_insn.
17447         (*call_value_indirect_elfv2<mode>): Disable for
17448         -mno-speculate-indirect-jumps.
17449         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17450         (indirect_jump): Emit different RTL for
17451         -mno-speculate-indirect-jumps.
17452         (*indirect_jump<mode>): Disable for
17453         -mno-speculate-indirect-jumps.
17454         (*indirect_jump<mode>_nospec): New define_insn.
17455         (tablejump): Emit different RTL for
17456         -mno-speculate-indirect-jumps.
17457         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17458         (tablejumpsi_nospec): New define_expand.
17459         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17460         (tablejumpdi_nospec): New define_expand.
17461         (*tablejump<mode>_internal1): Disable for
17462         -mno-speculate-indirect-jumps.
17463         (*tablejump<mode>_internal1_nospec): New define_insn.
17464         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17465         option.
17467 2018-01-16  Artyom Skrobov tyomitch@gmail.com
17469         * caller-save.c (insert_save): Drop unnecessary parameter.  All
17470         callers updated.
17472 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
17473             Richard Biener  <rguenth@suse.de>
17475         PR libgomp/83590
17476         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17477         return early, inline manually is_gimple_sizepos.  Make sure if we
17478         call gimplify_expr we don't end up with a gimple constant.
17479         * tree.c (variably_modified_type_p): Don't return true for
17480         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
17481         * gimplify.h (is_gimple_sizepos): Remove.
17483 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17485         PR tree-optimization/83857
17486         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17487         vectorizable_live_operation for pure SLP statements.
17488         (vectorizable_live_operation): Handle PHIs.
17490 2018-01-16  Richard Biener  <rguenther@suse.de>
17492         PR tree-optimization/83867
17493         * tree-vect-stmts.c (vect_transform_stmt): Precompute
17494         nested_in_vect_loop_p since the scalar stmt may get invalidated.
17496 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
17498         PR c/83844
17499         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17500         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17501         If off is not INTEGER_CST, issue a may not be aligned warning
17502         rather than isn't aligned.  Use isn%'t rather than isn't.
17503         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17504         into MULT_EXPR.
17505         <case MULT_EXPR>: Improve the case when bottom and one of the
17506         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17507         operand, in that case check if the other operand is multiple of
17508         bottom divided by the INTEGER_CST operand.
17510 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17512         PR target/83858
17513         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17514         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17515         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17516         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17517         * config/pa/pa.c (pa_function_arg_advance): Likewise.
17518         (pa_function_arg, pa_arg_partial_bytes): Likewise.
17519         (pa_function_arg_size): New function.
17521 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17523         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17524         in a separate statement.
17526 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
17528         PR tree-optimization/83847
17529         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17530         group gathers and scatters.
17532 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
17534         PR rtl-optimization/86620
17535         * params.def (max-sched-ready-insns): Bump minimum value to 1.
17537         PR rtl-optimization/83213
17538         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17539         to last if both are JUMP_INSNs.
17541         PR tree-optimization/83843
17542         * gimple-ssa-store-merging.c
17543         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17544         store_immediate_info for bswap/nop orig_stores.
17546 2018-01-15  Andrew Waterman  <andrew@sifive.com>
17548         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17549         !TARGET_MUL.
17550         <UDIV>: Increase cost if !TARGET_DIV.
17552 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
17554         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17555         (define_attr "cr_logical_3op"): New.
17556         (cceq_ior_compare): Adjust.
17557         (cceq_ior_compare_complement): Adjust.
17558         (*cceq_rev_compare): Adjust.
17559         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17560         (is_cracked_insn): Adjust.
17561         (insn_must_be_first_in_group): Adjust.
17562         * config/rs6000/40x.md: Adjust.
17563         * config/rs6000/440.md: Adjust.
17564         * config/rs6000/476.md: Adjust.
17565         * config/rs6000/601.md: Adjust.
17566         * config/rs6000/603.md: Adjust.
17567         * config/rs6000/6xx.md: Adjust.
17568         * config/rs6000/7450.md: Adjust.
17569         * config/rs6000/7xx.md: Adjust.
17570         * config/rs6000/8540.md: Adjust.
17571         * config/rs6000/cell.md: Adjust.
17572         * config/rs6000/e300c2c3.md: Adjust.
17573         * config/rs6000/e500mc.md: Adjust.
17574         * config/rs6000/e500mc64.md: Adjust.
17575         * config/rs6000/e5500.md: Adjust.
17576         * config/rs6000/e6500.md: Adjust.
17577         * config/rs6000/mpc.md: Adjust.
17578         * config/rs6000/power4.md: Adjust.
17579         * config/rs6000/power5.md: Adjust.
17580         * config/rs6000/power6.md: Adjust.
17581         * config/rs6000/power7.md: Adjust.
17582         * config/rs6000/power8.md: Adjust.
17583         * config/rs6000/power9.md: Adjust.
17584         * config/rs6000/rs64.md: Adjust.
17585         * config/rs6000/titan.md: Adjust.
17587 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17589         * config/i386/predicates.md (indirect_branch_operand): Rewrite
17590         ix86_indirect_branch_register logic.
17592 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17594         * config/i386/constraints.md (Bs): Update
17595         ix86_indirect_branch_register check.  Don't check
17596         ix86_indirect_branch_register with GOT_memory_operand.
17597         (Bw): Likewise.
17598         * config/i386/predicates.md (GOT_memory_operand): Don't check
17599         ix86_indirect_branch_register here.
17600         (GOT32_symbol_operand): Likewise.
17602 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17604         * config/i386/predicates.md (constant_call_address_operand):
17605         Rewrite ix86_indirect_branch_register logic.
17606         (sibcall_insn_operand): Likewise.
17608 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17610         * config/i386/constraints.md (Bs): Replace
17611         ix86_indirect_branch_thunk_register with
17612         ix86_indirect_branch_register.
17613         (Bw): Likewise.
17614         * config/i386/i386.md (indirect_jump): Likewise.
17615         (tablejump): Likewise.
17616         (*sibcall_memory): Likewise.
17617         (*sibcall_value_memory): Likewise.
17618         Peepholes of indirect call and jump via memory: Likewise.
17619         * config/i386/i386.opt: Likewise.
17620         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17621         (GOT_memory_operand): Likewise.
17622         (call_insn_operand): Likewise.
17623         (sibcall_insn_operand): Likewise.
17624         (GOT32_symbol_operand): Likewise.
17626 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
17628         PR middle-end/83837
17629         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17630         type rather than type addr's type points to.
17631         (expand_omp_atomic_mutex): Likewise.
17632         (expand_omp_atomic): Likewise.
17634 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17636         PR target/83839
17637         * config/i386/i386.c (output_indirect_thunk_function): Use
17638         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17639         for  __x86_return_thunk.
17641 2018-01-15  Richard Biener  <rguenther@suse.de>
17643         PR middle-end/83850
17644         * expmed.c (extract_bit_field_1): Fix typo.
17646 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17648         PR target/83687
17649         * config/arm/iterators.md (VF): New mode iterator.
17650         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17651         Remove integer-related logic from pattern.
17652         (neon_vabd<mode>_3): Likewise.
17654 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
17656         PR middle-end/82694
17657         * common.opt (fstrict-overflow): No longer an alias.
17658         (fwrapv-pointer): New option.
17659         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17660         also for pointer types based on flag_wrapv_pointer.
17661         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17662         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17663         opts->x_flag_wrapv got set.
17664         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17665         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17666         POINTER_TYPE_OVERFLOW_UNDEFINED.
17667         * match.pd: Likewise in address comparison pattern.
17668         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17670 2018-01-15  Richard Biener  <rguenther@suse.de>
17672         PR lto/83804
17673         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17674         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
17675         Reset type names to their identifier if their TYPE_DECL doesn't
17676         have linkage (and thus is used for ODR and devirt).
17677         (save_debug_info_for_decl): Remove.
17678         (save_debug_info_for_type): Likewise.
17679         (add_tree_to_fld_list): Adjust.
17680         * tree-pretty-print.c (dump_generic_node): Make dumping of
17681         type names more robust.
17683 2018-01-15  Richard Biener  <rguenther@suse.de>
17685         * BASE-VER: Bump to 8.0.1.
17687 2018-01-14  Martin Sebor  <msebor@redhat.com>
17689         PR other/83508
17690         * builtins.c (check_access): Avoid warning when the no-warning bit
17691         is set.
17693 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
17695         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17696         * ira-color (allocno_hard_regs_compare): Likewise.
17698 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
17700         PR target/83013
17701         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17702         Use .pushsection/.popsection.
17704 2018-01-14  Martin Sebor  <msebor@redhat.com>
17706         PR c++/81327
17707         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17709 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
17711         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17712         entry from extra_headers.
17713         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17714         extra_headers, make the list bitwise identical to the i?86-*-* one.
17716 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17718         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17719         -mcmodel=large with -mindirect-branch=thunk,
17720         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17721         -mfunction-return=thunk-extern.
17722         * doc/invoke.texi: Document -mcmodel=large is incompatible with
17723         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17724         -mfunction-return=thunk and -mfunction-return=thunk-extern.
17726 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17728         * config/i386/i386.c (print_reg): Print the name of the full
17729         integer register without '%'.
17730         (ix86_print_operand): Handle 'V'.
17731         * doc/extend.texi: Document 'V' modifier.
17733 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17735         * config/i386/constraints.md (Bs): Disallow memory operand for
17736         -mindirect-branch-register.
17737         (Bw): Likewise.
17738         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17739         (GOT_memory_operand): Likewise.
17740         (call_insn_operand): Likewise.
17741         (sibcall_insn_operand): Likewise.
17742         (GOT32_symbol_operand): Likewise.
17743         * config/i386/i386.md (indirect_jump): Call convert_memory_address
17744         for -mindirect-branch-register.
17745         (tablejump): Likewise.
17746         (*sibcall_memory): Likewise.
17747         (*sibcall_value_memory): Likewise.
17748         Disallow peepholes of indirect call and jump via memory for
17749         -mindirect-branch-register.
17750         (*call_pop): Replace m with Bw.
17751         (*call_value_pop): Likewise.
17752         (*sibcall_pop_memory): Replace m with Bs.
17753         * config/i386/i386.opt (mindirect-branch-register): New option.
17754         * doc/invoke.texi: Document -mindirect-branch-register option.
17756 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17758         * config/i386/i386-protos.h (ix86_output_function_return): New.
17759         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17760         set function_return_type.
17761         (indirect_thunk_name): Add ret_p to indicate thunk for function
17762         return.
17763         (output_indirect_thunk_function): Pass false to
17764         indirect_thunk_name.
17765         (ix86_output_indirect_branch_via_reg): Likewise.
17766         (ix86_output_indirect_branch_via_push): Likewise.
17767         (output_indirect_thunk_function): Create alias for function
17768         return thunk if regno < 0.
17769         (ix86_output_function_return): New function.
17770         (ix86_handle_fndecl_attribute): Handle function_return.
17771         (ix86_attribute_table): Add function_return.
17772         * config/i386/i386.h (machine_function): Add
17773         function_return_type.
17774         * config/i386/i386.md (simple_return_internal): Use
17775         ix86_output_function_return.
17776         (simple_return_internal_long): Likewise.
17777         * config/i386/i386.opt (mfunction-return=): New option.
17778         (indirect_branch): Mention -mfunction-return=.
17779         * doc/extend.texi: Document function_return function attribute.
17780         * doc/invoke.texi: Document -mfunction-return= option.
17782 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17784         * config/i386/i386-opts.h (indirect_branch): New.
17785         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17786         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17787         with local indirect jump when converting indirect call and jump.
17788         (ix86_set_indirect_branch_type): New.
17789         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17790         (indirectlabelno): New.
17791         (indirect_thunk_needed): Likewise.
17792         (indirect_thunk_bnd_needed): Likewise.
17793         (indirect_thunks_used): Likewise.
17794         (indirect_thunks_bnd_used): Likewise.
17795         (INDIRECT_LABEL): Likewise.
17796         (indirect_thunk_name): Likewise.
17797         (output_indirect_thunk): Likewise.
17798         (output_indirect_thunk_function): Likewise.
17799         (ix86_output_indirect_branch_via_reg): Likewise.
17800         (ix86_output_indirect_branch_via_push): Likewise.
17801         (ix86_output_indirect_branch): Likewise.
17802         (ix86_output_indirect_jmp): Likewise.
17803         (ix86_code_end): Call output_indirect_thunk_function if needed.
17804         (ix86_output_call_insn): Call ix86_output_indirect_branch if
17805         needed.
17806         (ix86_handle_fndecl_attribute): Handle indirect_branch.
17807         (ix86_attribute_table): Add indirect_branch.
17808         * config/i386/i386.h (machine_function): Add indirect_branch_type
17809         and has_local_indirect_jump.
17810         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17811         to true.
17812         (tablejump): Likewise.
17813         (*indirect_jump): Use ix86_output_indirect_jmp.
17814         (*tablejump_1): Likewise.
17815         (simple_return_indirect_internal): Likewise.
17816         * config/i386/i386.opt (mindirect-branch=): New option.
17817         (indirect_branch): New.
17818         (keep): Likewise.
17819         (thunk): Likewise.
17820         (thunk-inline): Likewise.
17821         (thunk-extern): Likewise.
17822         * doc/extend.texi: Document indirect_branch function attribute.
17823         * doc/invoke.texi: Document -mindirect-branch= option.
17825 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
17827         PR ipa/83051
17828         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17830 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
17832         * ipa-inline.c (want_inline_small_function_p): Return false if
17833         inlining has already failed with CIF_FINAL_ERROR.
17834         (update_caller_keys): Call want_inline_small_function_p before
17835         can_inline_edge_p.
17836         (update_callee_keys): Likewise.
17838 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17840         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17841         New function.
17842         (rs6000_quadword_masked_address_p): Likewise.
17843         (quad_aligned_load_p): Likewise.
17844         (quad_aligned_store_p): Likewise.
17845         (const_load_sequence_p): Add comment to describe the outer-most loop.
17846         (mimic_memory_attributes_and_flags): New function.
17847         (rs6000_gen_stvx): Likewise.
17848         (replace_swapped_aligned_store): Likewise.
17849         (rs6000_gen_lvx): Likewise.
17850         (replace_swapped_aligned_load): Likewise.
17851         (replace_swapped_load_constant): Capitalize argument name in
17852         comment describing this function.
17853         (rs6000_analyze_swaps): Add a third pass to search for vector loads
17854         and stores that access quad-word aligned addresses and replace
17855         with stvx or lvx instructions when appropriate.
17856         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17857         New function prototype.
17858         (rs6000_quadword_masked_address_p): Likewise.
17859         (rs6000_gen_lvx): Likewise.
17860         (rs6000_gen_stvx): Likewise.
17861         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17862         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17863         when memory address is aligned.
17864         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17865         this split to select lvx instruction when memory address is aligned.
17866         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17867         instruction when memory address is aligned.
17868         (*vsx_le_perm_load_v16qi): Likewise.
17869         (four unnamed splitters): Modify to select the stvx instruction
17870         when memory is aligned.
17872 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
17874         * predict.c (determine_unlikely_bbs): Handle correctly BBs
17875         which appears in the queue multiple times.
17877 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17878             Alan Hayward  <alan.hayward@arm.com>
17879             David Sherwood  <david.sherwood@arm.com>
17881         * tree-vectorizer.h (vec_lower_bound): New structure.
17882         (_loop_vec_info): Add check_nonzero and lower_bounds.
17883         (LOOP_VINFO_CHECK_NONZERO): New macro.
17884         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17885         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17886         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17887         fields.  Make seg_len the distance travelled, not including the
17888         access size.
17889         (dr_direction_indicator): Declare.
17890         (dr_zero_step_indicator): Likewise.
17891         (dr_known_forward_stride_p): Likewise.
17892         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17893         tree-ssanames.h.
17894         (runtime_alias_check_p): Allow runtime alias checks with
17895         variable strides.
17896         (operator ==): Compare access_size and align.
17897         (prune_runtime_alias_test_list): Rework for new distinction between
17898         the access_size and seg_len.
17899         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
17900         segment lengths.
17901         (get_segment_min_max): New function.
17902         (create_intersect_range_checks): Use it.
17903         (dr_step_indicator): New function.
17904         (dr_direction_indicator): Likewise.
17905         (dr_zero_step_indicator): Likewise.
17906         (dr_known_forward_stride_p): Likewise.
17907         * tree-loop-distribution.c (data_ref_segment_size): Return
17908         DR_STEP * (niters - 1).
17909         (compute_alias_check_pairs): Update call to the dr_with_seg_len
17910         constructor.
17911         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17912         (vect_preserves_scalar_order_p): New function, split out from...
17913         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
17914         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17915         (vect_vfa_access_size): New function.
17916         (vect_vfa_align): Likewise.
17917         (vect_compile_time_alias): Take access_size_a and access_b arguments.
17918         (dump_lower_bound): New function.
17919         (vect_check_lower_bound): Likewise.
17920         (vect_small_gap_p): Likewise.
17921         (vectorizable_with_step_bound_p): Likewise.
17922         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17923         depencies if the vectorization factor is 1.  Convert the checks
17924         for nonzero steps into checks on the bounds of DR_STEP.  Try using
17925         a bunds check for variable steps if the minimum required step is
17926         relatively small. Update calls to the dr_with_seg_len
17927         constructor and to vect_compile_time_alias.
17928         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17929         function.
17930         (vect_loop_versioning): Call it.
17931         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17932         when retrying.
17933         (vect_estimate_min_profitable_iters): Account for any bounds checks.
17935 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17936             Alan Hayward  <alan.hayward@arm.com>
17937             David Sherwood  <david.sherwood@arm.com>
17939         * doc/sourcebuild.texi (vect_scatter_store): Document.
17940         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17941         optabs.
17942         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17943         Document.
17944         * genopinit.c (main): Add supports_vec_scatter_store and
17945         supports_vec_scatter_store_cached to target_optabs.
17946         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17947         IFN_MASK_SCATTER_STORE.
17948         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17949         functions.
17950         * internal-fn.h (internal_store_fn_p): Declare.
17951         (internal_fn_stored_value_index): Likewise.
17952         * internal-fn.c (scatter_store_direct): New macro.
17953         (expand_scatter_store_optab_fn): New function.
17954         (direct_scatter_store_optab_supported_p): New macro.
17955         (internal_store_fn_p): New function.
17956         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17957         IFN_MASK_SCATTER_STORE.
17958         (internal_fn_mask_index): Likewise.
17959         (internal_fn_stored_value_index): New function.
17960         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17961         for scatter stores.
17962         * optabs-query.h (supports_vec_scatter_store_p): Declare.
17963         * optabs-query.c (supports_vec_scatter_store_p): New function.
17964         * tree-vectorizer.h (vect_get_store_rhs): Declare.
17965         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17966         true for scatter stores.
17967         (vect_gather_scatter_fn_p): Handle scatter stores too.
17968         (vect_check_gather_scatter): Consider using scatter stores if
17969         supports_vec_scatter_store_p.
17970         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17971         scatter stores too.
17972         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17973         internal_fn_stored_value_index.
17974         (check_load_store_masking): Handle scatter stores too.
17975         (vect_get_store_rhs): Make public.
17976         (vectorizable_call): Use internal_store_fn_p.
17977         (vectorizable_store): Handle scatter store internal functions.
17978         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17979         when deciding whether the end of the group has been reached.
17980         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17981         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17982         (mask_scatter_store<mode>): New insns.
17984 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17985             Alan Hayward  <alan.hayward@arm.com>
17986             David Sherwood  <david.sherwood@arm.com>
17988         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17989         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17990         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17991         function.
17992         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17993         Use vect_truncate_gather_scatter_offset if we can't treat the
17994         operation as a normal gather load or scatter store.
17995         (get_group_load_store_type): Take the gather_scatter_info
17996         as argument.  Try using a gather load or scatter store for
17997         single-element groups.
17998         (get_load_store_type): Update calls to get_group_load_store_type
17999         and vect_use_strided_gather_scatters_p.
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         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18006         optional tree argument.
18007         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18008         null target hooks.
18009         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18010         but continue to use the current value as a fallback.
18011         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18012         to compare the updates.
18013         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18014         (get_load_store_type): Use it when handling a strided access.
18015         (vect_get_strided_load_store_ops): New function.
18016         (vect_get_data_ptr_increment): Likewise.
18017         (vectorizable_load): Handle strided gather loads.  Always pass
18018         a step to vect_create_data_ref_ptr and bump_vector_ptr.
18020 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18021             Alan Hayward  <alan.hayward@arm.com>
18022             David Sherwood  <david.sherwood@arm.com>
18024         * doc/md.texi (gather_load@var{m}): Document.
18025         (mask_gather_load@var{m}): Likewise.
18026         * genopinit.c (main): Add supports_vec_gather_load and
18027         supports_vec_gather_load_cached to target_optabs.
18028         * optabs-tree.c (init_tree_optimization_optabs): Use
18029         ggc_cleared_alloc to allocate target_optabs.
18030         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18031         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18032         functions.
18033         * internal-fn.h (internal_load_fn_p): Declare.
18034         (internal_gather_scatter_fn_p): Likewise.
18035         (internal_fn_mask_index): Likewise.
18036         (internal_gather_scatter_fn_supported_p): Likewise.
18037         * internal-fn.c (gather_load_direct): New macro.
18038         (expand_gather_load_optab_fn): New function.
18039         (direct_gather_load_optab_supported_p): New macro.
18040         (direct_internal_fn_optab): New function.
18041         (internal_load_fn_p): Likewise.
18042         (internal_gather_scatter_fn_p): Likewise.
18043         (internal_fn_mask_index): Likewise.
18044         (internal_gather_scatter_fn_supported_p): Likewise.
18045         * optabs-query.c (supports_at_least_one_mode_p): New function.
18046         (supports_vec_gather_load_p): Likewise.
18047         * optabs-query.h (supports_vec_gather_load_p): Declare.
18048         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18049         and memory_type field.
18050         (NUM_PATTERNS): Bump to 15.
18051         * tree-vect-data-refs.c: Include internal-fn.h.
18052         (vect_gather_scatter_fn_p): New function.
18053         (vect_describe_gather_scatter_call): Likewise.
18054         (vect_check_gather_scatter): Try using internal functions for
18055         gather loads.  Recognize existing calls to a gather load function.
18056         (vect_analyze_data_refs): Consider using gather loads if
18057         supports_vec_gather_load_p.
18058         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18059         (vect_get_gather_scatter_offset_type): Likewise.
18060         (vect_convert_mask_for_vectype): Likewise.
18061         (vect_add_conversion_to_patterm): Likewise.
18062         (vect_try_gather_scatter_pattern): Likewise.
18063         (vect_recog_gather_scatter_pattern): New pattern recognizer.
18064         (vect_vect_recog_func_ptrs): Add it.
18065         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18066         internal_fn_mask_index and internal_gather_scatter_fn_p.
18067         (check_load_store_masking): Take the gather_scatter_info as an
18068         argument and handle gather loads.
18069         (vect_get_gather_scatter_ops): New function.
18070         (vectorizable_call): Check internal_load_fn_p.
18071         (vectorizable_load): Likewise.  Handle gather load internal
18072         functions.
18073         (vectorizable_store): Update call to check_load_store_masking.
18074         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18075         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18076         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18077         (aarch64_gather_scale_operand_d): New predicates.
18078         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18079         (mask_gather_load<mode>): New insns.
18081 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18082             Alan Hayward  <alan.hayward@arm.com>
18083             David Sherwood  <david.sherwood@arm.com>
18085         * optabs.def (fold_left_plus_optab): New optab.
18086         * doc/md.texi (fold_left_plus_@var{m}): Document.
18087         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18088         * internal-fn.c (fold_left_direct): Define.
18089         (expand_fold_left_optab_fn): Likewise.
18090         (direct_fold_left_optab_supported_p): Likewise.
18091         * fold-const-call.c (fold_const_fold_left): New function.
18092         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18093         * tree-parloops.c (valid_reduction_p): New function.
18094         (gather_scalar_reductions): Use it.
18095         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18096         (vect_finish_replace_stmt): Declare.
18097         * tree-vect-loop.c (fold_left_reduction_fn): New function.
18098         (needs_fold_left_reduction_p): New function, split out from...
18099         (vect_is_simple_reduction): ...here.  Accept reductions that
18100         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18101         (vect_force_simple_reduction): Also store the reduction type in
18102         the assignment's STMT_VINFO_REDUC_TYPE.
18103         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18104         (merge_with_identity): New function.
18105         (vect_expand_fold_left): Likewise.
18106         (vectorize_fold_left_reduction): Likewise.
18107         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
18108         scalar phi in place for it.  Check for target support and reject
18109         cases that would reassociate the operation.  Defer the transform
18110         phase to vectorize_fold_left_reduction.
18111         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18112         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18113         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18115 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18117         * tree-if-conv.c (predicate_mem_writes): Remove redundant
18118         call to ifc_temp_var.
18120 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18121             Alan Hayward  <alan.hayward@arm.com>
18122             David Sherwood  <david.sherwood@arm.com>
18124         * target.def (legitimize_address_displacement): Take the original
18125         offset as a poly_int.
18126         * targhooks.h (default_legitimize_address_displacement): Update
18127         accordingly.
18128         * targhooks.c (default_legitimize_address_displacement): Likewise.
18129         * doc/tm.texi: Regenerate.
18130         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18131         as an argument, moving assert of ad->disp == ad->disp_term to...
18132         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
18133         Try calling targetm.legitimize_address_displacement before expanding
18134         the address rather than afterwards, and adjust for the new interface.
18135         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18136         Match the new hook interface.  Handle SVE addresses.
18137         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18138         new hook interface.
18140 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18142         * Makefile.in (OBJS): Add early-remat.o.
18143         * target.def (select_early_remat_modes): New hook.
18144         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18145         * doc/tm.texi: Regenerate.
18146         * targhooks.h (default_select_early_remat_modes): Declare.
18147         * targhooks.c (default_select_early_remat_modes): New function.
18148         * timevar.def (TV_EARLY_REMAT): New timevar.
18149         * passes.def (pass_early_remat): New pass.
18150         * tree-pass.h (make_pass_early_remat): Declare.
18151         * early-remat.c: New file.
18152         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18153         function.
18154         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18156 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18157             Alan Hayward  <alan.hayward@arm.com>
18158             David Sherwood  <david.sherwood@arm.com>
18160         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18161         vfm1 with a bound_epilog parameter.
18162         (vect_do_peeling): Update calls accordingly, and move the prologue
18163         call earlier in the function.  Treat the base bound_epilog as 0 for
18164         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
18165         this base when peeling for gaps.
18166         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18167         with fully-masked loops.
18168         (vect_estimate_min_profitable_iters): Handle the single peeled
18169         iteration in that case.
18171 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18172             Alan Hayward  <alan.hayward@arm.com>
18173             David Sherwood  <david.sherwood@arm.com>
18175         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18176         single-element interleaving even if the size is not a power of 2.
18177         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18178         accesses for single-element interleaving if the group size is
18179         not a power of 2.
18181 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18182             Alan Hayward  <alan.hayward@arm.com>
18183             David Sherwood  <david.sherwood@arm.com>
18185         * doc/md.texi (fold_extract_last_@var{m}): Document.
18186         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18187         * optabs.def (fold_extract_last_optab): New optab.
18188         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18189         * internal-fn.c (fold_extract_direct): New macro.
18190         (expand_fold_extract_optab_fn): Likewise.
18191         (direct_fold_extract_optab_supported_p): Likewise.
18192         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18193         * tree-vect-loop.c (vect_model_reduction_cost): Handle
18194         EXTRACT_LAST_REDUCTION.
18195         (get_initial_def_for_reduction): Do not create an initial vector
18196         for EXTRACT_LAST_REDUCTION reductions.
18197         (vectorizable_reduction): Leave the scalar phi in place for
18198         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
18199         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
18200         epilogue code for EXTRACT_LAST_REDUCTION and defer the
18201         transform phase to vectorizable_condition.
18202         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18203         split out from...
18204         (vect_finish_stmt_generation): ...here.
18205         (vect_finish_replace_stmt): New function.
18206         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18207         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18208         pattern.
18209         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18211 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18212             Alan Hayward  <alan.hayward@arm.com>
18213             David Sherwood  <david.sherwood@arm.com>
18215         * doc/md.texi (extract_last_@var{m}): Document.
18216         * optabs.def (extract_last_optab): New optab.
18217         * internal-fn.def (EXTRACT_LAST): New internal function.
18218         * internal-fn.c (cond_unary_direct): New macro.
18219         (expand_cond_unary_optab_fn): Likewise.
18220         (direct_cond_unary_optab_supported_p): Likewise.
18221         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18222         loops using EXTRACT_LAST.
18223         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18224         (extract_last_<mode>): ...this optab.
18225         (vec_extract<mode><Vel>): Update accordingly.
18227 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18228             Alan Hayward  <alan.hayward@arm.com>
18229             David Sherwood  <david.sherwood@arm.com>
18231         * target.def (empty_mask_is_expensive): New hook.
18232         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18233         * doc/tm.texi: Regenerate.
18234         * targhooks.h (default_empty_mask_is_expensive): Declare.
18235         * targhooks.c (default_empty_mask_is_expensive): New function.
18236         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18237         if the target says that empty masks are expensive.
18238         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18239         New function.
18240         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18242 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18243             Alan Hayward  <alan.hayward@arm.com>
18244             David Sherwood  <david.sherwood@arm.com>
18246         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18247         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18248         (vect_use_loop_mask_for_alignment_p): New function.
18249         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18250         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18251         niters_skip argument.  Make sure that the first niters_skip elements
18252         of the first iteration are inactive.
18253         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18254         Update call to vect_set_loop_masks_directly.
18255         (get_misalign_in_elems): New function, split out from...
18256         (vect_gen_prolog_loop_niters): ...here.
18257         (vect_update_init_of_dr): Take a code argument that specifies whether
18258         the adjustment should be added or subtracted.
18259         (vect_update_init_of_drs): Likewise.
18260         (vect_prepare_for_masked_peels): New function.
18261         (vect_do_peeling): Skip prologue peeling if we're using a mask
18262         instead.  Update call to vect_update_inits_of_drs.
18263         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18264         mask_skip_niters.
18265         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18266         alignment.  Do not include the number of peeled iterations in
18267         the minimum threshold in that case.
18268         (vectorizable_induction): Adjust the start value down by
18269         LOOP_VINFO_MASK_SKIP_NITERS iterations.
18270         (vect_transform_loop): Call vect_prepare_for_masked_peels.
18271         Take the number of skipped iterations into account when calculating
18272         the loop bounds.
18273         * tree-vect-stmts.c (vect_gen_while_not): New function.
18275 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18276             Alan Hayward  <alan.hayward@arm.com>
18277             David Sherwood  <david.sherwood@arm.com>
18279         * doc/sourcebuild.texi (vect_fully_masked): Document.
18280         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18281         default value to 0.
18282         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18283         split out from...
18284         (vect_analyze_loop_2): ...here. Don't check the vectorization
18285         factor against the number of loop iterations if the loop is
18286         fully-masked.
18288 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18289             Alan Hayward  <alan.hayward@arm.com>
18290             David Sherwood  <david.sherwood@arm.com>
18292         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18293         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18294         (dump_groups): Update accordingly.
18295         (iv_use::mem_type): New member variable.
18296         (address_p): New function.
18297         (record_use): Add a mem_type argument and initialize the new
18298         mem_type field.
18299         (record_group_use): Add a mem_type argument.  Use address_p.
18300         Remove obsolete null checks of base_object.  Update call to record_use.
18301         (find_interesting_uses_op): Update call to record_group_use.
18302         (find_interesting_uses_cond): Likewise.
18303         (find_interesting_uses_address): Likewise.
18304         (get_mem_type_for_internal_fn): New function.
18305         (find_address_like_use): Likewise.
18306         (find_interesting_uses_stmt): Try find_address_like_use before
18307         calling find_interesting_uses_op.
18308         (addr_offset_valid_p): Use the iv mem_type field as the type
18309         of the addressed memory.
18310         (add_autoinc_candidates): Likewise.
18311         (get_address_cost): Likewise.
18312         (split_small_address_groups_p): Use address_p.
18313         (split_address_groups): Likewise.
18314         (add_iv_candidate_for_use): Likewise.
18315         (autoinc_possible_for_pair): Likewise.
18316         (rewrite_groups): Likewise.
18317         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18318         (determine_group_iv_cost): Update after split of USE_ADDRESS.
18319         (get_alias_ptr_type_for_ptr_address): New function.
18320         (rewrite_use_address): Rewrite address uses in calls that were
18321         identified by find_address_like_use.
18323 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18324             Alan Hayward  <alan.hayward@arm.com>
18325             David Sherwood  <david.sherwood@arm.com>
18327         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18328         TARGET_MEM_REFs.
18329         * gimple-expr.h (is_gimple_addressable: Likewise.
18330         * gimple-expr.c (is_gimple_address): Likewise.
18331         * internal-fn.c (expand_call_mem_ref): New function.
18332         (expand_mask_load_optab_fn): Use it.
18333         (expand_mask_store_optab_fn): Likewise.
18335 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18336             Alan Hayward  <alan.hayward@arm.com>
18337             David Sherwood  <david.sherwood@arm.com>
18339         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18340         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18341         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18342         (cond_umax@var{mode}): Document.
18343         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18344         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18345         (cond_umin_optab, cond_umax_optab): New optabs.
18346         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18347         (COND_IOR, COND_XOR): New internal functions.
18348         * internal-fn.h (get_conditional_internal_fn): Declare.
18349         * internal-fn.c (cond_binary_direct): New macro.
18350         (expand_cond_binary_optab_fn): Likewise.
18351         (direct_cond_binary_optab_supported_p): Likewise.
18352         (get_conditional_internal_fn): New function.
18353         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18354         Cope with reduction statements that are vectorized as calls rather
18355         than assignments.
18356         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18357         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18358         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18359         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18360         (UNSPEC_COND_EOR): New unspecs.
18361         (optab): Add mappings for them.
18362         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18363         (sve_int_op, sve_fp_op): New int attributes.
18365 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18366             Alan Hayward  <alan.hayward@arm.com>
18367             David Sherwood  <david.sherwood@arm.com>
18369         * optabs.def (while_ult_optab): New optab.
18370         * doc/md.texi (while_ult@var{m}@var{n}): Document.
18371         * internal-fn.def (WHILE_ULT): New internal function.
18372         * internal-fn.h (direct_internal_fn_supported_p): New override
18373         that takes two types as argument.
18374         * internal-fn.c (while_direct): New macro.
18375         (expand_while_optab_fn): New function.
18376         (convert_optab_supported_p): Likewise.
18377         (direct_while_optab_supported_p): New macro.
18378         * wide-int.h (wi::udiv_ceil): New function.
18379         * tree-vectorizer.h (rgroup_masks): New structure.
18380         (vec_loop_masks): New typedef.
18381         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18382         and fully_masked_p.
18383         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18384         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18385         (vect_max_vf): New function.
18386         (slpeel_make_loop_iterate_ntimes): Delete.
18387         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18388         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18389         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18390         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18391         internal-fn.h, stor-layout.h and optabs-query.h.
18392         (vect_set_loop_mask): New function.
18393         (add_preheader_seq): Likewise.
18394         (add_header_seq): Likewise.
18395         (interleave_supported_p): Likewise.
18396         (vect_maybe_permute_loop_masks): Likewise.
18397         (vect_set_loop_masks_directly): Likewise.
18398         (vect_set_loop_condition_masked): Likewise.
18399         (vect_set_loop_condition_unmasked): New function, split out from
18400         slpeel_make_loop_iterate_ntimes.
18401         (slpeel_make_loop_iterate_ntimes): Rename to..
18402         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
18403         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18404         (vect_do_peeling): Update call accordingly.
18405         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18406         loops.
18407         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18408         mask_compare_type, can_fully_mask_p and fully_masked_p.
18409         (release_vec_loop_masks): New function.
18410         (_loop_vec_info): Use it to free the loop masks.
18411         (can_produce_all_loop_masks_p): New function.
18412         (vect_get_max_nscalars_per_iter): Likewise.
18413         (vect_verify_full_masking): Likewise.
18414         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18415         retries, and free the mask rgroups before retrying.  Check loop-wide
18416         reasons for disallowing fully-masked loops.  Make the final decision
18417         about whether use a fully-masked loop or not.
18418         (vect_estimate_min_profitable_iters): Do not assume that peeling
18419         for the number of iterations will be needed for fully-masked loops.
18420         (vectorizable_reduction): Disable fully-masked loops.
18421         (vectorizable_live_operation): Likewise.
18422         (vect_halve_mask_nunits): New function.
18423         (vect_double_mask_nunits): Likewise.
18424         (vect_record_loop_mask): Likewise.
18425         (vect_get_loop_mask): Likewise.
18426         (vect_transform_loop): Handle the case in which the final loop
18427         iteration might handle a partial vector.  Call vect_set_loop_condition
18428         instead of slpeel_make_loop_iterate_ntimes.
18429         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18430         (check_load_store_masking): New function.
18431         (prepare_load_store_mask): Likewise.
18432         (vectorizable_store): Handle fully-masked loops.
18433         (vectorizable_load): Likewise.
18434         (supportable_widening_operation): Use vect_halve_mask_nunits for
18435         booleans.
18436         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18437         (vect_gen_while): New function.
18438         * config/aarch64/aarch64.md (umax<mode>3): New expander.
18439         (aarch64_uqdec<mode>): New insn.
18441 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18442             Alan Hayward  <alan.hayward@arm.com>
18443             David Sherwood  <david.sherwood@arm.com>
18445         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18446         (reduc_xor_scal_optab): New optabs.
18447         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18448         (reduc_xor_scal_@var{m}): Document.
18449         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18450         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18451         internal functions.
18452         * fold-const-call.c (fold_const_call): Handle them.
18453         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18454         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18455         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18456         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18457         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18458         (UNSPEC_XORV): New unspecs.
18459         (optab): Add entries for them.
18460         (BITWISEV): New int iterator.
18461         (bit_reduc_op): New int attributes.
18463 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18464             Alan Hayward  <alan.hayward@arm.com>
18465             David Sherwood  <david.sherwood@arm.com>
18467         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18468         * internal-fn.def (VEC_SHL_INSERT): New internal function.
18469         * optabs.def (vec_shl_insert_optab): New optab.
18470         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18471         (duplicate_and_interleave): Likewise.
18472         * tree-vect-loop.c: Include internal-fn.h.
18473         (neutral_op_for_slp_reduction): New function, split out from
18474         get_initial_defs_for_reduction.
18475         (get_initial_def_for_reduction): Handle option 2 for variable-length
18476         vectors by loading the neutral value into a vector and then shifting
18477         the initial value into element 0.
18478         (get_initial_defs_for_reduction): Replace the code argument with
18479         the neutral value calculated by neutral_op_for_slp_reduction.
18480         Use gimple_build_vector for constant-length vectors.
18481         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18482         but the first group_size elements have a neutral value.
18483         Use duplicate_and_interleave otherwise.
18484         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18485         Update call to get_initial_defs_for_reduction.  Handle SLP
18486         reductions for variable-length vectors by creating one vector
18487         result for each scalar result, with the elements associated
18488         with other scalar results stubbed out with the neutral value.
18489         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18490         Require IFN_VEC_SHL_INSERT for double reductions on
18491         variable-length vectors, or SLP reductions that have
18492         a neutral value.  Require can_duplicate_and_interleave_p
18493         support for variable-length unchained SLP reductions if there
18494         is no neutral value, such as for MIN/MAX reductions.  Also require
18495         the number of vector elements to be a multiple of the number of
18496         SLP statements when doing variable-length unchained SLP reductions.
18497         Update call to vect_create_epilog_for_reduction.
18498         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18499         and remove initial values.
18500         (duplicate_and_interleave): Make public.
18501         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18502         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18504 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18505             Alan Hayward  <alan.hayward@arm.com>
18506             David Sherwood  <david.sherwood@arm.com>
18508         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18509         (can_duplicate_and_interleave_p): New function.
18510         (vect_get_and_check_slp_defs): Take the vector of statements
18511         rather than just the current one.  Remove excess parentheses.
18512         Restriction rejectinon of vect_constant_def and vect_external_def
18513         for variable-length vectors to boolean types, or types for which
18514         can_duplicate_and_interleave_p is false.
18515         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18516         (duplicate_and_interleave): New function.
18517         (vect_get_constant_vectors): Use gimple_build_vector for
18518         constant-length vectors and suitable variable-length constant
18519         vectors.  Use duplicate_and_interleave for other variable-length
18520         vectors.  Don't defer the update when inserting new statements.
18522 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18523             Alan Hayward  <alan.hayward@arm.com>
18524             David Sherwood  <david.sherwood@arm.com>
18526         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18527         min_profitable_iters doesn't go negative.
18529 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18530             Alan Hayward  <alan.hayward@arm.com>
18531             David Sherwood  <david.sherwood@arm.com>
18533         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18534         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18535         * optabs.def (vec_mask_load_lanes_optab): New optab.
18536         (vec_mask_store_lanes_optab): Likewise.
18537         * internal-fn.def (MASK_LOAD_LANES): New internal function.
18538         (MASK_STORE_LANES): Likewise.
18539         * internal-fn.c (mask_load_lanes_direct): New macro.
18540         (mask_store_lanes_direct): Likewise.
18541         (expand_mask_load_optab_fn): Handle masked operations.
18542         (expand_mask_load_lanes_optab_fn): New macro.
18543         (expand_mask_store_optab_fn): Handle masked operations.
18544         (expand_mask_store_lanes_optab_fn): New macro.
18545         (direct_mask_load_lanes_optab_supported_p): Likewise.
18546         (direct_mask_store_lanes_optab_supported_p): Likewise.
18547         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18548         parameter.
18549         (vect_load_lanes_supported): Likewise.
18550         * tree-vect-data-refs.c (strip_conversion): New function.
18551         (can_group_stmts_p): Likewise.
18552         (vect_analyze_data_ref_accesses): Use it instead of checking
18553         for a pair of assignments.
18554         (vect_store_lanes_supported): Take a masked_p parameter.
18555         (vect_load_lanes_supported): Likewise.
18556         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18557         vect_store_lanes_supported and vect_load_lanes_supported.
18558         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18559         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18560         parameter.  Don't allow gaps for masked accesses.
18561         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
18562         and vect_load_lanes_supported.
18563         (get_load_store_type): Take a masked_p parameter and update
18564         call to get_group_load_store_type.
18565         (vectorizable_store): Update call to get_load_store_type.
18566         Handle IFN_MASK_STORE_LANES.
18567         (vectorizable_load): Update call to get_load_store_type.
18568         Handle IFN_MASK_LOAD_LANES.
18570 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18571             Alan Hayward  <alan.hayward@arm.com>
18572             David Sherwood  <david.sherwood@arm.com>
18574         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18575         modes for SVE.
18576         * config/aarch64/aarch64-protos.h
18577         (aarch64_sve_struct_memory_operand_p): Declare.
18578         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18579         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18580         (VPRED, vpred): Handle SVE structure modes.
18581         * config/aarch64/constraints.md (Utx): New constraint.
18582         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18583         (aarch64_sve_struct_nonimmediate_operand): New predicates.
18584         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18585         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18586         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18587         structure modes.  Split into pieces after RA.
18588         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18589         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18590         New patterns.
18591         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18592         SVE structure modes.
18593         (aarch64_classify_address): Likewise.
18594         (sizetochar): Move earlier in file.
18595         (aarch64_print_operand): Handle SVE register lists.
18596         (aarch64_array_mode): New function.
18597         (aarch64_sve_struct_memory_operand_p): Likewise.
18598         (TARGET_ARRAY_MODE): Redefine.
18600 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18601             Alan Hayward  <alan.hayward@arm.com>
18602             David Sherwood  <david.sherwood@arm.com>
18604         * target.def (array_mode): New target hook.
18605         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18606         * doc/tm.texi: Regenerate.
18607         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18608         * hooks.c (hook_optmode_mode_uhwi_none): New function.
18609         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18610         targetm.array_mode.
18611         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
18612         type sizes.
18614 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18615             Alan Hayward  <alan.hayward@arm.com>
18616             David Sherwood  <david.sherwood@arm.com>
18618         * fold-const.c (fold_binary_loc): Check the argument types
18619         rather than the result type when testing for a vector operation.
18621 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18623         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18624         * doc/tm.texi: Regenerate.
18626 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18627             Alan Hayward  <alan.hayward@arm.com>
18628             David Sherwood  <david.sherwood@arm.com>
18630         * doc/invoke.texi (-msve-vector-bits=): Document new option.
18631         (sve): Document new AArch64 extension.
18632         * doc/md.texi (w): Extend the description of the AArch64
18633         constraint to include SVE vectors.
18634         (Upl, Upa): Document new AArch64 predicate constraints.
18635         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18636         enum.
18637         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18638         (msve-vector-bits=): New option.
18639         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18640         SVE when these are disabled.
18641         (sve): New extension.
18642         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18643         modes.  Adjust their number of units based on aarch64_sve_vg.
18644         (MAX_BITSIZE_MODE_ANY_MODE): Define.
18645         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18646         aarch64_addr_query_type.
18647         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18648         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18649         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18650         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18651         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18652         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18653         (aarch64_simd_imm_zero_p): Delete.
18654         (aarch64_check_zero_based_sve_index_immediate): Declare.
18655         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18656         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18657         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18658         (aarch64_sve_float_mul_immediate_p): Likewise.
18659         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18660         rather than an rtx.
18661         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18662         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18663         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18664         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18665         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18666         (aarch64_regmode_natural_size): Likewise.
18667         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18668         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18669         left one place.
18670         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18671         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18672         for VG and the SVE predicate registers.
18673         (V_ALIASES): Add a "z"-prefixed alias.
18674         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18675         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18676         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18677         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18678         (REG_CLASS_NAMES): Add entries for them.
18679         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
18680         and the predicate registers.
18681         (aarch64_sve_vg): Declare.
18682         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18683         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18684         (REGMODE_NATURAL_SIZE): Define.
18685         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18686         SVE macros.
18687         * config/aarch64/aarch64.c: Include cfgrtl.h.
18688         (simd_immediate_info): Add a constructor for series vectors,
18689         and an associated step field.
18690         (aarch64_sve_vg): New variable.
18691         (aarch64_dbx_register_number): Handle VG and the predicate registers.
18692         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18693         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18694         (VEC_ANY_DATA, VEC_STRUCT): New constants.
18695         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18696         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18697         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18698         (aarch64_get_mask_mode): New functions.
18699         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18700         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18701         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
18702         predicate modes and predicate registers.  Explicitly restrict
18703         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
18704         to store a vector mode if it is recognized by
18705         aarch64_classify_vector_mode.
18706         (aarch64_regmode_natural_size): New function.
18707         (aarch64_hard_regno_caller_save_mode): Return the original mode
18708         for predicates.
18709         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18710         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18711         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18712         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18713         functions.
18714         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
18715         does not overlap dest if the function is frame-related.  Handle
18716         SVE constants.
18717         (aarch64_split_add_offset): New function.
18718         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18719         them aarch64_add_offset.
18720         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18721         and update call to aarch64_sub_sp.
18722         (aarch64_add_cfa_expression): New function.
18723         (aarch64_expand_prologue): Pass extra temporary registers to the
18724         functions above.  Handle the case in which we need to emit new
18725         DW_CFA_expressions for registers that were originally saved
18726         relative to the stack pointer, but now have to be expressed
18727         relative to the frame pointer.
18728         (aarch64_output_mi_thunk): Pass extra temporary registers to the
18729         functions above.
18730         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
18731         IP0 and IP1 values for SVE frames.
18732         (aarch64_expand_vec_series): New function.
18733         (aarch64_expand_sve_widened_duplicate): Likewise.
18734         (aarch64_expand_sve_const_vector): Likewise.
18735         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18736         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
18737         into the register, rather than emitting a SET directly.
18738         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18739         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18740         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18741         (offset_9bit_signed_scaled_p): New functions.
18742         (aarch64_replicate_bitmask_imm): New function.
18743         (aarch64_bitmask_imm): Use it.
18744         (aarch64_cannot_force_const_mem): Reject expressions involving
18745         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
18746         (aarch64_classify_index): Handle SVE indices, by requiring
18747         a plain register index with a scale that matches the element size.
18748         (aarch64_classify_address): Handle SVE addresses.  Assert that
18749         the mode of the address is VOIDmode or an integer mode.
18750         Update call to aarch64_classify_symbol.
18751         (aarch64_classify_symbolic_expression): Update call to
18752         aarch64_classify_symbol.
18753         (aarch64_const_vec_all_in_range_p): New function.
18754         (aarch64_print_vector_float_operand): Likewise.
18755         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
18756         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
18757         and the FP immediates 1.0 and 0.5.
18758         (aarch64_print_address_internal): Handle SVE addresses.
18759         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18760         (aarch64_regno_regclass): Handle predicate registers.
18761         (aarch64_secondary_reload): Handle big-endian reloads of SVE
18762         data modes.
18763         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18764         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18765         (aarch64_convert_sve_vector_bits): New function.
18766         (aarch64_override_options): Use it to handle -msve-vector-bits=.
18767         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18768         rather than an rtx.
18769         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18770         Handle SVE vector and predicate modes.  Accept VL-based constants
18771         that need only one temporary register, and VL offsets that require
18772         no temporary registers.
18773         (aarch64_conditional_register_usage): Mark the predicate registers
18774         as fixed if SVE isn't available.
18775         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18776         Return true for SVE vector and predicate modes.
18777         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18778         rather than an unsigned int.  Handle SVE modes.
18779         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
18780         SVE modes.
18781         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18782         if SVE is enabled.
18783         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18784         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18785         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18786         (aarch64_sve_float_mul_immediate_p): New functions.
18787         (aarch64_sve_valid_immediate): New function.
18788         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18789         Explicitly reject structure modes.  Check for INDEX constants.
18790         Handle PTRUE and PFALSE constants.
18791         (aarch64_check_zero_based_sve_index_immediate): New function.
18792         (aarch64_simd_imm_zero_p): Delete.
18793         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18794         vector modes.  Accept constants in the range of CNT[BHWD].
18795         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18796         ask for an Advanced SIMD mode.
18797         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18798         (aarch64_simd_vector_alignment): Handle SVE predicates.
18799         (aarch64_vectorize_preferred_vector_alignment): New function.
18800         (aarch64_simd_vector_alignment_reachable): Use it instead of
18801         the vector size.
18802         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18803         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18804         functions.
18805         (MAX_VECT_LEN): Delete.
18806         (expand_vec_perm_d): Add a vec_flags field.
18807         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18808         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18809         (aarch64_evpc_ext): Don't apply a big-endian lane correction
18810         for SVE modes.
18811         (aarch64_evpc_rev): Rename to...
18812         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
18813         (aarch64_evpc_rev_global): New function.
18814         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18815         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18816         MAX_VECT_LEN.
18817         (aarch64_evpc_sve_tbl): New function.
18818         (aarch64_expand_vec_perm_const_1): Update after rename of
18819         aarch64_evpc_rev.  Handle SVE permutes too, trying
18820         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18821         than aarch64_evpc_tbl.
18822         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18823         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18824         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18825         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18826         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18827         (aarch64_expand_sve_vcond): New functions.
18828         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18829         of aarch64_vector_mode_p.
18830         (aarch64_dwarf_poly_indeterminate_value): New function.
18831         (aarch64_compute_pressure_classes): Likewise.
18832         (aarch64_can_change_mode_class): Likewise.
18833         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18834         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18835         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18836         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18837         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18838         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18839         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18840         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18841         constraints.
18842         (Dn, Dl, Dr): Accept const as well as const_vector.
18843         (Dz): Likewise.  Compare against CONST0_RTX.
18844         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18845         of "vector" where appropriate.
18846         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18847         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18848         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18849         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18850         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18851         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18852         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18853         (v_int_equiv): Extend to SVE modes.
18854         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18855         mode attributes.
18856         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18857         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18858         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18859         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18860         (SVE_COND_FP_CMP): New int iterators.
18861         (perm_hilo): Handle the new unpack unspecs.
18862         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18863         attributes.
18864         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18865         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18866         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18867         (aarch64_equality_operator, aarch64_constant_vector_operand)
18868         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18869         (aarch64_sve_nonimmediate_operand): Likewise.
18870         (aarch64_sve_general_operand): Likewise.
18871         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18872         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18873         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18874         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18875         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18876         (aarch64_sve_float_arith_immediate): Likewise.
18877         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18878         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18879         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18880         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18881         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18882         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18883         (aarch64_sve_float_arith_operand): Likewise.
18884         (aarch64_sve_float_arith_with_sub_operand): Likewise.
18885         (aarch64_sve_float_mul_operand): Likewise.
18886         (aarch64_sve_vec_perm_operand): Likewise.
18887         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18888         (aarch64_mov_operand): Accept const_poly_int and const_vector.
18889         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18890         as well as const_vector.
18891         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18892         in file.  Use CONST0_RTX and CONSTM1_RTX.
18893         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
18894         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18895         Use aarch64_simd_imm_zero.
18896         * config/aarch64/aarch64-sve.md: New file.
18897         * config/aarch64/aarch64.md: Include it.
18898         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18899         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18900         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18901         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18902         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18903         (sve): New attribute.
18904         (enabled): Disable instructions with the sve attribute unless
18905         TARGET_SVE.
18906         (movqi, movhi): Pass CONST_POLY_INT operaneds through
18907         aarch64_expand_mov_immediate.
18908         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18909         CNT[BHSD] immediates.
18910         (movti): Split CONST_POLY_INT moves into two halves.
18911         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18912         Split additions that need a temporary here if the destination
18913         is the stack pointer.
18914         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18915         (*add<mode>3_poly_1): New instruction.
18916         (set_clobber_cc): New expander.
18918 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18920         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18921         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
18922         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18923         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18924         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
18925         Change innermode from fixed_mode_size to machine_mode.
18926         (simplify_subreg): Update call accordingly.  Handle a constant-sized
18927         subreg of a variable-length CONST_VECTOR.
18929 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18930             Alan Hayward  <alan.hayward@arm.com>
18931             David Sherwood  <david.sherwood@arm.com>
18933         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18934         (add_offset_to_base): New function, split out from...
18935         (create_mem_ref): ...here.  When handling a scale other than 1,
18936         check first whether the address is valid without the offset.
18937         Add it into the base if so, leaving the index and scale as-is.
18939 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
18941         PR c++/83778
18942         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18943         fold_for_warn before checking if arg2 is INTEGER_CST.
18945 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
18947         * config/rs6000/predicates.md (load_multiple_operation): Delete.
18948         (store_multiple_operation): Delete.
18949         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18950         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18951         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18952         guarded by TARGET_STRING.
18953         (rs6000_output_load_multiple): Delete.
18954         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18955         OPTION_MASK_STRING / TARGET_STRING handling.
18956         (print_operand) <'N', 'O'>: Add comment that these are unused now.
18957         (const rs6000_opt_masks) <"string">: Change mask to 0.
18958         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18959         (MASK_STRING): Delete.
18960         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18961         parts.  Simplify.
18962         (load_multiple): Delete.
18963         (*ldmsi8): Delete.
18964         (*ldmsi7): Delete.
18965         (*ldmsi6): Delete.
18966         (*ldmsi5): Delete.
18967         (*ldmsi4): Delete.
18968         (*ldmsi3): Delete.
18969         (store_multiple): Delete.
18970         (*stmsi8): Delete.
18971         (*stmsi7): Delete.
18972         (*stmsi6): Delete.
18973         (*stmsi5): Delete.
18974         (*stmsi4): Delete.
18975         (*stmsi3): Delete.
18976         (movmemsi_8reg): Delete.
18977         (corresponding unnamed define_insn): Delete.
18978         (movmemsi_6reg): Delete.
18979         (corresponding unnamed define_insn): Delete.
18980         (movmemsi_4reg): Delete.
18981         (corresponding unnamed define_insn): Delete.
18982         (movmemsi_2reg): Delete.
18983         (corresponding unnamed define_insn): Delete.
18984         (movmemsi_1reg): Delete.
18985         (corresponding unnamed define_insn): Delete.
18986         * config/rs6000/rs6000.opt (mno-string): New.
18987         (mstring): Replace by deprecation warning stub.
18988         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18990 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
18992         * regrename.c (regrename_do_replace): If replacing the same
18993         reg multiple times, try to reuse last created gen_raw_REG.
18995         PR debug/81155
18996         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18997         main to workaround a bug in GDB.
18999 2018-01-12  Tom de Vries  <tom@codesourcery.com>
19001         PR target/83737
19002         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19004 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
19006         PR rtl-optimization/80481
19007         * ira-color.c (get_cap_member): New function.
19008         (allocnos_conflict_by_live_ranges_p): Use it.
19009         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19010         (setup_slot_coalesced_allocno_live_ranges): Ditto.
19012 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
19014         PR target/83628
19015         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19016         (*saddl_se_1): Ditto.
19017         (*ssubsi_1): Ditto.
19018         (*ssubl_se_1): Ditto.
19020 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19022         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19023         rather than wi::to_widest for DR_INITs.
19024         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19025         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19026         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19027         INTEGER_CSTs.
19028         (vect_analyze_group_access_1): Note that here.
19030 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19032         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19033         polynomial type sizes.
19035 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
19037         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19038         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19039         (gimple_add_tmp_var): Likewise.
19041 2018-01-12  Martin Liska  <mliska@suse.cz>
19043         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19044         (gimple_alloc_sizes): Likewise.
19045         (dump_gimple_statistics): Use PRIu64 in printf format.
19046         * gimple.h: Change uint64_t to int.
19048 2018-01-12  Martin Liska  <mliska@suse.cz>
19050         * tree-core.h: Use uint64_t instead of int.
19051         * tree.c (tree_node_counts): Likewise.
19052         (tree_node_sizes): Likewise.
19053         (dump_tree_statistics): Use PRIu64 in printf format.
19055 2018-01-12  Martin Liska  <mliska@suse.cz>
19057         * Makefile.in: As qsort_chk is implemented in vec.c, add
19058         vec.o to linkage of gencfn-macros.
19059         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19060         passing the info to record_node_allocation_statistics.
19061         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19062         and pass the info.
19063         * ggc-common.c (struct ggc_usage): Add operator== and use
19064         it in operator< and compare function.
19065         * mem-stats.h (struct mem_usage): Likewise.
19066         * vec.c (struct vec_usage): Remove operator< and compare
19067         function. Can be simply inherited.
19069 2018-01-12  Martin Jambor  <mjambor@suse.cz>
19071         PR target/81616
19072         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19073         * tree-ssa-math-opts.c: Include domwalk.h.
19074         (convert_mult_to_fma_1): New function.
19075         (fma_transformation_info): New type.
19076         (fma_deferring_state): Likewise.
19077         (cancel_fma_deferring): New function.
19078         (result_of_phi): Likewise.
19079         (last_fma_candidate_feeds_initial_phi): Likewise.
19080         (convert_mult_to_fma): Added deferring logic, split actual
19081         transformation to convert_mult_to_fma_1.
19082         (math_opts_dom_walker): New type.
19083         (math_opts_dom_walker::after_dom_children): New method, body moved
19084         here from pass_optimize_widening_mul::execute, added deferring logic
19085         bits.
19086         (pass_optimize_widening_mul::execute): Moved most of code to
19087         math_opts_dom_walker::after_dom_children.
19088         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19089         * config/i386/i386.c (ix86_option_override_internal): Added
19090         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19092 2018-01-12  Richard Biener  <rguenther@suse.de>
19094         PR debug/83157
19095         * dwarf2out.c (gen_variable_die): Do not reset old_die for
19096         inline instance vars.
19098 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
19100         PR target/81819
19101         * config/rx/rx.c (rx_is_restricted_memory_address):
19102         Handle SUBREG case.
19104 2018-01-12  Richard Biener  <rguenther@suse.de>
19106         PR tree-optimization/80846
19107         * target.def (split_reduction): New target hook.
19108         * targhooks.c (default_split_reduction): New function.
19109         * targhooks.h (default_split_reduction): Declare.
19110         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19111         target requests first reduce vectors by combining low and high
19112         parts.
19113         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19114         (get_vectype_for_scalar_type_and_size): Export.
19115         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19116         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19117         * doc/tm.texi: Regenerate.
19118         * config/i386/i386.c (ix86_split_reduction): Implement
19119         TARGET_VECTORIZE_SPLIT_REDUCTION.
19121 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19123         PR target/83368
19124         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19125         in PIC mode except for TARGET_VXWORKS_RTP.
19126         * config/sparc/sparc.c: Include cfgrtl.h.
19127         (TARGET_INIT_PIC_REG): Define.
19128         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19129         (sparc_pic_register_p): New predicate.
19130         (sparc_legitimate_address_p): Use it.
19131         (sparc_legitimize_pic_address): Likewise.
19132         (sparc_delegitimize_address): Likewise.
19133         (sparc_mode_dependent_address_p): Likewise.
19134         (gen_load_pcrel_sym): Remove 4th parameter.
19135         (load_got_register): Adjust call to above.  Remove obsolete stuff.
19136         (sparc_expand_prologue): Do not call load_got_register here.
19137         (sparc_flat_expand_prologue): Likewise.
19138         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19139         (sparc_use_pseudo_pic_reg): New function.
19140         (sparc_init_pic_reg): Likewise.
19141         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19142         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19144 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
19146         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19147         Add item for branch_cost.
19149 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19151         PR rtl-optimization/83565
19152         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19153         not extend the result to a larger mode for rotate operations.
19154         (num_sign_bit_copies1): Likewise.
19156 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19158         PR target/40411
19159         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19160         -symbolic.
19161         Use values-Xc.o for -pedantic.
19162         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19164 2018-01-12  Martin Liska  <mliska@suse.cz>
19166         PR ipa/83054
19167         * ipa-devirt.c (final_warning_record::grow_type_warnings):
19168         New function.
19169         (possible_polymorphic_call_targets): Use it.
19170         (ipa_devirt): Likewise.
19172 2018-01-12  Martin Liska  <mliska@suse.cz>
19174         * profile-count.h (enum profile_quality): Use 0 as invalid
19175         enum value of profile_quality.
19177 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
19179         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19180         -mext-string options.
19182 2018-01-12  Richard Biener  <rguenther@suse.de>
19184         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19185         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19186         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19187         Likewise.
19188         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19190 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
19192         * configure.ac (--with-long-double-format): Add support for the
19193         configuration option to change the default long double format on
19194         PowerPC systems.
19195         * config.gcc (powerpc*-linux*-*): Likewise.
19196         * configure: Regenerate.
19197         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19198         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19199         used without modification.
19201 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19203         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19204         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19205         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19206         MISC_BUILTIN_SPEC_BARRIER.
19207         (rs6000_init_builtins): Likewise.
19208         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19209         enum value.
19210         (speculation_barrier): New define_insn.
19211         * doc/extend.texi: Document __builtin_speculation_barrier.
19213 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
19215         PR target/83203
19216         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19217         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19218         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19219         iterators.
19220         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
19221         integral modes instead of "ss" and "sd".
19222         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19223         vectors with 32-bit and 64-bit elements.
19224         (vecdupssescalarmodesuffix): New mode attribute.
19225         (vec_dup<mode>): Use it.
19227 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
19229         PR target/83330
19230         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19231         frame if argument is passed on stack.
19233 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
19235         PR target/82682
19236         * ree.c (combine_reaching_defs): Optimize also
19237         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19238         reg2=any_extend(exp); reg1=reg2;, formatting fix.
19240 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
19242         PR middle-end/83189
19243         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19245 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
19247         PR middle-end/83718
19248         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19249         after they are computed.
19251 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
19253         PR tree-optimization/83695
19254         * gimple-loop-linterchange.cc
19255         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19256         reset cached scev information after interchange.
19257         (pass_linterchange::execute): Remove call to scev_reset_htab.
19259 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19261         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19262         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19263         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19264         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19265         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19266         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19267         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19268         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19269         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19270         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19271         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19272         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19273         (V_lane_reg): Likewise.
19274         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19275         New define_expand.
19276         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19277         (vfmal_lane_low<mode>_intrinsic,
19278         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19279         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19280         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19281         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19282         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19283         vfmsl_lane_high<mode>_intrinsic): New define_insns.
19285 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19287         * config/arm/arm-cpus.in (fp16fml): New feature.
19288         (ALL_SIMD): Add fp16fml.
19289         (armv8.2-a): Add fp16fml as an option.
19290         (armv8.3-a): Likewise.
19291         (armv8.4-a): Add fp16fml as part of fp16.
19292         * config/arm/arm.h (TARGET_FP16FML): Define.
19293         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19294         when appropriate.
19295         * config/arm/arm-modes.def (V2HF): Define.
19296         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19297         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19298         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19299         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19300         vfmsl_low, vfmsl_high): New set of builtins.
19301         * config/arm/iterators.md (PLUSMINUS): New code iterator.
19302         (vfml_op): New code attribute.
19303         (VFMLHALVES): New int iterator.
19304         (VFML, VFMLSEL): New mode attributes.
19305         (V_reg): Define mapping for V2HF.
19306         (V_hi, V_lo): New mode attributes.
19307         (VF_constraint): Likewise.
19308         (vfml_half, vfml_half_selector): New int attributes.
19309         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19310         define_expand.
19311         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19312         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19313         New define_insn.
19314         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19315         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19316         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19317         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
19318         documentation.
19319         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19320         Document new effective target and option set.
19322 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19324         * config/arm/arm-cpus.in (armv8_4): New feature.
19325         (ARMv8_4a): New fgroup.
19326         (armv8.4-a): New arch.
19327         * config/arm/arm-tables.opt: Regenerate.
19328         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19329         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19330         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19331         Add matching rules for -march=armv8.4-a and extensions.
19332         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19334 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
19336         PR target/81821
19337         * config/rx/rx.md (BW): New mode attribute.
19338         (sync_lock_test_and_setsi): Add mode suffix to insn output.
19340 2018-01-11  Richard Biener  <rguenther@suse.de>
19342         PR tree-optimization/83435
19343         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19344         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19345         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19347 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19348             Alan Hayward  <alan.hayward@arm.com>
19349             David Sherwood  <david.sherwood@arm.com>
19351         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19352         field.
19353         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
19354         (aarch64_print_address_internal): Use it to check for a zero offset.
19356 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19357             Alan Hayward  <alan.hayward@arm.com>
19358             David Sherwood  <david.sherwood@arm.com>
19360         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19361         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19362         Return a poly_int64 rather than a HOST_WIDE_INT.
19363         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19364         rather than a HOST_WIDE_INT.
19365         * config/aarch64/aarch64.h (aarch64_frame): Protect with
19366         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
19367         hard_fp_offset, frame_size, initial_adjust, callee_offset and
19368         final_offset from HOST_WIDE_INT to poly_int64.
19369         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19370         to_constant when getting the number of units in an Advanced SIMD
19371         mode.
19372         (aarch64_builtin_vectorized_function): Check for a constant number
19373         of units.
19374         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19375         GET_MODE_SIZE.
19376         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19377         attribute instead of GET_MODE_NUNITS.
19378         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19379         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19380         GET_MODE_SIZE for fixed-size registers.
19381         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19382         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19383         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19384         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19385         (aarch64_print_operand, aarch64_print_address_internal)
19386         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19387         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19388         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19389         Handle polynomial GET_MODE_SIZE.
19390         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
19391         wider than SImode without modification.
19392         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19393         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19394         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19395         passing and returning SVE modes.
19396         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19397         rather than GEN_INT.
19398         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19399         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19400         (aarch64_allocate_and_probe_stack_space): Likewise.
19401         (aarch64_layout_frame): Cope with polynomial offsets.
19402         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19403         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
19404         polynomial offsets.
19405         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19406         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19407         poly_int64 rather than a HOST_WIDE_INT.
19408         (aarch64_get_separate_components, aarch64_process_components)
19409         (aarch64_expand_prologue, aarch64_expand_epilogue)
19410         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19411         (aarch64_anchor_offset): New function, split out from...
19412         (aarch64_legitimize_address): ...here.
19413         (aarch64_builtin_vectorization_cost): Handle polynomial
19414         TYPE_VECTOR_SUBPARTS.
19415         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19416         GET_MODE_NUNITS.
19417         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19418         number of elements from the PARALLEL rather than the mode.
19419         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19420         rather than GET_MODE_BITSIZE.
19421         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19422         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19423         (aarch64_expand_vec_perm_const_1): Handle polynomial
19424         d->perm.length () and d->perm elements.
19425         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
19426         Apply to_constant to d->perm elements.
19427         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19428         polynomial CONST_VECTOR_NUNITS.
19429         (aarch64_move_pointer): Take amount as a poly_int64 rather
19430         than an int.
19431         (aarch64_progress_pointer): Avoid temporary variable.
19432         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19433         the mode attribute instead of GET_MODE.
19435 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19436             Alan Hayward  <alan.hayward@arm.com>
19437             David Sherwood  <david.sherwood@arm.com>
19439         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19440         x exists before using it.
19441         (aarch64_add_constant_internal): Rename to...
19442         (aarch64_add_offset_1): ...this.  Replace regnum with separate
19443         src and dest rtxes.  Handle the case in which they're different,
19444         including when the offset is zero.  Replace scratchreg with an rtx.
19445         Use 2 additions if there is no spare register into which we can
19446         move a 16-bit constant.
19447         (aarch64_add_constant): Delete.
19448         (aarch64_add_offset): Replace reg with separate src and dest
19449         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
19450         Use aarch64_add_offset_1.
19451         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19452         an rtx rather than an int.  Take the delta as a poly_int64
19453         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
19454         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19455         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19456         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19457         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19458         and aarch64_add_sp.
19459         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19460         aarch64_add_constant.
19462 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19464         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19465         Use scalar_float_mode.
19467 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19469         * config/aarch64/aarch64-simd.md
19470         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19471         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19472         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19473         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19474         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19475         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19476         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19477         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19478         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19479         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19481 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19483         PR target/83514
19484         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19485         targ_options->x_arm_arch_string is non NULL.
19487 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
19489         * config/aarch64/aarch64.h
19490         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
19492 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
19494         PR target/82096
19495         * expmed.c (emit_store_flag_force): Swap if const op0
19496         and change VOIDmode to mode of op0.
19498 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
19500         PR rtl-optimization/83761
19501         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19502         than bytes to mode_for_size.
19504 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
19506         PR middle-end/83189
19507         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19508         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19509         profile.
19511 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
19513         PR middle-end/83575
19514         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19515         when in layout mode.
19516         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19517         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19518         partition fixup.
19520 2018-01-10  Michael Collison  <michael.collison@arm.com>
19522         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19523         * config/aarch64/aarch64-option-extension.def: Add
19524         AARCH64_OPT_EXTENSION of 'fp16fml'.
19525         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19526         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19527         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19528         * config/aarch64/constraints.md (Ui7): New constraint.
19529         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19530         (VFMLA_SEL_W): Ditto.
19531         (f16quad): Ditto.
19532         (f16mac1): Ditto.
19533         (VFMLA16_LOW): New int iterator.
19534         (VFMLA16_HIGH): Ditto.
19535         (UNSPEC_FMLAL): New unspec.
19536         (UNSPEC_FMLSL): Ditto.
19537         (UNSPEC_FMLAL2): Ditto.
19538         (UNSPEC_FMLSL2): Ditto.
19539         (f16mac): New code attribute.
19540         * config/aarch64/aarch64-simd-builtins.def
19541         (aarch64_fmlal_lowv2sf): Ditto.
19542         (aarch64_fmlsl_lowv2sf): Ditto.
19543         (aarch64_fmlalq_lowv4sf): Ditto.
19544         (aarch64_fmlslq_lowv4sf): Ditto.
19545         (aarch64_fmlal_highv2sf): Ditto.
19546         (aarch64_fmlsl_highv2sf): Ditto.
19547         (aarch64_fmlalq_highv4sf): Ditto.
19548         (aarch64_fmlslq_highv4sf): Ditto.
19549         (aarch64_fmlal_lane_lowv2sf): Ditto.
19550         (aarch64_fmlsl_lane_lowv2sf): Ditto.
19551         (aarch64_fmlal_laneq_lowv2sf): Ditto.
19552         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19553         (aarch64_fmlalq_lane_lowv4sf): Ditto.
19554         (aarch64_fmlsl_lane_lowv4sf): Ditto.
19555         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19556         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19557         (aarch64_fmlal_lane_highv2sf): Ditto.
19558         (aarch64_fmlsl_lane_highv2sf): Ditto.
19559         (aarch64_fmlal_laneq_highv2sf): Ditto.
19560         (aarch64_fmlsl_laneq_highv2sf): Ditto.
19561         (aarch64_fmlalq_lane_highv4sf): Ditto.
19562         (aarch64_fmlsl_lane_highv4sf): Ditto.
19563         (aarch64_fmlalq_laneq_highv4sf): Ditto.
19564         (aarch64_fmlsl_laneq_highv4sf): Ditto.
19565         * config/aarch64/aarch64-simd.md:
19566         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19567         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19568         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19569         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19570         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19571         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19572         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19573         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19574         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19575         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19576         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19577         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19578         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19579         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19580         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19581         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19582         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19583         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19584         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19585         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19586         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19587         (vfmlsl_low_u32): Ditto.
19588         (vfmlalq_low_u32): Ditto.
19589         (vfmlslq_low_u32): Ditto.
19590         (vfmlal_high_u32): Ditto.
19591         (vfmlsl_high_u32): Ditto.
19592         (vfmlalq_high_u32): Ditto.
19593         (vfmlslq_high_u32): Ditto.
19594         (vfmlal_lane_low_u32): Ditto.
19595         (vfmlsl_lane_low_u32): Ditto.
19596         (vfmlal_laneq_low_u32): Ditto.
19597         (vfmlsl_laneq_low_u32): Ditto.
19598         (vfmlalq_lane_low_u32): Ditto.
19599         (vfmlslq_lane_low_u32): Ditto.
19600         (vfmlalq_laneq_low_u32): Ditto.
19601         (vfmlslq_laneq_low_u32): Ditto.
19602         (vfmlal_lane_high_u32): Ditto.
19603         (vfmlsl_lane_high_u32): Ditto.
19604         (vfmlal_laneq_high_u32): Ditto.
19605         (vfmlsl_laneq_high_u32): Ditto.
19606         (vfmlalq_lane_high_u32): Ditto.
19607         (vfmlslq_lane_high_u32): Ditto.
19608         (vfmlalq_laneq_high_u32): Ditto.
19609         (vfmlslq_laneq_high_u32): Ditto.
19610         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19611         (AARCH64_FL_FOR_ARCH8_4): New.
19612         (AARCH64_ISA_F16FML): New ISA flag.
19613         (TARGET_F16FML): New feature flag for fp16fml.
19614         (doc/invoke.texi): Document new fp16fml option.
19616 2018-01-10  Michael Collison  <michael.collison@arm.com>
19618         * config/aarch64/aarch64-builtins.c:
19619         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19620         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19621         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19622         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19623         (AARCH64_ISA_SHA3): New ISA flag.
19624         (TARGET_SHA3): New feature flag for sha3.
19625         * config/aarch64/iterators.md (sha512_op): New int attribute.
19626         (CRYPTO_SHA512): New int iterator.
19627         (UNSPEC_SHA512H): New unspec.
19628         (UNSPEC_SHA512H2): Ditto.
19629         (UNSPEC_SHA512SU0): Ditto.
19630         (UNSPEC_SHA512SU1): Ditto.
19631         * config/aarch64/aarch64-simd-builtins.def
19632         (aarch64_crypto_sha512hqv2di): New builtin.
19633         (aarch64_crypto_sha512h2qv2di): Ditto.
19634         (aarch64_crypto_sha512su0qv2di): Ditto.
19635         (aarch64_crypto_sha512su1qv2di): Ditto.
19636         (aarch64_eor3qv8hi): Ditto.
19637         (aarch64_rax1qv2di): Ditto.
19638         (aarch64_xarqv2di): Ditto.
19639         (aarch64_bcaxqv8hi): Ditto.
19640         * config/aarch64/aarch64-simd.md:
19641         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19642         (aarch64_crypto_sha512su0qv2di): Ditto.
19643         (aarch64_crypto_sha512su1qv2di): Ditto.
19644         (aarch64_eor3qv8hi): Ditto.
19645         (aarch64_rax1qv2di): Ditto.
19646         (aarch64_xarqv2di): Ditto.
19647         (aarch64_bcaxqv8hi): Ditto.
19648         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19649         (vsha512h2q_u64): Ditto.
19650         (vsha512su0q_u64): Ditto.
19651         (vsha512su1q_u64): Ditto.
19652         (veor3q_u16): Ditto.
19653         (vrax1q_u64): Ditto.
19654         (vxarq_u64): Ditto.
19655         (vbcaxq_u16): Ditto.
19656         * config/arm/types.md (crypto_sha512): New type attribute.
19657         (crypto_sha3): Ditto.
19658         (doc/invoke.texi): Document new sha3 option.
19660 2018-01-10  Michael Collison  <michael.collison@arm.com>
19662         * config/aarch64/aarch64-builtins.c:
19663         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19664         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19665         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19666         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19667         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19668         (AARCH64_ISA_SM4): New ISA flag.
19669         (TARGET_SM4): New feature flag for sm4.
19670         * config/aarch64/aarch64-simd-builtins.def
19671         (aarch64_sm3ss1qv4si): Ditto.
19672         (aarch64_sm3tt1aq4si): Ditto.
19673         (aarch64_sm3tt1bq4si): Ditto.
19674         (aarch64_sm3tt2aq4si): Ditto.
19675         (aarch64_sm3tt2bq4si): Ditto.
19676         (aarch64_sm3partw1qv4si): Ditto.
19677         (aarch64_sm3partw2qv4si): Ditto.
19678         (aarch64_sm4eqv4si): Ditto.
19679         (aarch64_sm4ekeyqv4si): Ditto.
19680         * config/aarch64/aarch64-simd.md:
19681         (aarch64_sm3ss1qv4si): Ditto.
19682         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19683         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19684         (aarch64_sm4eqv4si): Ditto.
19685         (aarch64_sm4ekeyqv4si): Ditto.
19686         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19687         (sm3part_op): Ditto.
19688         (CRYPTO_SM3TT): Ditto.
19689         (CRYPTO_SM3PART): Ditto.
19690         (UNSPEC_SM3SS1): New unspec.
19691         (UNSPEC_SM3TT1A): Ditto.
19692         (UNSPEC_SM3TT1B): Ditto.
19693         (UNSPEC_SM3TT2A): Ditto.
19694         (UNSPEC_SM3TT2B): Ditto.
19695         (UNSPEC_SM3PARTW1): Ditto.
19696         (UNSPEC_SM3PARTW2): Ditto.
19697         (UNSPEC_SM4E): Ditto.
19698         (UNSPEC_SM4EKEY): Ditto.
19699         * config/aarch64/constraints.md (Ui2): New constraint.
19700         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19701         * config/arm/types.md (crypto_sm3): New type attribute.
19702         (crypto_sm4): Ditto.
19703         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19704         (vsm3tt1aq_u32): Ditto.
19705         (vsm3tt1bq_u32): Ditto.
19706         (vsm3tt2aq_u32): Ditto.
19707         (vsm3tt2bq_u32): Ditto.
19708         (vsm3partw1q_u32): Ditto.
19709         (vsm3partw2q_u32): Ditto.
19710         (vsm4eq_u32): Ditto.
19711         (vsm4ekeyq_u32): Ditto.
19712         (doc/invoke.texi): Document new sm4 option.
19714 2018-01-10  Michael Collison  <michael.collison@arm.com>
19716         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19717         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19718         (AARCH64_FL_FOR_ARCH8_4): New.
19719         (AARCH64_FL_V8_4): New flag.
19720         (doc/invoke.texi): Document new armv8.4-a option.
19722 2018-01-10  Michael Collison  <michael.collison@arm.com>
19724         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19725         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19726         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19727         * config/aarch64/aarch64-option-extension.def: Add
19728         AARCH64_OPT_EXTENSION of 'sha2'.
19729         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19730         (crypto): Disable sha2 and aes if crypto disabled.
19731         (crypto): Enable aes and sha2 if enabled.
19732         (simd): Disable sha2 and aes if simd disabled.
19733         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19734         New flags.
19735         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19736         (TARGET_SHA2): New feature flag for sha2.
19737         (TARGET_AES): New feature flag for aes.
19738         * config/aarch64/aarch64-simd.md:
19739         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19740         conditional on TARGET_AES.
19741         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19742         (aarch64_crypto_sha1hsi): Make pattern conditional
19743         on TARGET_SHA2.
19744         (aarch64_crypto_sha1hv4si): Ditto.
19745         (aarch64_be_crypto_sha1hv4si): Ditto.
19746         (aarch64_crypto_sha1su1v4si): Ditto.
19747         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19748         (aarch64_crypto_sha1su0v4si): Ditto.
19749         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19750         (aarch64_crypto_sha256su0v4si): Ditto.
19751         (aarch64_crypto_sha256su1v4si): Ditto.
19752         (doc/invoke.texi): Document new aes and sha2 options.
19754 2018-01-10  Martin Sebor  <msebor@redhat.com>
19756         PR tree-optimization/83781
19757         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19758         as string arrays.
19760 2018-01-11  Martin Sebor  <msebor@gmail.com>
19761             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19763         PR tree-optimization/83501
19764         PR tree-optimization/81703
19766         * tree-ssa-strlen.c (get_string_cst): Rename...
19767         (get_string_len): ...to this.  Handle global constants.
19768         (handle_char_store): Adjust.
19770 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
19771             Jim Wilson  <jimw@sifive.com>
19773         * config/riscv/riscv-protos.h (riscv_output_return): New.
19774         * config/riscv/riscv.c (struct machine_function): New naked_p field.
19775         (riscv_attribute_table, riscv_output_return),
19776         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19777         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19778         (riscv_compute_frame_info): Only compute frame->mask if not a naked
19779         function.
19780         (riscv_expand_prologue): Add early return for naked function.
19781         (riscv_expand_epilogue): Likewise.
19782         (riscv_function_ok_for_sibcall): Return false for naked function.
19783         (riscv_set_current_function): New.
19784         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19785         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19786         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19787         * doc/extend.texi (RISC-V Function Attributes): New.
19789 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
19791         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19792         check for 128-bit long double before checking TCmode.
19793         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19794         128-bit long doubles before checking TFmode or TCmode.
19795         (FLOAT128_IBM_P): Likewise.
19797 2018-01-10  Martin Sebor  <msebor@redhat.com>
19799         PR tree-optimization/83671
19800         * builtins.c (c_strlen): Unconditionally return zero for the empty
19801         string.
19802         Use -Warray-bounds for warnings.
19803         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19804         for non-constant array indices with COMPONENT_REF, arrays of
19805         arrays, and pointers to arrays.
19806         (gimple_fold_builtin_strlen): Determine and set length range for
19807         non-constant character arrays.
19809 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
19811         PR middle-end/81897
19812         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19813         empty blocks.
19815 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
19817         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19819 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
19821         PR target/83399
19822         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19823         VECTOR_MEM_ALTIVEC_OR_VSX_P.
19824         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19825         indexed_or_indirect_operand predicate.
19826         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19827         (*vsx_le_perm_load_v8hi): Likewise.
19828         (*vsx_le_perm_load_v16qi): Likewise.
19829         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19830         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19831         (*vsx_le_perm_store_v8hi): Likewise.
19832         (*vsx_le_perm_store_v16qi): Likewise.
19833         (eight unnamed splitters): Likewise.
19835 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
19837         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19838         * config/rs6000/emmintrin.h: Likewise.
19839         * config/rs6000/mmintrin.h: Likewise.
19840         * config/rs6000/xmmintrin.h: Likewise.
19842 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
19844         PR c++/43486
19845         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19846         "public_flag".
19847         * tree.c (tree_nop_conversion): Return true for location wrapper
19848         nodes.
19849         (maybe_wrap_with_location): New function.
19850         (selftest::check_strip_nops): New function.
19851         (selftest::test_location_wrappers): New function.
19852         (selftest::tree_c_tests): Call it.
19853         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19854         (maybe_wrap_with_location): New decl.
19855         (EXPR_LOCATION_WRAPPER_P): New macro.
19856         (location_wrapper_p): New inline function.
19857         (tree_strip_any_location_wrapper): New inline function.
19859 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
19861         PR target/83735
19862         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19863         stack_realign_offset for the largest alignment of stack slot
19864         actually used.
19865         (ix86_find_max_used_stack_alignment): New function.
19866         (ix86_finalize_stack_frame_flags): Use it.  Set
19867         max_used_stack_alignment if we don't realign stack.
19868         * config/i386/i386.h (machine_function): Add
19869         max_used_stack_alignment.
19871 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
19873         * config/arm/arm.opt (-mbranch-cost): New option.
19874         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19875         account.
19877 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
19879         PR target/83629
19880         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19881         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19883 2018-01-10  Richard Biener  <rguenther@suse.de>
19885         PR debug/83765
19886         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19887         early out so it also covers the case where we have a non-NULL
19888         origin.
19890 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
19892         PR tree-optimization/83753
19893         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19894         for non-strided grouped accesses if the number of elements is 1.
19896 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
19898         PR target/81616
19899         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19900         * i386.h (TARGET_USE_GATHER): Define.
19901         * x86-tune.def (X86_TUNE_USE_GATHER): New.
19903 2018-01-10  Martin Liska  <mliska@suse.cz>
19905         PR bootstrap/82831
19906         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19907         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19908         partitioning.
19909         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19910         CLEANUP_NO_PARTITIONING is not set.
19912 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
19914         * doc/rtl.texi: Remove documentation of (const ...) wrappers
19915         for vectors, as a partial revert of r254296.
19916         * rtl.h (const_vec_p): Delete.
19917         (const_vec_duplicate_p): Don't test for vector CONSTs.
19918         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19919         * expmed.c (make_tree): Likewise.
19921         Revert:
19922         * common.md (E, F): Use CONSTANT_P instead of checking for
19923         CONST_VECTOR.
19924         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19925         checking for CONST_VECTOR.
19927 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
19929         PR middle-end/83575
19930         * predict.c (force_edge_cold): Handle in more sane way edges
19931         with no prediction.
19933 2018-01-09  Carl Love  <cel@us.ibm.com>
19935         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19936         V4SI, V4SF types.
19937         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19938         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19939         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19940         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
19941         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19942         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
19943         * config/rs6000/rs6000-protos.h: Add extern defition for
19944         rs6000_generate_float2_double_code.
19945         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19946         function.
19947         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19948         (float2_v2df): Add define_expand.
19950 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
19952         PR target/83628
19953         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19954         op_mode in the force_to_mode call.
19956 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19958         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19959         instead of checking each element individually.
19960         (aarch64_evpc_uzp): Likewise.
19961         (aarch64_evpc_zip): Likewise.
19962         (aarch64_evpc_ext): Likewise.
19963         (aarch64_evpc_rev): Likewise.
19964         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19965         instead of checking each element individually.  Return true without
19966         generating rtl if
19967         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19968         whether all selected elements come from the same input, instead of
19969         checking each element individually.  Remove calls to gen_rtx_REG,
19970         start_sequence and end_sequence and instead assert that no rtl is
19971         generated.
19973 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19975         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19976         order of HIGH and CONST checks.
19978 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19980         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19981         if the destination isn't an SSA_NAME.
19983 2018-01-09  Richard Biener  <rguenther@suse.de>
19985         PR tree-optimization/83668
19986         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19987         move prologue...
19988         (canonicalize_loop_form): ... here, renamed from ...
19989         (canonicalize_loop_closed_ssa_form): ... this and amended to
19990         swap successor edges for loop exit blocks to make us use
19991         the RPO order we need for initial schedule generation.
19993 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
19995         PR tree-optimization/64811
19996         * match.pd: When optimizing comparisons with Inf, avoid
19997         introducing or losing exceptions from comparisons with NaN.
19999 2018-01-09  Martin Liska  <mliska@suse.cz>
20001         PR sanitizer/82517
20002         * asan.c (shadow_mem_size): Add gcc_assert.
20004 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
20006         Don't save registers in main().
20008         PR target/83738
20009         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20010         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20011         * config/avr/avr.c (avr_set_current_function): Don't error if
20012         naked, OS_task or OS_main are specified at the same time.
20013         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20014         OS_main.
20015         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20016         attribute.
20017         * common/config/avr/avr-common.c (avr_option_optimization_table):
20018         Switch on -mmain-is-OS_task for optimizing compilations.
20020 2018-01-09  Richard Biener  <rguenther@suse.de>
20022         PR tree-optimization/83572
20023         * graphite.c: Include cfganal.h.
20024         (graphite_transform_loops): Connect infinite loops to exit
20025         and remove fake edges at the end.
20027 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20029         * ipa-inline.c (edge_badness): Revert accidental checkin.
20031 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
20033         PR ipa/80763
20034         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20035         symbols; not inline clones.
20037 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
20039         PR target/83507
20040         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20041         hard registers.  Formatting fixes.
20043         PR preprocessor/83722
20044         * gcc.c (try_generate_repro): Pass
20045         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20046         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20047         do_report_bug.
20049 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
20050             Kito Cheng  <kito.cheng@gmail.com>
20052         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20053         (riscv_leaf_function_p): Delete.
20054         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20056 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20058         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20059         function.
20060         (do_ifelse): New function.
20061         (do_isel): New function.
20062         (do_sub3): New function.
20063         (do_add3): New function.
20064         (do_load_mask_compare): New function.
20065         (do_overlap_load_compare): New function.
20066         (expand_compare_loop): New function.
20067         (expand_block_compare): Call expand_compare_loop() when appropriate.
20068         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20069         option description.
20070         (-mblock-compare-inline-loop-limit): New option.
20072 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20074         PR target/83677
20075         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20076         Reverse order of second and third operands in first alternative.
20077         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20078         of first and second elements in UNSPEC_VPERMR vector.
20079         (altivec_expand_vec_perm_le): Likewise.
20081 2018-01-08  Jeff Law  <law@redhat.com>
20083         PR rtl-optimizatin/81308
20084         * tree-switch-conversion.c (cfg_altered): New file scoped static.
20085         (process_switch): If group_case_labels makes a change, then set
20086         cfg_altered.
20087         (pass_convert_switch::execute): If a switch is converted, then
20088         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
20090         PR rtl-optimization/81308
20091         * recog.c (split_all_insns): Conditionally cleanup the CFG after
20092         splitting insns.
20094 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
20096         PR target/83663 - Revert r255946
20097         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20098         generation for cases where splatting a value is not useful.
20099         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20100         across a vec_duplicate and a paradoxical subreg forming a vector
20101         mode to a vec_concat.
20103 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20105         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20106         -march=armv8.3-a variants.
20107         * config/arm/t-multilib: Likewise.
20108         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
20110 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20112         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20113         to generate rtl.
20114         (cceq_ior_compare_complement): Give it a name so I can use it, and
20115         change boolean_or_operator predicate to boolean_operator so it can
20116         be used to generate a crand.
20117         (eqne): New code iterator.
20118         (bd/bd_neg): New code_attrs.
20119         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20120         a single define_insn.
20121         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20122         decrement (bdnzt/bdnzf/bdzt/bdzf).
20123         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20124         with the new names of the branch decrement patterns, and added the
20125         names of the branch decrement conditional patterns.
20127 2018-01-08  Richard Biener  <rguenther@suse.de>
20129         PR tree-optimization/83563
20130         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20131         cache.
20133 2018-01-08  Richard Biener  <rguenther@suse.de>
20135         PR middle-end/83713
20136         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20138 2018-01-08  Richard Biener  <rguenther@suse.de>
20140         PR tree-optimization/83685
20141         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20142         references to abnormals.
20144 2018-01-08  Richard Biener  <rguenther@suse.de>
20146         PR lto/83719
20147         * dwarf2out.c (output_indirect_strings): Handle empty
20148         skeleton_debug_str_hash.
20149         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20151 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
20153         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20154         (emit_store_direct): Likewise.
20155         (arc_trampoline_adjust_address): Likewise.
20156         (arc_asm_trampoline_template): New function.
20157         (arc_initialize_trampoline): Use asm_trampoline_template.
20158         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20159         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20160         * config/arc/arc.md (flush_icache): Delete pattern.
20162 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
20164         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20165         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20166         munaligned-access.
20168 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20170         PR target/83681
20171         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20172         by not USED_FOR_TARGET.
20173         (make_pass_resolve_sw_modes): Likewise.
20175 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20177         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20178         USED_FOR_TARGET.
20180 2018-01-08  Richard Biener  <rguenther@suse.de>
20182         PR middle-end/83580
20183         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20185 2018-01-08  Richard Biener  <rguenther@suse.de>
20187         PR middle-end/83517
20188         * match.pd ((t * 2) / 2) -> t): Add missing :c.
20190 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
20192         PR middle-end/81897
20193         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20194         basic blocks with a small number of successors.
20195         (convert_control_dep_chain_into_preds): Improve handling of
20196         forwarder blocks.
20197         (dump_predicates): Split apart into...
20198         (dump_pred_chain): ...here...
20199         (dump_pred_info): ...and here.
20200         (can_one_predicate_be_invalidated_p): Add debugging printfs.
20201         (can_chain_union_be_invalidated_p): Improve check for invalidation
20202         of paths.
20203         (uninit_uses_cannot_happen): Avoid unnecessary if
20204         convert_control_dep_chain_into_preds yielded nothing.
20206 2018-01-06  Martin Sebor  <msebor@redhat.com>
20208         PR tree-optimization/83640
20209         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20210         subtracting negative offset from size.
20211         (builtin_access::overlap): Adjust offset bounds of the access to fall
20212         within the size of the object if possible.
20214 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
20216         PR rtl-optimization/83699
20217         * expmed.c (extract_bit_field_1): Restrict the vector usage of
20218         extract_bit_field_as_subreg to cases in which the extracted
20219         value is also a vector.
20221         * lra-constraints.c (process_alt_operands): Test for the equivalence
20222         substitutions when detecting a possible reload cycle.
20224 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
20226         PR debug/83480
20227         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20228         by default if flag_selective_schedling{,2}.  Formatting fixes.
20230         PR rtl-optimization/83682
20231         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20232         if it has non-VECTOR_MODE element mode.
20233         (vec_duplicate_p): Likewise.
20235         PR middle-end/83694
20236         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20237         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20239 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
20241         PR target/83604
20242         * config/i386/i386-builtin.def
20243         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20244         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20245         Require also OPTION_MASK_ISA_AVX512F in addition to
20246         OPTION_MASK_ISA_GFNI.
20247         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20248         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20249         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20250         to OPTION_MASK_ISA_GFNI.
20251         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20252         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20253         OPTION_MASK_ISA_AVX512BW.
20254         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20255         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20256         addition to OPTION_MASK_ISA_GFNI.
20257         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20258         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20259         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20260         to OPTION_MASK_ISA_GFNI.
20261         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20262         a requirement for all ISAs rather than any of them with a few
20263         exceptions.
20264         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20265         processing.
20266         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20267         bitmasks to be enabled with 3 exceptions, instead of requiring any
20268         enabled ISA with lots of exceptions.
20269         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20270         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20271         Change avx512bw in isa attribute to avx512f.
20272         * config/i386/sgxintrin.h: Add license boilerplate.
20273         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
20274         to __AVX512F__ and __AVX512VL to __AVX512VL__.
20275         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20276         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20277         defined.
20278         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20279         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20280         temporarily sse2 rather than sse if not enabled already.
20282         PR target/83604
20283         * config/i386/sse.md (VI248_VLBW): Rename to ...
20284         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
20285         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20286         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20287         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20288         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20289         mode iterator instead of VI248_VLBW.
20291 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
20293         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20294         (record_modified): Skip clobbers; add debug output.
20295         (param_change_prob): Use sreal frequencies.
20297 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
20299         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20300         punt for user-aligned variables.
20302 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
20304         * tree-chrec.c (chrec_contains_symbols): Return true for
20305         POLY_INT_CST.
20307 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
20309         PR target/82439
20310         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20311         of (x|y) == x for BICS pattern.
20313 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
20315         PR tree-optimization/83605
20316         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20317         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20318         can throw.
20320 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20322         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20323         * config/epiphany/rtems.h: New file.
20325 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20326             Uros Bizjak  <ubizjak@gmail.com>
20328         PR target/83554
20329         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20330         QIreg_operand instead of register_operand predicate.
20331         * config/i386/i386.c (ix86_rop_should_change_byte_p,
20332         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20333         comments instead of -fmitigate[-_]rop.
20335 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20337         PR bootstrap/81926
20338         * cgraphunit.c (symbol_table::compile): Switch to text_section
20339         before calling assembly_start debug hook.
20340         * run-rtl-passes.c (run_rtl_passes): Likewise.
20341         Include output.h.
20343 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20345         * tree-vrp.c (extract_range_from_binary_expr_1): Check
20346         range_int_cst_p rather than !symbolic_range_p before calling
20347         extract_range_from_multiplicative_op_1.
20349 2018-01-04  Jeff Law  <law@redhat.com>
20351         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20352         redundant test in assertion.
20354 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20356         * doc/rtl.texi: Document machine_mode wrapper classes.
20358 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20360         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20361         using tree_to_uhwi.
20363 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20365         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20366         the VEC_PERM_EXPR fold to fail.
20368 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20370         PR debug/83585
20371         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20372         to switched_sections.
20374 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20376         PR target/83680
20377         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20378         test for d.testing.
20380 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
20382         PR target/83387
20383         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20384         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20386 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20388         PR debug/83666
20389         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20390         is BLKmode and bitpos not zero or mode change is needed.
20392 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
20394         PR target/83675
20395         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20396         TARGET_VIS2.
20398 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
20400         PR target/83628
20401         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20402         instead of MULT rtx.  Update all corresponding splitters.
20403         (*saddl_se): Ditto.
20404         (*ssub<modesuffix>): Ditto.
20405         (*ssubl_se): Ditto.
20406         (*cmp_sadd_di): Update split patterns.
20407         (*cmp_sadd_si): Ditto.
20408         (*cmp_sadd_sidi): Ditto.
20409         (*cmp_ssub_di): Ditto.
20410         (*cmp_ssub_si): Ditto.
20411         (*cmp_ssub_sidi): Ditto.
20412         * config/alpha/predicates.md (const23_operand): New predicate.
20413         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20414         Look for ASHIFT, not MULT inner operand.
20415         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20417 2018-01-04  Martin Liska  <mliska@suse.cz>
20419         PR gcov-profile/83669
20420         * gcov.c (output_intermediate_file): Add version to intermediate
20421         gcov file.
20422         * doc/gcov.texi: Document new field 'version' in intermediate
20423         file format. Fix location of '-k' option of gcov command.
20425 2018-01-04  Martin Liska  <mliska@suse.cz>
20427         PR ipa/82352
20428         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20430 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
20432         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20434 2018-01-03  Martin Sebor  <msebor@redhat.com>
20436         PR tree-optimization/83655
20437         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20438         checking calls with invalid arguments.
20440 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20442         * tree-vect-stmts.c (vect_get_store_rhs): New function.
20443         (vectorizable_mask_load_store): Delete.
20444         (vectorizable_call): Return false for masked loads and stores.
20445         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
20446         instead of gimple_assign_rhs1.
20447         (vectorizable_load): Handle IFN_MASK_LOAD.
20448         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20450 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20452         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20453         split out from..,
20454         (vectorizable_mask_load_store): ...here.
20455         (vectorizable_load): ...and here.
20457 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20459         * tree-vect-stmts.c (vect_build_all_ones_mask)
20460         (vect_build_zero_merge_argument): New functions, split out from...
20461         (vectorizable_load): ...here.
20463 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20465         * tree-vect-stmts.c (vect_check_store_rhs): New function,
20466         split out from...
20467         (vectorizable_mask_load_store): ...here.
20468         (vectorizable_store): ...and here.
20470 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20472         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20473         split out from...
20474         (vectorizable_mask_load_store): ...here.
20476 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20478         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20479         (vect_model_store_cost): Take a vec_load_store_type instead of a
20480         vect_def_type.
20481         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20482         (vect_model_store_cost): Take a vec_load_store_type instead of a
20483         vect_def_type.
20484         (vectorizable_mask_load_store): Update accordingly.
20485         (vectorizable_store): Likewise.
20486         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20488 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20490         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20491         IFN_MASK_LOAD calls here rather than...
20492         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20494 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20495             Alan Hayward  <alan.hayward@arm.com>
20496             David Sherwood  <david.sherwood@arm.com>
20498         * expmed.c (extract_bit_field_1): For vector extracts,
20499         fall back to extract_bit_field_as_subreg if vec_extract
20500         isn't available.
20502 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20503             Alan Hayward  <alan.hayward@arm.com>
20504             David Sherwood  <david.sherwood@arm.com>
20506         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20507         they are variable or constant sized.
20508         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20509         slots for constant-sized data.
20511 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20512             Alan Hayward  <alan.hayward@arm.com>
20513             David Sherwood  <david.sherwood@arm.com>
20515         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20516         handling COND_EXPRs with boolean comparisons, try to find a better
20517         basis for the mask type than the boolean itself.
20519 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20521         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20522         is calculated and how it can be overridden.
20523         * genmodes.c (max_bitsize_mode_any_mode): New variable.
20524         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20525         if defined.
20526         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20527         if nonzero.
20529 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20530             Alan Hayward  <alan.hayward@arm.com>
20531             David Sherwood  <david.sherwood@arm.com>
20533         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20534         Remove the mode argument.
20535         (aarch64_simd_valid_immediate): Remove the mode and inverse
20536         arguments.
20537         * config/aarch64/iterators.md (bitsize): New iterator.
20538         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20539         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20540         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20541         aarch64_simd_valid_immediate.
20542         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20543         (aarch64_reg_or_bic_imm): Likewise.
20544         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20545         with an insn_type enum and msl with a modifier_type enum.
20546         Replace element_width with a scalar_mode.  Change the shift
20547         to unsigned int.  Add constructors for scalar_float_mode and
20548         scalar_int_mode elements.
20549         (aarch64_vect_float_const_representable_p): Delete.
20550         (aarch64_can_const_movi_rtx_p)
20551         (aarch64_simd_scalar_immediate_valid_for_move)
20552         (aarch64_simd_make_constant): Update call to
20553         aarch64_simd_valid_immediate.
20554         (aarch64_advsimd_valid_immediate_hs): New function.
20555         (aarch64_advsimd_valid_immediate): Likewise.
20556         (aarch64_simd_valid_immediate): Remove mode and inverse
20557         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
20558         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20559         and aarch64_float_const_representable_p on the result.
20560         (aarch64_output_simd_mov_immediate): Remove mode argument.
20561         Update call to aarch64_simd_valid_immediate and use of
20562         simd_immediate_info.
20563         (aarch64_output_scalar_simd_mov_immediate): Update call
20564         accordingly.
20566 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20567             Alan Hayward  <alan.hayward@arm.com>
20568             David Sherwood  <david.sherwood@arm.com>
20570         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20571         (mode_nunits): Likewise CONST_MODE_NUNITS.
20572         * machmode.def (ADJUST_NUNITS): Document.
20573         * genmodes.c (mode_data::need_nunits_adj): New field.
20574         (blank_mode): Update accordingly.
20575         (adj_nunits): New variable.
20576         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20577         parameter.
20578         (emit_mode_size_inline): Set need_bytesize_adj for all modes
20579         listed in adj_nunits.
20580         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20581         listed in adj_nunits.  Don't emit case statements for such modes.
20582         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20583         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
20584         nothing if adj_nunits is nonnull.
20585         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20586         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20587         (emit_mode_fbit): Update use of print_maybe_const_decl.
20588         (emit_move_size): Likewise.  Treat the array as non-const
20589         if adj_nunits.
20590         (emit_mode_adjustments): Handle adj_nunits.
20592 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20594         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20595         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20596         (VECTOR_MODES): Use it.
20597         (make_vector_modes): Take the prefix as an argument.
20599 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20600             Alan Hayward  <alan.hayward@arm.com>
20601             David Sherwood  <david.sherwood@arm.com>
20603         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20604         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20605         for MODE_VECTOR_BOOL.
20606         * machmode.def (VECTOR_BOOL_MODE): Document.
20607         * genmodes.c (VECTOR_BOOL_MODE): New macro.
20608         (make_vector_bool_mode): New function.
20609         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20610         MODE_VECTOR_BOOL.
20611         * lto-streamer-in.c (lto_input_mode_table): Likewise.
20612         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20613         Likewise.
20614         * stor-layout.c (int_mode_for_mode): Likewise.
20615         * tree.c (build_vector_type_for_mode): Likewise.
20616         * varasm.c (output_constant_pool_2): Likewise.
20617         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20618         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
20619         for MODE_VECTOR_BOOL.
20620         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20621         of mode class checks.
20622         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20623         instead of a list of mode class checks.
20624         (expand_vector_scalar_condition): Likewise.
20625         (type_for_widest_vector_mode): Handle BImode as an inner mode.
20627 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20628             Alan Hayward  <alan.hayward@arm.com>
20629             David Sherwood  <david.sherwood@arm.com>
20631         * machmode.h (mode_size): Change from unsigned short to
20632         poly_uint16_pod.
20633         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20634         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20635         or if measurement_type is not polynomial.
20636         (fixed_size_mode::includes_p): Check for constant-sized modes.
20637         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20638         return a poly_uint16 rather than an unsigned short.
20639         (emit_mode_size): Change the type of mode_size from unsigned short
20640         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
20641         (emit_mode_adjustments): Cope with polynomial vector sizes.
20642         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20643         for GET_MODE_SIZE.
20644         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20645         for GET_MODE_SIZE.
20646         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20647         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20648         * caller-save.c (setup_save_areas): Likewise.
20649         (replace_reg_with_saved_mem): Likewise.
20650         * calls.c (emit_library_call_value_1): Likewise.
20651         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20652         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20653         (gen_lowpart_for_combine): Likewise.
20654         * convert.c (convert_to_integer_1): Likewise.
20655         * cse.c (equiv_constant, cse_insn): Likewise.
20656         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20657         (cselib_subst_to_values): Likewise.
20658         * dce.c (word_dce_process_block): Likewise.
20659         * df-problems.c (df_word_lr_mark_ref): Likewise.
20660         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20661         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20662         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20663         (rtl_for_decl_location): Likewise.
20664         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20665         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20666         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20667         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20668         (expand_expr_real_1): Likewise.
20669         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20670         (pad_below): Likewise.
20671         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20672         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20673         * ira.c (get_subreg_tracking_sizes): Likewise.
20674         * ira-build.c (ira_create_allocno_objects): Likewise.
20675         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20676         (ira_sort_regnos_for_alter_reg): Likewise.
20677         * ira-costs.c (record_operand_costs): Likewise.
20678         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20679         (resolve_simple_move): Likewise.
20680         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20681         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20682         (lra_constraints): Likewise.
20683         (CONST_POOL_OK_P): Reject variable-sized modes.
20684         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20685         (add_pseudo_to_slot, lra_spill): Likewise.
20686         * omp-low.c (omp_clause_aligned_alignment): Likewise.
20687         * optabs-query.c (get_best_extraction_insn): Likewise.
20688         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20689         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20690         (expand_mult_highpart, valid_multiword_target_p): Likewise.
20691         * recog.c (offsettable_address_addr_space_p): Likewise.
20692         * regcprop.c (maybe_mode_change): Likewise.
20693         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20694         * regrename.c (build_def_use): Likewise.
20695         * regstat.c (dump_reg_info): Likewise.
20696         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20697         (find_reloads, find_reloads_subreg_address): Likewise.
20698         * reload1.c (eliminate_regs_1): Likewise.
20699         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20700         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20701         (simplify_binary_operation_1, simplify_subreg): Likewise.
20702         * targhooks.c (default_function_arg_padding): Likewise.
20703         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20704         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20705         (verify_gimple_assign_ternary): Likewise.
20706         * tree-inline.c (estimate_move_cost): Likewise.
20707         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20708         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20709         (get_address_cost_ainc): Likewise.
20710         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20711         (vect_supportable_dr_alignment): Likewise.
20712         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20713         (vectorizable_reduction): Likewise.
20714         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20715         (vectorizable_operation, vectorizable_load): Likewise.
20716         * tree.c (build_same_sized_truth_vector_type): Likewise.
20717         * valtrack.c (cleanup_auto_inc_dec): Likewise.
20718         * var-tracking.c (emit_note_insn_var_location): Likewise.
20719         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20720         (ADDR_VEC_ALIGN): Likewise.
20722 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20723             Alan Hayward  <alan.hayward@arm.com>
20724             David Sherwood  <david.sherwood@arm.com>
20726         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20727         unsigned short.
20728         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20729         or if measurement_type is polynomial.
20730         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20731         * combine.c (make_extraction): Likewise.
20732         * dse.c (find_shift_sequence): Likewise.
20733         * dwarf2out.c (mem_loc_descriptor): Likewise.
20734         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20735         (extract_bit_field, extract_low_bits): Likewise.
20736         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20737         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20738         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20739         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20740         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20741         * reload.c (find_reloads): Likewise.
20742         * reload1.c (alter_reg): Likewise.
20743         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20744         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20745         * tree-if-conv.c (predicate_mem_writes): Likewise.
20746         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20747         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20748         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20749         * valtrack.c (dead_debug_insert_temp): Likewise.
20750         * varasm.c (mergeable_constant_section): Likewise.
20751         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20753 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20754             Alan Hayward  <alan.hayward@arm.com>
20755             David Sherwood  <david.sherwood@arm.com>
20757         * expr.c (expand_assignment): Cope with polynomial mode sizes
20758         when assigning to a CONCAT.
20760 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20761             Alan Hayward  <alan.hayward@arm.com>
20762             David Sherwood  <david.sherwood@arm.com>
20764         * machmode.h (mode_precision): Change from unsigned short to
20765         poly_uint16_pod.
20766         (mode_to_precision): Return a poly_uint16 rather than an unsigned
20767         short.
20768         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20769         or if measurement_type is not polynomial.
20770         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
20771         in which the mode is already known to be a scalar_int_mode.
20772         * genmodes.c (emit_mode_precision): Change the type of mode_precision
20773         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
20774         initializer.
20775         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20776         for GET_MODE_PRECISION.
20777         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20778         for GET_MODE_PRECISION.
20779         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20780         as polynomial.
20781         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20782         (expand_field_assignment, make_extraction): Likewise.
20783         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20784         (get_last_value): Likewise.
20785         * convert.c (convert_to_integer_1): Likewise.
20786         * cse.c (cse_insn): Likewise.
20787         * expr.c (expand_expr_real_1): Likewise.
20788         * lra-constraints.c (simplify_operand_subreg): Likewise.
20789         * optabs-query.c (can_atomic_load_p): Likewise.
20790         * optabs.c (expand_atomic_load): Likewise.
20791         (expand_atomic_store): Likewise.
20792         * ree.c (combine_reaching_defs): Likewise.
20793         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20794         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20795         * tree.h (type_has_mode_precision_p): Likewise.
20796         * ubsan.c (instrument_si_overflow): Likewise.
20798 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20799             Alan Hayward  <alan.hayward@arm.com>
20800             David Sherwood  <david.sherwood@arm.com>
20802         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20803         polynomial numbers of units.
20804         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20805         (valid_vector_subparts_p): New function.
20806         (build_vector_type): Remove temporary shim and take the number
20807         of units as a poly_uint64 rather than an int.
20808         (build_opaque_vector_type): Take the number of units as a
20809         poly_uint64 rather than an int.
20810         * tree.c (build_vector_from_ctor): Handle polynomial
20811         TYPE_VECTOR_SUBPARTS.
20812         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20813         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20814         (build_vector_from_val): If the number of units is variable,
20815         use build_vec_duplicate_cst for constant operands and
20816         VEC_DUPLICATE_EXPR otherwise.
20817         (make_vector_type): Remove temporary is_constant ().
20818         (build_vector_type, build_opaque_vector_type): Take the number of
20819         units as a poly_uint64 rather than an int.
20820         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20821         VECTOR_CST_NELTS.
20822         * cfgexpand.c (expand_debug_expr): Likewise.
20823         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20824         (store_constructor, expand_expr_real_1): Likewise.
20825         (const_scalar_mask_from_tree): Likewise.
20826         * fold-const-call.c (fold_const_reduction): Likewise.
20827         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20828         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20829         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20830         (fold_relational_const): Likewise.
20831         (native_interpret_vector): Likewise.  Change the size from an
20832         int to an unsigned int.
20833         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20834         TYPE_VECTOR_SUBPARTS.
20835         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20836         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20837         duplicating a non-constant operand into a variable-length vector.
20838         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20839         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20840         * ipa-icf.c (sem_variable::equals): Likewise.
20841         * match.pd: Likewise.
20842         * omp-simd-clone.c (simd_clone_subparts): Likewise.
20843         * print-tree.c (print_node): Likewise.
20844         * stor-layout.c (layout_type): Likewise.
20845         * targhooks.c (default_builtin_vectorization_cost): Likewise.
20846         * tree-cfg.c (verify_gimple_comparison): Likewise.
20847         (verify_gimple_assign_binary): Likewise.
20848         (verify_gimple_assign_ternary): Likewise.
20849         (verify_gimple_assign_single): Likewise.
20850         * tree-pretty-print.c (dump_generic_node): Likewise.
20851         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20852         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20853         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20854         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20855         (vect_shift_permute_load_chain): Likewise.
20856         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20857         (expand_vector_condition, optimize_vector_constructor): Likewise.
20858         (lower_vec_perm, get_compute_type): Likewise.
20859         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20860         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20861         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20862         (vect_recog_mask_conversion_pattern): Likewise.
20863         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20864         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20865         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20866         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20867         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20868         (vectorizable_shift, vectorizable_operation, vectorizable_store)
20869         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20870         (supportable_widening_operation): Likewise.
20871         (supportable_narrowing_operation): Likewise.
20872         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20873         Likewise.
20874         * varasm.c (output_constant): Likewise.
20876 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20877             Alan Hayward  <alan.hayward@arm.com>
20878             David Sherwood  <david.sherwood@arm.com>
20880         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20881         so that both the length == 3 and length != 3 cases set up their
20882         own permute vectors.  Add comments explaining why we know the
20883         number of elements is constant.
20884         (vect_permute_load_chain): Likewise.
20886 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20887             Alan Hayward  <alan.hayward@arm.com>
20888             David Sherwood  <david.sherwood@arm.com>
20890         * machmode.h (mode_nunits): Change from unsigned char to
20891         poly_uint16_pod.
20892         (ONLY_FIXED_SIZE_MODES): New macro.
20893         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20894         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20895         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20896         New typedefs.
20897         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20898         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20899         or if measurement_type is not polynomial.
20900         * genmodes.c (ZERO_COEFFS): New macro.
20901         (emit_mode_nunits_inline): Make mode_nunits_inline return a
20902         poly_uint16.
20903         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20904         Use ZERO_COEFFS when emitting initializers.
20905         * data-streamer.h (bp_pack_poly_value): New function.
20906         (bp_unpack_poly_value): Likewise.
20907         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20908         for GET_MODE_NUNITS.
20909         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20910         for GET_MODE_NUNITS.
20911         * tree.c (make_vector_type): Remove temporary shim and make
20912         the real function take the number of units as a poly_uint64
20913         rather than an int.
20914         (build_vector_type_for_mode): Handle polynomial nunits.
20915         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20916         * emit-rtl.c (const_vec_series_p_1): Likewise.
20917         (gen_rtx_CONST_VECTOR): Likewise.
20918         * fold-const.c (test_vec_duplicate_folding): Likewise.
20919         * genrecog.c (validate_pattern): Likewise.
20920         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20921         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20922         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20923         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20924         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20925         * rtlanal.c (subreg_get_info): Likewise.
20926         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20927         (vect_grouped_load_supported): Likewise.
20928         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20929         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20930         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20931         (simplify_const_unary_operation, simplify_binary_operation_1)
20932         (simplify_const_binary_operation, simplify_ternary_operation)
20933         (test_vector_ops_duplicate, test_vector_ops): Likewise.
20934         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20935         instead of CONST_VECTOR_NUNITS.
20936         * varasm.c (output_constant_pool_2): Likewise.
20937         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20938         explicit-encoded elements in the XVEC for variable-length vectors.
20940 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20942         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20944 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20945             Alan Hayward  <alan.hayward@arm.com>
20946             David Sherwood  <david.sherwood@arm.com>
20948         * coretypes.h (fixed_size_mode): Declare.
20949         (fixed_size_mode_pod): New typedef.
20950         * builtins.h (target_builtins::x_apply_args_mode)
20951         (target_builtins::x_apply_result_mode): Change type to
20952         fixed_size_mode_pod.
20953         * builtins.c (apply_args_size, apply_result_size, result_vector)
20954         (expand_builtin_apply_args_1, expand_builtin_apply)
20955         (expand_builtin_return): Update accordingly.
20957 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20959         * cse.c (hash_rtx_cb): Hash only the encoded elements.
20960         * cselib.c (cselib_hash_rtx): Likewise.
20961         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20962         CONST_VECTOR encoding.
20964 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20965             Jeff Law  <law@redhat.com>
20967         PR target/83641
20968         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20969         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20970         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20971         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20973         PR target/83641
20974         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20975         explicitly probe *sp in a noreturn function if there were any callee
20976         register saves or frame pointer is needed.
20978 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20980         PR debug/83621
20981         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20982         BLKmode for ternary, binary or unary expressions.
20984         PR debug/83645
20985         * var-tracking.c (delete_vta_debug_insn): New inline function.
20986         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20987         insns from get_insns () to NULL instead of each bb separately.
20988         Use delete_vta_debug_insn.  No longer static.
20989         (vt_debug_insns_local, variable_tracking_main_1): Adjust
20990         delete_vta_debug_insns callers.
20991         * rtl.h (delete_vta_debug_insns): Declare.
20992         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20993         instead of variable_tracking_main.
20995 2018-01-03  Martin Sebor  <msebor@redhat.com>
20997         PR tree-optimization/83603
20998         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20999         arguments past the endof the argument list in functions declared
21000         without a prototype.
21001         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21002         Avoid checking when arguments are null.
21004 2018-01-03  Martin Sebor  <msebor@redhat.com>
21006         PR c/83559
21007         * doc/extend.texi (attribute const): Fix a typo.
21008         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21009         issuing -Wsuggest-attribute for void functions.
21011 2018-01-03  Martin Sebor  <msebor@redhat.com>
21013         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21014         offset_int::from instead of wide_int::to_shwi.
21015         (maybe_diag_overlap): Remove assertion.
21016         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21017         * gimple-ssa-sprintf.c (format_directive): Same.
21018         (parse_directive): Same.
21019         (sprintf_dom_walker::compute_format_length): Same.
21020         (try_substitute_return_value): Same.
21022 2018-01-03  Jeff Law  <law@redhat.com>
21024         PR middle-end/83654
21025         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21026         non-constant residual for zero at runtime and avoid probing in
21027         that case.  Reorganize code for trailing problem to mirror handling
21028         of the residual.
21030 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21032         PR tree-optimization/83501
21033         * tree-ssa-strlen.c (get_string_cst): New.
21034         (handle_char_store): Call get_string_cst.
21036 2018-01-03  Martin Liska  <mliska@suse.cz>
21038         PR tree-optimization/83593
21039         * tree-ssa-strlen.c: Include tree-cfg.h.
21040         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21041         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21042         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21043         to false.
21044         (strlen_dom_walker::before_dom_children): Call
21045         gimple_purge_dead_eh_edges. Dump tranformation with details
21046         dump flags.
21047         (strlen_dom_walker::before_dom_children): Update call by adding
21048         new argument cleanup_eh.
21049         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21051 2018-01-03  Martin Liska  <mliska@suse.cz>
21053         PR ipa/83549
21054         * cif-code.def (VARIADIC_THUNK): New enum value.
21055         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21056         thunks.
21058 2018-01-03  Jan Beulich  <jbeulich@suse.com>
21060         * sse.md (mov<mode>_internal): Tighten condition for when to use
21061         vmovdqu<ssescalarsize> for TI and OI modes.
21063 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21065         Update copyright years.
21067 2018-01-03  Martin Liska  <mliska@suse.cz>
21069         PR ipa/83594
21070         * ipa-visibility.c (function_and_variable_visibility): Skip
21071         functions with noipa attribure.
21073 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
21075         * gcc.c (process_command): Update copyright notice dates.
21076         * gcov-dump.c (print_version): Ditto.
21077         * gcov.c (print_version): Ditto.
21078         * gcov-tool.c (print_version): Ditto.
21079         * gengtype.c (create_file): Ditto.
21080         * doc/cpp.texi: Bump @copying's copyright year.
21081         * doc/cppinternals.texi: Ditto.
21082         * doc/gcc.texi: Ditto.
21083         * doc/gccint.texi: Ditto.
21084         * doc/gcov.texi: Ditto.
21085         * doc/install.texi: Ditto.
21086         * doc/invoke.texi: Ditto.
21088 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21090         * vector-builder.h (vector_builder::m_full_nelts): Change from
21091         unsigned int to poly_uint64.
21092         (vector_builder::full_nelts): Update prototype accordingly.
21093         (vector_builder::new_vector): Likewise.
21094         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21095         (vector_builder::operator ==): Likewise.
21096         (vector_builder::finalize): Likewise.
21097         * int-vector-builder.h (int_vector_builder::int_vector_builder):
21098         Take the number of elements as a poly_uint64 rather than an
21099         unsigned int.
21100         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21101         from unsigned int to poly_uint64.
21102         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21103         (vec_perm_indices::new_vector): Likewise.
21104         (vec_perm_indices::length): Likewise.
21105         (vec_perm_indices::nelts_per_input): Likewise.
21106         (vec_perm_indices::input_nelts): Likewise.
21107         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21108         number of elements per input as a poly_uint64 rather than an
21109         unsigned int.  Use the original encoding for variable-length
21110         vectors, rather than clamping each individual element.
21111         For the second and subsequent elements in each pattern,
21112         clamp the step and base before clamping their sum.
21113         (vec_perm_indices::series_p): Handle polynomial element counts.
21114         (vec_perm_indices::all_in_range_p): Likewise.
21115         (vec_perm_indices_to_tree): Likewise.
21116         (vec_perm_indices_to_rtx): Likewise.
21117         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21118         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21119         (tree_vector_builder::new_binary_operation): Handle polynomial
21120         element counts.  Return false if we need to know the number
21121         of elements at compile time.
21122         * fold-const.c (fold_vec_perm): Punt if the number of elements
21123         isn't known at compile time.
21125 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21127         * vec-perm-indices.h (vec_perm_builder): Change element type
21128         from HOST_WIDE_INT to poly_int64.
21129         (vec_perm_indices::element_type): Update accordingly.
21130         (vec_perm_indices::clamp): Handle polynomial element_types.
21131         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21132         (vec_perm_indices::all_in_range_p): Likewise.
21133         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21134         than shwi trees.
21135         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21136         polynomial vec_perm_indices element types.
21137         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21138         * fold-const.c (fold_vec_perm): Likewise.
21139         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21140         * tree-vect-generic.c (lower_vec_perm): Likewise.
21141         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21142         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21143         element type to HOST_WIDE_INT.
21145 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21146             Alan Hayward  <alan.hayward@arm.com>
21147             David Sherwood  <david.sherwood@arm.com>
21149         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21150         rather than an int.  Use plus_constant.
21151         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21152         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21154 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21155             Alan Hayward  <alan.hayward@arm.com>
21156             David Sherwood  <david.sherwood@arm.com>
21158         * calls.c (emit_call_1, expand_call): Change struct_value_size from
21159         a HOST_WIDE_INT to a poly_int64.
21161 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21162             Alan Hayward  <alan.hayward@arm.com>
21163             David Sherwood  <david.sherwood@arm.com>
21165         * calls.c (load_register_parameters): Cope with polynomial
21166         mode sizes.  Require a constant size for BLKmode parameters
21167         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
21168         forces a parameter to be padded at the lsb end in order to
21169         fill a complete number of words, require the parameter size
21170         to be ordered wrt UNITS_PER_WORD.
21172 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21173             Alan Hayward  <alan.hayward@arm.com>
21174             David Sherwood  <david.sherwood@arm.com>
21176         * reload1.c (spill_stack_slot_width): Change element type
21177         from unsigned int to poly_uint64_pod.
21178         (alter_reg): Treat mode sizes as polynomial.
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         * reload.c (complex_word_subreg_p): New function.
21185         (reload_inner_reg_of_subreg, push_reload): Use it.
21187 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21188             Alan Hayward  <alan.hayward@arm.com>
21189             David Sherwood  <david.sherwood@arm.com>
21191         * lra-constraints.c (process_alt_operands): Reject matched
21192         operands whose sizes aren't ordered.
21193         (match_reload): Refer to this check here.
21195 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21196             Alan Hayward  <alan.hayward@arm.com>
21197             David Sherwood  <david.sherwood@arm.com>
21199         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21200         that the mode size is in the set {1, 2, 4, 8, 16}.
21202 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21203             Alan Hayward  <alan.hayward@arm.com>
21204             David Sherwood  <david.sherwood@arm.com>
21206         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21207         Use plus_constant instead of gen_rtx_PLUS.
21209 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21210             Alan Hayward  <alan.hayward@arm.com>
21211             David Sherwood  <david.sherwood@arm.com>
21213         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21214         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21215         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21216         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21217         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21218         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21219         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21220         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21221         * config/i386/i386.c (ix86_push_rounding): ...this new function.
21222         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21223         a poly_int64.
21224         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21225         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21226         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21227         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21228         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21229         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21230         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21231         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21232         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21233         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21234         function.
21235         * expr.c (emit_move_resolve_push): Treat the input and result
21236         of PUSH_ROUNDING as a poly_int64.
21237         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21238         (emit_push_insn): Likewise.
21239         * lra-eliminations.c (mark_not_eliminable): Likewise.
21240         * recog.c (push_operand): Likewise.
21241         * reload1.c (elimination_effects): Likewise.
21242         * rtlanal.c (nonzero_bits1): Likewise.
21243         * calls.c (store_one_arg): Likewise.  Require the padding to be
21244         known at compile time.
21246 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21247             Alan Hayward  <alan.hayward@arm.com>
21248             David Sherwood  <david.sherwood@arm.com>
21250         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21251         Use plus_constant instead of gen_rtx_PLUS.
21253 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21254             Alan Hayward  <alan.hayward@arm.com>
21255             David Sherwood  <david.sherwood@arm.com>
21257         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21258         rather than an int.
21260 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21261             Alan Hayward  <alan.hayward@arm.com>
21262             David Sherwood  <david.sherwood@arm.com>
21264         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21265         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21266         via stack temporaries.  Treat the mode size as polynomial too.
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         * expr.c (expand_expr_real_2): When handling conversions involving
21273         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21274         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
21275         as a poly_uint64 too.
21277 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21278             Alan Hayward  <alan.hayward@arm.com>
21279             David Sherwood  <david.sherwood@arm.com>
21281         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21283 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21284             Alan Hayward  <alan.hayward@arm.com>
21285             David Sherwood  <david.sherwood@arm.com>
21287         * combine.c (can_change_dest_mode): Handle polynomial
21288         REGMODE_NATURAL_SIZE.
21289         * expmed.c (store_bit_field_1): Likewise.
21290         * expr.c (store_constructor): Likewise.
21291         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21292         and polynomial REGMODE_NATURAL_SIZE.
21293         (gen_lowpart_common): Likewise.
21294         * reginfo.c (record_subregs_of_mode): Likewise.
21295         * rtlanal.c (read_modify_subreg_p): Likewise.
21297 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21298             Alan Hayward  <alan.hayward@arm.com>
21299             David Sherwood  <david.sherwood@arm.com>
21301         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21302         numbers of elements.
21304 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21305             Alan Hayward  <alan.hayward@arm.com>
21306             David Sherwood  <david.sherwood@arm.com>
21308         * match.pd: Cope with polynomial numbers of vector elements.
21310 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21311             Alan Hayward  <alan.hayward@arm.com>
21312             David Sherwood  <david.sherwood@arm.com>
21314         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21315         in a POINTER_PLUS_EXPR.
21317 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21318             Alan Hayward  <alan.hayward@arm.com>
21319             David Sherwood  <david.sherwood@arm.com>
21321         * omp-simd-clone.c (simd_clone_subparts): New function.
21322         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21323         (ipa_simd_modify_function_body): Likewise.
21325 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21326             Alan Hayward  <alan.hayward@arm.com>
21327             David Sherwood  <david.sherwood@arm.com>
21329         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21330         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21331         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21332         (expand_vector_condition, vector_element): Likewise.
21333         (subparts_gt): New function.
21334         (get_compute_type): Use subparts_gt.
21335         (count_type_subparts): Delete.
21336         (expand_vector_operations_1): Use subparts_gt instead of
21337         count_type_subparts.
21339 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21340             Alan Hayward  <alan.hayward@arm.com>
21341             David Sherwood  <david.sherwood@arm.com>
21343         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21344         (vect_compile_time_alias): ...this new function.  Do the calculation
21345         on poly_ints rather than trees.
21346         (vect_prune_runtime_alias_test_list): Update call accordingly.
21348 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21349             Alan Hayward  <alan.hayward@arm.com>
21350             David Sherwood  <david.sherwood@arm.com>
21352         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21353         numbers of units.
21354         (vect_schedule_slp_instance): Likewise.
21356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21357             Alan Hayward  <alan.hayward@arm.com>
21358             David Sherwood  <david.sherwood@arm.com>
21360         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21361         constant and extern definitions for variable-length vectors.
21362         (vect_get_constant_vectors): Note that the number of units
21363         is known to be constant.
21365 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21366             Alan Hayward  <alan.hayward@arm.com>
21367             David Sherwood  <david.sherwood@arm.com>
21369         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21370         of units as polynomial.  Choose between WIDE and NARROW based
21371         on multiple_p.
21373 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21374             Alan Hayward  <alan.hayward@arm.com>
21375             David Sherwood  <david.sherwood@arm.com>
21377         * tree-vect-stmts.c (simd_clone_subparts): New function.
21378         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21380 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21381             Alan Hayward  <alan.hayward@arm.com>
21382             David Sherwood  <david.sherwood@arm.com>
21384         * tree-vect-stmts.c (vectorizable_call): Treat the number of
21385         vectors as polynomial.  Use build_index_vector for
21386         IFN_GOMP_SIMD_LANE.
21388 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21389             Alan Hayward  <alan.hayward@arm.com>
21390             David Sherwood  <david.sherwood@arm.com>
21392         * tree-vect-stmts.c (get_load_store_type): Treat the number of
21393         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21394         for variable-length vectors.
21395         (vectorizable_mask_load_store): Treat the number of units as
21396         polynomial, asserting that it is constant if the condition has
21397         already been enforced.
21398         (vectorizable_store, vectorizable_load): Likewise.
21400 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21401             Alan Hayward  <alan.hayward@arm.com>
21402             David Sherwood  <david.sherwood@arm.com>
21404         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21405         of units as polynomial.  Punt if we can't tell at compile time
21406         which vector contains the final result.
21408 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21409             Alan Hayward  <alan.hayward@arm.com>
21410             David Sherwood  <david.sherwood@arm.com>
21412         * tree-vect-loop.c (vectorizable_induction): Treat the number
21413         of units as polynomial.  Punt on SLP inductions.  Use an integer
21414         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
21415         cast of such a series for variable-length floating-point
21416         reductions.
21418 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21419             Alan Hayward  <alan.hayward@arm.com>
21420             David Sherwood  <david.sherwood@arm.com>
21422         * tree.h (build_index_vector): Declare.
21423         * tree.c (build_index_vector): New function.
21424         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21425         of units as polynomial, forcibly converting it to a constant if
21426         vectorizable_reduction has already enforced the condition.
21427         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
21428         to create a {1,2,3,...} vector.
21429         (vectorizable_reduction): Treat the number of units as polynomial.
21430         Choose vectype_in based on the largest scalar element size rather
21431         than the smallest number of units.  Enforce the restrictions
21432         relied on above.
21434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21435             Alan Hayward  <alan.hayward@arm.com>
21436             David Sherwood  <david.sherwood@arm.com>
21438         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21439         number of units as polynomial.
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         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21446         * target.def (autovectorize_vector_sizes): Return the vector sizes
21447         by pointer, using vector_sizes rather than a bitmask.
21448         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21449         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21450         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21451         Likewise.
21452         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21453         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21454         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21455         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21456         * omp-general.c (omp_max_vf): Likewise.
21457         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21458         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21459         * tree-vect-loop.c (vect_analyze_loop): Likewise.
21460         * tree-vect-slp.c (vect_slp_bb): Likewise.
21461         * doc/tm.texi: Regenerate.
21462         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21463         to a poly_uint64.
21464         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21465         the vector size as a poly_uint64 rather than an unsigned int.
21466         (current_vector_size): Change from an unsigned int to a poly_uint64.
21467         (get_vectype_for_scalar_type): Update accordingly.
21468         * tree.h (build_truth_vector_type): Take the size and number of
21469         units as a poly_uint64 rather than an unsigned int.
21470         (build_vector_type): Add a temporary overload that takes
21471         the number of units as a poly_uint64 rather than an unsigned int.
21472         * tree.c (make_vector_type): Likewise.
21473         (build_truth_vector_type): Take the number of units as a poly_uint64
21474         rather than an unsigned int.
21476 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21477             Alan Hayward  <alan.hayward@arm.com>
21478             David Sherwood  <david.sherwood@arm.com>
21480         * target.def (get_mask_mode): Take the number of units and length
21481         as poly_uint64s rather than unsigned ints.
21482         * targhooks.h (default_get_mask_mode): Update accordingly.
21483         * targhooks.c (default_get_mask_mode): Likewise.
21484         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21485         * doc/tm.texi: Regenerate.
21487 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21488             Alan Hayward  <alan.hayward@arm.com>
21489             David Sherwood  <david.sherwood@arm.com>
21491         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21492         * omp-general.c (omp_max_vf): Likewise.
21493         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21494         (expand_omp_simd): Handle polynomial safelen.
21495         * omp-low.c (omplow_simd_context): Add a default constructor.
21496         (omplow_simd_context::max_vf): Change from int to poly_uint64.
21497         (lower_rec_simd_input_clauses): Update accordingly.
21498         (lower_rec_input_clauses): Likewise.
21500 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21501             Alan Hayward  <alan.hayward@arm.com>
21502             David Sherwood  <david.sherwood@arm.com>
21504         * tree-vectorizer.h (vect_nunits_for_cost): New function.
21505         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21506         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21507         (vect_analyze_slp_cost): Likewise.
21508         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21509         (vect_model_load_cost): Likewise.
21511 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21512             Alan Hayward  <alan.hayward@arm.com>
21513             David Sherwood  <david.sherwood@arm.com>
21515         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21516         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21517         from an unsigned int * to a poly_uint64_pod *.
21518         (calculate_unrolling_factor): New function.
21519         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
21521 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21522             Alan Hayward  <alan.hayward@arm.com>
21523             David Sherwood  <david.sherwood@arm.com>
21525         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21526         from an unsigned int to a poly_uint64.
21527         (_loop_vec_info::slp_unrolling_factor): Likewise.
21528         (_loop_vec_info::vectorization_factor): Change from an int
21529         to a poly_uint64.
21530         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21531         (vect_get_num_vectors): New function.
21532         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21533         (vect_get_num_copies): Use vect_get_num_vectors.
21534         (vect_analyze_data_ref_dependences): Change max_vf from an int *
21535         to an unsigned int *.
21536         (vect_analyze_data_refs): Change min_vf from an int * to a
21537         poly_uint64 *.
21538         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21539         than an unsigned HOST_WIDE_INT.
21540         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21541         (vect_analyze_data_ref_dependence): Change max_vf from an int *
21542         to an unsigned int *.
21543         (vect_analyze_data_ref_dependences): Likewise.
21544         (vect_compute_data_ref_alignment): Handle polynomial vf.
21545         (vect_enhance_data_refs_alignment): Likewise.
21546         (vect_prune_runtime_alias_test_list): Likewise.
21547         (vect_shift_permute_load_chain): Likewise.
21548         (vect_supportable_dr_alignment): Likewise.
21549         (dependence_distance_ge_vf): Take the vectorization factor as a
21550         poly_uint64 rather than an unsigned HOST_WIDE_INT.
21551         (vect_analyze_data_refs): Change min_vf from an int * to a
21552         poly_uint64 *.
21553         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21554         vfm1 as a poly_uint64 rather than an int.  Make the same change
21555         for the returned bound_scalar.
21556         (vect_gen_vector_loop_niters): Handle polynomial vf.
21557         (vect_do_peeling): Likewise.  Update call to
21558         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21559         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21560         be constant.
21561         * tree-vect-loop.c (vect_determine_vectorization_factor)
21562         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21563         (vect_get_known_peeling_cost): Likewise.
21564         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21565         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21566         (vect_transform_loop): Likewise.  Use the lowest possible VF when
21567         updating the upper bounds of the loop.
21568         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
21569         rather than an int.
21570         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21571         polynomial unroll factors.
21572         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21573         (vect_make_slp_decision): Likewise.
21574         (vect_supported_load_permutation_p): Likewise, and polynomial
21575         vf too.
21576         (vect_analyze_slp_cost): Handle polynomial vf.
21577         (vect_slp_analyze_node_operations): Likewise.
21578         (vect_slp_analyze_bb_1): Likewise.
21579         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21580         than an unsigned HOST_WIDE_INT.
21581         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21582         (vectorizable_load): Handle polynomial vf.
21583         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21584         a poly_uint64.
21585         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21587 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21588             Alan Hayward  <alan.hayward@arm.com>
21589             David Sherwood  <david.sherwood@arm.com>
21591         * match.pd: Handle bit operations involving three constants
21592         and try to fold one pair.
21594 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21596         * tree-vect-loop-manip.c: Include gimple-fold.h.
21597         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21598         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
21599         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21600         Add a path that uses a step of VF instead of 1, but disable it
21601         for now.
21602         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21603         and niters_no_overflow parameters.  Update calls to
21604         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21605         Create a new SSA name if the latter choses to use a ste other
21606         than zero, and return it via niters_vector_mult_vf_var.
21607         * tree-vect-loop.c (vect_transform_loop): Update calls to
21608         vect_do_peeling, vect_gen_vector_loop_niters and
21609         slpeel_make_loop_iterate_ntimes.
21610         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21611         (vect_gen_vector_loop_niters): Update declarations after above changes.
21613 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
21615         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21616         128-bit round to integer instructions.
21617         (ceil<mode>2): Likewise.
21618         (btrunc<mode>2): Likewise.
21619         (round<mode>2): Likewise.
21621 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21623         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21624         unaligned VSX load/store on P8/P9.
21625         (expand_block_clear): Allow the use of unaligned VSX
21626         load/store on P8/P9.
21628 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21630         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21631         New function.
21632         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21633         swap associated with both a load and a store.
21635 2018-01-02  Andrew Waterman  <andrew@sifive.com>
21637         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21638         * config/riscv/riscv.md (clear_cache): Use it.
21640 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
21642         * web.c: Remove out-of-date comment.
21644 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21646         * expr.c (fixup_args_size_notes): Check that any existing
21647         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21648         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21649         (emit_single_push_insn): ...here.
21651 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21653         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21654         (const_vector_encoded_nelts): New function.
21655         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21656         (const_vector_int_elt, const_vector_elt): Declare.
21657         * emit-rtl.c (const_vector_int_elt_1): New function.
21658         (const_vector_elt): Likewise.
21659         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21660         of CONST_VECTOR_ELT.
21662 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21664         * expr.c: Include rtx-vector-builder.h.
21665         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21666         directly on the tree encoding.
21667         (const_vector_from_tree): Likewise.
21668         * optabs.c: Include rtx-vector-builder.h.
21669         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21670         sequence of "u" values.
21671         * vec-perm-indices.c: Include rtx-vector-builder.h.
21672         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21673         directly on the vec_perm_indices encoding.
21675 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21677         * doc/rtl.texi (const_vector): Describe new encoding scheme.
21678         * Makefile.in (OBJS): Add rtx-vector-builder.o.
21679         * rtx-vector-builder.h: New file.
21680         * rtx-vector-builder.c: Likewise.
21681         * rtl.h (rtx_def::u2): Add a const_vector field.
21682         (CONST_VECTOR_NPATTERNS): New macro.
21683         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21684         (CONST_VECTOR_DUPLICATE_P): Likewise.
21685         (CONST_VECTOR_STEPPED_P): Likewise.
21686         (CONST_VECTOR_ENCODED_ELT): Likewise.
21687         (const_vec_duplicate_p): Check for a duplicated vector encoding.
21688         (unwrap_const_vec_duplicate): Likewise.
21689         (const_vec_series_p): Check for a non-duplicated vector encoding.
21690         Say that the function only returns true for integer vectors.
21691         * emit-rtl.c: Include rtx-vector-builder.h.
21692         (gen_const_vec_duplicate_1): Delete.
21693         (gen_const_vector): Call gen_const_vec_duplicate instead of
21694         gen_const_vec_duplicate_1.
21695         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21696         (gen_const_vec_duplicate): Use rtx_vector_builder.
21697         (gen_const_vec_series): Likewise.
21698         (gen_rtx_CONST_VECTOR): Likewise.
21699         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21700         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21701         Build a new vector rather than modifying a CONST_VECTOR in-place.
21702         (handle_special_swappables): Update call accordingly.
21703         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21704         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21705         Build a new vector rather than modifying a CONST_VECTOR in-place.
21706         (handle_special_swappables): Update call accordingly.
21708 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21710         * simplify-rtx.c (simplify_const_binary_operation): Use
21711         CONST_VECTOR_ELT instead of XVECEXP.
21713 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21715         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21716         the selector elements to be different from the data elements
21717         if the selector is a VECTOR_CST.
21718         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21719         ssizetype for the selector.
21721 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21723         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21724         before testing each element individually.
21725         * tree-vect-generic.c (lower_vec_perm): Likewise.
21727 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21729         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21730         * selftest-run-tests.c (selftest::run_tests): Call it.
21731         * vector-builder.h (vector_builder::operator ==): New function.
21732         (vector_builder::operator !=): Likewise.
21733         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21734         (vec_perm_indices::all_from_input_p): New function.
21735         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21736         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21737         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21738         instead of reading the VECTOR_CST directly.  Detect whether both
21739         vector inputs are the same before constructing the vec_perm_indices,
21740         and update the number of inputs argument accordingly.  Use the
21741         utility functions added above.  Only construct sel2 if we need to.
21743 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21745         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21746         the broadcast of the low byte.
21747         (expand_mult_highpart): Use an explicit encoding for the permutes.
21748         * optabs-query.c (can_mult_highpart_p): Likewise.
21749         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21750         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21751         (vectorizable_bswap): Likewise.
21752         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21753         explicit encoding for the power-of-2 permutes.
21754         (vect_permute_store_chain): Likewise.
21755         (vect_grouped_load_supported): Likewise.
21756         (vect_permute_load_chain): Likewise.
21758 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21760         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21761         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21762         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21763         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21764         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21765         (vect_gen_perm_mask_any): Likewise.
21767 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21769         * int-vector-builder.h: New file.
21770         * vec-perm-indices.h: Include int-vector-builder.h.
21771         (vec_perm_indices): Redefine as an int_vector_builder.
21772         (auto_vec_perm_indices): Delete.
21773         (vec_perm_builder): Redefine as a stand-alone class.
21774         (vec_perm_indices::vec_perm_indices): New function.
21775         (vec_perm_indices::clamp): Likewise.
21776         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21777         (vec_perm_indices::new_vector): New function.
21778         (vec_perm_indices::new_expanded_vector): Update for new
21779         vec_perm_indices class.
21780         (vec_perm_indices::rotate_inputs): New function.
21781         (vec_perm_indices::all_in_range_p): Operate directly on the
21782         encoded form, without computing elided elements.
21783         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21784         encoding.  Update for new vec_perm_indices class.
21785         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21786         the given vec_perm_builder.
21787         (expand_vec_perm_var): Update vec_perm_builder constructor.
21788         (expand_mult_highpart): Use vec_perm_builder instead of
21789         auto_vec_perm_indices.
21790         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21791         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
21792         or double series encoding as appropriate.
21793         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21794         vec_perm_indices instead of auto_vec_perm_indices.
21795         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21796         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21797         (vect_permute_store_chain): Likewise.
21798         (vect_grouped_load_supported): Likewise.
21799         (vect_permute_load_chain): Likewise.
21800         (vect_shift_permute_load_chain): Likewise.
21801         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21802         (vect_transform_slp_perm_load): Likewise.
21803         (vect_schedule_slp_instance): Likewise.
21804         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21805         (vectorizable_mask_load_store): Likewise.
21806         (vectorizable_bswap): Likewise.
21807         (vectorizable_store): Likewise.
21808         (vectorizable_load): Likewise.
21809         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21810         vec_perm_indices instead of auto_vec_perm_indices.  Use
21811         tree_to_vec_perm_builder to read the vector from a tree.
21812         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21813         vec_perm_builder instead of a vec_perm_indices.
21814         (have_whole_vector_shift): Use vec_perm_builder and
21815         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
21816         truncation to calc_vec_perm_mask_for_shift.
21817         (vect_create_epilog_for_reduction): Likewise.
21818         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21819         from auto_vec_perm_indices to vec_perm_indices.
21820         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21821         instead of changing individual elements.
21822         (aarch64_vectorize_vec_perm_const): Use new_vector to install
21823         the vector in d.perm.
21824         * config/arm/arm.c (expand_vec_perm_d::perm): Change
21825         from auto_vec_perm_indices to vec_perm_indices.
21826         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21827         instead of changing individual elements.
21828         (arm_vectorize_vec_perm_const): Use new_vector to install
21829         the vector in d.perm.
21830         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21831         Update vec_perm_builder constructor.
21832         (rs6000_expand_interleave): Likewise.
21833         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21834         (rs6000_expand_interleave): Likewise.
21836 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21838         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21839         to qimode could truncate the indices.
21840         * optabs.c (expand_vec_perm_var): Likewise.
21842 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21844         * Makefile.in (OBJS): Add vec-perm-indices.o.
21845         * vec-perm-indices.h: New file.
21846         * vec-perm-indices.c: Likewise.
21847         * target.h (vec_perm_indices): Replace with a forward class
21848         declaration.
21849         (auto_vec_perm_indices): Move to vec-perm-indices.h.
21850         * optabs.h: Include vec-perm-indices.h.
21851         (expand_vec_perm): Delete.
21852         (selector_fits_mode_p, expand_vec_perm_var): Declare.
21853         (expand_vec_perm_const): Declare.
21854         * target.def (vec_perm_const_ok): Replace with...
21855         (vec_perm_const): ...this new hook.
21856         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21857         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21858         * doc/tm.texi: Regenerate.
21859         * optabs.def (vec_perm_const): Delete.
21860         * doc/md.texi (vec_perm_const): Likewise.
21861         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21862         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21863         expand_vec_perm for constant permutation vectors.  Assert that
21864         the mode of variable permutation vectors is the integer equivalent
21865         of the mode that is being permuted.
21866         * optabs-query.h (selector_fits_mode_p): Declare.
21867         * optabs-query.c: Include vec-perm-indices.h.
21868         (selector_fits_mode_p): New function.
21869         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21870         is defined, instead of checking whether the vec_perm_const_optab
21871         exists.  Use targetm.vectorize.vec_perm_const instead of
21872         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
21873         fit in the vector mode before using a variable permute.
21874         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21875         vec_perm_indices instead of an rtx.
21876         (expand_vec_perm): Replace with...
21877         (expand_vec_perm_const): ...this new function.  Take the selector
21878         as a vec_perm_indices rather than an rtx.  Also take the mode of
21879         the selector.  Update call to shift_amt_for_vec_perm_mask.
21880         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21881         Use vec_perm_indices::new_expanded_vector to expand the original
21882         selector into bytes.  Check whether the indices fit in the vector
21883         mode before using a variable permute.
21884         (expand_vec_perm_var): Make global.
21885         (expand_mult_highpart): Use expand_vec_perm_const.
21886         * fold-const.c: Includes vec-perm-indices.h.
21887         * tree-ssa-forwprop.c: Likewise.
21888         * tree-vect-data-refs.c: Likewise.
21889         * tree-vect-generic.c: Likewise.
21890         * tree-vect-loop.c: Likewise.
21891         * tree-vect-slp.c: Likewise.
21892         * tree-vect-stmts.c: Likewise.
21893         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21894         Delete.
21895         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21896         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21897         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21898         (aarch64_vectorize_vec_perm_const): ...this new function.
21899         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21900         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21901         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21902         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21903         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21904         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21905         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21906         into...
21907         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
21908         check for NEON modes.
21909         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21910         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21911         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21912         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21913         into...
21914         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
21915         the old VEC_PERM_CONST conditions.
21916         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21917         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21918         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21919         (ia64_vectorize_vec_perm_const_ok): Merge into...
21920         (ia64_vectorize_vec_perm_const): ...this new function.
21921         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21922         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21923         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21924         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21925         * config/mips/mips.c (mips_expand_vec_perm_const)
21926         (mips_vectorize_vec_perm_const_ok): Merge into...
21927         (mips_vectorize_vec_perm_const): ...this new function.
21928         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21929         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21930         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21931         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21932         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21933         (rs6000_expand_vec_perm_const): Delete.
21934         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21935         Delete.
21936         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21937         (altivec_expand_vec_perm_const_le): Take each operand individually.
21938         Operate on constant selectors rather than rtxes.
21939         (altivec_expand_vec_perm_const): Likewise.  Update call to
21940         altivec_expand_vec_perm_const_le.
21941         (rs6000_expand_vec_perm_const): Delete.
21942         (rs6000_vectorize_vec_perm_const_ok): Delete.
21943         (rs6000_vectorize_vec_perm_const): New function.
21944         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21945         an element count and rtx array.
21946         (rs6000_expand_extract_even): Update call accordingly.
21947         (rs6000_expand_interleave): Likewise.
21948         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21949         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21950         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21951         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21952         (rs6000_expand_vec_perm_const): Delete.
21953         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21954         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21955         (altivec_expand_vec_perm_const_le): Take each operand individually.
21956         Operate on constant selectors rather than rtxes.
21957         (altivec_expand_vec_perm_const): Likewise.  Update call to
21958         altivec_expand_vec_perm_const_le.
21959         (rs6000_expand_vec_perm_const): Delete.
21960         (rs6000_vectorize_vec_perm_const_ok): Delete.
21961         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
21962         reference to the SPE evmerge intructions.
21963         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21964         an element count and rtx array.
21965         (rs6000_expand_extract_even): Update call accordingly.
21966         (rs6000_expand_interleave): Likewise.
21967         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21968         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21969         new function.
21970         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21972 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21974         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21975         vector mode and that that mode matches the mode of the data
21976         being permuted.
21977         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21978         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
21979         directly using expand_vec_perm_1 when forcing selectors into
21980         registers.
21981         (expand_vec_perm_var): New function, split out from expand_vec_perm.
21983 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21985         * optabs-query.h (can_vec_perm_p): Delete.
21986         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21987         * optabs-query.c (can_vec_perm_p): Split into...
21988         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21989         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21990         particular selector is valid.
21991         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21992         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21993         (vect_grouped_load_supported): Likewise.
21994         (vect_shift_permute_load_chain): Likewise.
21995         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21996         (vect_transform_slp_perm_load): Likewise.
21997         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21998         (vectorizable_bswap): Likewise.
21999         (vect_gen_perm_mask_checked): Likewise.
22000         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
22001         implementations of variable permutation vectors into account
22002         when deciding which selector to use.
22003         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22004         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22005         with a false third argument.
22006         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22007         to test whether the constant selector is valid and can_vec_perm_var_p
22008         to test whether a variable selector is valid.
22010 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22012         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22013         * optabs-query.c (can_vec_perm_p): Likewise.
22014         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22015         instead of vec_perm_indices.
22016         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22017         (vect_gen_perm_mask_checked): Likewise,
22018         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22019         (vect_gen_perm_mask_checked): Likewise,
22021 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22023         * optabs-query.h (qimode_for_vec_perm): Declare.
22024         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22025         (qimode_for_vec_perm): ...this new function.
22026         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22028 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22030         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22031         does not have a conditional at the top.
22033 2018-01-02  Richard Biener  <rguenther@suse.de>
22035         * ipa-inline.c (big_speedup_p): Fix expression.
22037 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
22039         PR target/81616
22040         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22041         for generic 4->6.
22043 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
22045         PR target/81616
22046         Generic tuning.
22047         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22048         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22049         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22050         cond_taken_branch_cost 3->4.
22052 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
22054         PR tree-optimization/83581
22055         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22056         TODO_cleanup_cfg if any changes have been made.
22058         PR middle-end/83608
22059         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22060         convert_modes if target mode has the right side, but different mode
22061         class.
22063         PR middle-end/83609
22064         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22065         last argument when extracting from CONCAT.  If either from_real or
22066         from_imag is NULL, use expansion through memory.  If result is not
22067         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22068         the parts directly to inner mode, if even that fails, use expansion
22069         through memory.
22071         PR middle-end/83623
22072         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22073         check for bswap in mode rather than HImode and use that in expand_unop
22074         too.
22076 Copyright (C) 2018 Free Software Foundation, Inc.
22078 Copying and distribution of this file, with or without modification,
22079 are permitted in any medium without royalty provided the copyright
22080 notice and this notice are preserved.