dumpfile.c: eliminate special-casing of dump_file/alt_dump_file
[gcc.git] / gcc / ChangeLog
1 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2
3 * dump-context.h: Include "pretty-print.h".
4 (dump_context::refresh_dumps_are_enabled): New decl.
5 (dump_context::emit_item): New decl.
6 (class dump_context): Add fields "m_test_pp" and
7 "m_test_pp_flags".
8 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9 (temp_dump_context::get_dumped_text): New decl.
10 (class temp_dump_context): Add field "m_pp".
11 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
12 (dump_context::refresh_dumps_are_enabled): ...and add a test for
13 m_test_pp.
14 (set_dump_file): Update for above change.
15 (set_alt_dump_file): Likewise.
16 (dump_loc): New overload, taking a pretty_printer *.
17 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
18 to any test pretty-printer.
19 (make_item_for_dump_gimple_stmt): New function, adapted from
20 optinfo::add_gimple_stmt.
21 (dump_context::dump_gimple_stmt): Call it, and use the result,
22 eliminating the direct usage of dump_file and alt_dump_file in
23 favor of indirectly using them via emit_item.
24 (make_item_for_dump_gimple_expr): New function, adapted from
25 optinfo::add_gimple_expr.
26 (dump_context::dump_gimple_expr): Call it, and use the result,
27 eliminating the direct usage of dump_file and alt_dump_file in
28 favor of indirectly using them via emit_item.
29 (make_item_for_dump_generic_expr): New function, adapted from
30 optinfo::add_tree.
31 (dump_context::dump_generic_expr): Call it, and use the result,
32 eliminating the direct usage of dump_file and alt_dump_file in
33 favor of indirectly using them via emit_item.
34 (make_item_for_dump_printf_va): New function, adapted from
35 optinfo::add_printf_va.
36 (make_item_for_dump_printf): New function.
37 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
38 and use the result, eliminating the direct usage of dump_file and
39 alt_dump_file in favor of indirectly using them via emit_item.
40 (make_item_for_dump_dec): New function.
41 (dump_context::dump_dec): Call it, and use the result,
42 eliminating the direct usage of dump_file and alt_dump_file in
43 favor of indirectly using them via emit_item.
44 (make_item_for_dump_symtab_node): New function, adapted from
45 optinfo::add_symtab_node.
46 (dump_context::dump_symtab_node): Call it, and use the result,
47 eliminating the direct usage of dump_file and alt_dump_file in
48 favor of indirectly using them via emit_item.
49 (dump_context::begin_scope): Reimplement, avoiding direct usage
50 of dump_file and alt_dump_file in favor of indirectly using them
51 via emit_item.
52 (dump_context::emit_item): New member function.
53 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
54 Set up test pretty-printer on the underlying context. Call
55 refresh_dumps_are_enabled.
56 (temp_dump_context::~temp_dump_context): Call
57 refresh_dumps_are_enabled.
58 (temp_dump_context::get_dumped_text): New member function.
59 (selftest::verify_dumped_text): New function.
60 (ASSERT_DUMPED_TEXT_EQ): New macro.
61 (selftest::test_capture_of_dump_calls): Run all tests twice, with
62 and then without optinfo enabled. Add uses of
63 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
64 * dumpfile.h: Update comment for the dump_* API.
65 * optinfo-emit-json.cc
66 (selftest::test_building_json_from_dump_calls): Update for new
67 param for temp_dump_context ctor.
68 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
69 and "m_owned" field.
70 (optinfo_item::~optinfo_item): Likewise.
71 (optinfo::add_item): New member function.
72 (optinfo::emit): Update comment.
73 (optinfo::add_string): Delete.
74 (optinfo::add_printf): Delete.
75 (optinfo::add_printf_va): Delete.
76 (optinfo::add_gimple_stmt): Delete.
77 (optinfo::add_gimple_expr): Delete.
78 (optinfo::add_tree): Delete.
79 (optinfo::add_symtab_node): Delete.
80 (optinfo::add_dec): Delete.
81 * optinfo.h (class dump_context): New forward decl.
82 (optinfo::add_item): New decl.
83 (optinfo::add_string): Delete.
84 (optinfo::add_printf): Delete.
85 (optinfo::add_printf_va): Delete.
86 (optinfo::add_gimple_stmt): Delete.
87 (optinfo::add_gimple_expr): Delete.
88 (optinfo::add_tree): Delete.
89 (optinfo::add_symtab_node): Delete.
90 (optinfo::add_dec): Delete.
91 (optinfo::add_poly_int): Delete.
92 (optinfo_item::optinfo_item): Remove "owned" param.
93 (class optinfo_item): Remove field "m_owned".
94
95 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
96
97 PR middle-end/86705
98 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
99 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
100 requested variable alignment.
101 (expand_one_ssa_partition): Likewise.
102 (expand_one_var): Likewise.
103
104 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
105
106 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
107 to speculation_safe_value_not_needed.
108
109 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
110
111 * targhooks.h (speculation_safe_value_not_needed): New prototype.
112 * targhooks.c (speculation_safe_value_not_needed): New function.
113 * target.def (have_speculation_safe_value): Update documentation.
114 * doc/tm.texi: Regenerated.
115
116 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
117
118 * config/aarch64/iterators.md (ALLI_TI): New iterator.
119 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
120 expand.
121 (despeculate_copy<ALLI:mode>_insn): New insn.
122 (despeculate_copyti_insn): New insn.
123 (despeculate_simple<ALLI:mode>): New insn
124 (despeculate_simpleti): New insn.
125 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
126 function.
127 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
128 aarch64_speculation_safe_value.
129 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
130
131 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
132
133 * config/aarch64/aarch64-speculation.cc: New file.
134 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
135 before pass_reorder_blocks.
136 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
137 prototype.
138 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
139 X14 and X15 when tracking speculation.
140 * config/aarch64/aarch64.md (register name constants): Add
141 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
142 (unspec): Add UNSPEC_SPECULATION_TRACKER.
143 (speculation_barrier): New insn attribute.
144 (cmp<mode>): Allow SP in comparisons.
145 (speculation_tracker): New insn.
146 (speculation_barrier): Add speculation_barrier attribute.
147 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
148 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
149 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
150
151 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
152
153 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
154 aarch64_track_speculation is true.
155 (tb<optab><mode>1): Likewise.
156 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
157 generate CB[N]Z when tracking speculation.
158 (aarch64_split_compare_and_swap): Likewise.
159 (aarch64_split_atomic_op): Likewise.
160
161 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
162
163 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
164
165 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
166
167 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
168 (speculation_barrier): New insn.
169
170 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
171
172 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
173 * config/arm/arm.md (speculation_barrier): New expand.
174 (speculation_barrier_insn): New pattern.
175
176 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
177
178 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
179 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
180 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
181 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
182 list.
183 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
184 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
185 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
186 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
187 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
188 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
189 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
190 * builtins.c (expand_speculation_safe_value): New function.
191 (expand_builtin): Call it.
192 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
193 * doc/extend.texi: Document __builtin_speculation_safe_value.
194 * doc/md.texi: Document "speculation_barrier" pattern.
195 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
196 TARGET_HAVE_SPECULATION_SAFE_VALUE.
197 * doc/tm.texi: Regenerated.
198 * target.def (have_speculation_safe_value, speculation_safe_value): New
199 hooks.
200 * targhooks.c (default_have_speculation_safe_value): New function.
201 (default_speculation_safe_value): New function.
202 * targhooks.h (default_have_speculation_safe_value): Add prototype.
203 (default_speculation_safe_value): Add prototype.
204
205 2018-07-31 David Malcolm <dmalcolm@redhat.com>
206
207 * dump-context.h (dump_context::dump_loc): New decl.
208 * dumpfile.c (dump_context::dump_loc): New member function.
209 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
210 and dump_gimple_stmt.
211 (dump_context::dump_gimple_expr_loc): Likewise, using
212 dump_gimple_expr.
213 (dump_context::dump_generic_expr_loc): Likewise, using
214 dump_generic_expr.
215 (dump_context::dump_printf_loc_va): Likewise, using
216 dump_printf_va.
217 (dump_context::begin_scope): Explicitly using the global function
218 "dump_loc", rather than the member function.
219
220 2018-07-31 Martin Sebor <msebor@redhat.com>
221
222 PR tree-optimization/86741
223 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
224
225 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
226
227 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
228 depend on whether prefetch instructions will be emitted or not.
229 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
230 will be emitted or not.
231 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
232 (TARGET_SETMEM_PFD): New macros.
233
234 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
235
236 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
237 (NULL_STMT_VEC_INFO): Delete.
238 (stmt_vec_info::operator*): Likewise.
239 (stmt_vec_info::operator gimple *): Likewise.
240 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
241 of NULL_STMT_VEC_INFO.
242 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
243 (vect_reassociating_reduction_p): Likewise.
244 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
245 (vectorizable_store): Likewise.
246 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
247 (vec_info::free_stmt_vec_infos): Likewise.
248
249 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
250
251 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
252 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
253
254 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
255
256 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
257 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
258 (vec_info::free_stmt_vec_info): New private member functions.
259 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
260 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
261 * tree-parloops.c (gather_scalar_reductions): Remove calls to
262 set_stmt_vec_info_vec and free_stmt_vec_infos.
263 * tree-vect-loop.c (_loop_vec_info): Remove call to
264 set_stmt_vec_info_vec.
265 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
266 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
267 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
268 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
269 (vec_info::free_stmt_vec_info): ...these new functions. Remove
270 assignments in {vec_info::,}new_stmt_vec_info that are redundant
271 with the clearing in the xcalloc.
272 (stmt_vec_info_vec): Delete.
273 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
274 (vectorize_loops): Likewise.
275 (vec_info::~vec_info): Remove argument from call to
276 free_stmt_vec_infos.
277 (vec_info::add_stmt): Remove vinfo argument from call to
278 new_stmt_vec_info.
279
280 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
281
282 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
283 rather than a gimple stmt.
284 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
285 information for pattern statements when passed the original
286 statement; instead wait to be passed the pattern statement itself.
287 Don't call set_vinfo_for_stmt here.
288 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
289 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
290 stmt_vec_infos here.
291 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
292 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
293 stmt_vec_infos entry.
294
295 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
296
297 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
298 * tree-vectorizer.c (vec_info::replace_stmt): New function.
299 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
300 * tree-vect-stmts.c (vectorizable_call): Likewise.
301 (vectorizable_simd_clone_call): Likewise.
302
303 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
304
305 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
306 * tree-vectorizer.c (vec_info::remove_stmt): New function.
307 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
308 * tree-vect-loop.c (vect_transform_loop): Likewise.
309 * tree-vect-slp.c (vect_schedule_slp): Likewise.
310 * tree-vect-stmts.c (vect_remove_stores): Likewise.
311
312 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
313
314 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
315 (vect_dr_stmt): Delete.
316 * tree-vectorizer.c (vec_info::lookup_dr): New function.
317 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
318 of DR_VECT_AUX.
319 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
320 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
321 (vect_verify_datarefs_alignment, vect_peeling_supportable)
322 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
323 (vect_analyze_data_refs): Likewise.
324 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
325 argument.
326 (vect_find_same_alignment_drs): Likewise.
327 (vect_slp_analyze_node_dependences): Update calls accordingly.
328 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
329 instead of DR_VECT_AUX.
330 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
331 of a vector data references. Use vec_info::lookup_dr instead of
332 DR_VECT_AUX.
333 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
334 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
335 instead of DR_VECT_AUX.
336
337 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
338
339 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
340 dr_vec_info.
341 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
342 accordingly.
343 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
344 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
345 (vect_gen_prolog_loop_niters): Likewise.
346
347 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
348
349 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
350 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
351 (vect_known_alignment_in_bytes, vect_dr_behavior)
352 (vect_get_scalar_dr_size): Take references as dr_vec_infos
353 instead of data_references. Update calls to other routines for
354 which the same change has been made.
355 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
356 dr_vec_infos instead of stmt_vec_infos.
357 (vect_analyze_data_ref_dependence): Update call accordingly.
358 (vect_slp_analyze_data_ref_dependence)
359 (vect_record_base_alignments): Use DR_VECT_AUX.
360 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
361 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
362 (vector_alignment_reachable_p, vect_get_data_access_cost)
363 (vect_peeling_supportable, vect_analyze_group_access_1)
364 (vect_analyze_group_access, vect_analyze_data_ref_access)
365 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
366 (vect_compile_time_alias, vect_small_gap_p)
367 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
368 (vect_supportable_dr_alignment): Take references as dr_vec_infos
369 instead of data_references. Update calls to other routines for
370 which the same change has been made.
371 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
372 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
373 (vect_slp_analyze_and_verify_node_alignment)
374 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
375 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
376 (vect_setup_realignment): Use dr_vec_infos. Update calls after
377 above changes.
378 (_vect_peel_info::dr): Replace with...
379 (_vect_peel_info::dr_info): ...this new field.
380 (vect_peeling_hash_get_most_frequent)
381 (vect_peeling_hash_choose_best_peeling): Update accordingly.
382 (vect_peeling_hash_get_lowest_cost):
383 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
384 routines for which the same change has been made.
385 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
386 data_reference.
387 * tree-vect-loop-manip.c (get_misalign_in_elems)
388 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
389 above changes.
390 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
391 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
392 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
393 (get_group_load_store_type, get_negative_load_store_type)
394 (vect_get_data_ptr_increment, vectorizable_store)
395 (vectorizable_load): Likewise.
396 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
397 Update calls to other routines for which the same change has been made.
398
399 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
400
401 * tree-vectorizer.h (vec_info::move_dr): New member function.
402 (dataref_aux): Rename to...
403 (dr_vec_info): ...this and add "dr" and "stmt" fields.
404 (_stmt_vec_info::dr_aux): Update accordingly.
405 (_stmt_vec_info::data_ref_info): Delete.
406 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
407 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
408 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
409 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
410 of data_ref.
411 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
412 (STMT_VINFO_DR_INFO): New macro.
413 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
414 (set_dr_misalignment): Update after rename of dataref_aux.
415 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
416 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
417 initialization of STMT_VINFO_DATA_REF.
418 * tree-vectorizer.c (vec_info::move_dr): New function.
419 * tree-vect-patterns.c (vect_recog_bool_pattern)
420 (vect_recog_mask_conversion_pattern)
421 (vect_recog_gather_scatter_pattern): Use it.
422 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
423 the "dr" and "stmt" fields of dr_vec_info instead of
424 STMT_VINFO_DATA_REF.
425
426 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
427
428 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
429 (is_pattern_stmt_p): Use it.
430 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
431 on pattern statements.
432
433 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
434
435 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
436 original stmt as a stmt_vec_info rather than a gimple stmt.
437 (vect_pattern_recog_1): Take the statement directly as a
438 stmt_vec_info, rather than via a gimple_stmt_iterator.
439 Update call to vect_mark_pattern_stmts.
440 (vect_pattern_recog): Update calls accordingly.
441
442 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
443
444 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
445 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
446 a vect_def_type for the first argument.
447 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
448 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
449 operand if it isn't defined by a vectorized statement.
450 (vect_build_gather_load_calls): Remove the mask_dt argument and
451 update calls to vect_get_vec_def_for_stmt_copy.
452 (vectorizable_bswap): Likewise the dt argument.
453 (vectorizable_call): Update calls to vectorizable_bswap and
454 vect_get_vec_def_for_stmt_copy.
455 (vectorizable_simd_clone_call, vectorizable_assignment)
456 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
457 (vectorizable_comparison): Update calls to
458 vect_get_vec_def_for_stmt_copy.
459 (vectorizable_store): Likewise. Remove now-unnecessary calls to
460 vect_is_simple_use.
461 (vect_get_loop_based_defs): Remove dt argument and update call
462 to vect_get_vec_def_for_stmt_copy.
463 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
464 and vect_get_vec_def_for_stmt_copy.
465 (vectorizable_load): Update calls to vect_build_gather_load_calls
466 and vect_get_vec_def_for_stmt_copy.
467 * tree-vect-loop.c (vect_create_epilog_for_reduction)
468 (vectorizable_reduction, vectorizable_live_operation): Update calls
469 to vect_get_vec_def_for_stmt_copy.
470
471 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
472
473 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
474 and gimple stmt arguments with a stmt_vec_info.
475 (vect_record_base_alignments): Update calls accordingly.
476 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
477 and gimple stmt arguments with a stmt_vec_info.
478 (vect_build_slp_tree_1): Remove vinfo argument and update call
479 to vect_record_max_nunits.
480 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
481 and vect_record_max_nunits.
482
483 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
484
485 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
486 file and take a stmt_vec_info instead of a gimple stmt.
487 (supportable_widening_operation, vect_finish_replace_stmt)
488 (vect_finish_stmt_generation, vect_get_store_rhs)
489 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
490 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
491 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
492 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
493 (vect_create_data_ref_ptr, bump_vector_ptr)
494 (vect_permute_store_chain, vect_setup_realignment)
495 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
496 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
497 (vectorizable_reduction, vectorizable_induction)
498 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
499 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
500 than gimple stmts as arguments.
501 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
502 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
503 (can_group_stmts_p, vect_check_gather_scatter)
504 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
505 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
506 (vect_permute_load_chain, vect_shift_permute_load_chain)
507 (vect_transform_grouped_load)
508 (vect_record_grouped_load_vectors): Likewise.
509 * tree-vect-loop.c (vect_fixup_reduc_chain)
510 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
511 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
512 (vectorizable_reduction, vectorizable_induction)
513 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
514 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
515 (vect_get_load_store_mask): Likewise.
516 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
517 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
518 * tree-vect-stmts.c (vect_mark_relevant)
519 (is_simple_and_all_uses_invariant)
520 (exist_non_indexing_operands_for_use_p, process_use)
521 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
522 (vect_get_vec_def_for_operand, vect_get_vec_defs)
523 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
524 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
525 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
526 (get_negative_load_store_type, get_load_store_type)
527 (vect_check_load_store_mask, vect_check_store_rhs)
528 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
529 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
530 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
531 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
532 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
533 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
534 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
535 (supportable_widening_operation): Likewise.
536
537 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
538
539 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
540 a stmt_vec_info instead of a gcall.
541 (vect_check_gather_scatter): Update call accordingly.
542 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
543 of a gphi.
544 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
545 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
546 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
547 instead of a gimple stmt.
548 (vect_transform_loop): Update calls accordingly.
549 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
550 stmt_vec_infos instead of gimple stmts.
551 (vect_analyze_slp_instance): Update use accordingly.
552 * tree-vect-stmts.c (read_vector_array, write_vector_array)
553 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
554 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
555 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
556 (vect_gen_widened_results_half, vect_get_loop_based_defs)
557 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
558 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
559 down to subroutines.
560
561 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
562
563 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
564 of the worklist from a vector of gimple stmts to a vector of
565 stmt_vec_infos.
566 * tree-vect-stmts.c (vect_mark_relevant, process_use)
567 (vect_mark_stmts_to_be_vectorized): Likewise
568
569 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
570
571 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
572 statement before passing it to vect_analyze_stmt.
573 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
574 the chain of phi vector definitions. Track the exit phi via its
575 stmt_vec_info.
576 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
577 STMT_VINFO_REDUC_DEF.
578 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
579 stmt_vec_infos to handle the statement chains.
580 (vect_get_slp_defs): Record the first statement in the node
581 using a stmt_vec_info.
582 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
583 statements here and pass their stmt_vec_info down to subroutines.
584 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
585 down to vect_finish_stmt_generation.
586 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
587 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
588 stmt_vec_infos to subroutines.
589 (vect_remove_stores): Use stmt_vec_infos to handle the statement
590 chains.
591
592 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
593
594 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
595 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
596 (vect_permute_store_chain, vect_setup_realignment)
597 (vect_permute_load_chain, vect_shift_permute_load_chain)
598 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
599 stmts internally, and when passing values to other vectorizer routines.
600 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
601 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
602 (vect_analyze_loop_operations, get_initial_def_for_reduction)
603 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
604 (vectorizable_reduction, vectorizable_induction)
605 (vectorizable_live_operation, vect_transform_loop_stmt)
606 (vect_transform_loop): Likewise.
607 * tree-vect-patterns.c (vect_reassociating_reduction_p)
608 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
609 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
610 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
611 (vect_slp_analyze_node_operations_1): Likewise.
612 * tree-vect-stmts.c (vect_mark_relevant, process_use)
613 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
614 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
615 (vect_finish_stmt_generation_1, get_group_load_store_type)
616 (get_load_store_type, vect_build_gather_load_calls)
617 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
618 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
619 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
620 (vectorizable_store, vectorizable_load, vectorizable_condition)
621 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
622 (supportable_widening_operation): Likewise.
623 (vect_get_vector_types_for_stmt): Likewise.
624 * tree-vectorizer.h (vect_dr_behavior): Likewise.
625
626 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
627
628 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
629 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
630 (vect_permute_store_chain, vect_permute_load_chain)
631 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
632 repeated stmt_vec_info lookups.
633 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
634 (vect_update_ivs_after_vectorizer): Likewise.
635 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
636 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
637 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
638 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
639 (vect_bb_slp_scalar_cost): Likewise.
640 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
641
642 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
643
644 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
645 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
646 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
647 to get gassigns and gcalls, rather than operating on generc gimple
648 stmts.
649 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
650 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
651 (vectorizable_load, vect_analyze_stmt): Likewise.
652 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
653
654 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
655
656 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
657 return stmt_vec_infos rather than gimple stmts. Do not accept
658 null arguments.
659 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
660 of a gimple stmt.
661 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
662 Update use of get_later_stmt.
663 (vect_get_constant_vectors): Update call accordingly.
664 (vect_schedule_slp_instance): Likewise
665 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
666 (vect_slp_analyze_instance_dependence): Likewise.
667 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
668
669 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
670
671 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
672 (stmt_info_for_cost::stmt_info): ...this new field.
673 (add_stmt_costs): Update accordingly.
674 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
675 (vect_get_known_peeling_cost): Likewise.
676 (vect_estimate_min_profitable_iters): Likewise.
677 * tree-vect-stmts.c (record_stmt_cost): Likewise.
678
679 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
680
681 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
682 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
683 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
684 accordingly.
685 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
686
687 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
688
689 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
690 a gimple stmt to a stmt_vec_info.
691 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
692
693 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
694
695 * tree-vectorizer.h (vec_info::grouped_stores): Change from
696 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
697 (_loop_vec_info::reduction_chains): Likewise.
698 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
699 accordingly.
700 * tree-vect-slp.c (vect_analyze_slp): Likewise.
701
702 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
703
704 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
705 a gimple stmt to a stmt_vec_info.
706 (_stmt_vec_info::next_element): Likewise.
707 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
708 (vect_slp_analyze_and_verify_node_alignment)
709 (vect_analyze_group_access_1, vect_analyze_group_access)
710 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
711 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
712 (vect_supportable_dr_alignment): Update accordingly.
713 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
714 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
715 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
716 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
717 * tree-vect-slp.c (vect_build_slp_tree_1)
718 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
719 (vect_split_slp_store_group, vect_analyze_slp_instance)
720 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
721 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
722 (get_group_load_store_type, get_load_store_type)
723 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
724 (vect_transform_stmt, vect_remove_stores): Likewise.
725
726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
727
728 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
729 than a gimple stmt.
730 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
731 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
732 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
733 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
734 (vector_alignment_reachable_p, vect_get_data_access_cost)
735 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
736 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
737 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
738 (vect_analyze_group_access_1, vect_analyze_group_access)
739 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
740 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
741 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
742 result of vect_dr_stmt and use the stmt_vec_info instead of
743 the associated gimple stmt.
744 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
745 (vect_gen_prolog_loop_niters): Likewise.
746 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
747
748 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
749
750 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
751 to a vec<stmt_vec_info>.
752 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
753 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
754 vec<stmt_vec_info>.
755 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
756 to a vec<stmt_vec_info>.
757 (bst_traits::value_type, bst_traits::value_type): Likewise.
758 (bst_traits::hash): Update accordingly.
759 (vect_get_and_check_slp_defs): Change the stmts parameter from
760 a vec<gimple *> to a vec<stmt_vec_info>.
761 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
762 (vect_build_slp_tree): Likewise.
763 (vect_build_slp_tree_2): Likewise. Update uses of
764 SLP_TREE_SCALAR_STMTS.
765 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
766 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
767 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
768 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
769 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
770 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
771 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
772 (vect_get_constant_vectors, vect_get_slp_defs)
773 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
774 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
775 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
776 instead of gimple stmts.
777 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
778 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
779 (vect_slp_analyze_instance_dependence): Update uses of
780 SLP_TREE_SCALAR_STMTS.
781 (vect_slp_analyze_and_verify_node_alignment): Likewise.
782 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
783 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
784 (get_initial_defs_for_reduction): Likewise.
785 (vect_create_epilog_for_reduction): Likewise.
786 (vectorize_fold_left_reduction): Likewise.
787 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
788 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
789 (can_vectorize_live_stmts): Likewise.
790
791 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
792
793 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
794 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
795 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
796 than gimple stmts.
797 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
798 of a gimple stmt.
799 (gather_scalar_reductions): Update after above interface changes.
800 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
801 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
802 than gimple stmts.
803 (vect_force_simple_reduction): Likewise.
804 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
805 LOOP_VINFO_REDUCTIONS.
806 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
807
808 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
809
810 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
811 a gimple stmt to a stmt_vec_info.
812 * tree-vect-loop.c (vect_active_double_reduction_p)
813 (vect_force_simple_reduction, vectorizable_reduction): Update
814 accordingly.
815
816 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
817
818 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
819 vec<gimple *> to a vec<stmt_vec_info>.
820 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
821 the reduction_phis argument from a vec<gimple *> to a
822 vec<stmt_vec_info>.
823 (vectorizable_reduction): Likewise the phis local variable that
824 is passed to vect_create_epilog_for_reduction. Update for new type
825 of SLP_TREE_VEC_STMTS.
826 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
827 (vectorizable_live_operation): Likewise.
828 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
829 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
830
831 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
832
833 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
834 a gimple stmt to a stmt_vec_info.
835 (vectorizable_condition, vectorizable_live_operation)
836 (vectorizable_reduction, vectorizable_induction): Pass back the
837 vectorized statement as a stmt_vec_info.
838 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
839 use of STMT_VINFO_VEC_STMT.
840 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
841 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
842 as stmt_vec_infos rather than gimple stmts.
843 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
844 to a stmt_vec_info.
845 (vectorizable_live_operation): Likewise.
846 (vectorizable_reduction, vectorizable_induction): Likewise,
847 updating use of STMT_VINFO_VEC_STMT.
848 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
849 of STMT_VINFO_VEC_STMT.
850 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
851 (vectorizable_simd_clone_call, vectorizable_conversion)
852 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
853 (vectorizable_store, vectorizable_load, vectorizable_condition)
854 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
855 from a gimple stmt to a stmt_vec_info.
856 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
857 pointer to a stmt_vec_info to the vectorizable_* routines.
858
859 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
860
861 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
862 a gimple stmt to a stmt_vec_info.
863 (is_pattern_stmt_p): Update accordingly.
864 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
865 (vect_record_grouped_load_vectors): Likewise.
866 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
867 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
868 (vect_model_reduction_cost): Likewise.
869 (vect_create_epilog_for_reduction): Likewise.
870 (vectorizable_reduction, vectorizable_induction): Likewise.
871 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
872 Return the stmt_vec_info for the pattern statement.
873 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
874 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
875 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
876 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
877 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
878 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
879 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
880 (free_stmt_vec_info, vect_is_simple_use): Likewise.
881
882 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
883
884 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
885 (vect_finish_stmt_generation): Likewise.
886 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
887 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
888 (vect_build_gather_load_calls): Use the return value of the above
889 functions instead of a separate call to vinfo_for_stmt. Use narrow
890 scopes for the input gimple stmt and wider scopes for the associated
891 stmt_vec_info. Use vec_info::lookup_def when setting these
892 stmt_vec_infos from an SSA_NAME definition.
893 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
894 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
895 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
896 (vectorizable_store, vectorizable_load, vectorizable_condition)
897 (vectorizable_comparison): Likewise.
898 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
899 (vectorizable_reduction): Likewise.
900
901 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
902
903 * tree-vectorizer.h (vect_is_simple_use): Add an optional
904 stmt_vec_info * parameter before the optional gimple **.
905 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
906 (process_use, vect_get_vec_def_for_operand_1): Update callers.
907 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
908 * tree-vect-loop.c (vectorizable_reduction): Likewise.
909 (vectorizable_live_operation): Likewise.
910 * tree-vect-patterns.c (type_conversion_p): Likewise.
911 (vect_look_through_possible_promotion): Likewise.
912 (vect_recog_rotate_pattern): Likewise.
913 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
914
915 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
916
917 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
918 a typedef to a wrapper class.
919 (NULL_STMT_VEC_INFO): New macro.
920 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
921 (stmt_vec_info::operator*): New function.
922 (stmt_vec_info::operator gimple *): Likewise.
923 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
924 (add_stmt_costs): Likewise.
925 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
926 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
927 (vect_get_known_peeling_cost): Likewise.
928 (vect_estimate_min_profitable_iters): Likewise.
929 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
930 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
931 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
932 (vectorizable_store, free_stmt_vec_infos): Likewise.
933 (new_stmt_vec_info): Change return type of xcalloc to
934 _stmt_vec_info *.
935
936 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
937
938 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
939 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
940 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
941 a single_imm_use-based sequence.
942 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
943
944 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
945
946 * tree-vectorizer.h (vec_info::lookup_def): Declare.
947 * tree-vectorizer.c (vec_info::lookup_def): New function.
948 * tree-vect-patterns.c (vect_get_internal_def): Use it.
949 (vect_widened_op_tree): Likewise.
950 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
951 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
952 (vectorizable_reduction): Likewise.
953 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
954 of a gimple *.
955 (vect_is_slp_reduction): Update calls accordingly. Use
956 vec_info::lookup_def.
957 (vect_is_simple_reduction): Likewise
958 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
959
960 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
961
962 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
963 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
964 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
965 of vinfo_for_stmt.
966 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
967 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
968 (vect_update_vf_for_slp, vect_analyze_loop_operations)
969 (vect_is_slp_reduction, vectorizable_induction)
970 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
971 * tree-vect-patterns.c (vect_init_pattern_stmt):
972 (vect_determine_min_output_precision_1, vect_determine_precisions)
973 (vect_pattern_recog): Likewise.
974 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
975 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
976 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
977 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
978 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
979 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
980 info field from a loop to a loop_vec_info.
981
982 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
983
984 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
985 (vec_info::add_stmt): Declare.
986 * tree-vectorizer.c (vec_info::add_stmt): New function.
987 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
988 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
989 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
990 (vectorizable_induction): Likewise.
991 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
992 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
993 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
994 (vectorizable_load): Likewise.
995 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
996 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
997 (vect_recog_gather_scatter_pattern): Likewise.
998 (append_pattern_def_seq): Likewise. Remove a check that is
999 performed by add_stmt itself.
1000
1001 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1002
1003 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1004 which make_ssa_name was called with new_stmt before new_stmt
1005 had been created.
1006
1007 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1008
1009 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1010 split out from...
1011 (vect_is_slp_reduction): ...here...
1012 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1013 that are already known to be false.
1014
1015 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1016
1017 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1018 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1019 STMT_VINFO_NUM_SLP_USES when it's true.
1020 (vect_free_slp_instance): Add a final_p parameter and pass it to
1021 vect_free_slp_tree.
1022 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1023 (vect_analyze_slp_instance): Likewise.
1024 (vect_slp_analyze_operations): Likewise.
1025 (vect_slp_analyze_bb_1): Likewise.
1026 * tree-vectorizer.c (vec_info): Likewise.
1027 * tree-vect-loop.c (vect_transform_loop): Likewise.
1028
1029 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1030
1031 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1032 function is not called for second and subsequent members of
1033 a reduction group.
1034
1035 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1036
1037 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1038 cases for nested loops from here to ...
1039 (vect_create_epilog_for_reduction): ...here. Only call
1040 vect_is_simple_use for inner-loop reductions.
1041
1042 2018-07-31 Martin Liska <mliska@suse.cz>
1043
1044 PR gcov-profile/85338
1045 PR gcov-profile/85350
1046 PR gcov-profile/85372
1047 * profile.c (struct location_triplet): New.
1048 (struct location_triplet_hash): Likewise.
1049 (output_location): Do not output a BB that
1050 is already recorded for a line.
1051 (branch_prob): Use streamed_locations.
1052
1053 2018-07-31 Martin Liska <mliska@suse.cz>
1054
1055 PR gcov-profile/85370
1056 * coverage.c (coverage_begin_function): Do not mark target
1057 clones as artificial functions.
1058
1059 2018-07-31 Martin Liska <mliska@suse.cz>
1060
1061 PR gcov-profile/83813
1062 PR gcov-profile/84758
1063 PR gcov-profile/85217
1064 PR gcov-profile/85332
1065 * profile.c (branch_prob): Do not record GOTO expressions
1066 for GIMPLE statements which locations are already streamed.
1067
1068 2018-07-31 Olivier Hainque <hainque@adacore.com>
1069
1070 * gcc.c (handle_spec_function): Accept a soft_matched_part
1071 argument, as do_spec_1. Pass it down to ...
1072 (eval_spec_function): Accept a soft_matched_part argument,
1073 and pass it down to ...
1074 (do_spec_2): Accept a soft_matched_part argument, and pass
1075 it down to do_spec_1.
1076 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1077 (handle_braces): Update call to handle_spec_function.
1078 (driver::set_up_specs): Update calls to do_spec_2.
1079 (compare_debug_dump_opt_spec_function): Likewise.
1080 (compare_debug_self_opt_spec_function): Likewise.
1081
1082 2018-07-31 Olivier Hainque <hainque@adacore.com>
1083
1084 * common.opt (nolibc): New option.
1085 * doc/invoke.texi (Link Options): Document it.
1086 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1087 * config/alpha/linux.h: Likewise.
1088 * config/arc/elf.h: Likewise.
1089 * config/arm/uclinux-elf.h: Likewise.
1090 * config/arm/unknown-elf.h: Likewise.
1091 * config/avr/avrlibc.h: Likewise.
1092 * config/bfin/bfin.h: Likewise.
1093 * config/bfin/linux.h: Likewise.
1094 * config/bfin/uclinux.h: Likewise.
1095 * config/darwin.h: Likewise.
1096 * config/darwin10.h: Likewise.
1097 * config/darwin12.h: Likewise.
1098 * config/gnu-user.h: Likewise.
1099 * config/lm32/uclinux-elf.h: Likewise.
1100 * config/pa/pa-hpux11.h: Likewise.
1101 * config/pa/pa64-hpux.h: Likewise.
1102 * config/sparc/sparc.h: Likewise.
1103
1104 2018-07-31 Olivier Hainque <hainque@adacore.com>
1105
1106 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1107 undefined variables.
1108
1109 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1110
1111 PR target/86640
1112 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1113 instead of GEN_INT.
1114
1115 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1116
1117 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1118 terminated string literal.
1119
1120 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1121
1122 PR rtl-optimization/85160
1123 * combine.c (is_just_move): New function.
1124 (try_combine): Allow combining two instructions into two if neither of
1125 the original instructions was a move.
1126
1127 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
1128
1129 PR target/86673
1130 * doc/extend.texi (Global Register Variables): Discourage use of type
1131 qualifiers.
1132 (Local Register Variables): Likewise.
1133
1134 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
1135
1136 PR tree-optimization/86506
1137 * hwint.h (ceil_log2): Resync with hwint.c implementation.
1138
1139 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
1140
1141 PR target/86547
1142 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1143 hard_regno, make sure no insn between `from` and `to` clobbers it.
1144
1145 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
1146 Tom de Vries <tdevries@suse.de>
1147
1148 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1149 (PTX_DEFAULT_RUNTIME_DIM): ... this.
1150 (nvptx_goacc_validate_dims): Set default worker and gang dims to
1151 PTX_DEFAULT_RUNTIME_DIM.
1152 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1153
1154 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
1155
1156 * config/pa/pa.c (pa_output_addr_vec): Align address table.
1157 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1158 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1159
1160 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
1161
1162 * config/rs6000/constraints.md (wG constraint): Delete, no longer
1163 used.
1164 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1165 predicate to reflect toc fusion has been deleted.
1166 (toc_fusion_mem_raw): Delete, no longer used.
1167 (toc_fusion_mem_wrapped): Likewise.
1168 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1169 fusion mask bit.
1170 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1171 Delete, no longer used.
1172 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1173 meant to be used for toc fusion.
1174 (rs6000_debug_print_mode): Delete toc fusion debugging.
1175 (rs6000_debug_reg_global): Likewise.
1176 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1177 fusion and secondary reload support that were never used.
1178 (rs6000_option_override_internal): Delete TOC fusion, that was only
1179 partially defined, and it did not work unless you also used the
1180 -mcmodel= switch.
1181 (rs6000_legitimate_address_p): Delete TOC fusion support.
1182 (rs6000_opt_masks): Likewise.
1183 (fusion_wrap_memory_address): Delete function, no longer used.
1184 (fusion_split_address); Delete TOC fusion support.
1185 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1186 longer used with toc fusion being deleted.
1187 (TARGET_TOC_FUSION_FP): Likewise.
1188 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1189 UNSPEC.
1190 (toc fusion spliter): Delete TOC fusion support.
1191 (toc_fusionload_<mode>): Likewise.
1192 (toc_fusionload_di): Likewise.
1193 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1194 longer needs to be named. Rename predicate to delete TOC fusion.
1195 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1196 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1197 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1198 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1199 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1200
1201 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1202
1203 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1204 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1205 __int128 in built-in function prototypes.
1206 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1207 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1208
1209 2018-07-27 Martin Sebor <msebor@redhat.com>
1210
1211 PR tree-optimization/86696
1212 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1213 types, including enums.
1214 (handle_char_store): Be prepared for the above function to fail.
1215
1216 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1217
1218 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1219 when optimization level is lower than 2 or optimize for size.
1220
1221 2018-07-26 Martin Sebor <msebor@redhat.com>
1222
1223 PR tree-optimization/86043
1224 PR tree-optimization/86042
1225 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1226 (get_string_cst_length): Rename...
1227 (get_min_string_length): ...to this. Add argument.
1228 (handle_char_store): Extend to handle multi-character stores by
1229 MEM_REF.
1230 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1231 * tree.h (initializer_zerop): Add argument.
1232
1233 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1234
1235 PR middle-end/86660
1236 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1237 declare target to variables if they have always,{to,from,tofrom} map
1238 kinds.
1239
1240 2018-07-26 Martin Liska <mliska@suse.cz>
1241
1242 PR lto/86548
1243 * lto-wrapper.c: Add linker_output as prefix
1244 for ltrans_output_file.
1245
1246 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1247
1248 PR rtl-optimization/85805
1249 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1250 value for hard registers if that was written in the same mode.
1251
1252 2018-07-26 Martin Liska <mliska@suse.cz>
1253
1254 PR gcov-profile/86536
1255 * gcov.c (format_gcov): Use printf format %.*f directly
1256 and do not handle special values.
1257
1258 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1259
1260 * common/config/arc/arc-common.c (arc_option_optimization_table):
1261 Update default optimizations for size.
1262
1263 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1264
1265 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1266 * config/arc/constraints.md (CfZ): New constraint.
1267 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1268 (subsf3_fpu): Likewise.
1269 (cmpsf_fpu): Likewise.
1270 (cmpsf_fpu_uneq): Likewise.
1271
1272 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1273
1274 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1275 accesses as well.
1276 (arc_is_uncached_mem_p): uncached applies to both the variable and
1277 the pointer.
1278
1279 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1280
1281 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1282 register names.
1283
1284 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1285
1286 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1287 field "m_scopes" from vec to auto_vec.
1288
1289 2018-07-25 Martin Liska <mliska@suse.cz>
1290
1291 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1292 return type.
1293
1294 2018-07-25 Richard Biener <rguenther@suse.de>
1295
1296 PR debug/86654
1297 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1298 special wrt context_die late.
1299 (gen_subprogram_die): Re-use DIEs in local scope.
1300
1301 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1302
1303 PR tree-optimization/86644
1304 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1305
1306 2018-07-25 Martin Liska <mliska@suse.cz>
1307
1308 PR middle-end/86645
1309 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1310 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1311
1312 2018-07-25 Martin Liska <mliska@suse.cz>
1313
1314 PR sanitizer/79635
1315 * params.def: Explain ASan abbreviation and provide
1316 a documentation link.
1317
1318 2018-07-24 Martin Sebor <msebor@redhat.com>
1319
1320 PR tree-optimization/86622
1321 PR tree-optimization/86532
1322 * builtins.h (string_length): Declare.
1323 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1324 (check_access): Be prepared for non-constant length ranges.
1325 (string_length): Make extern.
1326 * expr.c (string_constant): Only handle the minor non-constant
1327 array index. Use string_constant to compute the length of
1328 a generic string constant.
1329
1330 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1331
1332 PR tree-optimization/86618
1333 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1334 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1335
1336 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1337
1338 PR tree-optimization/86636
1339 * json.cc (json::object::set): Fix comment. Add assertions.
1340 (json::array::append): Move here from json.h. Add comment and an
1341 assertion.
1342 (json::string::string): Likewise.
1343 * json.h (json::array::append): Move to json.cc.
1344 (json::string::string): Likewise.
1345 * optinfo-emit-json.cc
1346 (optrecord_json_writer::impl_location_to_json): Assert that we
1347 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1348 wrapper around it. Expand the location once, rather than three
1349 times.
1350 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1351 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1352 wrappers.
1353 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1354 places. Fix some overlong lines.
1355
1356 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1357
1358 * config/aarch64/aarch64-simd.md
1359 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1360 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1361 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1362 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1363 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1364 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1365 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1366 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1367 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1368
1369 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1370
1371 PR middle-end/86627
1372 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1373 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1374 and abs_d == d, do the power of two handling if profitable.
1375
1376 2018-07-24 Richard Biener <rguenther@suse.de>
1377
1378 * match.pd: Add BIT_FIELD_REF canonicalizations.
1379
1380 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1381
1382 PR c/86617
1383 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1384
1385 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1386
1387 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1388 terminated STRING_CST object.
1389
1390 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1391
1392 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1393
1394 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1395
1396 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1397 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1398 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1399 the elements into a register.
1400 (rs6000_split_v4si_init_di_reg): Delete.
1401 (rs6000_split_v4si_init): Delete.
1402 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1403 (vsx_init_v4si): Rewrite as a define_expand.
1404
1405 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1406
1407 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1408 zero_extend argument from memory): New.
1409
1410 2018-07-22 Martin Sebor <msebor@redhat.com>
1411
1412 PR bootstrap/86621
1413 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1414 diagnosing calls with unknown arguments unless -Walloca-larger-than
1415 is restricted to less than PTRDIFF_MAX bytes.
1416
1417 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1418
1419 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1420
1421 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1422
1423 * pretty-print.c (text_info::set_location): Remove redundant
1424 "line_table" parameter from call to rich_location::set_range.
1425
1426 2018-07-20 Martin Sebor <msebor@redhat.com>
1427
1428 PR middle-end/82063
1429 * builtins.c (expand_builtin_alloca): Adjust.
1430 * calls.c (alloc_max_size): Simplify.
1431 * cgraphunit.c (cgraph_node::expand): Adjust.
1432 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1433 variables.
1434 (frame_larger_than_size): Same.
1435 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1436 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1437 Initialize.
1438 * doc/invoke.texi (GCC Command Options): Document option arguments.
1439 Explain byte-size arguments and suffixes.
1440 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1441 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1442 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1443 * doc/options.texi (UInteger): Expand.
1444 (Host_Wide_Int, ByteSize): Document new properties.
1445 * final.c (final_start_function_1): Include sizes in an error message.
1446 * function.c (frame_offset_overflow): Same.
1447 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1448 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1449 Diagnose unbounded alloca calls only for limits of less than
1450 PTRDIFF_MAX.
1451 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1452 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1453 for alloca(0).
1454 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1455 only for limits of less than PTRDIFF_MAX.
1456 * langhooks-def.h (lhd_handle_option): Change function argument
1457 to HOST_WIDE_INT.
1458 * langhooks.c (lhd_handle_option): Same.
1459 * langhooks.h (handle_option): Same.
1460 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1461 ByteSize flags.
1462 (var_type, var_type_struct): Same.
1463 (var_set): Handle ByteSize flag.
1464 * optc-gen.awk: Add comments to output to ease debugging. Make
1465 use of HOST_WIDE_INT where appropriate.
1466 * opts-gen-save.awk: Use %lx to format unsigned long.
1467 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1468 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1469 arguments. Parse bytes-size suffixes.
1470 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1471 (enum_value_to_arg): Same.
1472 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1473 (handle_option): Adjust.
1474 (generate_option): Change function argument to HOST_WIDE_INT.
1475 (cmdline_handle_error): Adjust.
1476 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1477 (set_option): Change function argument to HOST_WIDE_INT.
1478 (option_enabled): Handle cl_host_wide_int.
1479 (get_option_state): Handle CLVC_SIZE.
1480 (control_warning_option): Same.
1481 * opts.c (common_handle_option): Change function argument to
1482 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1483 OPT_Wvla_larger_than_.
1484 * opts.h (enum cl_var_type): Add an enumerator.
1485 * stor-layout.c (layout_decl): Print a more meaningful warning.
1486 * toplev.c (output_stack_usage): Adjust.
1487
1488 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1489
1490 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1491 call to inline_expand_builtin_string_cmp.
1492 (expand_builtin_strcmp): Likewise.
1493 (expand_builtin_strncmp): Likewise.
1494 (inline_string_cmp): Delete the last parameter, change char_type_node
1495 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1496 two operands.
1497 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1498 the inlining expansion on target where the type of the call has same or
1499 narrower precision than unsigned char.
1500
1501 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1502
1503 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1504 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1505 * common.opt (fsave-optimization-record): New option.
1506 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1507 * doc/invoke.texi (-fsave-optimization-record): New option.
1508 * dumpfile.c: Include "optinfo-emit-json.h".
1509 (struct kv_pair): Move to coretypes.h.
1510 (optgroup_options): Make non-static.
1511 (dump_context::end_scope): Call
1512 optimization_records_maybe_pop_dump_scope.
1513 * dumpfile.h (optgroup_options): New decl.
1514 * json.cc: New file.
1515 * json.h: New file.
1516 * optinfo-emit-json.cc: New file.
1517 * optinfo-emit-json.h: New file.
1518 * optinfo.cc: Include "optinfo-emit-json.h".
1519 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1520 (optinfo_enabled_p): Check optimization_records_enabled_p.
1521 (optinfo_wants_inlining_info_p): Likewise.
1522 * optinfo.h: Update comment.
1523 * profile-count.c (profile_quality_as_string): New function.
1524 * profile-count.h (profile_quality_as_string): New decl.
1525 (profile_count::quality): New accessor.
1526 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1527 and optinfo_emit_json_cc_tests.
1528 * selftest.h (selftest::json_cc_tests): New decl.
1529 (selftest::optinfo_emit_json_cc_tests): New decl.
1530 * toplev.c: Include "optinfo-emit-json.h".
1531 (compile_file): Call optimization_records_finish.
1532 (do_compile): Call optimization_records_start.
1533 * tree-ssa-live.c: Include optinfo.h.
1534 (remove_unused_scope_block_p): Retain inlining information if
1535 optinfo_wants_inlining_info_p returns true.
1536
1537 2018-07-20 Richard Biener <rguenther@suse.de>
1538
1539 PR debug/86585
1540 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1541 to cover -flto-partition=none.
1542
1543 2018-07-20 Martin Liska <mliska@suse.cz>
1544
1545 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1546 (get_decl_source_range): Remove unused function.
1547
1548 2018-07-20 Richard Biener <rguenther@suse.de>
1549
1550 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1551 (struct vn_phi_s): Likewise.
1552 (struct vn_reference_s): Likewise.
1553 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1554 for searching the slot of an entry known to be in the hash itself.
1555 (vn_phi_hasher::equal): Likewise.
1556 (vn_reference_hasher::equal): Likewise.
1557 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1558 globals.
1559 (optimistic_info, current_info): Remove, keeping only valid_info.
1560 (vn_reference_lookup_1): Remove fallback lookup.
1561 (vn_reference_lookup_2): Likewise.
1562 (vn_nary_op_lookup_1): Likewise.
1563 (vn_phi_lookup): Likewise.
1564 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1565 hash element.
1566 (vn_reference_insert): Adjust, chain the inserted hash element
1567 at last_inserted_ref.
1568 (vn_reference_insert_pieces): Likewise.
1569 (visit_reference_op_call): Likewise.
1570 (vn_nary_op_insert_into): Chain the inserted hash element at
1571 last_inserted_nary.
1572 (vn_nary_op_insert_pieces): Adjust.
1573 (vn_nary_op_insert): Likewise.
1574 (vn_nary_op_insert_stmt): Likewise.
1575 (vn_phi_insert): Adjust, chain the inserted hash element at
1576 last_inserted_phi.
1577 (process_scc): Remove clearing and copying the optimistic
1578 table. Instead remove elements inserted during an optimistic
1579 iteration from the single table we maintain.
1580 (init_scc_vn): Adjust.
1581 (free_scc_vn): Likewise.
1582 (sccvn_dom_walker::record_cond): Likewise.
1583 (sccvn_dom_walker::after_dom_children): Likewise.
1584
1585 2018-07-19 Martin Sebor <msebor@redhat.com>
1586
1587 PR tree-optimization/84047
1588 PR tree-optimization/83776
1589 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1590 (check_array_bounds): Call it.
1591
1592 2018-07-19 Martin Sebor <msebor@redhat.com>
1593
1594 * align.h (align_flags): Use member initialization.
1595
1596 2018-07-19 David Malcolm <dmalcolm@redhat.com>
1597
1598 * Makefile.in (OBJS): Add optinfo.o.
1599 * coretypes.h (class symtab_node): New forward decl.
1600 (struct cgraph_node): New forward decl.
1601 (class varpool_node): New forward decl.
1602 * dump-context.h: New file.
1603 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1604 "tree-pass.h".
1605 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1606 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1607 (set_alt_dump_file): Likewise.
1608 (dump_context::~dump_context): New dtor.
1609 (dump_gimple_stmt): Move implementation to...
1610 (dump_context::dump_gimple_stmt): ...this new member function.
1611 Add the stmt to any pending optinfo, creating one if need be.
1612 (dump_gimple_stmt_loc): Move implementation to...
1613 (dump_context::dump_gimple_stmt_loc): ...this new member function.
1614 Start a new optinfo and add the stmt to it.
1615 (dump_gimple_expr): Move implementation to...
1616 (dump_context::dump_gimple_expr): ...this new member function.
1617 Add the stmt to any pending optinfo, creating one if need be.
1618 (dump_gimple_expr_loc): Move implementation to...
1619 (dump_context::dump_gimple_expr_loc): ...this new member function.
1620 Start a new optinfo and add the stmt to it.
1621 (dump_generic_expr): Move implementation to...
1622 (dump_context::dump_generic_expr): ...this new member function.
1623 Add the tree to any pending optinfo, creating one if need be.
1624 (dump_generic_expr_loc): Move implementation to...
1625 (dump_context::dump_generic_expr_loc): ...this new member
1626 function. Add the tree to any pending optinfo, creating one if
1627 need be.
1628 (dump_printf): Move implementation to...
1629 (dump_context::dump_printf_va): ...this new member function. Add
1630 the text to any pending optinfo, creating one if need be.
1631 (dump_printf_loc): Move implementation to...
1632 (dump_context::dump_printf_loc_va): ...this new member function.
1633 Start a new optinfo and add the stmt to it.
1634 (dump_dec): Move implementation to...
1635 (dump_context::dump_dec): ...this new member function. Add the
1636 value to any pending optinfo, creating one if need be.
1637 (dump_context::dump_symtab_node): New member function.
1638 (dump_context::get_scope_depth): New member function.
1639 (dump_context::begin_scope): New member function.
1640 (dump_context::end_scope): New member function.
1641 (dump_context::ensure_pending_optinfo): New member function.
1642 (dump_context::begin_next_optinfo): New member function.
1643 (dump_context::end_any_optinfo): New member function.
1644 (dump_context::s_current): New global.
1645 (dump_context::s_default): New global.
1646 (dump_scope_depth): Delete global.
1647 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1648 (dump_symtab_node): New function.
1649 (get_dump_scope_depth): Reimplement in terms of dump_context.
1650 (dump_begin_scope): Likewise.
1651 (dump_end_scope): Likewise.
1652 (selftest::temp_dump_context::temp_dump_context): New ctor.
1653 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1654 (selftest::verify_item): New function.
1655 (ASSERT_IS_TEXT): New macro.
1656 (ASSERT_IS_TREE): New macro.
1657 (ASSERT_IS_GIMPLE): New macro.
1658 (selftest::test_capture_of_dump_calls): New test.
1659 (selftest::dumpfile_c_tests): Call it.
1660 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1661 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1662 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1663 descriptive comment.
1664 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1665 (dump_node, dump_bb): Move these unrelated decls.
1666 (class dump_manager): Add leading comment.
1667 * optinfo.cc: New file.
1668 * optinfo.h: New file.
1669
1670 2018-07-19 Michael Collison <michael.collison@arm.com>
1671 Richard Henderson <rth@redhat.com>
1672
1673 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1674 (subti): Handle op1 zero.
1675 (subvti4, usub4ti4): New.
1676 (*sub<GPI>3_compare1_imm): New.
1677 (sub<GPI>3_carryinCV): New.
1678 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1679 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1680
1681 2018-07-19 Michael Collison <michael.collison@arm.com>
1682 Richard Henderson <rth@redhat.com>
1683
1684 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1685 (addti3): Create simpler code if low part is already known to be 0.
1686 (addvti4, uaddvti4): New.
1687 (*add<GPI>3_compareC_cconly_imm): New.
1688 (*add<GPI>3_compareC_cconly): New.
1689 (*add<GPI>3_compareC_imm): New.
1690 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1691 handle constants within this pattern..
1692 (*add<GPI>3_compareV_cconly_imm): New.
1693 (*add<GPI>3_compareV_cconly): New.
1694 (*add<GPI>3_compareV_imm): New.
1695 (add<GPI>3_compareV): New.
1696 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1697 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1698 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1699 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1700 with 'comparison' operator.
1701 (*add<GPI>3_compareV_cconly_imm): Ditto.
1702 (*add<GPI>3_compareV_cconly): Ditto.
1703 (*add<GPI>3_compareV_imm): Ditto.
1704 (add<GPI>3_compareV): Ditto.
1705 (add<mode>3_carryinC): Ditto.
1706 (*add<mode>3_carryinC_zero): Ditto.
1707 (*add<mode>3_carryinC): Ditto.
1708 (add<mode>3_carryinV): Ditto.
1709 (*add<mode>3_carryinV_zero): Ditto.
1710 (*add<mode>3_carryinV): Ditto.
1711
1712 2018-07-19 Michael Collison <michael.collison@arm.com>
1713 Richard Henderson <rth@redhat.com>
1714
1715 * config/aarch64/aarch64-modes.def (CC_V): New.
1716 * config/aarch64/aarch64-protos.h
1717 (aarch64_addti_scratch_regs): Declare
1718 (aarch64_subvti_scratch_regs): Declare.
1719 (aarch64_expand_subvti): Declare.
1720 (aarch64_gen_unlikely_cbranch): Declare
1721 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1722 for signed overflow using CC_Vmode.
1723 (aarch64_get_condition_code_1): Handle CC_Vmode.
1724 (aarch64_gen_unlikely_cbranch): New function.
1725 (aarch64_addti_scratch_regs): New function.
1726 (aarch64_subvti_scratch_regs): New function.
1727 (aarch64_expand_subvti): New function.
1728
1729 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1730
1731 * config/aarch64/aarch64-option-extensions.def: New entry for profile
1732 extension.
1733 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1734 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1735 extension.
1736
1737 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1738
1739 PR target/83009
1740 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1741 address check not strict.
1742
1743 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1744
1745 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1746 Umq with Umn.
1747 (store_pair_lanes<mode>): Likewise.
1748 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1749 enum value 'ADDR_QUERY_LDP_STP_N'.
1750 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1751 (aarch64_print_address_internal): Add declaration.
1752 (aarch64_print_ldpstp_address): Remove.
1753 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1754 (aarch64_print_operand): Change printing of 'y'.
1755 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1756 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1757 'true' rather than '1'.
1758 * config/aarch64/constraints.md (Uml): Likewise.
1759 (Uml): Rename to Umn.
1760 (Umq): Remove.
1761
1762 2018-07-19 Richard Biener <rguenther@suse.de>
1763
1764 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1765 a trailing array.
1766 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1767 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1768 (vn_reference_hasher): Likewise.
1769 (struct vn_tables_s): Remove obstack and alloc-pool members.
1770 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1771 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1772 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1773 (vn_reference_insert_pieces): Likewise.
1774 (alloc_vn_nary_op_noinit): Adjust.
1775 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1776 (vn_phi_eq): Adjust.
1777 (shared_lookup_phiargs): Remove.
1778 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1779 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1780 (visit_reference_op_call): Likewise.
1781 (copy_nary, copy_phi, copy_reference): Remove.
1782 (process_scc): Rewind the obstack when iterating. Do not
1783 copy the elements to valid_info but just move them from one
1784 hashtable to the other.
1785 (allocate_vn_table): Adjust.
1786 (free_vn_table): Likewise.
1787 (init_scc_vn): Likewise.
1788 (free_scc_vn): Likewise.
1789
1790 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1791
1792 PR target/86560
1793 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1794 indirect_return as function type attribute.
1795 (ix86_attribute_table): Change indirect_return to function
1796 type attribute.
1797 * doc/extend.texi: Update indirect_return attribute.
1798
1799 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1800
1801 * wide-int.h (widest2_int): New.
1802 * gimple-fold.c (arith_overflowed_p): Use it.
1803 * tree.h (widest2_int_cst): New.
1804 * tree-vrp.c (wide_int_binop_overflow): Rename from
1805 vrp_int_const_binop.
1806 Rewrite to work on trees.
1807 (extract_range_from_multiplicative_op_1): Abstract code to...
1808 (wide_int_range_min_max): ...here.
1809 (wide_int_range_cross_product): ...and here.
1810 (extract_range_from_binary_expr_1): Abstract overflow code to...
1811 (wide_int_range_mult_wrapping): ...here.
1812 * tree-vrp.h (wide_int_range_cross_product): New.
1813 (wide_int_range_mult_wrapping): New.
1814
1815 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1816 Julia Koval <julia.koval@intel.com>
1817
1818 * config/i386/x86-tune-costs.h (skylake_memcpy,
1819 skylake_memset): Replace rep_prefix with unrolling for size 512.
1820
1821 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1822
1823 PR middle-end/86544
1824 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1825 in last stmt.
1826
1827 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1828
1829 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1830 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1831 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1832 previously known as "PowerPC AltiVec Built-in Functions". Move
1833 some material to new subsubsections "PowerPC AltiVec Built-in
1834 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1835 ISA 2.07".
1836 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1837 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1838 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1839 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1840
1841 2018-07-18 Richard Biener <rguenther@suse.de>
1842
1843 PR tree-optimization/86557
1844 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1845 EXACT_DIV_EXPR.
1846
1847 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1848
1849 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1850
1851 2018-07-17 Jeff Law <law@redhat.com>
1852
1853 * config/arm/arm.c (get_label_padding): Update for recent
1854 changes to label_to_alignment.
1855
1856 PR tree-optimization/86010
1857 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1858
1859 * config/mips/mips.c (vr4130_align_insns): Update for recent
1860 changes to label_to_alignment.
1861
1862 * config/frv/frv.c (frv_label_align): Update for recent changes
1863 to label_to_alignment.
1864
1865 * config/nios2/nios2.c (nios2_label_align): Update for recent
1866 changes which dropped ALIGN_LABELS_LOG.
1867
1868 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1869
1870 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1871 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1872
1873 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1874
1875 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1876 deprecated align_labels_log.
1877
1878 2018-07-17 Richard Biener <rguenther@suse.de>
1879
1880 PR lto/86456
1881 * dwarf2out.c (init_sections_and_labels): Always generate
1882 a debug_line_str_section for early LTO debug.
1883 (dwarf2out_finish): Reset debug_line_str_hash output early.
1884 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1885 with fat LTO part.
1886 (dwarf2out_early_finish): Output debug_line_str.
1887
1888 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1889
1890 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1891 index register on z196 or later.
1892
1893 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1894
1895 * config/s390/s390.c (s390_default_align): Set default function
1896 alignment to 16.
1897 (s390_override_options_after_change): Call s390_default align.
1898 (s390_option_override_internal): Call s390_default_align.
1899 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1900
1901 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1902
1903 PR middle-end/86542
1904 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1905 to _looptemp_ clauses, other than the first two.
1906
1907 2018-07-17 Martin Liska <mliska@suse.cz>
1908
1909 * opts.c: Do not enable OPT_falign_* for -Os.
1910
1911 2018-07-17 Martin Liska <mliska@suse.cz>
1912
1913 * align.h (MAX_CODE_ALIGN): New.
1914 (MAX_CODE_ALIGN_VALUE): New.
1915 * common/config/i386/i386-common.c (ix86_handle_option):
1916 (MAX_CODE_ALIGN): Moved to align.h.
1917 * final.c (MAX_CODE_ALIGN): Likewise.
1918 * opts.c (parse_and_check_align_values):
1919 (MAX_CODE_ALIGN): Likewise.
1920 (MAX_CODE_ALIGN_VALUE): Likewise.
1921
1922 2018-07-17 Martin Liska <mliska@suse.cz>
1923
1924 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1925 in order to fulfil coding style.
1926 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1927 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1928 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1929 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1930 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1931 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1932 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1933 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1934 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1935
1936 2018-07-17 Martin Liska <mliska@suse.cz>
1937
1938 * align.h: New file.
1939 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1940 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1941 align_flags of label_to_alignment.
1942 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1943 class.
1944 * config/m68k/m68k.c: Do not use removed align_labels_value and
1945 align_loops_value.
1946 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1947 (LOOP_ALIGN): Likewise.
1948 (LABEL_ALIGN): Likewise.
1949 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1950 Remove not used macro.
1951 (rs6000_loop_align): Change return type to align_flags.
1952 (rs6000_loop_align_max_skip): Remove.
1953 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1954 Change return type to align_flags.
1955 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1956 Remove not used macro.
1957 (rs6000_loop_align): Change return type to align_flags.
1958 (rs6000_loop_align_max_skip): Remove.
1959 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1960 * config/rx/rx-protos.h (rx_align_for_label): Make it
1961 static function.
1962 * config/rx/rx.c (rx_align_for_label): Change return type
1963 to align_flags.
1964 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1965 macro definitions.
1966 into align_flags class.
1967 (LABEL_ALIGN): Likewise.
1968 (LOOP_ALIGN): Likewise.
1969 * config/s390/s390.c (s390_label_align): Use align_flags
1970 class member.
1971 (s390_asm_output_function_label): Likewise.
1972 * config/sh/sh.c (sh_override_options_after_change):
1973 Use align_flags class directly without macros.
1974 (find_barrier): Likewise.
1975 (barrier_align): Likewise.
1976 (sh_loop_align): Likewise.
1977 * config/spu/spu.c (spu_option_override):
1978 Use align_flags_tuple::get_value instead of removed macros.
1979 (spu_sched_init): Likewise.
1980 * config/spu/spu.h (GTY): Likewise.
1981 * config/visium/visium.c (visium_option_override):
1982 Set "8" as default secondary alignment.
1983 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1984 in order to guarantee secondary alignment of 8.
1985 * coretypes.h: Include align.h header file.
1986 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1987 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1988 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1989 * doc/tm.texi.in: Likewise.
1990 * final.c (struct label_alignment): Remove not used structure.
1991 (LABEL_ALIGN): Change type to align_flags.
1992 (LOOP_ALIGN): Likewise.
1993 (JUMP_ALIGN): Likewise.
1994 (default_loop_align_max_skip): Remove.
1995 (default_label_align_max_skip): Likewise.
1996 (default_jump_align_max_skip): Likewise.
1997 (default_label_align_after_barrier_max_skip):
1998 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1999 (LABEL_TO_MAX_SKIP): Remove.
2000 (label_to_alignment): Return align_flags type instead of integer.
2001 (label_to_max_skip): Remove.
2002 (align_fuzz): Use align_flags type.
2003 (compute_alignments): Use align_flags type and use align_flags::max
2004 to combine multiple alignments.
2005 (grow_label_align): Grow vec instead of C array.
2006 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2007 (shorten_branches): Use align_flags type and use align_flags::max
2008 to combine multiple alignments.
2009 (final_scan_insn_1): Remove usage of secondary alignment that comes
2010 from label alignment, but instead use proper secondary alignment
2011 which is computed in grow_label_align.
2012 * flags.h (struct align_flags_tuple): Move to align.h.
2013 (struct align_flags): Likewise.
2014 (state_align_loops): Rename to align_loops.
2015 (state_align_jumps): Rename to align_jumps.
2016 (state_align_labels): Rename to align_labels.
2017 (state_align_functions): Rename to align_functions.
2018 (align_loops_log): Remove.
2019 (align_jumps_log): Remove.
2020 (align_labels_log): Remove.
2021 (align_functions_log): Remove.
2022 (align_loops_max_skip): Remove.
2023 (align_jumps_max_skip): Remove.
2024 (align_labels_max_skip): Remove.
2025 (align_functions_max_skip): Remove.
2026 (align_loops_value): Remove.
2027 (align_jumps_value): Remove.
2028 (align_labels_value): Remove.
2029 (align_functions_value): Remove.
2030 * output.h (label_to_alignment): Change return type to align_flags.
2031 (label_to_max_skip): Remove.
2032 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2033 jump_align_max_skip macros.
2034 * targhooks.h (default_loop_align_max_skip): Remove.
2035 (default_label_align_max_skip): Likewise.
2036 (default_jump_align_max_skip): Likewise.
2037 (default_label_align_after_barrier_max_skip): Remove.
2038 * toplev.c (read_log_maxskip): Use ::normalize function.
2039 (parse_N_M): Remove not used argument and also call ::normalize.
2040 (parse_alignment_opts): Do not pass unused arguments.
2041 * varasm.c (assemble_start_function): Use directly align_functions
2042 instead of removed macros.
2043 * system.h: Do not poison removed macros.
2044
2045 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2046
2047 PR middle-end/86539
2048 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2049 and cond temporaries don't have reference type if iterator has
2050 pointer type. For init use &for_pre_body instead of pre_p if
2051 for_pre_body is non-empty.
2052
2053 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2054
2055 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2056 double-double modes to SFmode directly directly.
2057 (trunc<mode>sf2_fprs): Delete.
2058
2059 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2060
2061 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2062 for conversions between IFmode and the decimal floating point modes.
2063 (init_float128_ieee): Use the correct names for conversions between
2064 KFmode and the decimal floating point modes.
2065
2066 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2067
2068 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2069 for the conversions between TDmode and IFmode.
2070 (init_float128_ieee): Use more correct names for the conversions
2071 between TDmode and KFmode.
2072
2073 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2074
2075 PR tree-optimization/86526
2076 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2077 (inline_expand_builtin_string_cmp): Likewise.
2078 (inline_string_cmp): Likewise. Use c_readstr instead of
2079 builtin_memcpy_read_str. Add unit_mode temporary.
2080
2081 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2082
2083 PR middle-end/86528
2084 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2085 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2086
2087 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2088
2089 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2090 Alphabetize prototypes of built-in functions, separating out
2091 built-in functions that are listed in this section but should be
2092 described elsewhere.
2093
2094 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2095
2096 PR target/86511
2097 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2098 conditional move when trapping comparison was split to a
2099 non-trapping one (and vice versa).
2100
2101 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2102
2103 * config/s390/s390.c (s390_function_profiler): Generate nops
2104 instead of profiler call sequences.
2105 * config/s390/s390.opt: Add the new option.
2106
2107 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2108
2109 * config/s390/s390.c (s390_function_profiler): Generate
2110 __mcount_loc section.
2111 * config/s390/s390.opt: Add the new option.
2112
2113 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2114
2115 * common.opt: Add the new warning.
2116 * config/s390/s390.c (s390_function_profiler): Emit "brasl
2117 %r0,__fentry__" when -mfentry is specified.
2118 (s390_option_override_internal): Disallow -mfentry for 31-bit
2119 CPUs.
2120 * config/s390/s390.opt: Add the new option.
2121
2122 2018-07-16 Richard Biener <rguenther@suse.de>
2123
2124 PR lto/86523
2125 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2126 for function-local FUNCTION_DECL and RESULT_DECL immediately.
2127
2128 2018-07-16 Martin Liska <mliska@suse.cz>
2129
2130 PR ipa/86529
2131 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2132 to ::get_create.
2133
2134 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2135
2136 * config/arc/arcHS.md: Update ARCHS scheduling rules.
2137
2138 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2139
2140 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2141 for ARCHS4x.
2142 * config/arc/arc-cpus.def (hs4x): New cpu.
2143 (hs4xd): Likewise.
2144 * config/arc/arc-tables.opt: Regenerate.
2145 * config/arc/arc.c (arc_sched_issue_rate): New function.
2146 (TARGET_SCHED_ISSUE_RATE): Define.
2147 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2148 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2149 fpu_cvt.
2150 (attr tune): Add ARCHS4x tune values.
2151 (attr tune_dspmpy): Define.
2152 (*tst): Correct instruction type.
2153 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2154 * config/arc/arcHS4x.md: New file.
2155 * config/arc/fpu.md: Update instruction type attributes.
2156 * config/arc/t-multilib: Regenerate.
2157
2158 2018-07-16 Tom de Vries <tdevries@suse.de>
2159
2160 PR debug/86455
2161 * var-tracking.c (vt_initialize): Fix pre_dec handling.
2162
2163 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2164
2165 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2166 early clobber.
2167
2168 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
2169
2170 PR tree-optimization/86514
2171 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2172 conversion to a boolean type from a type with greater precision.
2173
2174 2018-07-16 Tom de Vries <tdevries@suse.de>
2175
2176 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2177 dump_flags request TDF_SLIM.
2178
2179 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2180
2181 * fold-const.c (int_const_binop_1): Abstract...
2182 (wide_int_binop): ...wide int code here.
2183 (poly_int_binop): ...poly int code here.
2184 Abstract the rest of int_const_binop_1 into int_const_binop.
2185 * fold-const.h (wide_int_binop): New.
2186 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2187 Remove useless PLUS/MINUS_EXPR case.
2188 (zero_nonzero_bits_from_vr): Move wide int code...
2189 (zero_nonzero_bits_from_bounds): ...here.
2190 (extract_range_from_binary_expr_1): Move mask optimization code...
2191 (range_easy_mask_min_max): ...here.
2192 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2193 (range_easy_mask_min_max): New.
2194
2195 2018-07-15 Jeff Law <law@redhat.com>
2196
2197 PR target/85993
2198 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2199 block.
2200
2201 2018-07-14 Jim Wilson <jimw@sifive.com>
2202
2203 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2204
2205 2018-07-14 Paul Koning <ni1d@arrl.net>
2206
2207 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2208
2209 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2210
2211 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2212 copying section.
2213
2214 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2215 Steve Munroe <munroesj52@gmail.com>
2216
2217 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2218 (_mm_andnot_si128): Likewise.
2219 (_mm_or_si128): Likewise.
2220 (_mm_xor_si128): Likewise.
2221
2222 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2223
2224 PR middle-end/78809
2225 * builtins.c (expand_builtin_memcmp): Inline the calls first
2226 when result_eq is false.
2227 (expand_builtin_strcmp): Inline the calls first.
2228 (expand_builtin_strncmp): Likewise.
2229 (inline_string_cmp): New routine. Expand a string compare
2230 call by using a sequence of char comparison.
2231 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2232 a call to str(n)cmp/memcmp.
2233 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2234 New option.
2235 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2236
2237 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2238
2239 * config/arm/driver-arm.c: Include arm-native.h.
2240 (host_detect_local_cpu): Use auto-generated data tables.
2241 (vendors, arm_cpu_table): Delete. Move part information to ...
2242 * config/arm/arm-cpus.in: ... here.
2243 * config/arm/parsecpu.awk (gen_native): New function.
2244 (vendor, part): New CPU fields.
2245 (END): Add support for building the native CPU detection tables.
2246 * config/arm/t-arm (arm-native.h): Add build rule.
2247 (driver-arm.o): Add dependency on arm-native.h.
2248
2249 2018-07-13 Richard Biener <rguenther@suse.de>
2250
2251 PR middle-end/85974
2252 * match.pd (addr1 - addr2): Allow either of the operand to
2253 have a conversion.
2254
2255 2018-07-13 Tom de Vries <tdevries@suse.de>
2256
2257 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2258 in remap_ssa_name.
2259
2260 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2261
2262 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2263 arrays instead of numbered variables.
2264
2265 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2266
2267 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2268 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2269
2270 2018-07-13 Richard Biener <rguenther@suse.de>
2271
2272 PR debug/86452
2273 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2274 instead of get_context_die.
2275
2276 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2277 Richard Biener <rguenther@suse.de>
2278
2279 PR middle-end/86489
2280 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2281 that the loop latch destination where phi is defined.
2282
2283 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2284
2285 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2286 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2287 (riscv_set_current_function): Extract getting interrupt type to new
2288 function.
2289 (riscv_get_interrupt_type): New function.
2290 (riscv_merge_decl_attributes): New function, checking interrupt type is
2291 same.
2292 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2293
2294 2018-07-12 Paul Koning <ni1d@arrl.net>
2295
2296 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2297 directive.
2298
2299 2018-07-12 Paul Koning <ni1d@arrl.net>
2300
2301 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2302 zero reference, add doloop_end instead.
2303 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2304 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2305 detail for doloop_end.
2306
2307 2018-07-12 Martin Sebor <msebor@redhat.com>
2308
2309 PR c/86453
2310 * attribs.c (decl_attributes): Reject conflicting attributes before
2311 calling attribute handlers.
2312
2313 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2314
2315 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2316 parameter.
2317 (gcc::dump_manager::get_dump_file_name): likewise.
2318 (dump_begin): Likewise.
2319 * dumpfile.h (dump_begin): Update prototype.
2320 (gcc::dump_manager::get_dump_file_name,
2321 gcc::dump_manager::get_dump_file_name): Update prototype.
2322
2323 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2324
2325 * internal-fn.h (vectorizable_internal_fn_p): New function.
2326 * tree-vect-slp.c (compatible_calls_p): Likewise.
2327 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2328 to internal functions.
2329 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2330
2331 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2332
2333 * fold-const.h (inverse_conditions_p): Declare.
2334 * fold-const.c (inverse_conditions_p): New function.
2335 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2336 that test the inverse condition of a conditional internal function.
2337 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2338 * internal-fn.c (internal_fn_mask_index): Handle conditional
2339 internal functions.
2340 (vectorized_internal_fn_supported_p): New function.
2341 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2342 (any_pred_load_store): Replace with...
2343 (need_to_predicate): ...this new variable.
2344 (redundant_ssa_names): New variable.
2345 (ifcvt_can_use_mask_load_store): Move initial checks to...
2346 (ifcvt_can_predicate): ...this new function. Handle tree codes
2347 for which a conditional internal function exists.
2348 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2349 instead of ifcvt_can_use_mask_load_store. Update after variable
2350 name change.
2351 (predicate_load_or_store): New function, split out from
2352 predicate_mem_writes.
2353 (check_redundant_cond_expr): New function.
2354 (value_available_p): Likewise.
2355 (predicate_rhs_code): Likewise.
2356 (predicate_mem_writes): Rename to...
2357 (predicate_statements): ...this. Use predicate_load_or_store
2358 and predicate_rhs_code.
2359 (combine_blocks, tree_if_conversion): Update after above name changes.
2360 (ifcvt_local_dce): Handle redundant_ssa_names.
2361 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2362 general conditional functions.
2363 * tree-vect-stmts.c (vectorizable_call): Likewise.
2364
2365 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2366 Alan Hayward <alan.hayward@arm.com>
2367 David Sherwood <david.sherwood@arm.com>
2368
2369 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2370 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2371 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2372 plus and minus and convert them into IFN_COND_FMA-based sequences.
2373 (convert_mult_to_fma): Handle conditional plus and minus.
2374
2375 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2376
2377 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2378 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2379 (cond_fnms_optab): New optabs.
2380 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2381 internal functions.
2382 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2383 * internal-fn.h (get_conditional_internal_fn): Declare.
2384 (get_unconditional_internal_fn): Likewise.
2385 * internal-fn.c (cond_ternary_direct): New macro.
2386 (expand_cond_ternary_optab_fn): Likewise.
2387 (direct_cond_ternary_optab_supported_p): Likewise.
2388 (FOR_EACH_COND_FN_PAIR): Likewise.
2389 (get_conditional_internal_fn): New function.
2390 (get_unconditional_internal_fn): Likewise.
2391 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2392 (gimple_match_op::gimple_match_op): Add a new overload for 5
2393 operands.
2394 (gimple_match_op::set_op): Likewise.
2395 (gimple_resimplify5): Declare.
2396 * genmatch.c (decision_tree::gen): Generate simplifications for
2397 5 operands.
2398 * gimple-match-head.c (gimple_simplify): Define an overload for
2399 5 operands. Handle calls with 5 arguments in the top-level overload.
2400 (convert_conditional_op): Handle conversions from unconditional
2401 internal functions to conditional ones.
2402 (gimple_resimplify5): New function.
2403 (build_call_internal): Pass a fifth operand.
2404 (maybe_push_res_to_seq): Likewise.
2405 (try_conditional_simplification): Try converting conditional
2406 internal functions to unconditional internal functions.
2407 Handle 3-operand unconditional forms.
2408 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2409 Define ternary equivalents of the current rules for binary conditional
2410 internal functions.
2411 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2412 ternary operations.
2413 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2414 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2415 (optab): Handle them.
2416 (SVE_COND_FP_TERNARY): New int iterator.
2417 (sve_fmla_op, sve_fmad_op): New int attributes.
2418 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2419 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2420 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2421
2422 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2423
2424 * target.def (preferred_else_value): New target hook.
2425 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2426 * doc/tm.texi: Regenerate.
2427 * targhooks.h (default_preferred_else_value): Declare.
2428 * targhooks.c (default_preferred_else_value): New function.
2429 * internal-fn.h (conditional_internal_fn_code): Declare.
2430 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2431 (get_conditional_internal_fn): Use it.
2432 (conditional_internal_fn_code): New function.
2433 * gimple-match.h (gimple_match_cond): New struct.
2434 (gimple_match_op): Add a cond member function.
2435 (gimple_match_op::gimple_match_op): Update all forms to take a
2436 gimple_match_cond.
2437 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2438 for the suboperation, but don't specify a particular else_value.
2439 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2440 (visit_nary_op, visit_reference_op_load): Pass
2441 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2442 * gimple-match-head.c: Include tree-eh.h
2443 (convert_conditional_op): New function.
2444 (maybe_resimplify_conditional_op): Likewise.
2445 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2446 (gimple_resimplify2): Likewise.
2447 (gimple_resimplify3): Likewise.
2448 (gimple_resimplify4): Likewise.
2449 (maybe_push_res_to_seq): Return null for conditional operations.
2450 (try_conditional_simplification): New function.
2451 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2452 constructor.
2453 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2454 IFN_COND_* call.
2455 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2456 function.
2457 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2458
2459 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2460
2461 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2462 DECL_FCONTEXT
2463 (hash_tree): Do not hash DECL_FCONTEXT
2464 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2465 Do not stream DECL_FCONTEXT.
2466 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2467 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2468
2469 2018-07-12 Richard Biener <rguenther@suse.de>
2470
2471 PR debug/86462
2472 * dwarf2out.c (gen_block_die): Only output blocks when they have
2473 at least one !DECL_IGNORED_P variable.
2474
2475 2018-07-12 Richard Biener <rguenther@suse.de>
2476
2477 PR target/84829
2478 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2479 Remove -mieee-fp handling.
2480
2481 2018-07-12 Richard Biener <rguenther@suse.de>
2482
2483 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2484 left-over from last patch.
2485
2486 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2487
2488 PR tree-optimization/86492
2489 * gimple-ssa-store-merging.c
2490 (imm_store_chain_info::coalesce_immediate_stores): Call
2491 check_no_overlap even for the merge_overlapping case. Formatting fix.
2492
2493 2018-07-12 Richard Biener <rguenther@suse.de>
2494
2495 PR middle-end/86479
2496 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2497 move possibly trapping operations into the conditional.
2498
2499 2018-07-12 Richard Biener <rguenther@suse.de>
2500
2501 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2502 (vn_lookup_simplify_result): Remove recursion limit applied
2503 here.
2504 (vn_nary_build_or_lookup_1): Adjust.
2505 (try_to_simplify): Likewise.
2506 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2507 here.
2508 (gimple_resimplify2): Likewise.
2509 (gimple_resimplify3): Likewise.
2510 (gimple_resimplify4): Likewise.
2511
2512 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2513
2514 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2515 Use __mmask64 type instead of __mmask8 for __M argument.
2516 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2517 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2518 __U argument.
2519 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2520 __mmask16 for __M argument.
2521 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2522 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2523 to __mmask16 instead of __mmask8.
2524 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2525 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2526 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2527 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2528 instead of __mmask16 for __U argument.
2529 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2530 __mmask16 instead of __mmask8 for __U argument.
2531 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2532 __U argument.
2533 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2534 __mmask16.
2535 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2536 argument.
2537 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2538 __U argument.
2539 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2540 __mmask16.
2541 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2542 of __mmask16.
2543 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2544 __U argument.
2545 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2546 __U argument.
2547 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2548 __U argument.
2549 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2550 __U argument.
2551 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2552 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2553 return type as well as __M argument type and all casts from __mmask8
2554 to __mmask32.
2555 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2556 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2557 return type as well as __M argument type and all casts from __mmask8
2558 to __mmask16.
2559 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2560 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2561 return type as well as __M argument type and all casts from __mmask8
2562 to __mmask32.
2563 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2564 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2565 return type as well as __M argument type and all casts from __mmask8
2566 to __mmask16.
2567 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2568 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2569 __mmask16.
2570
2571 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2572
2573 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2574 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2575 for __U argument.
2576
2577 2018-07-11 Paul Koning <ni1d@arrl.net>
2578
2579 * doc/md.texi (define_subst): Document how multiple occurrences of
2580 the same argument in the replacement pattern are handled.
2581
2582 2018-07-11 Paul Koning <ni1d@arrl.net>
2583
2584 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2585 alphabetical order.
2586 (Common Type Attributes): Add "mode" attribute.
2587
2588 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2589
2590 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2591 stream DECL_ORIGINAL_TYPE.
2592 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2593 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2594 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2595 Do not walk original type.
2596 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2597 external decls.
2598 (write_ts_decl_non_common_tree_pointers): Do not stream
2599 DECL_ORIGINAL_TYPE
2600 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2601 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2602
2603 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2604
2605 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2606 thread twice from the same starting edge.
2607
2608 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2609
2610 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2611 * gimple.c (gimple_call_nonnull_result_p): ...here...
2612 (gimple_call_nonnull_arg): ...and here.
2613 * gimple.h (gimple_call_nonnull_result_p): New.
2614 (gimple_call_nonnull_arg): New.
2615
2616 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
2617
2618 * config/arm/arm-cpus.in: Move information from fpu field of each
2619 cpu definition to the isa field.
2620 * config/arm/parsecpu.awk (fpu): Delete match rule.
2621 (gen_comm_data): Don't add bits from the CPU's FPU entry.
2622
2623 2018-07-11 Richard Biener <rguenther@suse.de>
2624
2625 PR debug/86457
2626 * dwarf2out.c (init_sections_and_labels): Use
2627 output_asm_line_debug_info consistently.
2628 (dwarf2out_early_finish): Likewise.
2629 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2630 type units.
2631
2632 2018-07-11 Richard Biener <rguenther@suse.de>
2633
2634 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2635 Rework father_bb setting in a way to avoid propagating constants
2636 multiple times on a loop body.
2637
2638 2018-07-10 Mark Wielaard <mark@klomp.org>
2639
2640 PR debug/86459
2641 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2642
2643 2018-07-10 Richard Biener <rguenther@suse.de>
2644
2645 * hash-map.h (hash_map::iterator::operator*): Return
2646 references to key and value.
2647
2648 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2649
2650 PR c++/86443
2651 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2652 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2653 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2654 (gimplify_omp_for): For composite loops, move outer
2655 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2656 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2657 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2658 TREE_LIST for both the original class iterator and the "last" helper
2659 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2660 loop, remember has_decl_expr from outer composite loops for the
2661 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2662
2663 2018-07-09 Martin Sebor <msebor@redhat.com>
2664
2665 PR middle-end/77357
2666 PR middle-end/86428
2667 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2668 accessing implicitly initialized array elements.
2669 * expr.c (string_constant): Handle string initializers of
2670 character arrays within aggregates.
2671 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2672 Store element offset. As a special case, handle zero size.
2673 (fold_nonarray_ctor_reference): Same.
2674 (fold_ctor_reference): Add argument. Store subobject offset.
2675 * gimple-fold.h (fold_ctor_reference): Add argument.
2676
2677 2018-07-09 Paul Koning <ni1d@arrl.net>
2678
2679 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2680 (pdp11_insn_cost): New function.
2681 (pdp11_md_asm_adjust): New function.
2682 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2683 (pdp11_rtx_costs): Update to match machine better.
2684 (output_addr_const_pdp11): Correct format mismatch warnings.
2685 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2686 * config/pdp11/pdp11.md: General change to add base_cost and/or
2687 length attributes for use by new pdp11_insn_cost function.
2688 (MIN_BRANCH): Correct definition.
2689 (MIN_SOB): Ditto.
2690 (doloop_end): Use standard pattern name for looping pattern.
2691 (doloop_end_nocc): New.
2692 (movsf): Add another constraint alternative.
2693 (zero_extendqihi2): Add constraint alternatives for not in place
2694 extend.
2695 (zero_extendhisi2): Remove.
2696 (shift patterns): Add CC handling variants.
2697 (bswaphi2): New.
2698 (bswapsi2): New.
2699 (rothi3): New.
2700 (define_peephole2): New peephole to recognize mov that sets CC for
2701 subsequent test.
2702
2703 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2704
2705 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2706 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2707 wi::add.
2708
2709 2018-07-09 Jakub Jelinek <jakub@redhat.com>
2710
2711 PR c/86420
2712 * real.c (real_nextafter): Return true if result is denormal.
2713
2714 2018-07-09 Martin Liska <mliska@suse.cz>
2715
2716 * common.opt: Add back wrongly removed attribute.
2717
2718 2018-07-09 Richard Biener <rguenther@suse.de>
2719
2720 PR debug/86413
2721 * dwarf2out.c (gen_block_die): For an early generated DIE
2722 always output high/low PC attributes.
2723
2724 2018-07-09 Tom de Vries <tdevries@suse.de>
2725
2726 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2727 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2728 onto VAR_DECL with abstract origin.
2729
2730 2018-07-07 Jim Wilson <jimw@sifive.com>
2731
2732 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2733
2734 2018-07-07 Tom de Vries <tdevries@suse.de>
2735
2736 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2737
2738 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
2739
2740 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2741 overflow_type.
2742 (combine_bound): Use wide-int overflow calculation instead of
2743 rolling our own.
2744 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2745 overflow_type.
2746 * fold-const.c (int_const_binop_2): Same.
2747 (extract_muldiv_1): Same.
2748 (fold_div_compare): Same.
2749 (fold_abs_const): Same.
2750 * match.pd: Same.
2751 * poly-int.h (add): Same.
2752 (sub): Same.
2753 (neg): Same.
2754 (mul): Same.
2755 * predict.c (predict_iv_comparison): Same.
2756 * profile-count.c (slow_safe_scale_64bit): Same.
2757 * simplify-rtx.c (simplify_const_binary_operation): Same.
2758 * tree-chrec.c (tree_fold_binomial): Same.
2759 * tree-data-ref.c (split_constant_offset_1): Same.
2760 * tree-if-conv.c (idx_within_array_bound): Same.
2761 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2762 * tree-ssa-phiopt.c (minmax_replacement): Same.
2763 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2764 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2765 * vr-values.c (vr_values::adjust_range_with_scev): Same.
2766 * wide-int.cc (wi::add_large): Same.
2767 (wi::mul_internal): Same.
2768 (wi::sub_large): Same.
2769 (wi::divmod_internal): Same.
2770 * wide-int.h: Change overflow type to overflow_type for neg, add,
2771 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2772 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2773 mul_internal, divmod_internal.
2774 (overflow_type): New enum.
2775 (accumulate_overflow): New.
2776
2777 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2778
2779 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2780 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2781
2782 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2783
2784 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2785 argument is checked for zero before entering loop, avoid checking again.
2786
2787 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2788
2789 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2790 * gimplify.h (generic_expr_could_trap_p): Likwise.
2791 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2792
2793 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2794
2795 PR tree-optimization/86401
2796 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2797 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2798 (fold_bit_and_mask): ... here. New helper function for match.pd.
2799 * fold-const.h (fold_bit_and_mask): Declare.
2800 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2801
2802 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2803
2804 PR target/86324
2805 * target.def (translate_mode_attribute): New hook.
2806 * targhooks.h (default_translate_mode_attribute): Declare.
2807 * targhooks.c (default_translate_mode_attribute): New function.
2808 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2809 * doc/tm.texi: Regenerate.
2810 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2811 (rs6000_translate_mode_attribute): New function.
2812
2813 2018-07-06 Paul Koning <ni1d@arrl.net>
2814
2815 * doc/md.texi (define_split): Document DONE and FAIL.
2816 (define_peephole2): Ditto.
2817
2818 2018-07-05 Jeff Law <law@redhat.com>
2819
2820 PR tree-optimization/86010
2821 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2822 both the head and tail of mem* and str* calls.
2823
2824 2018-07-05 Jim Wilson <jimw@sifive.com>
2825
2826 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2827
2828 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2829
2830 * config/aarch64/aarch64-simd.md: correct flags text for
2831 MIN_EXPR replacement.
2832
2833 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2834
2835 * configure: Regenerated.
2836
2837 2018-07-05 Carl Love <cel@us.ibm.com>
2838
2839 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2840 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2841 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2842 VSX_BUILTIN_DOUBLEL_V4SF.
2843
2844 2018-07-05 Martin Sebor <msebor@redhat.com>
2845
2846 PR c++/86400
2847 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2848 than its domain to compute its the upper bound of a char array.
2849
2850 2018-07-05 Nathan Sidwell <nathan@acm.org>
2851
2852 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2853 * doc/cpp.texi: Update comment.
2854 * doc/tm.texi: Rebuilt.
2855 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2856 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2857 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2858 headers affected by extern "C".
2859 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2860 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2861 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2862 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2863 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2864 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2865 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2866 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2867 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2868 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2869 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2870 config/sparc/sp64-elf.h, config/spu/spu.h,
2871 config/stormy16/stormy16.h, config/v850/v850.h,
2872 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2873 define NO_IMPLICIT_EXTERN_C.
2874 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2875
2876 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2877
2878 PR target/84711
2879 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2880 instead of GET_MODE_SIZE when comparing Units.
2881
2882 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2883
2884 PR target/84711
2885 * rtlanal.c (set_noop_p): Constrain on mode change,
2886 include hard-reg-set.h
2887
2888 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2889
2890 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2891
2892 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2893
2894 Revert
2895 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2896
2897 PR sanitizer/84250
2898 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2899 libasan.
2900 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2901
2902 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2903
2904 PR sanitizer/84250
2905 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2906 libasan.
2907 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2908
2909 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2910
2911 PR middle-end/86380
2912 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2913
2914 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2915
2916 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2917 neg_*_op* variables.
2918
2919 2018-07-04 Martin Liska <mliska@suse.cz>
2920
2921 * tree-switch-conversion.c: Define
2922 max_ratio_for_speed and max_ratio_for_size constants.
2923
2924 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2925 Martin Liska <mliska@suse.cz>
2926
2927 PR middle-end/66240
2928 PR target/45996
2929 PR c/84100
2930 * common.opt: Rename align options with 'str_' prefix.
2931 * common/config/i386/i386-common.c (set_malign_value): New
2932 function.
2933 (ix86_handle_option): Use it to set -falign-* options/
2934 * config/aarch64/aarch64-protos.h (struct tune_params): Change
2935 type from int to string.
2936 * config/aarch64/aarch64.c: Update default values from int
2937 to string.
2938 * config/alpha/alpha.c (alpha_override_options_after_change):
2939 Likewise.
2940 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2941 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2942 max skip conditionally.
2943 * config/i386/freebsd.h (SUBALIGN_LOG): New.
2944 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2945 max skip conditionally.
2946 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2947 max skip conditionally.
2948 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2949 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2950 max skip conditionally.
2951 * config/i386/i386.c (struct ptt): Change type from int to
2952 string.
2953 (ix86_default_align): Set default values.
2954 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2955 max skip conditionally.
2956 * config/i386/iamcu.h (SUBALIGN_LOG): New.
2957 (ASM_OUTPUT_MAX_SKIP_ALIGN):
2958 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2959 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2960 max skip conditionally.
2961 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2962 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2963 * config/i386/x86-64.h (SUBALIGN_LOG): New.
2964 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2965 max skip conditionally.
2966 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2967 * config/ia64/ia64.c (ia64_option_override): Set default values
2968 for alignment options.
2969 * config/m68k/m68k.c: Handle new str_align_* options.
2970 * config/mips/mips.c (mips_set_compression_mode): Change
2971 type of constants.
2972 (mips_option_override): Set default values for options.
2973 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2974 Likewise.
2975 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2976 Likewise.
2977 * config/rx/rx.c (rx_option_override): Likewise.
2978 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2979 (LABEL_ALIGN): Use align_labels_log.
2980 (LOOP_ALIGN): Use align_loops_align.
2981 * config/s390/s390.c (s390_asm_output_function_label): Use new
2982 macros.
2983 * config/sh/sh.c (sh_override_options_after_change):
2984 Change type of constants.
2985 * config/spu/spu.c (spu_sched_init): Likewise.
2986 * config/sparc/sparc.c (sparc_option_override): Set default
2987 values for options.
2988 * config/visium/visium.c (visium_option_override): Likewise.
2989 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2990 emit p2align format with last argument if it's not needed.
2991 * doc/invoke.texi: Document extended format of -falign-*.
2992 * final.c: Use align_labels alignment.
2993 * flags.h (struct target_flag_state): Change type to use
2994 align_flags.
2995 (struct align_flags_tuple): New.
2996 (struct align_flags): Likewise.
2997 (align_loops_log): Redefine macro to use new types.
2998 (align_loops_max_skip): Redefine macro to use new types.
2999 (align_jumps_log): Redefine macro to use new types.
3000 (align_jumps_max_skip): Redefine macro to use new types.
3001 (align_labels_log): Redefine macro to use new types.
3002 (align_labels_max_skip): Redefine macro to use new types.
3003 (align_functions_log): Redefine macro to use new types.
3004 (align_loops): Redefine macro to use new types.
3005 (align_jumps): Redefine macro to use new types.
3006 (align_labels): Redefine macro to use new types.
3007 (align_functions): Redefine macro to use new types.
3008 (align_functions_max_skip): Redefine macro to use new types.
3009 (align_loops_value): New macro.
3010 (align_jumps_value): New macro.
3011 (align_labels_value): New macro.
3012 (align_functions_value): New macro.
3013 * function.c (invoke_set_current_function_hook): Propagate
3014 alignment values from flags to global variables default in
3015 topleev.h.
3016 * ipa-icf.c (sem_function::equals_wpa): Use
3017 cl_optimization_option_eq instead of memcmp.
3018 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3019 of string types.
3020 (cl_optimization_stream_in): Likewise.
3021 * optc-save-gen.awk: Support strings in cl_optimization.
3022 * opth-gen.awk: Likewise.
3023 * opts.c (finish_options): Remove error checking of invalid
3024 value ranges.
3025 (MAX_CODE_ALIGN): Remove.
3026 (MAX_CODE_ALIGN_VALUE): Likewise.
3027 (parse_and_check_align_values): New function.
3028 (check_alignment_argument): Likewise.
3029 (common_handle_option): Use check_alignment_argument.
3030 * opts.h (parse_and_check_align_values): Declare.
3031 * toplev.c (init_alignments): Remove.
3032 (read_log_maxskip): New.
3033 (parse_N_M): Likewise.
3034 (parse_alignment_opts): Likewise.
3035 (backend_init_target): Remove usage of init_alignments.
3036 * toplev.h (parse_alignment_opts): Declare.
3037 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3038 argument.
3039 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3040 * tree.c (cl_option_hasher::equal): New.
3041 * varasm.c: Use new global macros.
3042
3043 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3044
3045 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3046 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3047 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3048 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3049 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3050 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3051 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3052 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3053 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3054 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3055 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3056 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3057 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3058
3059 2018-07-04 Martin Liska <mliska@suse.cz>
3060 Jonathan Wakely <jwakely@redhat.com>
3061
3062 * coverage.c: Use correct type.
3063 * doc/invoke.texi: Language correction.
3064
3065 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3066
3067 PR target/85620
3068 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3069 ENDBRANCH for non-tail call which may return via indirect branch.
3070 * doc/extend.texi: Document indirect_return attribute.
3071
3072 2018-07-03 Martin Sebor <msebor@redhat.com>
3073
3074 PR tree-optimization/86274
3075 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3076 precondition.
3077 (format_floating): Correct handling of infinities and NaNs.
3078
3079 2018-07-03 Martin Sebor <msebor@redhat.com>
3080
3081 * print-tree.c (print_real_cst): New function.
3082 (print_node_brief): Call it.
3083 (print_node): Ditto.
3084
3085 2018-07-03 Jeff Law <law@redhat.com>
3086
3087 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3088 into a single pattern.
3089
3090 * config/h8300/h8300.md (ors code_iterator): New.
3091 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3092 a single pattern and single splitter.
3093 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3094 (iorqi3_1, xorqi3_1): Likewise.
3095 (iorqi3, xorqi3 expanders): Similarly.
3096
3097 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3098 (movmd_internal) into a single pattern using the P mode iterator.
3099 (movmd splitters): Similarly.
3100 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3101 (movsd splitters): Similarly.
3102
3103 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3104 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3105 right table based on the size of the operand.
3106 * config/h8300/h8300.md (length_table): Corresponding changes. All
3107 references to "addb", "addw" and "addl" changed to "add".
3108 (btst patterns): Merge two variants into a single pattern.
3109 (tstqi, tsthi): Likewise.
3110 (addhi3_incdec, addsi3_incdec): Likewise.
3111 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3112 (mulhi3, mulsi3): Likewise.
3113 (udivhi3, udivsi3): Likewise.
3114 (divhi3, divsi3): Likewise.
3115 (andorqi3, andorhi3, andorsi3): Likewise.
3116
3117 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
3118
3119 PR target/85694
3120 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3121 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3122
3123 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3124
3125 PR tree-optimization/85694
3126 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3127 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3128 UNSPEC_URHADD.
3129 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3130 (<u>avg<mode>3_ceil): New patterns.
3131
3132 2018-07-03 David Malcolm <dmalcolm@redhat.com>
3133
3134 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3135 scan-tree-dump directive.
3136 * gcc.dg/vect/slp-perm-2.c: Likewise.
3137 * gcc.dg/vect/slp-perm-3.c: Likewise.
3138 * gcc.dg/vect/slp-perm-5.c: Likewise.
3139 * gcc.dg/vect/slp-perm-6.c: Likewise.
3140 * gcc.dg/vect/slp-perm-7.c: Likewise.
3141 * gcc.dg/vect/slp-perm-8.c: Likewise.
3142
3143 2018-07-03 Marek Polacek <polacek@redhat.com>
3144
3145 PR middle-end/86202
3146 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3147
3148 2018-07-03 Richard Biener <rguenther@suse.de>
3149
3150 PR ipa/86389
3151 * tree-ssa-structalias.c (find_func_clobbers): Properly
3152 handle indirect calls.
3153
3154 2018-07-03 Jeff Law <law@redhat.com>
3155
3156 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3157 (shifts): New code iterator.
3158 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3159 expander. Fix HImode handling on H8/SX.
3160 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3161 (subqi3, subhi3, subsi3 expanders): Likewise.
3162 (andqi3, andhi3, andsi3 expanders): Likewise.
3163 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3164 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3165 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3166 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3167 (zero_extendqihi2, zero_extendqisi2): Likewise.
3168 (extendqihi2, extendqisi2): Likewise.
3169 (rotlqi3, rotlhi3, rotlsi3): Likewise.
3170 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3171 (rotlqi3_1, rotlhi3_1): Likewise.
3172 (logicalhi3_sn, logicalsi3_sn): Likewise.
3173 (logicalhi3, logicalsi3): Likewise.
3174
3175 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3176
3177 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3178 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3179 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3180 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3181 type to append_pattern_def_seq instead of creating a stmt_vec_info
3182 directly.
3183 (build_mask_conversion): Likewise. Remove vinfo argument.
3184 (vect_add_conversion_to_patterm): Likewise, renaming to...
3185 (vect_add_conversion_to_pattern): ...this.
3186 (vect_recog_mask_conversion_pattern): Update call to
3187 build_mask_conversion. Pass the vector type to
3188 append_pattern_def_seq here too.
3189 (vect_recog_gather_scatter_pattern): Update call to
3190 vect_add_conversion_to_pattern.
3191
3192 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3193
3194 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3195 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3196 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3197 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3198 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3199 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3200 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3201 append_pattern_def_seq instead of new_pattern_def_seq.
3202 (vect_recog_divmod_pattern): Do both of the above.
3203 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3204 is null.
3205
3206 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3207
3208 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3209 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3210 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3211 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3212 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3213 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3214 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3215 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3216 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3217 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3218 parameter with a single stmt_vec_info.
3219 (vect_recog_func_ptr): Likewise.
3220 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3221 (vect_try_gather_scatter_pattern): ...this.
3222 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3223 the stmt_vec_info of the statement to be matched. Don't clear
3224 STMT_VINFO_RELATED_STMT.
3225 (vect_pattern_recog): Update call accordingly.
3226
3227 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3228
3229 PR tree-optimization/85694
3230 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3231 (uavgM3_ceil): Document new optabs.
3232 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3233 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3234 functions.
3235 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3236 (savg_ceil_optab): New optabs.
3237 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3238 (vect_vect_recog_func_ptrs): Add it.
3239 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3240 constant directly from the associated lhs.
3241
3242 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3243
3244 * tree-vect-patterns.c (vect_split_statement): New function.
3245 (vect_convert_input): Use it to try to split an existing cast.
3246
3247 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3248
3249 * poly-int.h (print_hex): New function.
3250 * dumpfile.h (dump_dec, dump_hex): Declare.
3251 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3252 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3253 min_input_precision, operation_precision and operation_sign.
3254 * tree-vect-patterns.c (vect_get_range_info): New function.
3255 (vect_same_loop_or_bb_p, vect_single_imm_use)
3256 (vect_operation_fits_smaller_type): Delete.
3257 (vect_look_through_possible_promotion): Add an optional
3258 single_use_p parameter.
3259 (vect_recog_over_widening_pattern): Rewrite to use new
3260 stmt_vec_info infomration. Handle one operation at a time.
3261 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3262 (vect_truncatable_operation_p, vect_set_operation_type)
3263 (vect_set_min_input_precision): New functions.
3264 (vect_determine_min_output_precision_1): Likewise.
3265 (vect_determine_min_output_precision): Likewise.
3266 (vect_determine_precisions_from_range): Likewise.
3267 (vect_determine_precisions_from_users): Likewise.
3268 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3269 (vect_vect_recog_func_ptrs): Put over_widening first.
3270 Add cast_forwprop.
3271 (vect_pattern_recog): Call vect_determine_precisions.
3272
3273 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3274
3275 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3276 statements that have been replaced by further pattern statements.
3277 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3278
3279 2018-07-03 Richard Biener <rguenther@suse.de>
3280
3281 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3282 always set *dt. Dump vectype in vectype overload.
3283 * dumpfile.h (dump_gimple_expr): New function.
3284 (dump_gimple_expr_loc): Likewise.
3285 * dumpfile.c (dump_gimple_expr): New function.
3286 (dump_gimple_expr_loc): Likewise.
3287
3288 2018-07-02 Jeff Law <law@redhat.com>
3289
3290 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3291 the H8/300, H8/300H and H8/S variants into a single pattern.
3292 (movhi_h8300, movqi_h8300hs): Similarly.
3293 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3294 (QHI mode iterator): New.
3295
3296 * config/h8300/h8300.md: Remove trailing whitespace.
3297
3298 2018-07-02 Jim Wilson <jimw@sifive.com>
3299
3300 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3301 instead of emit_insn for interrupt returns.
3302 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3303 (riscv_sret, riscv_uret): Likewise.
3304
3305 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3306
3307 * pretty-print.c (selftest::test_pp_format): Move save and restore
3308 of quotes to class auto_fix_quotes, and add an instance.
3309 * selftest.c: Include "intl.h".
3310 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3311 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3312 * selftest.h (selftest::auto_fix_quotes): New class.
3313
3314 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3315
3316 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3317 (aarch64_sve_prepare_conditional_op): Remove.
3318 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3319 Allow aarch64_simd_reg_or_zero as select operand; remove
3320 the aarch64_sve_prepare_conditional_op call.
3321 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3322 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3323 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3324 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3325 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3326 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3327 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3328 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3329 and a splitters to match all of the *_any patterns.
3330 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3331
3332 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3333 (SVE_COND_FP_BINARY_REV): Remove.
3334 (sve_int_op_rev, sve_fp_op_rev): New.
3335 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3336 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3337 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3338 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3339 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3340 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3341 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3342 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3343 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3344
3345 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3346 Remove match_dup 1 from the inner unspec.
3347 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3348
3349 * config/aarch64/aarch64.md (movprfx): New attr.
3350 (length): Default movprfx to 8.
3351 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3352 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3353 (*<su>mul<SVE_I>3_highpart): Likewise.
3354 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3355 (*v<ASHIFT><SVE_I>3): Likewise.
3356 (*<su><MAXMIN><SVE_I>3): Likewise.
3357 (*<su><MAXMIN><SVE_F>3): Likewise.
3358 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3359 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3360 (*div<SVE_F>4): Likewise.
3361
3362 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3363
3364 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3365 in dump string.
3366
3367 2018-07-02 Richard Biener <rguenther@suse.de>
3368
3369 PR tree-optimization/86363
3370 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3371 memset argument refers to a non-variable address.
3372
3373 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3374
3375 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3376 {PLUS,MINUS}_EXPR code to...
3377 (adjust_symbolic_bound): ...here,
3378 (combine_bound): ...here,
3379 (set_value_range_with_overflow): ...and here.
3380
3381 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3382
3383 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3384 code...
3385 (extract_range_from_abs_expr): ...here.
3386
3387 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3388
3389 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3390 -fno-omit-frame-pointer when not optimizing.
3391
3392 2018-07-02 Martin Liska <mliska@suse.cz>
3393
3394 PR ipa/86279
3395 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3396 (propagate_nothrow): Likewise.
3397
3398 2018-07-02 Martin Liska <mliska@suse.cz>
3399
3400 PR ipa/86323
3401 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3402
3403 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3404
3405 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3406 function in r262149, changing "loc" param from source_location to
3407 const dump_location_t &.
3408 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3409 declaration, as above.
3410
3411 2018-07-01 Paul Koning <ni1d@arrl.net>
3412
3413 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3414 -munit-asm, -mgnu-asm, -mdec-asm.
3415 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3416 (pdp11_output_labelref): New.
3417 (pdp11_output_def): New.
3418 (pdp11_output_addr_vec_elt): New.
3419 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3420 %# and %@ format codes.
3421 (pdp11_option_override): New.
3422 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3423 (pdp11_output_ident): New.
3424 (pdp11_asm_named_section): New.
3425 (pdp11_asm_init_sections): New.
3426 (pdp11_file_start): New.
3427 (pdp11_file_end): New.
3428 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3429 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3430 %o, like %c but octal.
3431 (pdp11_option_override): New.
3432 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3433 -mdec-asm.
3434 (DATA_SECTION_ASM_OP): Ditto.
3435 (READONLY_DATA_SECTION_ASM_OP): New.
3436 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3437 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3438 (ASM_OUTPUT_LABELREF): Ditto.
3439 (ASM_OUTPUT_DEF): Ditto.
3440 (ASM_OUTPUT_EXTERNAL): New.
3441 (ASM_OUTPUT_SOURCE_FILENAME): New.
3442 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3443 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3444 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3445 %# and %@ format codes.
3446 * config/pdp11/pdp11.opt (mgnu-asm): New.
3447 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3448 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3449 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3450
3451 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3452
3453 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3454 dereferencing path[] beyond its length.
3455 (debug_path): New.
3456 (debug_all_paths): New.
3457 (rewire_first_differing_edge): New.
3458 (adjust_paths_after_duplication): New.
3459 (duplicate_thread_path): Call adjust_paths_after_duplication.
3460 Add new argument.
3461 (thread_through_all_blocks): Add new argument to
3462 duplicate_thread_path.
3463
3464 2018-06-30 Jim Wilson <jimw@sifive.com>
3465
3466 * config/riscv/predicates.md (p2m1_shift_operand): New.
3467 (high_mask_shift_operand): New.
3468 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3469 pattern using p2m1_shift_operand.
3470 (lshsi3_zero_extend_3+2): New combiner pattern using
3471 high_mask_shift_operand.
3472
3473 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3474
3475 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3476 split out from...
3477 (vect_recog_rotate_pattern): ...here.
3478 (vect_convert_input): Try to insert casts of invariants in the
3479 preheader.
3480 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3481 preheader to be empty.
3482
3483 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3484
3485 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3486 vector type. If given, install it in the new statement's
3487 STMT_VINFO_VECTYPE.
3488 (vect_element_precision): New function.
3489 (vect_unpromoted_value): New struct.
3490 (vect_unpromoted_value::vect_unpromoted_value): New function.
3491 (vect_unpromoted_value::set_op): Likewise.
3492 (vect_look_through_possible_promotion): Likewise.
3493 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3494 (vect_widened_op_tree, vect_convert_input): Likewise.
3495 (vect_convert_inputs, vect_convert_output): Likewise.
3496 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3497 to handle the optional cast of the multiplication result and
3498 vect_widened_op_tree to detect the widened multiplication itself.
3499 Do not require the input and output of promotion casts to have
3500 the same sign, but base the signedness of the operation on the
3501 input rather than the result. If the pattern includes two
3502 promotions, check that those promotions have the same sign.
3503 Do not restrict the MULT_EXPR handling to a double-width result;
3504 handle quadruple-width results and wider. Use vect_convert_inputs
3505 to convert the inputs to the common type.
3506 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3507 to handle the optional cast of the ABS result. Also allow a sign
3508 change or a sign extension between the ABS and MINUS.
3509 Use vect_widened_op_tree to detect the widened subtraction and use
3510 vect_convert_inputs to convert the inputs to the common type.
3511 (vect_handle_widen_op_by_const): Delete.
3512 (vect_recog_widen_op_pattern): New function.
3513 (vect_recog_widen_mult_pattern): Use it.
3514 (vect_recog_widen_shift_pattern): Likewise.
3515 (vect_recog_widen_sum_pattern): Use
3516 vect_look_through_possible_promotion to handle the promoted
3517 PLUS_EXPR operand.
3518
3519 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3520
3521 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3522 the containing gimple_seq *.
3523 * gimple-iterator.h (gsi_for_stmt): Declare it.
3524 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3525 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3526 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3527 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3528 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3529 checks.
3530 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3531 split out from...
3532 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3533 statement being replaced is part of an existing pattern
3534 definition sequence, inserting the new pattern statements before
3535 the original one.
3536 (vect_pattern_recog_1): Don't return a bool. If the statement
3537 is already part of a pattern, instead apply pattern matching
3538 to the pattern definition statements. Don't clear the
3539 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3540 (vect_pattern_recog): Don't break after the first match;
3541 continue processing the pattern definition statements instead.
3542 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3543
3544 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3545
3546 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3547 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3548 (vect_recog_widen_sum_pattern): Use it.
3549
3550 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3551
3552 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3553 phi is not a pattern statement and has not been replaced by
3554 a pattern statement.
3555 * tree-vect-patterns.c (type_conversion_p): Don't check
3556 STMT_VINFO_IN_PATTERN_P.
3557 (vect_recog_vector_vector_shift_pattern): Likewise.
3558 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3559 the pattern statement rather than the original statement; check
3560 directly for a WIDEN_MULT_EXPR here.
3561 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3562 vect_is_simple_use to return the pattern statement rather
3563 than the original statement; use is_pattern_stmt_p to check
3564 for such a pattern statement.
3565 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3566 to return the pattern statement rather than the original statement;
3567 don't do the same transformation here.
3568 (vect_is_simple_use): If the defining statement has been replaced
3569 by a pattern statement, return the pattern statement instead.
3570 Remove the corresponding (local) transformation from the vectype
3571 overload.
3572
3573 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3574
3575 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3576 end and default to null.
3577 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3578 (vectorizable_reduction): Update calls accordingly, dropping the
3579 gimple ** argument if the passed-back statement isn't needed.
3580 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3581 (vect_recog_rotate_pattern): Likewise.
3582 (vect_recog_mask_conversion_pattern): Likewise.
3583 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3584 (vect_mask_constant_operand_p): Likewise.
3585 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3586 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3587 (get_group_load_store_type, get_load_store_type): Likewise.
3588 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3589 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3590 (vectorizable_conversion, vectorizable_assignment): Likewise.
3591 (vectorizable_shift, vectorizable_operation): Likewise.
3592 (vectorizable_store, vect_is_simple_cond): Likewise.
3593 (vectorizable_condition, vectorizable_comparison): Likewise.
3594 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3595 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3596 and move it to the end. Cope with null def_stmt_outs.
3597
3598 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3599
3600 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3601
3602 2018-06-29 Jeff Law <law@redhat.com>
3603
3604 * config/v850/v850.c (v850_legitimate_address_p): Handle large
3605 displacements for TARGET_V850E2V3 and newer.
3606 (TARGET_LRA_P): Remove. Defaults to LRA now.
3607 * config/v850/v850.md (sign23byte_load): Remove.
3608 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3609 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3610
3611 2018-06-29 Martin Liska <mliska@suse.cz>
3612
3613 PR lto/85759
3614 * coverage.c (coverage_init): Mangle full path name.
3615 * doc/invoke.texi: Document the change.
3616 * gcov-io.c (mangle_path): New.
3617 * gcov-io.h (mangle_path): Likewise.
3618 * gcov.c (mangle_name): Use mangle_path for path mangling.
3619
3620 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3621
3622 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3623 if starting source register is not even.
3624
3625 2018-06-29 Martin Liska <mliska@suse.cz>
3626
3627 PR tree-optimization/86263
3628 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3629 Make edge redirection.
3630
3631 2018-06-29 David Malcolm <dmalcolm@redhat.com>
3632
3633 * dumpfile.c (dump_loc): Add indentation based on scope depth.
3634 (dump_scope_depth): New variable.
3635 (get_dump_scope_depth): New function.
3636 (dump_begin_scope): New function.
3637 (dump_end_scope): New function.
3638 * dumpfile.h (get_dump_scope_depth): New declaration.
3639 (dump_begin_scope): New declaration.
3640 (dump_end_scope): New declaration.
3641 (class auto_dump_scope): New class.
3642 (AUTO_DUMP_SCOPE): New macro.
3643 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3644 AUTO_DUMP_SCOPE.
3645
3646 2018-06-29 Richard Biener <rguenther@suse.de>
3647
3648 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3649 compute_all_dependences succeeds.
3650 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3651 exceed --param loop-max-datarefs-for-datadeps.
3652
3653 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3654
3655 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3656
3657 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3658
3659 PR target/86348
3660 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3661 alternative 0 in preferred_for_speed attribute.
3662
3663 2018-06-28 Paul Koning <ni1d@arrl.net>
3664
3665 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3666 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3667 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3668 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3669 for shift insn patterns.
3670
3671 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3672
3673 * cgraph.c (cgraph_node::get_body): Replace assignments to
3674 "dump_file" with calls to set_dump_file.
3675 * dumpfile.c (alt_dump_file): Make static, and group with...
3676 (alt_flags): ...this definition.
3677 (dumps_are_enabled): New variable.
3678 (refresh_dumps_are_enabled): New function.
3679 (set_dump_file): New function.
3680 (set_alt_dump_file): New function.
3681 (gcc::dump_manager::dump_start): Replace assignments to
3682 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3683 set_alt_dump_file.
3684 (gcc::dump_manager::dump_finish): Likewise.
3685 * dumpfile.h (alt_dump_file): Delete decl.
3686 (dumps_are_enabled): New variable decl.
3687 (set_dump_file): New function decl.
3688 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3689 global.
3690 * tree-nested.c (lower_nested_functions): Replace assignments to
3691 "dump_file" with calls to set_dump_file.
3692
3693 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3694
3695 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3696 goto_locus of each outgoing edge of each basic block.
3697
3698 2018-06-28 Richard Biener <rguenther@suse.de>
3699
3700 * dwarf2out.c (decl_scope_table): Remove.
3701 (push_decl_scope): Likewise.
3702 (pop_decl_scope): Likewise.
3703 (gen_type_die_for_member): Do not call push/pop_decl_scope.
3704 (gen_struct_or_union_type_die): Likewise.
3705 (gen_tagged_type_die): Likewise.
3706 (dwarf2out_init): Do not initialize decl_scope_table.
3707 (dwarf2out_c_finalize): Do not free it.
3708
3709 2018-06-28 Richard Biener <rguenther@suse.de>
3710
3711 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3712 deciding whether to not re-use a DIE.
3713
3714 2018-06-28 Richard Biener <rguenther@suse.de>
3715
3716 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3717 DW_AT_abstract_origin attribute.
3718
3719 2018-06-28 Martin Liska <mliska@suse.cz>
3720
3721 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3722 Use newly introduced constants.
3723 * tree-switch-conversion.h (struct jump_table_cluster):
3724 Define max_ratio_for_size and max_ratio_for_speed.
3725
3726 2018-06-28 Martin Liska <mliska@suse.cz>
3727
3728 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3729 Add new checking assert to catch invalid state.
3730 (jump_table_cluster::can_be_handled): Handle single case
3731 clusters.
3732 (jump_table_cluster::is_beneficial): Bail out for such case.
3733 (bit_test_cluster::find_bit_tests):
3734 Add new checking assert to catch invalid state.
3735 (bit_test_cluster::can_be_handled): Handle single case
3736 clusters.
3737 (bit_test_cluster::is_beneficial): Bail out for such case.
3738 (switch_decision_tree::analyze_switch_statement):
3739 Fix comment.
3740
3741 2018-06-28 Martin Liska <mliska@suse.cz>
3742
3743 * common.opt: Introduce -completion option.
3744 * gcc.c (driver_handle_option): Handle it.
3745 (driver::main): Print completions if completion
3746 is set.
3747 * opt-suggestions.c (option_proposer::get_completions):
3748 New function.
3749 (option_proposer::suggest_completion): Likewise.
3750 (option_proposer::find_param_completions): Likewise.
3751 (verify_autocompletions): Likewise.
3752 (test_completion_valid_options): Likewise.
3753 (test_completion_valid_params): Likewise.
3754 (in_completion_p): Likewise.
3755 (empty_completion_p): Likewise.
3756 (test_completion_partial_match): Likewise.
3757 (test_completion_garbage): Likewise.
3758 (opt_proposer_c_tests): Likewise.
3759 * opt-suggestions.h: Declare new functions.
3760 * opts.c (common_handle_option): Handle OPT__completion_.
3761 * selftest-run-tests.c (selftest::run_tests): Add
3762 opt_proposer_c_tests.
3763 * selftest.c (assert_str_startswith): New.
3764 * selftest.h (assert_str_startswith): Likewise.
3765 (opt_proposer_c_tests): New.
3766 (ASSERT_STR_STARTSWITH): Likewise.
3767
3768 2018-06-28 Martin Liska <mliska@suse.cz>
3769
3770 * Makefile.in: Add opt-suggestions.o.
3771 * gcc-main.c: Include opt-suggestions.h.
3772 * gcc.c (driver::driver): Likewise.
3773 (driver::~driver): Remove m_option_suggestions.
3774 (driver::build_option_suggestions): Moved to option_proposer.
3775 (driver::suggest_option): Likewise.
3776 (driver::handle_unrecognized_options): Use option_proposer.
3777 * gcc.h (class driver): Add new memver m_option_proposer.
3778 * opt-suggestions.c: New file.
3779 * opt-suggestions.h: New file.
3780
3781 2018-06-28 Martin Liska <mliska@suse.cz>
3782
3783 * vec.h (class auto_string_vec): New (moved from auto_argvec).
3784 (auto_string_vec::~auto_string_vec): Likewise.
3785
3786 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3787
3788 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3789 prevent_decl_creation_for_types fields up and add reset_location field.
3790 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3791 statement if id->reset_location is true.
3792 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3793 id->reset_location is true.
3794 (copy_phis_for_bb): Force input_location on the arguments if
3795 id->reset_location is true.
3796 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3797 is set on the function to be inlined.
3798
3799 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3800
3801 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3802
3803 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3804
3805 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3806 registers for Pmode.
3807 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3808 hard registers for the clobbered pseudo.
3809
3810 2018-06-27 Paul Koning <ni1d@arrl.net>
3811
3812 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3813 mutually exclusive options.
3814 * config/pdp11/constraints.md (h): New constraint.
3815 (O): Update definition to match shift code generation.
3816 (D): New constraint.
3817 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3818 (CCFP): Remove.
3819 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3820 function.
3821 (output_jump): Change arguments.
3822 (pdp11_fixed_cc_regs): New function.
3823 (pdp11_cc_mode): Ditto.
3824 (pdp11_expand_shift): Ditto.
3825 (pdp11_assemble_shift): Ditto.
3826 (pdp11_small_shift): Ditto.
3827 (pdp11_branch_cost): Remove.
3828 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3829 from output.
3830 (pdp11_register_move_cost): Update for CC registers.
3831 (pdp11_rtx_costs): Add case for LSHIFTRT.
3832 (pdp11_output_jump): Add CCNZ mode conditional branches.
3833 (notice_update_cc_on_set): Remove.
3834 (pdp11_cc_mode): New function.
3835 (simple_memory_operand): Correct pre/post decrement case.
3836 (no_side_effect_operand): New function.
3837 (pdp11_regno_reg_class): Add CC_REGS class.
3838 (pdp11_fixed_cc_regs): New function.
3839 (pdp11_small_shift): New function.
3840 (pdp11_expand_shift): New function to expand shift insns.
3841 (pdp11_assemble_shift): New function to output shifts.
3842 (pdp11_branch_cost): Remove.
3843 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3844 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3845 (WCHAR_TYPE): Ditto.
3846 (PTRDIFF_TYPE): Ditto.
3847 (ADJUST_INSN_LENGTH): New macro.
3848 (FIXED_REGISTERS): Add CC registers.
3849 (CALL_USED_REGISTERS): Ditto.
3850 (reg_class): Ditto.
3851 (REG_CLASS_NAMES): Ditto.
3852 (REG_CLASS_CONTENTS): Ditto.
3853 (SELECT_CC_MODE): Use new function.
3854 (TARGET_FLAGS_REGNUM): New macro.
3855 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3856 (cc0_reg_rtx): Remove.
3857 (CC_STATUS_MDEP): Remove.
3858 (CC_STATUS_MDEFP_INIT): Remove.
3859 (CC_IN_FPU): Remove.
3860 (NOTICE_UPDATE_CC): Remove.
3861 (REGISTER_NAMES): Add CC registers.
3862 (BRANCH_COST): Change to constant 1.
3863 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3864 handling.
3865 * config/pdp11/pdp11.opt (mbcopy): Remove.
3866 (mbcopy-builtin): Remove.
3867 (mbranch-cheap): Remove.
3868 (mbranch-expensive): Remove.
3869 * config/pdp11/predicates.md (expand_shift_operand): Update to
3870 match shift code generation.
3871 (ccnz_operator): New predicate.
3872 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3873 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3874 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3875 exclusive options.
3876 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3877 description of O constraint.
3878
3879 2018-06-27 Jeff Law <law@redhat.com>
3880 Austin Law <austinklaw@gmail.com>
3881
3882 * config/v850/v850.md (addsi3_set_flags): New pattern.
3883 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3884 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3885 (zero_extendhisi2_v850_set_flags): Likewise.
3886 (zero_extendqisi2_v850_set_flags): Likewise.
3887 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3888 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3889 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3890
3891 * config/v850/v850-protos.h (notice_update_cc): Remove.
3892 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3893 (v850_print_operand): Handle 'D' and "d".
3894 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3895 Add handling of arithmetic/logical operations compared against zero.
3896 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3897 Do not look at v850_compare_op, instead get mode from last argument.
3898 (v850_gen_compare): Remove
3899 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3900 after reload for prologue insns.
3901 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3902 patterns.
3903 (construct_save_jarl): Likewise.
3904 (TARGET_FLAGS_REGNUM): Define.
3905 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3906 (NOTICE_UPDATE_CC): Remove.
3907 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3908 than cc0. Conditionalize on reload_completed.
3909 (cmpsi_insn, setfcc_insn): Likewise.
3910 (tst1 splitter): Turn into define_and_split which sets the flags
3911 after reload.
3912 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3913 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3914 (cstoresf4, cstoredf4): Clobber the flags.
3915 (cmpsi, cmpsf, cmpdf): Remove expanders.
3916 (setf_insn): Remove pattern.
3917 (addsi3): Turn into define_and_split which clobbers the flags after
3918 reload and a suitable pattern (addsi3_clobber_flags) for use after
3919 reload.
3920 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3921 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3922 (ashrsi3, ashrsi3_v850e2): Likewise.
3923 (bins): Clobber the flags.
3924 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3925 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3926 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3927 (call_value_internal_short, call_value_internal_long): Likewise.
3928 (callt_save_interrupt, callt_return_interrupt): Likewise.
3929 (save_interrupt, return_interrupt): Likewise.
3930 (callt_save_all_interrupt, save_all_interrupt): Likewise.
3931 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3932 (restore_all_interrupt, _restore_all_interrupt): Likewise.
3933 (All FP comparisons): Only allow after reload has completed.
3934 (trfsr): Likewise.
3935 (divh, divhu): Tweak output template.
3936 (branch_z_normal, branch_z_invert): Remove
3937 (branch_nz_normal, branch_nz_invert): Likewise.
3938 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3939
3940 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3941 * config/v850/v850.c (notice_update_cc): Remove.
3942 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
3943 (CC_NO_CARRY): Likewise.
3944 (NOTICE_UPDATE_CC): Define to nothing.
3945 * config/v850/v850.md: Remove block comment on cc0 handling
3946 Remove "cc" attribute from all patterns. Remove cc_status handling
3947 from all patterns. Minor formatting fixes.
3948
3949 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3950
3951 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3952 (cortex-a76.cortex-a55): Likewise.
3953 * config/aarch64/aarch64-tune.md: Regenerate.
3954 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3955 cortex-a76.cortex-a55.
3956
3957 2018-06-27 Jeff Law <law@redhat.com>
3958
3959 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3960 (MULTILIB_DIRNAMES): Similarly.
3961
3962 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
3963
3964 * gimple.h (gimple_return_retbnd): Delete.
3965 (gimple_return_set_retbnd): Likewise.
3966 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3967 gimple_return_set_retbnd.
3968 * gimple-pretty-print.c (dump_gimple_return): Remove call to
3969 gimple_return_retbnd and adjust.
3970 * tree-inline.h (struct copy_body_data): Remove retbnd field.
3971 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3972 Explicitly return NULL in a couple more cases. Move assertion
3973 on debug statements and remove unreachable code.
3974 (reset_debug_binding): Do not test id->retbnd.
3975 (expand_call_inline): Do not set it.
3976
3977 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3978
3979 * configure.ac: Add --disable-gcov option.
3980 * configure: Regenerate.
3981 * Makefile.in: Honour @enable_gcov@.
3982 * doc/install.texi: Document --disable-gcov.
3983
3984 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3985
3986 * config/arm/arm-cpus.in (cortex-a76): New entry.
3987 (cortex-a76.cortex-a55): Likewise.
3988 * config/arm/arm-tables.opt: Regenerate.
3989 * config/arm/arm-tune.md: Likewise.
3990 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3991 * doc/invoke.texi (ARM Options): Document cortex-a76 and
3992 cortex-a76.cortex-a55.
3993
3994 2018-06-27 Tamar Christina <tamar.christina@arm.com>
3995
3996 PR target/85769
3997 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3998
3999 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4000
4001 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4002 comment.
4003 (EPILOGUE_USES): Likewise.
4004
4005 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4006
4007 * tree-inline.c (remap_location): New function extracted from...
4008 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4009 (copy_phis_for_bb): ...here. Call remap_location.
4010 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4011
4012 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4013
4014 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4015 unaligned vsx for 16B memset.
4016
4017 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4018
4019 PR target/86285
4020 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4021 ieee128_float_type_node to long_double_type_node unless
4022 TARGET_LONG_DOUBLE_128 is set.
4023
4024 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4025
4026 * cfgloop.c (get_loop_location): Convert return type from
4027 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4028 by implicit construction from rtx_insn *, and using
4029 dump_user_location_t::from_function_decl for the fallback case.
4030 * cfgloop.h (get_loop_location): Convert return type from
4031 location_t to dump_user_location_t.
4032 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4033 dump_printf_loc to pass in a dump_location_t rather than a
4034 location_t, via the gimple stmt.
4035 * coverage.c (get_coverage_counts): Update calls to
4036 dump_printf_loc to pass in dump_location_t rather than a
4037 location_t.
4038 * doc/optinfo.texi (Dump types): Convert example of
4039 dump_printf_loc from taking "locus" to taking "insn". Update
4040 description of the "_loc" calls to cover dump_location_t.
4041 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4042 "selftest.h".
4043 (dump_user_location_t::dump_user_location_t): New constructors,
4044 from gimple *stmt and rtx_insn *.
4045 (dump_user_location_t::from_function_decl): New function.
4046 (dump_loc): Make static.
4047 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4048 const dump_location_t &.
4049 (dump_generic_expr_loc): Delete.
4050 (dump_printf_loc): Convert param "loc" from location_t to
4051 const dump_location_t &.
4052 (selftest::test_impl_location): New function.
4053 (selftest::dumpfile_c_tests): New function.
4054 * dumpfile.h: Include "profile-count.h".
4055 (class dump_user_location_t): New class.
4056 (struct dump_impl_location_t): New struct.
4057 (class dump_location_t): New class.
4058 (dump_printf_loc): Convert 2nd param from source_location to
4059 const dump_location_t &.
4060 (dump_generic_expr_loc): Delete.
4061 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4062 const dump_location_t &.
4063 * gimple-fold.c (fold_gimple_assign): Update call to
4064 dump_printf_loc to pass in a dump_location_t rather than a
4065 location_t, via the gimple stmt.
4066 (gimple_fold_call): Likewise.
4067 * gimple-loop-interchange.cc
4068 (loop_cand::analyze_iloop_reduction_var): Update for change to
4069 check_reduction_path.
4070 (tree_loop_interchange::interchange): Update for change to
4071 find_loop_location.
4072 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4073 change in return-type of find_loop_location.
4074 (graphite_regenerate_ast_isl): Likewise.
4075 * graphite-optimize-isl.c (optimize_isl): Likewise.
4076 * graphite.c (graphite_transform_loops): Likewise.
4077 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4078 pass in a dump_location_t rather than a location_t, via the
4079 gimple stmt.
4080 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4081 * ipa.c (walk_polymorphic_call_targets): Likewise.
4082 * loop-unroll.c (report_unroll): Convert "locus" param from
4083 location_t to dump_location_t.
4084 (decide_unrolling): Update for change to get_loop_location's
4085 return type.
4086 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4087 location_t to dump_user_location_t.
4088 (grid_find_single_omp_among_assignments_1): Updates calls to
4089 dump_printf_loc to pass in a dump_location_t rather than a
4090 location_t, via the gimple stmt.
4091 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4092 location_t to dump_location_t. Updates calls to dump_printf_loc
4093 to pass in a dump_location_t rather than a location_t, via the
4094 gimple stmt.
4095 (grid_inner_loop_gridifiable_p): Likewise.
4096 (grid_dist_follows_simple_pattern): Likewise.
4097 (grid_gfor_follows_tiling_pattern): Likewise.
4098 (grid_target_follows_gridifiable_pattern): Likewise.
4099 (grid_attempt_target_gridification): Convert initialization
4100 of local "grid" from memset to zero-initialization; FIXME: does
4101 this require C++11? Update call to dump_printf_loc to pass in a
4102 optinfo_location rather than a location_t, via the gimple stmt.
4103 * profile.c (read_profile_edge_counts): Updates call to
4104 dump_printf_loc to pass in a dump_location_t rather than a
4105 location_t
4106 (compute_branch_probabilities): Likewise.
4107 * selftest-run-tests.c (selftest::run_tests): Call
4108 dumpfile_c_tests.
4109 * selftest.h (dumpfile_c_tests): New decl.
4110 * tree-loop-distribution.c (pass_loop_distribution::execute):
4111 Update for change in return type of find_loop_location.
4112 * tree-parloops.c (parallelize_loops): Likewise.
4113 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4114 "locus" from location_t to dump_user_location_t.
4115 (canonicalize_loop_induction_variables): Likewise.
4116 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4117 for change in return type of find_loop_location.
4118 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4119 to dump_printf_loc to pass in a dump_location_t rather than a
4120 location_t, via the stmt.
4121 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4122 Likewise.
4123 * tree-vect-loop-manip.c (find_loop_location): Convert return
4124 type from source_location to dump_user_location_t.
4125 (vect_do_peeling): Update for above change.
4126 (vect_loop_versioning): Update for change in type of
4127 vect_location.
4128 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4129 from location_t to dump_user_location_t.
4130 (vect_estimate_min_profitable_iters): Update for change in type
4131 of vect_location.
4132 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4133 location_t to dump_location_t.
4134 (vect_slp_bb): Update for change in type of vect_location.
4135 * tree-vectorizer.c (vect_location): Convert from source_location
4136 to dump_user_location_t.
4137 (try_vectorize_loop_1): Update for change in vect_location's type.
4138 (vectorize_loops): Likewise.
4139 (increase_alignment): Likewise.
4140 * tree-vectorizer.h (vect_location): Convert from source_location
4141 to dump_user_location_t.
4142 (find_loop_location): Convert return type from source_location to
4143 dump_user_location_t.
4144 (check_reduction_path): Convert 1st param from location_t to
4145 dump_user_location_t.
4146 * value-prof.c (check_counter): Update call to dump_printf_loc to
4147 pass in a dump_user_location_t rather than a location_t; update
4148 call to error_at for change in type of "locus".
4149 (check_ic_target): Update call to dump_printf_loc to
4150 pass in a dump_user_location_t rather than a location_t, via the
4151 call_stmt.
4152
4153 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
4154
4155 * config/s390/s390.h (enum processor_flags): Do not use
4156 default tune parameter when -march was specified.
4157
4158 2018-06-26 Jakub Jelinek <jakub@redhat.com>
4159
4160 PR target/86314
4161 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4162 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4163 operands.
4164
4165 2018-06-26 Richard Biener <rguenther@suse.de>
4166
4167 PR tree-optimization/86287
4168 PR bootstrap/86316
4169 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4170 (vect_analyze_loop): Initialize n_stmts.
4171
4172 2018-06-26 Richard Biener <rguenther@suse.de>
4173
4174 PR middle-end/86271
4175 * fold-const.c (fold_convertible_p): Pointer extension
4176 isn't valid.
4177
4178 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4179
4180 PR debug/86064
4181 * dwarf2out.c (loc_list_has_views): Adjust comments.
4182 (dw_loc_list): Split single cross-partition range with
4183 nonzero locview.
4184
4185 2018-06-25 Jeff Law <law@redhat.com>
4186
4187 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4188 on -mbig-switch by default.
4189
4190 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4191 test.
4192 (const_float_0_operand): Remove unused predicate.
4193 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4194 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4195 (recipsf2): New expander. Original pattern now called
4196 (recipsf2_insn).
4197 (recipdf2, recipdf2_insn): Similarly.
4198 (rsqrtsf2, rsqrtsf2_insn): Similarly
4199 (rsqrtdf2, rsqrtdf2_insn): Similarly
4200
4201 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4202
4203 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4204 Simplify logic for FreeBSD (twice).
4205
4206 2018-06-25 Martin Sebor <msebor@redhat.com>
4207
4208 PR tree-optimization/86204
4209 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4210 a strnlen result if it's less than the length of the string.
4211
4212 2018-06-25 Martin Sebor <msebor@redhat.com>
4213
4214 PR tree-optimization/85700
4215 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4216 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4217 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4218
4219 2018-06-25 Martin Sebor <msebor@redhat.com>
4220
4221 * doc/extend.texi (Zero-length arrays): Update and clarify.
4222
4223 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4224
4225 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4226 added IEEE/IBM long double multilib support on PowerPC little
4227 endian Linux systems.
4228 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4229 (MULTILIB_DEFAULTS): Likewise.
4230 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4231 Likewise.
4232 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4233 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4234 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4235
4236 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4237
4238 PR middle-end/86311
4239 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4240 (REORDER_45): Likewise.
4241
4242 2018-06-25 Jeff Law <law@redhat.com>
4243
4244 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4245 dividend to 32 bits. Adjust length.
4246 (udivmodhi4): Cleanup output template. Fix length.
4247
4248 2018-06-25 Carl Love <cel@us.ibm.com>
4249
4250 * config/rs6000/vsx.md: Change word selector to prefered location.
4251
4252 2018-06-25 Richard Biener <rguenther@suse.de>
4253
4254 PR tree-optimization/86304
4255 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4256 epilogue-if-converted loops as well.
4257
4258 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4259
4260 * lto-section-out.c (lto_begin_section): Do not print section
4261 name for noaddr and unnumbered dumps.
4262
4263 2018-06-25 Richard Biener <rguenther@suse.de>
4264
4265 * tree-vectorizer.h (struct vec_info_shared): New structure
4266 with parts split out from struct vec_info and loop_nest from
4267 struct _loop_vec_info.
4268 (struct vec_info): Adjust accordingly.
4269 (struct _loop_vec_info): Likewise.
4270 (LOOP_VINFO_LOOP_NEST): Adjust.
4271 (LOOP_VINFO_DATAREFS): Likewise.
4272 (LOOP_VINFO_DDRS): Likewise.
4273 (struct _bb_vec_info): Likewise.
4274 (BB_VINFO_DATAREFS): Likewise.
4275 (BB_VINFO_DDRS): Likewise.
4276 (struct _stmt_vec_info): Add dr_aux member.
4277 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4278 (DR_MISALIGNMENT_UNINITIALIZED): New.
4279 (set_dr_misalignment): Adjust.
4280 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4281 (vect_analyze_loop): Adjust prototype.
4282 (vect_analyze_loop_form): Likewise.
4283 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4284 Compute dependences lazily.
4285 (vect_record_base_alignments): Use shared datarefs/ddrs.
4286 (vect_verify_datarefs_alignment): Likewise.
4287 (vect_analyze_data_refs_alignment): Likewise.
4288 (vect_analyze_data_ref_accesses): Likewise.
4289 (vect_analyze_data_refs): Likewise.
4290 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4291 constructor parameter for shared part.
4292 (vect_analyze_loop_form): Pass in shared part and adjust.
4293 (vect_analyze_loop_2): Pass in storage for the number of
4294 stmts. Move loop nest finding to the caller. Compute
4295 datarefs lazily.
4296 (vect_analyze_loop): Pass in shared part.
4297 (vect_transform_loop): Verify shared datarefs are unchanged.
4298 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4299 constructor parameter for shared part.
4300 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4301 (vect_slp_bb): Verify shared datarefs are unchanged before
4302 transform.
4303 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4304 change.
4305 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4306 DR_MISALIGNMENT_UNINITIALIZED.
4307 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4308 parameter for shared part.
4309 (vec_info::~vec_info): Adjust.
4310 (vec_info_shared::vec_info_shared): New.
4311 (vec_info_shared::~vec_info_shared): Likewise.
4312 (vec_info_shared::save_datarefs): Likewise.
4313 (vec_info_shared::check_datarefs): Likewise.
4314 (try_vectorize_loop_1): Construct shared part live for analyses
4315 of a single loop for multiple vector sizes.
4316 * tree-parloops.c (gather_scalar_reductions): Adjust.
4317
4318 2018-06-25 Richard Biener <rguenther@suse.de>
4319
4320 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4321 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4322 (vect_analyze_data_refs): Remove similar code from here and
4323 simplify accordingly.
4324
4325 2018-06-25 Richard Biener <rguenther@suse.de>
4326
4327 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4328 for reverse storage order accesses rather than asserting
4329 they cannot happen here.
4330
4331 2018-06-25 Tom de Vries <tdevries@suse.de>
4332
4333 PR debug/86257
4334 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4335 Use data16 instead of .byte for insn prefix.
4336
4337 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4338
4339 PR C++/86082
4340 * parser.c (make_char_string_pack): Pass this literal chars
4341 through cpp_interpret_string.
4342 (cp_parser_userdef_numeric_literal): Check the result of
4343 make_char_string_pack.
4344
4345 2018-06-24 Maya Rashish <coypu@sdf.org>
4346
4347 * ginclude/stddef.h: Simplify conditions around avoiding
4348 re-definition of __size_t.
4349
4350 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4351
4352 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4353 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4354
4355 2018-06-22 Maya Rashish <coypu@sdf.org>
4356
4357 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4358 made to OpenBSD and NetBSD through the years.
4359
4360 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4361
4362 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4363 behavior of vec_pack (vector double, vector double) to match
4364 behavior of vec_float2 (vector double, vector double).
4365
4366 2018-06-22 Olivier Hainque <hainque@adacore.com>
4367
4368 * gimplify.c (gimplify_function_tree): Prevent creation
4369 of a trampoline for the address of the current function
4370 passed to entry/exit instrumentation hooks.
4371
4372 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4373
4374 PR target/86222
4375 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4376 correctly.
4377
4378 2018-06-22 Martin Liska <mliska@suse.cz>
4379
4380 PR tree-optimization/86263
4381 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4382 Bail out if is_enabled is false.
4383 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4384 New declaration.
4385 (jump_table_cluster::is_enabled): New function.
4386
4387 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4388
4389 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4390 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4391 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4392 (lto_input_ts_binfo_tree_pointers): Likewise.
4393 * tree-streamer-out.c (streamer_write_tree_bitfields,
4394 write_ts_binfo_tree_pointers): Likewise.
4395 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4396
4397 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4398
4399 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4400
4401 2018-06-22 Martin Liska <mliska@suse.cz>
4402
4403 * symbol-summary.h (get): Make it pure and inline move
4404 functionality from ::get function.
4405 (get): Remove and inline into ::get and ::get_create.
4406 (get_create): Move code from ::get function.
4407
4408 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4409
4410 PR target/85994
4411 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4412 -x assembler-with-cpp.
4413
4414 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4415
4416 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4417 _FILE_OFFSET_BITS=64 for C++.
4418
4419 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4420
4421 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4422 conversion insn that shows up when pr85657-3.c is compiled using
4423 IEEE 128-bit long double.
4424 (neg<mode>2_internal): Use the correct mode to check whether the
4425 mode is IBM extended.
4426 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4427 multiply and divide external functions from being created more
4428 than once.
4429
4430 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4431
4432 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4433 functions.
4434 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4435 the edge can be forwarded.
4436 (cfg_layout_merge_blocks): Likewise.
4437
4438 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4439
4440 * except.c (finish_eh_generation): Commit edge insertions only after
4441 the EH edges have been redirected from post-landing to landing pads.
4442
4443 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4444
4445 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4446 create_tmp_var_for to create the FRAME decl.
4447 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4448
4449 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4450
4451 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4452 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4453 debug statement when resetting its value.
4454 (expand_call_inline): Copy the locus of the call onto the assignment
4455 of the return value, if any. Use local variable in more cases.
4456
4457 2018-06-21 Martin Liska <mliska@suse.cz>
4458
4459 * ipa-pure-const.c (propagate_nothrow): Use
4460 funct_state_summaries->get.
4461 (dump_malloc_lattice): Likewise.
4462 (propagate_malloc): Likewise.
4463
4464 2018-06-21 Richard Biener <rguenther@suse.de>
4465
4466 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4467 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4468 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4469 comment.
4470 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4471 BLOCK_ABSTRACT_ORIGIN unconditionally.
4472
4473 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4474
4475 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4476 deleting it.
4477 * ipa-reference.c (ipa_reference_c_finalize): Delete
4478 ipa_ref_opt_sum_summaries and set it to NULL.
4479
4480 2018-06-21 Tom de Vries <tdevries@suse.de>
4481
4482 PR tree-optimization/85859
4483 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4484 test with comment from bb_no_side_effects_p.
4485
4486 2018-06-21 Richard Biener <rguenther@suse.de>
4487
4488 PR tree-optimization/86232
4489 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4490 max for constant niter.
4491
4492 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4493
4494 * config/aarch64/aarch64-simd.md
4495 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4496
4497 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4498
4499 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4500 Make opernads of the unspec commutative.
4501
4502 2018-06-21 Richard Biener <rguenther@suse.de>
4503
4504 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4505 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4506 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4507 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4508 NULL DR_STEP.
4509 (vect_record_base_alignments): Do not record base alignment
4510 for gathers or scatters.
4511 (vect_compute_data_ref_alignment): Drop return value that is always
4512 true. Bail out early for gathers or scatters.
4513 (vect_enhance_data_refs_alignment): Bail out early for gathers
4514 or scatters.
4515 (vect_find_same_alignment_drs): Likewise.
4516 (vect_analyze_data_refs_alignment): Remove dead code.
4517 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4518 (vect_analyze_data_refs): For possible gathers or scatters do
4519 not create an alternate DR, just check their possible validity
4520 and mark them. Adjust DECL_NONALIASED handling to not rely
4521 on DR_BASE_ADDRESS.
4522 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4523 update inits of gathers or scatters.
4524 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4525 Also copy gather/scatter flag to pattern vinfo.
4526
4527 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4528
4529 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4530 behavior of vec_packsu (vector unsigned long long, vector unsigned
4531 long long) to match behavior of vec_packs with same signature.
4532
4533 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4534 Thomas Schwinge <thomas@codesourcery.com>
4535 Cesar Philippidis <cesar@codesourcery.com>
4536
4537 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4538 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4539 (gimplify_adjust_omp_clauses): Likewise.
4540 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4541 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4542 (gimplify_omp_target_update): Update handling of acc update and
4543 enter/exit data.
4544 * omp-low.c (install_var_field): Remove unused parameter
4545 base_pointers_restrict.
4546 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4547 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4548 FINALIZE}
4549 (omp_target_base_pointers_restrict_p): Delete.
4550 (scan_omp_target): Update call to scan_sharing_clauses.
4551 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4552 FINALIZE}.
4553 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4554 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4555 (convert_local_omp_clauses): Likewise.
4556 * tree-pretty-print.c (dump_omp_clause): Likewise.
4557 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4558 FINALIZE}.
4559 (omp_clause_code_name): Likewise.
4560
4561 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4562
4563 PR debug/86194
4564 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4565 be narrowed.
4566
4567 PR tree-optimization/86231
4568 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4569 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4570
4571 2018-06-20 Tom de Vries <tdevries@suse.de>
4572
4573 PR tree-optimization/86097
4574 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4575 iv type if signedness of iv type is not the same as that of *nit.
4576
4577 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4578
4579 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4580 EDGE_EH edges, verify they are all EDGE_EH.
4581
4582 2018-06-20 Maya Rashish <coypu@sdf.org>
4583
4584 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4585
4586 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4587
4588 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4589 * config/aarch64/aarch64.c (xgene1_tunings): Add
4590 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4591 (aarch64_mode_valid_for_sched_fusion_p):
4592 Allow 16-byte modes.
4593 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4594 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4595 128-bit modes.
4596 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4597 New pattern.
4598 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4599 * config/aarch64/iterators.md (VQ2): New mode iterator.
4600
4601 2018-06-20 Martin Liska <mliska@suse.cz>
4602
4603 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4604 Change default ratio from 10 to 8.
4605
4606 2018-06-20 Martin Liska <mliska@suse.cz>
4607
4608 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4609 New.
4610 (bit_test_cluster::find_bit_tests): Likewise.
4611 (switch_decision_tree::analyze_switch_statement): Find clusters.
4612 * tree-switch-conversion.h (struct jump_table_cluster): Document
4613 hierarchy.
4614
4615 2018-06-20 Martin Liska <mliska@suse.cz>
4616
4617 * tree-switch-conversion.c (switch_conversion::collect):
4618 Record m_uniq property.
4619 (switch_conversion::expand): Bail out for special conditions.
4620 (group_cluster::~group_cluster): New.
4621 (group_cluster::group_cluster): Likewise.
4622 (group_cluster::dump): Likewise.
4623 (jump_table_cluster::emit): New.
4624 (switch_decision_tree::fix_phi_operands_for_edges): New.
4625 (struct case_node): Remove struct.
4626 (jump_table_cluster::can_be_handled): New.
4627 (case_values_threshold): Moved to header.
4628 (reset_out_edges_aux): Likewise.
4629 (jump_table_cluster::is_beneficial): New.
4630 (bit_test_cluster::can_be_handled): Likewise.
4631 (add_case_node): Remove.
4632 (bit_test_cluster::is_beneficial): New.
4633 (case_bit_test::cmp): New.
4634 (bit_test_cluster::emit): New.
4635 (expand_switch_as_decision_tree_p): Remove.
4636 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4637 (fix_phi_operands_for_edge): Likewise.
4638 (switch_decision_tree::analyze_switch_statement): New.
4639 (compute_cases_per_edge): Move ...
4640 (switch_decision_tree::compute_cases_per_edge): ... here.
4641 (try_switch_expansion): Likewise.
4642 (switch_decision_tree::try_switch_expansion): Likewise.
4643 (record_phi_operand_mapping): Likewise.
4644 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4645 (emit_case_decision_tree): Likewise.
4646 (switch_decision_tree::emit): Likewise.
4647 (balance_case_nodes): Likewise.
4648 (switch_decision_tree::balance_case_nodes): Likewise.
4649 (dump_case_nodes): Likewise.
4650 (switch_decision_tree::dump_case_nodes): Likewise.
4651 (emit_jump): Likewise.
4652 (switch_decision_tree::emit_jump): Likewise.
4653 (emit_cmp_and_jump_insns): Likewise.
4654 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4655 (emit_case_nodes): Likewise.
4656 (switch_decision_tree::emit_case_nodes): Likewise.
4657 (conditional_probability): Remove.
4658 * tree-switch-conversion.h (enum cluster_type): New.
4659 (PRINT_CASE): New.
4660 (struct cluster): Likewise.
4661 (cluster::cluster): Likewise.
4662 (struct simple_cluster): Likewise.
4663 (simple_cluster::simple_cluster): Likewise.
4664 (struct group_cluster): Likewise.
4665 (struct jump_table_cluster): Likewise.
4666 (struct bit_test_cluster): Likewise.
4667 (struct min_cluster_item): Likewise.
4668 (struct case_tree_node): Likewise.
4669 (case_tree_node::case_tree_node): Likewise.
4670 (jump_table_cluster::case_values_threshold): Likewise.
4671 (struct case_bit_test): Likewise.
4672 (struct switch_decision_tree): Likewise.
4673 (struct switch_conversion): Likewise.
4674 (switch_decision_tree::reset_out_edges_aux): Likewise.
4675
4676 2018-06-20 Martin Liska <mliska@suse.cz>
4677
4678 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4679 (hoist_edge_and_branch_if_true): Likewise.
4680 (expand_switch_using_bit_tests_p): Likewise.
4681 (struct case_bit_test): Likewise.
4682 (case_bit_test_cmp): Likewise.
4683 (emit_case_bit_tests): Likewise.
4684 (switch_conversion::switch_conversion): New class.
4685 (struct switch_conv_info): Remove old struct.
4686 (collect_switch_conv_info): More to ...
4687 (switch_conversion::collect): ... this.
4688 (check_range): Likewise.
4689 (switch_conversion::check_range): Likewise.
4690 (check_all_empty_except_final): Likewise.
4691 (switch_conversion::check_all_empty_except_final): Likewise.
4692 (check_final_bb): Likewise.
4693 (switch_conversion::check_final_bb): Likewise.
4694 (create_temp_arrays): Likewise.
4695 (switch_conversion::create_temp_arrays): Likewise.
4696 (free_temp_arrays): Likewise.
4697 (gather_default_values): Likewise.
4698 (switch_conversion::gather_default_values): Likewise.
4699 (build_constructors): Likewise.
4700 (switch_conversion::build_constructors): Likewise.
4701 (constructor_contains_same_values_p): Likewise.
4702 (switch_conversion::contains_same_values_p): Likewise.
4703 (array_value_type): Likewise.
4704 (switch_conversion::array_value_type): Likewise.
4705 (build_one_array): Likewise.
4706 (switch_conversion::build_one_array): Likewise.
4707 (build_arrays): Likewise.
4708 (switch_conversion::build_arrays): Likewise.
4709 (gen_def_assigns): Likewise.
4710 (switch_conversion::gen_def_assigns): Likewise.
4711 (prune_bbs): Likewise.
4712 (switch_conversion::prune_bbs): Likewise.
4713 (fix_phi_nodes): Likewise.
4714 (switch_conversion::fix_phi_nodes): Likewise.
4715 (gen_inbound_check): Likewise.
4716 (switch_conversion::gen_inbound_check): Likewise.
4717 (process_switch): Use the newly created class.
4718 (switch_conversion::expand): New.
4719 (switch_conversion::~switch_conversion): New.
4720 * tree-switch-conversion.h: New file.
4721
4722 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4723
4724 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4725 tree-vect-patterns.c.
4726 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4727 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
4728 (vect_recog_sad_pattern): Likewise.
4729 (vect_recog_widen_sum_pattern): Likewise.
4730 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
4731 (vect_recog_widen_shift_pattern): Remove the type_in argument.
4732 (vect_recog_rotate_pattern): Likewise.
4733 (vect_recog_mult_pattern): Likewise.
4734 (vect_recog_vector_vector_shift_pattern): Likewise.
4735 (vect_recog_divmod_pattern): Likewise.
4736 (vect_recog_mixed_size_cond_pattern): Likewise.
4737 (vect_recog_bool_pattern): Likewise.
4738 (vect_recog_mask_conversion_pattern): Likewise.
4739 (vect_try_gather_scatter_pattern): Likewise.
4740 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
4741 (vect_recog_over_widening_pattern): Likewise.
4742 (vect_recog_gather_scatter_pattern): Likewise.
4743 (vect_recog_func_ptr): Move from tree-vectorizer.h
4744 (vect_vect_recog_func_ptrs): Move further down the file.
4745 (vect_recog_func): Likewise. Remove the third argument.
4746 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4747 (vect_pattern_recog_1): Expect the pattern function to do any
4748 necessary target tests. Also expect it to provide a vector type.
4749 Remove the type_in handling.
4750
4751 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4752
4753 * tree-vect-patterns.c (vect_pattern_detected): New function.
4754 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4755 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4756 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4757 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4758 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4759 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4760 (vect_recog_mask_conversion_pattern)
4761 (vect_try_gather_scatter_pattern): Likewise.
4762
4763 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4764
4765 * tree-vect-patterns.c (vect_get_internal_def): New function.
4766 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4767 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4768 (search_type_for_mask_1): Use it.
4769
4770 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4771
4772 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4773 redundant WIDEN_SUM_EXPR handling.
4774 (vect_recog_sad_pattern): Likewise.
4775
4776 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4777
4778 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4779 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4780 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4781 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4782 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4783
4784 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4785
4786 * tree-vect-stmts.c (vectorizable_call): Make sure that we
4787 use the stmt_vec_info of the original bb statement for the
4788 new zero assignment, even if the call is part of a pattern.
4789
4790 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4791
4792 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4793 that the sequence is attached to the original statement rather
4794 than the pattern statement.
4795 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4796 PATTERN_DEF_SEQ from the original statement rather than
4797 the main pattern statement.
4798 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4799 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4800 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4801
4802 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4803
4804 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4805 definition statements before the early exit for statements that aren't
4806 live or relevant.
4807 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4808 split out from...
4809 (vect_transform_loop): ...here. Process pattern definition
4810 statements without first checking whether the main pattern
4811 statement is live or relevant.
4812
4813 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4814
4815 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4816 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4817
4818 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4819
4820 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4821 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4822 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4823 (expand_block_compare): Change select_block_compare_mode call.
4824 (expand_strncmp_align_check): Use new functions, fix comment.
4825 (emit_final_str_compare_gpr): New function.
4826 (expand_strn_compare): Refactor and clean up code.
4827 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4828
4829 2018-06-19 Tony Reix <tony.reix@atos.com>
4830 Damien Bergamini <damien.bergamini@atos.com>
4831 David Edelsohn <dje.gcc@gmail.com>
4832
4833 * collect2.c (static_obj): New variable.
4834 (static_libs): New variable.
4835 (is_in_list): Uncomment declaration.
4836 (main): Track AIX libraries linked statically.
4837 (is_in_list): Uncomment definition.
4838 (scan_prog_file): Don't add AIX shared libraries initializer
4839 to constructor list if linking statically.
4840
4841 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4842
4843 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4844 constant.
4845 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4846
4847 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4848
4849 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4850 blocks.
4851
4852 2018-06-19 Martin Liska <mliska@suse.cz>
4853
4854 * config/i386/i386.c (ix86_can_inline_p): Do not use
4855 ipa_fn_summaries::get_create.
4856 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4857 get.
4858 (devirtualization_time_bonus): Likewise.
4859 (ipcp_propagate_stage): Likewise.
4860 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4861 (edge_set_predicate): Likewise.
4862 (evaluate_conditions_for_known_args): Likewise.
4863 (evaluate_properties_for_edge): Likewise.
4864 (ipa_call_summary::reset): Tranform to ...
4865 (ipa_call_summary::~ipa_call_summary): ... this.
4866 (ipa_fn_summary::reset): Transform to ...
4867 (ipa_fn_summary::~ipa_fn_summary): ... this.
4868 (ipa_fn_summary_t::remove): Rename to ...
4869 (ipa_fn_summary_t::remove_callees): ... this.
4870 (ipa_fn_summary_t::duplicate): Use placement new
4871 instead of memory copy.
4872 (ipa_call_summary_t::duplicate): Likewise.
4873 (ipa_call_summary_t::remove): Remove.
4874 (dump_ipa_call_summary): Change get_create to get.
4875 (ipa_dump_fn_summary): Dump only when summary exists.
4876 (analyze_function_body): Use symbol_summary::get instead
4877 of get_create.
4878 (compute_fn_summary): Likewise.
4879 (estimate_edge_devirt_benefit): Likewise.
4880 (estimate_edge_size_and_time): Likewise.
4881 (inline_update_callee_summaries): Likewise.
4882 (remap_edge_change_prob): Likewise.
4883 (remap_edge_summaries): Likewise.
4884 (ipa_merge_fn_summary_after_inlining): Likewise.
4885 (write_ipa_call_summary): Likewise.
4886 (ipa_fn_summary_write): Likewise.
4887 (ipa_free_fn_summary): Likewise.
4888 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4889 (struct ipa_call_summary): Likewise.
4890 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4891 of get_create.
4892 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4893 (estimate_size_after_inlining): Likewise.
4894 (estimate_growth): Likewise.
4895 (growth_likely_positive): Likewise.
4896 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4897 (inline_call): Likewise.
4898 * ipa-inline.c (caller_growth_limits): Likewise.
4899 (can_inline_edge_p): Likewise.
4900 (can_inline_edge_by_limits_p): Likewise.
4901 (compute_uninlined_call_time): Likewise.
4902 (compute_inlined_call_time): Likewise.
4903 (want_inline_small_function_p): Likewise.
4904 (edge_badness): Likewise.
4905 (update_caller_keys): Likewise.
4906 (update_callee_keys): Likewise.
4907 (inline_small_functions): Likewise.
4908 (inline_to_all_callers_1): Likewise.
4909 (dump_overall_stats): Likewise.
4910 (early_inline_small_functions): Likewise.
4911 (early_inliner): Likewise.
4912 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4913 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4914 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4915 * ipa-split.c (execute_split_functions): Likewise.
4916 * symbol-summary.h: Likewise.
4917 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4918
4919 2018-06-19 Richard Biener <rguenther@suse.de>
4920
4921 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4922 (vectorize_loops): ... here. Fix dbgcnt handling.
4923 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4924
4925 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
4926
4927 PR target/86197
4928 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4929 ieee128 argument takes up only one (vector) register, not two (floating
4930 point) registers.
4931
4932 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4933
4934 * gimplify.c (gimplify_init_constructor): Really never clear for an
4935 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4936
4937 2018-06-19 Richard Biener <rguenther@suse.de>
4938
4939 PR tree-optimization/86179
4940 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4941 after failed recognition.
4942
4943 2018-06-18 Martin Sebor <msebor@redhat.com>
4944
4945 PR middle-end/85602
4946 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4947 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4948 Handle integer subtraction.
4949 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4950 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4951
4952 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4953
4954 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4955 param from rtx to rtx_insn *.
4956 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4957 param.
4958 (frv_ifcvt_modify_insn): Likwise.
4959 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4960 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
4961 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4962 as_a <rtx_insn *> cast to local "unprotected_region" once
4963 it's been established that it's not NULL or pc_rtx.
4964 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4965 param "sethi" from rtx to rtx_insn *.
4966 (nds32_group_float_insns): Likewise for param "insn".
4967 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4968 param.
4969 (vax_output_int_subtract): Likewise.
4970 * config/vax/vax.c (vax_output_int_add): Likewise for param
4971 "insn".
4972 (vax_output_int_subtract): Likewise.
4973 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4974 (emit_pattern_after): Likewise for param "after".
4975 (emit_insn_after): Likewise.
4976 (emit_jump_insn_after): Likewise.
4977 (emit_call_insn_after): Likewise.
4978 (emit_debug_insn_after): Likewise.
4979 (emit_pattern_before): Likewise for param "before".
4980 (emit_insn_before): Likewise.
4981 (emit_jump_insn_before): Likewise.
4982 * final.c (get_insn_template): Likewise for param "insn", removing
4983 a cast.
4984 * output.h (get_insn_template): Likewise for 2nd param.
4985 * rtl.h (emit_insn_before): Likewise.
4986 (emit_jump_insn_before): Likewise.
4987 (emit_debug_insn_before_noloc): Likewise.
4988 (emit_insn_after): Likewise.
4989 (emit_jump_insn_after): Likewise.
4990 (emit_call_insn_after): Likewise.
4991 (emit_debug_insn_after): Likewise.
4992 (set_insn_deleted): Likewise for param.
4993
4994 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
4995
4996 PR target/85358
4997 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4998 floating point modes, so that IFmode is numerically greater than
4999 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5000 to declare the ordering. This prevents IFmode from being
5001 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5002 machine. Include rs6000-modes.h to share the fractional values
5003 between genmodes* and the rest of the compiler.
5004 (IFmode): Likewise.
5005 (KFmode): Likewise.
5006 (TFmode): Likewise.
5007 * config/rs6000/rs6000-modes.h: New file.
5008 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5009 meaning of rs6000_long_double_size so that 126..128 selects an
5010 appropriate 128-bit floating point type.
5011 (rs6000_option_override_internal): Likewise.
5012 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5013 (TARGET_LONG_DOUBLE_128): Change the meaning of
5014 rs6000_long_double_size so that 126..128 selects an appropriate
5015 128-bit floating point type.
5016 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5017 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5018 source and destination to match the standard usage.
5019 (truncifkf2): Likewise.
5020 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5021 ISA 2.07 to use an explicit clobber, instead of passing in a
5022 temporary.
5023 (copysign<mode>3_soft): Likewise.
5024
5025 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5026
5027 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5028 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5029 (vect_slp_analyze_instance_dependence): Likewise.
5030 (vect_enhance_data_refs_alignment): Likewise.
5031 (vect_analyze_data_refs_alignment): Likewise.
5032 (vect_slp_analyze_and_verify_instance_alignment
5033 (vect_analyze_data_ref_accesses): Likewise.
5034 (vect_prune_runtime_alias_test_list): Likewise.
5035 (vect_analyze_data_refs): Likewise.
5036 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5037 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5038 (vect_analyze_scalar_cycles_1): Likewise.
5039 (vect_get_loop_niters): Likewise.
5040 (vect_analyze_loop_form_1): Likewise.
5041 (vect_update_vf_for_slp): Likewise.
5042 (vect_analyze_loop_operations): Likewise.
5043 (vect_analyze_loop): Likewise.
5044 (vectorizable_induction): Likewise.
5045 (vect_transform_loop): Likewise.
5046 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5047 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5048 (vect_make_slp_decision): Likewise.
5049 (vect_detect_hybrid_slp): Likewise.
5050 (vect_slp_analyze_operations): Likewise.
5051 (vect_slp_bb): Likewise.
5052 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5053 (vectorizable_bswap): Likewise.
5054 (vectorizable_call): Likewise.
5055 (vectorizable_simd_clone_call): Likewise.
5056 (vectorizable_conversion): Likewise.
5057 (vectorizable_assignment): Likewise.
5058 (vectorizable_shift): Likewise.
5059 (vectorizable_operation): Likewise.
5060 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5061
5062 2018-06-18 Martin Sebor <msebor@redhat.com>
5063
5064 PR tree-optimization/81384
5065 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5066 * builtins.c (expand_builtin_strnlen): New function.
5067 (expand_builtin): Call it.
5068 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5069 * builtins.def (BUILT_IN_STRNLEN): New.
5070 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5071 Warn for bounds in excess of maximum object size.
5072 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5073 single-value ranges. Handle strnlen.
5074 (handle_builtin_strlen): Handle strnlen.
5075 (strlen_check_and_optimize_stmt): Same.
5076 * doc/extend.texi (Other Builtins): Document strnlen.
5077
5078 2018-06-18 Maya Rashish <coypu@sdf.org>
5079
5080 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5081 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5082 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5083
5084 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5085 here to ...
5086 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5087
5088 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5089
5090 * tree.c (escaped_string::escape): Replace cast to char * by
5091 const_cast<char *> (unescaped).
5092
5093 2018-06-18 Nick Clifton <nickc@redhat.com>
5094
5095 PR 84195
5096 * tree.c (escaped_string): New class. Converts an unescaped
5097 string into its escaped equivalent.
5098 (warn_deprecated_use): Use the new class to convert the
5099 deprecation message, if present.
5100 (test_escaped_strings): New self test.
5101 (test_c_tests): Add test_escaped_strings.
5102 * doc/extend.texi (deprecated): Add a note that the
5103 deprecation message is affected by the -fmessage-length
5104 option, and that control characters will be escaped.
5105 (#pragma GCC error): Document this pragma.
5106 (#pragma GCC warning): Likewise.
5107 * doc/invoke.texi (-fmessage-length): Document this option's
5108 effect on the #warning and #error preprocessor directives and
5109 the deprecated attribute.
5110
5111 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5112
5113 * tree.c (decl_value_expr_lookup): Revert latest change.
5114 (decl_value_expr_insert): Likewise.
5115
5116 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
5117
5118 * gimplify.c (nonlocal_vlas): Delete.
5119 (nonlocal_vla_vars): Likewise.
5120 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5121 referenced VLAs.
5122 (gimplify_body): Do not create and destroy nonlocal_vlas.
5123 * tree-nested.c: Include diagnostic.h.
5124 (use_pointer_in_frame): Tweak.
5125 (lookup_field_for_decl): Add assertion and declare the transformation.
5126 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5127 internal error when the reference is in a wrong context. Do not
5128 create a debug decl by default.
5129 (note_nonlocal_block_vlas): Delete.
5130 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5131 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
5132 create a debug decl by default.
5133 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5134 call is in a wrong context.
5135 (fixup_vla_decls): New function.
5136 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
5137 debug variables were created.
5138 * tree.c (decl_value_expr_lookup): Add checking assertion.
5139 (decl_value_expr_insert): Likewise.
5140
5141 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5142
5143 PR middle-end/82479
5144 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5145 * tree-scalar-evolution.c (interpret_expr): Likewise.
5146 (expression_expensive_p): Likewise.
5147 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5148 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5149 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5150 (ssa_defined_by_minus_one_stmt_p): New.
5151
5152 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5153
5154 PR middle-end/64946
5155 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5156 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5157 * dojump.c (do_jump): Likewise.
5158 * expr.c (expand_expr_real_2): Check operand type's sign.
5159 * fold-const.c (const_unop): Handle ABSU_EXPR.
5160 (fold_abs_const): Likewise.
5161 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5162 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5163 (strip_sign_op_1): Likesise.
5164 * match.pd: Add new pattern to generate ABSU_EXPR.
5165 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5166 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5167 * tree-eh.c (operation_could_trap_helper_p): Likewise.
5168 * tree-inline.c (estimate_operator_cost): Likewise.
5169 * tree-pretty-print.c (dump_generic_node): Likewise.
5170 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5171 * tree.def (ABSU_EXPR): New.
5172
5173 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5174
5175 PR middle-end/86095
5176 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5177 documented as preserved for backward compatibility only.
5178 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5179
5180 PR rtl-optimization/86108
5181 * bb-reorder.c (create_forwarder_block): Renamed to ...
5182 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5183 jump from new landing pad to the second part.
5184 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5185 Adjust callers.
5186
5187 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5188
5189 PR middle-end/85878
5190 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5191 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5192 Only call store_expr for halves if the mode is the same.
5193
5194 PR middle-end/86123
5195 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5196 Fix up comment formatting.
5197
5198 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5199
5200 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5201 (typed_splay_tree::closure,
5202 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5203 (typed_splay_tree::typed_splay_tree,
5204 typed_splay_tree::operator =): Declared private.
5205 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5206 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5207 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5208 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5209 typed_splay_tree::splay_tree_splay,
5210 typed_splay_tree::splay_tree_foreach_helper,
5211 typed_splay_tree::splay_tree_insert,
5212 typed_splay_tree::splay_tree_remove,
5213 typed_splay_tree::splay_tree_lookup,
5214 typed_splay_tree::splay_tree_predecessor,
5215 typed_splay_tree::splay_tree_successor,
5216 typed_splay_tree::splay_tree_min,
5217 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5218 (typed_splay_tree::root, typed_splay_tree::comp,
5219 typed_splay_tree::delete_key,
5220 typed_splay_tree::delete_value): New data members.
5221 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5222 typed_splay_tree::remove.
5223
5224 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5225
5226 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5227 -mginv and -mno-ginv to the assembler.
5228 * config/mips/mips.opt (-mcrc): New option.
5229 (-mginv): Likewise.
5230 * doc/invoke.text (-mcrc): Document.
5231 (-mginv): Likewise.
5232
5233 2018-06-15 Nick Clifton <nickc@redhat.com>
5234
5235 PR 84195
5236 * tree.c (escaped_string): New class. Converts an unescaped
5237 string into its escaped equivalent.
5238 (warn_deprecated_use): Use the new class to convert the
5239 deprecation message, if present.
5240 (test_escaped_strings): New self test.
5241 (test_c_tests): Add test_escaped_strings.
5242 * doc/extend.texi (deprecated): Add a note that the
5243 deprecation message is affected by the -fmessage-length
5244 option, and that control characters will be escaped.
5245 (#pragma GCC error): Document this pragma.
5246 (#pragma GCC warning): Likewise.
5247 * doc/invoke.texi (-fmessage-length): Document this option's
5248 effect on the #warning and #error preprocessor directives and
5249 the deprecated attribute.
5250
5251 2018-06-15 Richard Biener <rguenther@suse.de>
5252
5253 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5254 here, also noting vector size used.
5255 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5256 size used in MSG_OPTIMIZED_LOCATIONS dump.
5257 (pass_slp_vectorize::execute): Adjust.
5258
5259 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5260
5261 PR target/85968
5262 * config/arc/arc.c (arc_return_address_register): Fix
5263 if-condition.
5264
5265 2018-06-15 Richard Biener <rguenther@suse.de>
5266
5267 PR middle-end/86159
5268 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5269 leave useless conversion stripping to force_gimple_operand_gsi.
5270 (gimplify_build2): Likewise.
5271 (gimplify_build1): Likewise.
5272
5273 2018-06-15 Richard Biener <rguenther@suse.de>
5274
5275 PR middle-end/86076
5276 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5277 before adjusting their block.
5278
5279 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5280
5281 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5282 multilibs for *-*-rtems*.
5283 * config/riscv/t-rtems: New file.
5284
5285 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5286
5287 PR middle-end/86122
5288 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5289 unsigned_type_for returns NULL.
5290
5291 PR target/85945
5292 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5293 subregs of multi-word pseudos unless the float mode has word size.
5294
5295 2018-06-14 Richard Biener <rguenther@suse.de>
5296
5297 PR middle-end/86139
5298 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5299 duplicate and harmful type_hash_canon.
5300 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5301
5302 2018-06-14 Richard Biener <rguenther@suse.de>
5303
5304 PR ipa/86124
5305 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5306 NULL cgraph_node.
5307
5308 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5309
5310 * config/rtems.h (STDINT_LONG32): Define.
5311
5312 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5313 Prachi Godbole <prachi.godbole@imgtec.com>
5314
5315 * config/mips/mips-cpus.def: Define P6600.
5316 * config/mips/mips-tables.opt: Regenerate.
5317 * config/mips/mips.c (mips_ucbranch_type): New enum.
5318 (mips_rtx_cost_data): Add support for P6600.
5319 (mips_issue_rate): Likewise.
5320 (mips_multipass_dfa_lookahead): Likewise.
5321 (mips_avoid_hazard): Likewise.
5322 (mips_reorg_process_insns): Likewise.
5323 (mips_classify_branch_p6600): New function.
5324 * config/mips/mips.h (TUNE_P6600): New define.
5325 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5326 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5327 * config/mips/mips.md: Include p6600.md.
5328 (processor): Add p6600.
5329 * config/mips/p6600.md: New file.
5330 * doc/invoke.texi: Add p6600 to supported architectures.
5331
5332 2018-06-13 Martin Sebor <msebor@redhat.com>
5333
5334 PR tree-optimization/86114
5335 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5336 of integer types.
5337 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5338
5339 2018-06-13 Richard Biener <rguenther@suse.de>
5340
5341 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5342 Properly set vector type of the intermediate stmt.
5343 * tree-vect-stmts.c (vectorizable_operation): The destination
5344 var always has vectype_out type.
5345
5346 2018-06-13 Jeff Law <law@redhat.com>
5347
5348 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5349 integer 0 for argument to print_rtl_with_bb.
5350 (rl78_reorg): Likewise.
5351
5352 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5353
5354 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5355 from rtx to rtx_insn *.
5356 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5357 "label".
5358 (add_sched_insns_for_speculation): Likewise for local "target",
5359 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5360 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5361 from rtx_insn ** to rtx_code_label **.
5362 (reorg_emit_nops): Likewise.
5363 (c6x_reorg): Likewise for local "call_labels".
5364 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5365 rtx to rtx_insn *.
5366 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5367 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5368 the loops over LABEL_REFS.
5369 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5370 braf_label.
5371 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5372 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5373 (split_branches): Strengthen local "olabel" from rtx to
5374 rtx_insn *, adding a safe_as_a cast.
5375 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5376 to "rtx_insn *".
5377 (add_insn_after): Likewise for first two params.
5378 (add_insn_before): Likewise.
5379 (remove_insn): Likewise for param.
5380 (emit_pattern_before_noloc): Likewise for second and third params.
5381 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5382 (emit_call_insn_before_noloc): Likewise.
5383 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5384 to "rtx_insn *".
5385 (emit_barrier_before): Likewise.
5386 (emit_label_before): Strengthen "label" param from "rtx" to
5387 "rtx_code_label *". Strengthen "before" param from "rtx" to
5388 "rtx_insn *".
5389 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5390 "rtx_insn *".
5391 (emit_pattern_after_noloc): Likewise.
5392 (emit_insn_after_noloc): Likewise.
5393 (emit_jump_insn_after_noloc): Likewise.
5394 (emit_call_insn_after_noloc): Likewise.
5395 (emit_debug_insn_after_noloc): Likewise.
5396 (emit_barrier_after): Likewise.
5397 (emit_label_after): Likewise for both params.
5398 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5399 "loc" param from "int" to "location_t".
5400 (emit_insn_after_setloc): Likewise.
5401 (emit_jump_insn_after_setloc): Likewise.
5402 (emit_call_insn_after_setloc): Likewise.
5403 (emit_debug_insn_after_setloc): Likewise.
5404 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5405 "loc" param from "int" to "location_t".
5406 (emit_pattern_before): Convert NULL_RTX to NULL.
5407 (emit_insn_before_setloc): Convert "loc" param from "int" to
5408 "location_t".
5409 (emit_jump_insn_before_setloc): Likewise.
5410 (emit_call_insn_before_setloc): Likewise.
5411 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5412 rtx_insn *. Convert "loc" param from "int" to "location_t".
5413 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5414 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5415 Convert 3rd param from "int" to "location_t".
5416 (emit_barrier_before, emit_barrier_after, next_real_insn):
5417 Strengthen param from rtx to rtx_insn *.
5418 (emit_label_before): Strengthen 1st param from "rtx" to
5419 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5420 "rtx_insn *".
5421 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5422 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5423 Strengthen 2nd param from "rtx" to "rtx_insn *".
5424 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5425 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5426 Likewise. Convert 3rd param from "int" to "location_t".
5427 (emit_label_after): Strengthen 1st param from "rtx" to
5428 "rtx_code_label *".
5429 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5430 "rtx_insn *".
5431 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5432 from "rtx" to "rtx_insn *".
5433
5434 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5435
5436 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5437 bodies streamed in with -Q.
5438 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5439 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5440 * gimple-streamer-out.c: Include gimple-pretty-print.h
5441 (output_bb): Dump stmts streamed.
5442 * lto-section-out.c: Include print-tree.h
5443 (lto_begin_section): Dump sections created.
5444 (lto_output_decl_index): Dump decl encoded.
5445 * lto-streamer-out.c: Include print-tree.h
5446 (create_output_block): Dump output block created.
5447 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5448 (output_function): Dump function output.
5449 (output_constructor): Dump constructor streamed.
5450 (write_global_stream): Output indexes encoded.
5451 (produce_asm_for_decls): Dump streams encoded.
5452 * lto-streamer.c (streamer_dump_file): New global var.
5453 * lto-streamer.h (streamer_dump_file): Declare.
5454 * passes.c (ipa_write_summaries): Initialize streamer dump.
5455 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5456 in.
5457
5458 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5459
5460 PR target/86048
5461 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5462 offsets for register save directives. Emit a second batch of save
5463 directives, if need be, when the function accesses prior frames.
5464
5465 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5466
5467 * config/arc/fpu.md (fmasf4): Force operand to register.
5468 (fnmasf4): Likewise.
5469
5470 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5471
5472 * config/arc/arc-protos.h (arc_pad_return): Remove.
5473 * config/arc/arc.c (machine_function): Remove force_short_suffix
5474 and size_reason.
5475 (arc_print_operand): Adjust printing of '&'.
5476 (arc_verify_short): Remove conditional printing of short suffix.
5477 (arc_final_prescan_insn): Remove reference to size_reason.
5478 (pad_return): New function.
5479 (arc_reorg): Call pad_return.
5480 (arc_pad_return): Remove.
5481 (arc_init_machine_status): Remove reference to force_short_suffix.
5482 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5483 (attr length): When attribute iscompact is true force to 2
5484 regardless; in the case of maybe check if we want to force the
5485 instruction to have 4 bytes length.
5486 (nopv): Change it to generate 4 byte long nop as well.
5487 (blockage): New pattern.
5488 (simple_return): Remove call to arc_pad_return.
5489 (p_return_i): Likewise.
5490
5491 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5492
5493 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5494
5495 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5496
5497 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5498 ARC cores.
5499
5500 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5501
5502 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5503 for ARC700 and ARCv2.
5504
5505 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5506
5507 PR target/86076
5508 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5509 operands[2] instead of operands[1].
5510
5511
5512 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5513
5514 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5515 case, check whether the outer register overlaps an unallocatable
5516 register, not just whether it fits the required class.
5517
5518 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5519
5520 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5521 are poly_ints.
5522 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5523 (memrefs_conflict_p): Likewise.
5524 (init_alias_analysis): Likewise.
5525 * cfgexpand.c (expand_debug_expr): Likewise.
5526 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5527 * cse.c (fold_rtx): Likewise.
5528 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5529 * expr.c (emit_block_move_hints): Likewise.
5530 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5531 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5532 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5533 (emit_group_store): Likewise.
5534 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5535 to read the PRE/POST_MODIFY increment.
5536 * calls.c (store_one_arg): Use strip_offset.
5537 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5538 poly_int_rtx_p.
5539 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5540 by a VEC_SELECT.
5541 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5542 (simplify_binary_operation_1): Extend CONST_INT handling to
5543 poly_int_rtx_p.
5544 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5545 than a HOST_WIDE_INT.
5546 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5547 poly_int64.
5548 (adjust_mems, add_stores): Update accodingly.
5549 (vt_canonicalize_addr): Track polynomial offsets.
5550 (emit_note_insn_var_location): Likewise.
5551 (vt_add_function_parameter): Likewise.
5552 (vt_initialize): Likewise.
5553
5554 2018-06-12 Jeff Law <law@redhat.com>
5555
5556 * config.gcc (alpha*-*-freebsd*): Remove.
5557 * config/alpha/freebsd.h: Remove.
5558
5559 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5560
5561 PR other/69968
5562 * spellcheck-tree.c (levenshtein_distance): Rename to...
5563 (get_edit_distance): ...this, and update for underlying renaming.
5564 * spellcheck-tree.h (levenshtein_distance): Rename to...
5565 (get_edit_distance): ...this.
5566 * spellcheck.c (levenshtein_distance): Rename to...
5567 (get_edit_distance): ...this. Convert from Levenshtein distance
5568 to Damerau-Levenshtein distance by supporting transpositions of
5569 adjacent characters. Rename "v1" to "v_next" and "v0" to
5570 "v_one_ago".
5571 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5572 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5573 update for underlying renaming.
5574 (selftest::levenshtein_distance_unit_test): Rename to...
5575 (selftest::test_get_edit_distance_unit): ...this, and update for
5576 underlying renaming.
5577 (selftest::test_find_closest_string): Add example from PR 69968
5578 where transposition helps
5579 (selftest::test_metric_conditions): Update for renaming.
5580 (selftest::test_metric_conditions): Likewise.
5581 (selftest::spellcheck_c_tests): Likewise.
5582 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5583 (get_edit_distance): ...this.
5584 (best_match::consider): Update for renaming.
5585
5586 2018-06-12 Martin Sebor <msebor@redhat.com>
5587
5588 PR tree-optimization/85259
5589 * builtins.c (compute_objsize): Handle constant offsets.
5590 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5591 true iff a warning has been issued.
5592 * gimple.h (gimple_nonartificial_location): New function.
5593 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5594 gimple_nonartificial_location and handle -Wno-system-headers.
5595 (handle_builtin_stxncpy): Same.
5596
5597 2018-06-12 Martin Sebor <msebor@redhat.com>
5598
5599 PR c/85931
5600 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5601
5602 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
5603
5604 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5605 BUILTIN_VEC_XST entries for pointer to double and long long.
5606
5607 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
5608
5609 PR target/85990
5610 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5611 Update comments.
5612 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5613 Likewise.
5614
5615 2018-06-12 Martin Liska <mliska@suse.cz>
5616
5617 * doc/options.texi: Document IntegerRange.
5618
5619 2018-06-12 Martin Liska <mliska@suse.cz>
5620
5621 * config/i386/i386.opt: Make MPX-related options as Deprecated.
5622 * opt-functions.awk: Handle Deprecated flag.
5623 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5624 and report error.
5625 (read_cmdline_option): Report warning for a deprecated option.
5626 * opts.h (struct cl_option): Add new field cl_deprecated.
5627 (CL_ERR_DEPRECATED): New.
5628
5629 2018-06-12 Martin Liska <mliska@suse.cz>
5630
5631 * doc/options.texi: Document Deprecated option flag.
5632
5633 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5634
5635 * config/arc/arc-arch.h (arc_extras): New enum.
5636 (arc_cpu_t):Add field extra.
5637 (arc_cpu_types): Consider the extras.
5638 * config/arc/arc-cpus.def: Add extras info.
5639 * config/arc/arc-opts.h (processor_type): Consider extra field.
5640 * config/arc/arc.c (arc_override_options): Handle extra field.
5641
5642 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5643
5644 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5645 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5646 field.
5647 * config/arc/arc.c (arc_init): Update pic warning.
5648 (irq_range): Update irq range parsing warnings.
5649 (arc_override_options): Update various warning messages.
5650 (arc_handle_aux_attribute): Likewise.
5651
5652 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5653
5654 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5655
5656 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5657
5658 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5659 compiler messages directives.
5660
5661 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5662
5663 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5664 * config/mips/mips-tables.opt: Regenerate.
5665 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5666 mips64r6.
5667 * doc/invoke.texi: Document -march=i6500.
5668
5669 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5670
5671 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5672 (i6400_gpmul): Add cpu_unit.
5673 (i6400_gpdiv): Likewise.
5674 (i6400_msa_add_d): Update reservations.
5675 (i6400_msa_int_add) Likewise.
5676 (i6400_msa_short_logic3) Likewise.
5677 (i6400_msa_short_logic2) Likewise.
5678 (i6400_msa_short_logic) Likewise.
5679 (i6400_msa_move) Likewise.
5680 (i6400_msa_cmp) Likewise.
5681 (i6400_msa_short_float2) Likewise.
5682 (i6400_msa_div_d) Likewise.
5683 (i6400_msa_long_logic1) Likewise.
5684 (i6400_msa_long_logic2) Likewise.
5685 (i6400_msa_mult) Likewise.
5686 (i6400_msa_long_float2) Likewise.
5687 (i6400_msa_long_float4) Likewise.
5688 (i6400_msa_long_float5) Likewise.
5689 (i6400_msa_long_float8) Likewise.
5690 (i6400_fpu_fadd): Include frint type.
5691 (i6400_fpu_store): New define_insn_reservation.
5692 (i6400_fpu_load): Likewise.
5693 (i6400_fpu_move): Likewise.
5694 (i6400_fpu_fcmp): Likewise.
5695 (i6400_fpu_fmadd): Likewise.
5696 (i6400_int_mult): Include imul3nc type and update reservation.
5697 (i6400_int_div): Include idiv3 type and update reservation.
5698 (i6400_int_load): Update to check type not move_type.
5699 (i6400_int_store): Likewise.
5700 (i6400_int_prefetch): Set zero latency.
5701
5702 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
5703
5704 * gcc.c: Document new %@{...} sequence.
5705 (LINK_COMMAND_SPEC): Use it for the -L switches.
5706 (cpp_unique_options): Use it for the -I switches.
5707 (at_file_argbuf): New global variable.
5708 (in_at_file): Likewise.
5709 (alloc_args): Create at_file_argbuf.
5710 (clear_args): Truncate at_file_argbuf.
5711 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5712 (open_at_file): New function.
5713 (close_at_file): Likewise.
5714 (create_at_file): Delete.
5715 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5716 <'o'>: Likewise.
5717 <'@'>: New case.
5718 (validate_switches_from_spec): Deal with %@{...} sequence.
5719 (validate_switches): Likewise.
5720 (driver::finalize): Call clear_args.
5721
5722 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5723
5724 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5725
5726 2018-06-11 Martin Sebor <msebor@redhat.com>
5727
5728 * doc/invoke.texi (-Wall): List -Wc++17-compat.
5729 (Wno-class-memaccess): Add @opindex.
5730 (Wno-templates, Wno-multiple-inheritance): Same.
5731 (Wno-virtual-inheritance, Wno-namespaces): Same.
5732 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5733 (Wno-format-overflow, Wno-format-truncation): Same.
5734 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5735 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5736 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5737 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5738 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5739 (Wno-misspelled-isr): Same.
5740
5741 2018-06-11 Martin Sebor <msebor@redhat.com>
5742
5743 * PR tree-optimization/86083
5744 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5745
5746 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5747
5748 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5749
5750 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
5751
5752 PR target/85755
5753 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5754 on the correct operand.
5755 (*movdi_internal64): Ditto.
5756
5757 2018-06-11 Martin Liska <mliska@suse.cz>
5758
5759 PR tree-optimization/86089
5760 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5761
5762 2018-06-11 Julia Koval <julia.koval@intel.com>
5763
5764 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5765 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5766 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5767
5768 2018-06-11 Olivier Hainque <hainque@adacore.com>
5769
5770 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5771 for Ada with strict dwarf2.
5772
5773 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
5774
5775 PR target/85755
5776 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5777 addresses.
5778
5779 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
5780
5781 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5782
5783 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
5784
5785 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5786 TARGET_ELF.
5787
5788 2018-06-08 Martin Liska <mliska@suse.cz>
5789
5790 * tree-cfg.h (debug_function): Fix argument type to match
5791 implementation.
5792
5793 2018-06-08 Martin Liska <mliska@suse.cz>
5794
5795 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5796 Remove usage of MPX-related (and removed) fields.
5797 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5798
5799 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5800
5801 * cfg.c (debug): Use TDF_NONE rather than 0.
5802 * cfghooks.c (debug): Likewise.
5803 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5804 (struct dump_option_value_info): Convert to...
5805 (struct kv_pair): ...this template type.
5806 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5807 rather than 0.
5808 (optinfo_verbosity_options): Likewise.
5809 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5810 OPTGROUP_NONE.
5811 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5812 than int for "optgroup_flags" param.
5813 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5814 "dump_kind" param.
5815 (dump_dec): Likewise.
5816 (dump_finish): Use TDF_NONE rather than 0.
5817 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5818 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5819 than 0. Update for change to option_ptr.
5820 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5821 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5822 0. Update for changes to optinfo_verbosity_options and
5823 optgroup_options.
5824 (opt_info_switch_p): Convert optgroup_flags from int to
5825 optgroup_flags_t.
5826 (dump_basic_block): Use dump_flags_t rather than int
5827 for "dump_kind" param.
5828 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5829 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5830 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5831 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5832 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5833 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5834 TDF_NONE): Convert from macros to...
5835 (enum dump_flag): ...this new enum.
5836 (dump_flags_t): Update to use enum.
5837 (operator|, operator&, operator~, operator|=, operator&=):
5838 Implement for dump_flags_t.
5839 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5840 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5841 Convert from macros to...
5842 (enum optgroup_flag): ...this new enum.
5843 (optgroup_flags_t): New typedef.
5844 (operator|, operator|=): Implement for optgroup_flags_t.
5845 (struct dump_file_info): Convert field "alt_flags" to
5846 dump_flags_t. Convert field "optgroup_flags" to
5847 optgroup_flags_t.
5848 (dump_basic_block): Use dump_flags_t rather than int for param.
5849 (dump_generic_expr_loc): Likewise.
5850 (dump_dec): Likewise.
5851 (dump_register): Convert param "optgroup_flags" to
5852 optgroup_flags_t.
5853 (opt_info_enable_passes): Likewise.
5854 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5855 than 0.
5856 * gimple-pretty-print.c (debug): Likewise.
5857 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5858 (merged_store_group::apply_stores): Likewise.
5859 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5860 * gimple.c (verify_gimple_pp): Likewise.
5861 * graphite-poly.c (print_pbb_body): Likewise.
5862 * passes.c (pass_manager::register_one_dump_file): Convert
5863 local "optgroup_flags" to optgroup_flags_t.
5864 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5865 (debug): Likewise.
5866 (debug_body): Likewise.
5867 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5868 to optgroup_flags_t.
5869 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5870 than 0.
5871 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5872 (convert_mult_to_fma): Likewise.
5873 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5874 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5875 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5876 "dump_kind" to dump_flags_t.
5877
5878 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5879
5880 * config/rs6000/rs6000.c (min, max): Delete.
5881
5882 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5883
5884 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5885 -mabi=spe and -mabi=no-spe.
5886
5887 2018-06-08 Martin Liska <mliska@suse.cz>
5888
5889 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5890 where we expect an existing summary.
5891
5892 2018-06-08 Martin Liska <mliska@suse.cz>
5893
5894 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5895 * ipa-inline.h (estimate_edge_growth): Likewise.
5896
5897 2018-06-08 Martin Liska <mliska@suse.cz>
5898
5899 * cgraph.c (function_version_hasher::hash): Use
5900 cgraph_node::get_uid ().
5901 (function_version_hasher::equal):
5902 * cgraph.h (cgraph_node::get_uid): New method.
5903 * ipa-inline.c (update_caller_keys): Use
5904 cgraph_node::get_uid ().
5905 (update_callee_keys): Likewise.
5906 * ipa-utils.c (searchc): Likewise.
5907 (ipa_reduced_postorder): Likewise.
5908 * lto-cgraph.c (input_node): Likewise.
5909 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5910 * symbol-summary.h (symtab_insertion): Likewise.
5911 (symtab_removal): Likewise.
5912 (symtab_duplication): Likewise.
5913 * tree-pretty-print.c (dump_function_header): Likewise.
5914 * tree-sra.c (convert_callers_for_node): Likewise.
5915
5916 2018-06-08 Martin Liska <mliska@suse.cz>
5917
5918 * cgraph.c (symbol_table::create_edge): Always assign a new
5919 unique number.
5920 (symbol_table::free_edge): Do not recycle numbers.
5921 * cgraph.h (cgraph_edge::get): New method.
5922 * symbol-summary.h (symtab_removal): Use it.
5923 (symtab_duplication): Likewise.
5924 (call_summary::hashable_uid): Remove.
5925
5926 2018-06-08 Martin Liska <mliska@suse.cz>
5927
5928 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5929 (initialize_growth_caches): Remove.
5930 (free_growth_caches): Likewise.
5931 (do_estimate_edge_time): Use edge_growth_cache.
5932 (do_estimate_edge_size): Likewise.
5933 (do_estimate_edge_hints): Likewise.
5934 * ipa-inline.c (reset_edge_caches): Likewise.
5935 (recursive_inlining): Likewise.
5936 (inline_small_functions): Likewise.
5937 * ipa-inline.h (initialize_growth_caches): Remove.
5938 (estimate_edge_size): Likewise.
5939 (estimate_edge_time): Likewise.
5940 (estimate_edge_hints): Likewise.
5941 (reset_edge_growth_cache): Likewise.
5942 * symbol-summary.h (call_summary::remove): New method.
5943
5944 2018-06-08 Martin Liska <mliska@suse.cz>
5945
5946 * ipa-cp.c (class edge_clone_summary): New summary.
5947 (grow_edge_clone_vectors): Remove.
5948 (ipcp_edge_duplication_hook): Remove.
5949 (class edge_clone_summary_t): New call_summary class.
5950 (ipcp_edge_removal_hook): Remove.
5951 (edge_clone_summary_t::duplicate): New function.
5952 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5953 (create_specialized_node): Likewise.
5954 (ipcp_driver): Initialize edge_clone_summaries and do not
5955 register hooks.
5956
5957 2018-06-08 Martin Liska <mliska@suse.cz>
5958
5959 * symbol-summary.h (get): New function.
5960 (call_summary::m_initialize_when_cloning): New class member.
5961
5962 2018-06-08 Martin Liska <mliska@suse.cz>
5963
5964 * cgraph.c (cgraph_node::remove): Do not recycle uid.
5965 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5966 (symbol_table::allocate_cgraph_symbol): Do not set uid.
5967 * passes.c (uid_hash_t): Record removed_nodes by their uids.
5968 (remove_cgraph_node_from_order): Use the removed_nodes set.
5969 (do_per_function_toporder): Likwise.
5970 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5971 instead of summary_uid.
5972 (symtab_removal): Likewise.
5973 (symtab_duplication): Likewise.
5974
5975 2018-06-08 Martin Liska <mliska@suse.cz>
5976
5977 * ipa-cp.c (ipcp_store_bits_results): Use
5978 ipcp_transformation_sum.
5979 (ipcp_store_vr_results): Likewise.
5980 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5981 to ...
5982 (ipcp_transformation_initialize): ... this.
5983 (ipa_set_node_agg_value_chain):
5984 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5985 (write_ipcp_transformation_info): Likewise.
5986 (read_ipcp_transformation_info): Likewise.
5987 (ipcp_update_bits): Likewise.
5988 (ipcp_update_vr): Likewise.
5989 (ipcp_transform_function): Likewise.
5990 * ipa-prop.h: Rename ipcp_transformation_summary to
5991 ipcp_transformation.
5992 (class ipcp_transformation_t): New function summary.
5993 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5994 (ipa_get_agg_replacements_for_node): Likewise.
5995
5996 2018-06-08 Martin Liska <mliska@suse.cz>
5997
5998 * ipa-pure-const.c (struct funct_state_d): Do it class instead
5999 of struct.
6000 (class funct_state_summary_t): New function_summary class.
6001 (has_function_state): Remove.
6002 (get_function_state): Likewise.
6003 (set_function_state): Likewise.
6004 (add_new_function): Likewise.
6005 (funct_state_summary_t::insert): New function.
6006 (duplicate_node_data): Remove.
6007 (remove_node_data): Remove.
6008 (funct_state_summary_t::duplicate): New function.
6009 (register_hooks): Create new funct_state_summaries.
6010 (pure_const_generate_summary): Use it.
6011 (pure_const_write_summary): Likewise.
6012 (pure_const_read_summary): Likewise.
6013 (propagate_pure_const): Likewise.
6014 (propagate_nothrow): Likewise.
6015 (dump_malloc_lattice): Likewise.
6016 (propagate_malloc): Likewise.
6017 (execute): Do not register hooks, just remove summary
6018 instead.
6019 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6020 constructor.
6021
6022 2018-06-08 Martin Liska <mliska@suse.cz>
6023
6024 * ipa-reference.c (remove_node_data): Remove.
6025 (duplicate_node_data): Likewise.
6026 (class ipa_ref_var_info_summary_t): New class.
6027 (class ipa_ref_opt_summary_t): Likewise.
6028 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6029 (get_reference_optimization_summary): Use
6030 ipa_ref_opt_sum_summaries.
6031 (set_reference_vars_info): Remove.
6032 (set_reference_optimization_summary): Likewise.
6033 (ipa_init): Create summaries.
6034 (init_function_info): Use function summary.
6035 (ipa_ref_opt_summary_t::duplicate): New function.
6036 (ipa_ref_opt_summary_t::remove): New function.
6037 (get_read_write_all_from_node): Fix GNU coding style.
6038 (propagate): Use function summary.
6039 (write_node_summary_p): Fix GNU coding style.
6040 (stream_out_bitmap): Likewise.
6041 (ipa_reference_read_optimization_summary): Use function summary.
6042 (ipa_reference_c_finalize): Do not release hooks.
6043
6044 2018-06-08 Martin Liska <mliska@suse.cz>
6045
6046 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6047 (analyze_function_body): Extract multiple calls of get_create.
6048 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6049 * ipa-inline.c (recursive_inlining): Use ::get method.
6050 * ipa-inline.h (estimate_edge_growth): Likewise.
6051
6052 2018-06-08 Martin Liska <mliska@suse.cz>
6053
6054 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6055 HSA_INVALID.
6056 (hsa_function_summary::hsa_function_summary): Use the new enum
6057 value.
6058 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6059 * hsa-gen.c (hsa_get_host_function): Likewise.
6060 (get_brig_function_name): Likewise.
6061 * ipa-hsa.c (process_hsa_functions): Likewise.
6062 (ipa_hsa_write_summary): Likewise.
6063 * symbol-summary.h (symtab_duplication): Use ::get function/
6064 (get): New function.
6065
6066 2018-06-08 Martin Liska <mliska@suse.cz>
6067
6068 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6069 of get.
6070 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6071 (hsa_register_kernel): Likewise.
6072 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6073 * hsa-gen.c (hsa_get_host_function): Likewise.
6074 (get_brig_function_name): Likewise.
6075 (generate_hsa): Likewise.
6076 (pass_gen_hsail::execute): Likewise.
6077 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6078 (devirtualization_time_bonus): Likewise.
6079 (ipcp_propagate_stage): Likewise.
6080 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6081 (edge_set_predicate): Likewise.
6082 (evaluate_conditions_for_known_args): Likewise.
6083 (evaluate_properties_for_edge): Likewise.
6084 (ipa_fn_summary::reset): Likewise.
6085 (ipa_fn_summary_t::duplicate): Likewise.
6086 (dump_ipa_call_summary): Likewise.
6087 (ipa_dump_fn_summary): Likewise.
6088 (analyze_function_body): Likewise.
6089 (compute_fn_summary): Likewise.
6090 (estimate_edge_devirt_benefit): Likewise.
6091 (estimate_edge_size_and_time): Likewise.
6092 (estimate_calls_size_and_time): Likewise.
6093 (estimate_node_size_and_time): Likewise.
6094 (inline_update_callee_summaries): Likewise.
6095 (remap_edge_change_prob): Likewise.
6096 (remap_edge_summaries): Likewise.
6097 (ipa_merge_fn_summary_after_inlining): Likewise.
6098 (ipa_update_overall_fn_summary): Likewise.
6099 (read_ipa_call_summary): Likewise.
6100 (inline_read_section): Likewise.
6101 (write_ipa_call_summary): Likewise.
6102 (ipa_fn_summary_write): Likewise.
6103 (ipa_free_fn_summary): Likewise.
6104 * ipa-hsa.c (process_hsa_functions): Likewise.
6105 (ipa_hsa_write_summary): Likewise.
6106 (ipa_hsa_read_section): Likewise.
6107 * ipa-icf.c (sem_function::merge): Likewise.
6108 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6109 (do_estimate_edge_time): Likewise.
6110 (estimate_size_after_inlining): Likewise.
6111 (estimate_growth): Likewise.
6112 (growth_likely_positive): Likewise.
6113 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6114 (inline_call): Likewise.
6115 * ipa-inline.c (caller_growth_limits): Likewise.
6116 (can_inline_edge_p): Likewise.
6117 (can_inline_edge_by_limits_p): Likewise.
6118 (compute_uninlined_call_time): Likewise.
6119 (compute_inlined_call_time): Likewise.
6120 (want_inline_small_function_p): Likewise.
6121 (edge_badness): Likewise.
6122 (update_caller_keys): Likewise.
6123 (update_callee_keys): Likewise.
6124 (recursive_inlining): Likewise.
6125 (inline_small_functions): Likewise.
6126 (inline_to_all_callers_1): Likewise.
6127 (dump_overall_stats): Likewise.
6128 (early_inline_small_functions): Likewise.
6129 (early_inliner): Likewise.
6130 * ipa-inline.h (estimate_edge_growth): Likewise.
6131 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6132 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6133 * ipa-prop.h (IPA_NODE_REF): Likewise.
6134 (IPA_EDGE_REF): Likewise.
6135 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6136 (propagate_malloc): Likewise.
6137 * ipa-split.c (execute_split_functions): Likewise.
6138 * symbol-summary.h: Rename get to get_create.
6139 (get): Likewise.
6140 (get_create): Likewise.
6141 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6142
6143 2018-06-08 Martin Liska <mliska@suse.cz>
6144
6145 * symbol-summary.h (release): Move definition out of class
6146 declaration.
6147 (symtab_removal): Likewise.
6148 (symtab_duplication): Likewise.
6149
6150 2018-06-08 Martin Liska <mliska@suse.cz>
6151
6152 * symbol-summary.h (function_summary): Move constructor
6153 implementation out of class declaration.
6154 (release): Likewise.
6155 (symtab_insertion): Likewise.
6156 (symtab_removal): Likewise.
6157 (symtab_duplication): Likewise.
6158 (get): Likewise.
6159
6160 2018-06-08 Martin Liska <mliska@suse.cz>
6161
6162 * Makefile.in: Remove support for MPX (macros, related functions,
6163 fields in cgraph_node, ...).
6164 * builtin-types.def (BT_BND): Likewise.
6165 (BT_FN_BND_CONST_PTR): Likewise.
6166 (BT_FN_CONST_PTR_BND): Likewise.
6167 (BT_FN_VOID_PTR_BND): Likewise.
6168 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6169 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6170 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6171 (expand_builtin_mempcpy_with_bounds): Likewise.
6172 (expand_builtin_memset_with_bounds): Likewise.
6173 (expand_builtin_memset_args): Likewise.
6174 (std_expand_builtin_va_start): Likewise.
6175 (expand_builtin): Likewise.
6176 (expand_builtin_with_bounds): Likewise.
6177 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6178 (DEF_LIB_BUILTIN_CHKP): Likewise.
6179 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6180 (DEF_CHKP_BUILTIN): Likewise.
6181 (BUILT_IN_MEMCPY): Likewise.
6182 (BUILT_IN_MEMMOVE): Likewise.
6183 (BUILT_IN_MEMPCPY): Likewise.
6184 (BUILT_IN_MEMSET): Likewise.
6185 (BUILT_IN_STPCPY): Likewise.
6186 (BUILT_IN_STRCAT): Likewise.
6187 (BUILT_IN_STRCHR): Likewise.
6188 (BUILT_IN_STRCPY): Likewise.
6189 (BUILT_IN_STRLEN): Likewise.
6190 (BUILT_IN_MEMCPY_CHK): Likewise.
6191 (BUILT_IN_MEMMOVE_CHK): Likewise.
6192 (BUILT_IN_MEMPCPY_CHK): Likewise.
6193 (BUILT_IN_MEMSET_CHK): Likewise.
6194 (BUILT_IN_STPCPY_CHK): Likewise.
6195 (BUILT_IN_STRCAT_CHK): Likewise.
6196 (BUILT_IN_STRCPY_CHK): Likewise.
6197 * calls.c (store_bounds): Likewise.
6198 (emit_call_1): Likewise.
6199 (special_function_p): Likewise.
6200 (maybe_warn_nonstring_arg): Likewise.
6201 (initialize_argument_information): Likewise.
6202 (finalize_must_preallocate): Likewise.
6203 (compute_argument_addresses): Likewise.
6204 (expand_call): Likewise.
6205 * cfgexpand.c (expand_call_stmt): Likewise.
6206 (expand_return): Likewise.
6207 (expand_gimple_stmt_1): Likewise.
6208 (pass_expand::execute): Likewise.
6209 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6210 (cgraph_node::remove): Likewise.
6211 (cgraph_node::dump): Likewise.
6212 (cgraph_node::verify_node): Likewise.
6213 * cgraph.h (chkp_function_instrumented_p): Likewise.
6214 (symtab_node::get_alias_target): Likewise.
6215 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6216 (cgraph_local_p): Likewise.
6217 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6218 (cgraph_edge::rebuild_references): Likewise.
6219 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6220 (walk_polymorphic_call_targets): Likewise.
6221 (cgraph_node::expand_thunk): Likewise.
6222 (symbol_table::output_weakrefs): Likewise.
6223 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6224 (ix86_handle_option): Likewise.
6225 * config/i386/constraints.md: Likewise.
6226 * config/i386/i386-builtin-types.def (BND): Likewise.
6227 (VOID): Likewise.
6228 (PVOID): Likewise.
6229 (ULONG): Likewise.
6230 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6231 (BDESC_FIRST): Likewise.
6232 (BDESC): Likewise.
6233 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6234 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6235 * config/i386/i386.c (enum reg_class): Likewise.
6236 (ix86_target_string): Likewise.
6237 (ix86_option_override_internal): Likewise.
6238 (ix86_conditional_register_usage): Likewise.
6239 (ix86_valid_target_attribute_inner_p): Likewise.
6240 (ix86_set_indirect_branch_type): Likewise.
6241 (ix86_set_current_function): Likewise.
6242 (ix86_function_arg_regno_p): Likewise.
6243 (init_cumulative_args): Likewise.
6244 (ix86_function_arg_advance): Likewise.
6245 (ix86_function_arg): Likewise.
6246 (ix86_pass_by_reference): Likewise.
6247 (ix86_function_value_regno_p): Likewise.
6248 (ix86_function_value_1): Likewise.
6249 (ix86_function_value_bounds): Likewise.
6250 (ix86_return_in_memory): Likewise.
6251 (ix86_setup_incoming_vararg_bounds): Likewise.
6252 (ix86_va_start): Likewise.
6253 (indirect_thunk_need_prefix): Likewise.
6254 (print_reg): Likewise.
6255 (ix86_print_operand): Likewise.
6256 (ix86_expand_call): Likewise.
6257 (ix86_output_function_return): Likewise.
6258 (reg_encoded_number): Likewise.
6259 (BDESC_VERIFYS): Likewise.
6260 (ix86_init_mpx_builtins): Likewise.
6261 (ix86_init_builtins): Likewise.
6262 (ix86_emit_cmove): Likewise.
6263 (ix86_emit_move_max): Likewise.
6264 (ix86_expand_builtin): Likewise.
6265 (ix86_builtin_mpx_function): Likewise.
6266 (ix86_get_arg_address_for_bt): Likewise.
6267 (ix86_load_bounds): Likewise.
6268 (ix86_store_bounds): Likewise.
6269 (ix86_load_returned_bounds): Likewise.
6270 (ix86_store_returned_bounds): Likewise.
6271 (ix86_class_likely_spilled_p): Likewise.
6272 (ix86_hard_regno_mode_ok): Likewise.
6273 (x86_order_regs_for_local_alloc): Likewise.
6274 (ix86_mitigate_rop): Likewise.
6275 (ix86_bnd_prefixed_insn_p): Likewise.
6276 (ix86_mpx_bound_mode): Likewise.
6277 (ix86_make_bounds_constant): Likewise.
6278 (ix86_initialize_bounds): Likewise.
6279 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6280 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6281 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6282 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6283 (TARGET_CHKP_BOUND_MODE): Likewise.
6284 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6285 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6286 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6287 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6288 * config/i386/i386.h (TARGET_MPX): Likewise.
6289 (TARGET_MPX_P): Likewise.
6290 (VALID_BND_REG_MODE): Likewise.
6291 (FIRST_BND_REG): Likewise.
6292 (LAST_BND_REG): Likewise.
6293 (enum reg_class): Likewise.
6294 (BND_REG_P): Likewise.
6295 (BND_REGNO_P): Likewise.
6296 (BNDmode): Likewise.
6297 (ADJUST_INSN_LENGTH): Likewise.
6298 * config/i386/i386.md: Likewise.
6299 * config/i386/i386.opt: Likewise.
6300 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6301 (defined): Likewise.
6302 (LINK_MPX): Likewise.
6303 (MPX_SPEC): Likewise.
6304 (LIBMPX_SPEC): Likewise.
6305 (LIBMPXWRAPPERS_SPEC): Likewise.
6306 (CHKP_SPEC): Likewise.
6307 * config/i386/predicates.md: Likewise.
6308 * dbxout.c (dbxout_type): Likewise.
6309 * doc/extend.texi: Likewise.
6310 * doc/invoke.texi: Likewise.
6311 * doc/md.texi: Likewise.
6312 * doc/tm.texi: Likewise.
6313 * doc/tm.texi.in: Likewise.
6314 * dwarf2out.c (is_base_type): Likewise.
6315 (gen_formal_types_die): Likewise.
6316 (gen_subprogram_die): Likewise.
6317 (gen_type_die_with_usage): Likewise.
6318 (gen_decl_die): Likewise.
6319 (dwarf2out_late_global_decl): Likewise.
6320 * expr.c (expand_assignment): Likewise.
6321 (emit_storent_insn): Likewise.
6322 (store_expr_with_bounds): Likewise.
6323 (store_expr): Likewise.
6324 (expand_expr_real_1): Likewise.
6325 * expr.h (store_expr_with_bounds): Likewise.
6326 * function.c (use_register_for_decl): Likewise.
6327 (struct bounds_parm_data): Likewise.
6328 (assign_parms_augmented_arg_list): Likewise.
6329 (assign_parm_find_entry_rtl): Likewise.
6330 (assign_parm_is_stack_parm): Likewise.
6331 (assign_parm_load_bounds): Likewise.
6332 (assign_bounds): Likewise.
6333 (assign_parms): Likewise.
6334 (expand_function_start): Likewise.
6335 * gcc.c (CHKP_SPEC): Likewise.
6336 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6337 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6338 (wrestrict_dom_walker::check_call): Likewise.
6339 * gimple.c (gimple_build_call_from_tree): Likewise.
6340 * gimple.h (enum gf_mask): Likewise.
6341 (gimple_call_with_bounds_p): Likewise.
6342 (gimple_call_set_with_bounds): Likewise.
6343 * gimplify.c (gimplify_init_constructor): Likewise.
6344 * ipa-cp.c (initialize_node_lattices): Likewise.
6345 (propagate_constants_across_call): Likewise.
6346 (find_more_scalar_values_for_callers_subset): Likewise.
6347 * ipa-hsa.c (process_hsa_functions): Likewise.
6348 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6349 * ipa-icf.c (sem_function::merge): Likewise.
6350 * ipa-inline.c (early_inliner): Likewise.
6351 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6352 (warn_function_cold): Likewise.
6353 (propagate_pure_const): Likewise.
6354 * ipa-ref.h (enum GTY): Likewise.
6355 * ipa-split.c (find_retbnd): Likewise.
6356 (consider_split): Likewise.
6357 (split_function): Likewise.
6358 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6359 * ipa.c (walk_polymorphic_call_targets): Likewise.
6360 (symbol_table::remove_unreachable_nodes): Likewise.
6361 (process_references): Likewise.
6362 (cgraph_build_static_cdtor_1): Likewise.
6363 * lto-cgraph.c (lto_output_node): Likewise.
6364 (output_refs): Likewise.
6365 (compute_ltrans_boundary): Likewise.
6366 (input_overwrite_node): Likewise.
6367 (input_node): Likewise.
6368 (input_cgraph_1): Likewise.
6369 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6370 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6371 (class pass_chkp_instrumentation_passes): Likewise.
6372 (make_pass_chkp_instrumentation_passes): Likewise.
6373 * passes.def: Likewise.
6374 * rtl.h (struct GTY): Likewise.
6375 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6376 * stor-layout.c (layout_type): Likewise.
6377 * symtab.c: Likewise.
6378 * target.def: Likewise.
6379 * targhooks.c (default_chkp_bound_type): Likewise.
6380 (default_chkp_bound_mode): Likewise.
6381 (default_builtin_chkp_function): Likewise.
6382 (default_chkp_function_value_bounds): Likewise.
6383 (default_chkp_make_bounds_constant): Likewise.
6384 (default_chkp_initialize_bounds): Likewise.
6385 * targhooks.h (default_chkp_bound_type): Likewise.
6386 (default_chkp_bound_mode): Likewise.
6387 (default_builtin_chkp_function): Likewise.
6388 (default_chkp_function_value_bounds): Likewise.
6389 (default_chkp_make_bounds_constant): Likewise.
6390 (default_chkp_initialize_bounds): Likewise.
6391 * toplev.c (compile_file): Likewise.
6392 (process_options): Likewise.
6393 * tree-core.h (DEF_BUILTIN): Likewise.
6394 (DEF_BUILTIN_CHKP): Likewise.
6395 * tree-inline.c (declare_return_variable): Likewise.
6396 (remap_gimple_stmt): Likewise.
6397 (copy_bb): Likewise.
6398 (initialize_inlined_parameters): Likewise.
6399 (expand_call_inline): Likewise.
6400 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6401 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6402 (make_pass_ipa_chkp_produce_thunks): Likewise.
6403 (make_pass_chkp): Likewise.
6404 (make_pass_chkp_opt): Likewise.
6405 (make_pass_chkp_instrumentation_passes): Likewise.
6406 * tree-pretty-print.c (dump_generic_node): Likewise.
6407 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6408 * tree-ssa-dce.c (propagate_necessity): Likewise.
6409 (eliminate_unnecessary_stmts): Likewise.
6410 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6411 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6412 * tree-ssa-sccvn.h: Likewise.
6413 * tree-ssa-strlen.c (get_string_length): Likewise.
6414 (valid_builtin_call): Likewise.
6415 (adjust_last_stmt): Likewise.
6416 (handle_builtin_strchr): Likewise.
6417 (handle_builtin_strcpy): Likewise.
6418 (handle_builtin_stxncpy): Likewise.
6419 (handle_builtin_memcpy): Likewise.
6420 (handle_builtin_strcat): Likewise.
6421 (strlen_check_and_optimize_stmt): Likewise.
6422 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6423 * tree-streamer-in.c: Likewise.
6424 * tree-streamer.c (record_common_node): Likewise.
6425 * tree.c (tree_code_size): Likewise.
6426 (wide_int_to_tree_1): Likewise.
6427 (type_contains_placeholder_1): Likewise.
6428 (build_common_tree_nodes): Likewise.
6429 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6430 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6431 (POINTER_BOUNDS_P): Likewise.
6432 (BOUNDED_TYPE_P): Likewise.
6433 (BOUNDED_P): Likewise.
6434 (CALL_WITH_BOUNDS_P): Likewise.
6435 (pointer_bounds_type_node): Likewise.
6436 * value-prof.c (gimple_ic): Likewise.
6437 * var-tracking.c (vt_add_function_parameters): Likewise.
6438 * varasm.c (make_decl_rtl): Likewise.
6439 (assemble_start_function): Likewise.
6440 (output_constant): Likewise.
6441 (maybe_assemble_visibility): Likewise.
6442 * varpool.c (ctor_for_folding): Likewise.
6443 * chkp-builtins.def: Remove.
6444 * ipa-chkp.c: Remove.
6445 * ipa-chkp.h: Remove.
6446 * rtl-chkp.c: Remove.
6447 * rtl-chkp.h: Remove.
6448 * tree-chkp-opt.c: Remove.
6449 * tree-chkp.c: Remove.
6450 * tree-chkp.h: Remove.
6451
6452 2018-06-07 Carl Love <cel@us.ibm.com>
6453
6454 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6455 vextract_fp_from_shortl): Add BE support.
6456
6457 2018-06-07 Paul Koning <ni1d@arrl.net>
6458
6459 * compare-elim.c (try_merge_compare): Don't merge compare if
6460 address contains a side effect.
6461 (try_eliminate_compare): Likewise.
6462
6463 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6464
6465 * config.gcc: Support "tremont".
6466 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6467 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6468 PROCESSOR_TREMONT.
6469 * config/i386/i386.c (m_TREMONT): Define.
6470 (processor_target_table): Add "tremont".
6471 (PTA_TREMONT): Define.
6472 (ix86_lea_outperforms): Add TARGET_TREMONT.
6473 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6474 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6475 and M_INTEL_GOLDMONT_PLUS.
6476 (fold_builtin_cpu): Add "tremont".
6477 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6478 (ix86_option_override_internal): Add "tremont".
6479 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6480 (processor_type): Add PROCESSOR_TREMONT.
6481 * config/i386/x86-tune.def: Add m_TREMONT.
6482 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6483
6484 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6485
6486 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6487 symbol defined for msp430i* devices to be lower case.
6488
6489 2018-06-07 Richard Biener <rguenther@suse.de>
6490
6491 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6492 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6493 Properly wrap signed arithmetic if overflow wraps.
6494
6495 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6496
6497 PR tree-optimization/69615
6498 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6499 of a cast from a same precision integral SSA_NAME in a bb dominated
6500 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6501 cast to utype if rhs2 has already a compatible type.
6502
6503 2018-06-07 Richard Biener <rguenther@suse.de>
6504
6505 PR tree-optimization/85935
6506 * graphite-scop-detection.c (find_params_in_bb): Analyze
6507 condition operands with respect to the correct loop. Assert
6508 the analysis doesn't fail.
6509
6510 2018-06-04 Carl Love <cel@us.ibm.com>
6511
6512 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6513 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6514 as it is slightly cheaper.
6515 (first_match_or_eos_index_<mode>):
6516 Calculate index using natural element order.
6517 (first_match_index_<mode>):
6518 Calculate index using natural element order.
6519 (first_match_or_eos_index_<mode>):
6520 Calculate index using natural order.
6521 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6522 for BE and LE modes.
6523 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6524 P9V_BUILTIN_VCLZLSBB_V16QI.
6525 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6526 specific.
6527
6528 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6529
6530 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6531 indentation and line wrap for many prototypes. Add missing
6532 @smallexample directives around block of prototypes for vec_xl and
6533 vec_xst.
6534
6535 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6536
6537 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6538 track if we pass or return IEEE 128-bit floating point.
6539 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6540 C++ mangling that is compatible with GCC 8.1.
6541 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6542 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6543 floating point types.
6544 (rs6000_function_arg_advance_1): Likewise.
6545 (rs6000_mangle_type): Optionally generate mangled names that match
6546 what GCC 8.1 generated for IEEE 128-bit floating point types.
6547 (rs6000_globalize_decl_name): If we have an external function that
6548 passes or returns IEEE 128-bit types, generate a weak reference
6549 from the mangled name used in GCC 8.1 to the current mangled
6550 name.
6551 (rs6000_init_builtins): Make __ibm128 use the long double type if
6552 long double is IBM extended double. Make __float128 use the long
6553 double type if long double is IEEE 128-bit.
6554
6555 PR target/85657
6556 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6557 macro for __ibm128 built-in functions.
6558 (PACK_IF): Add __ibm128 pack/unpack functions.
6559 (UNPACK_IF): Likewise.
6560 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6561 enable long double built-in functions if long double is IEEE
6562 128-bit floating point.
6563 (rs6000_invalid_builtin): Update long double built-in function
6564 error message.
6565 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6566 functions, adjust the built-in function to use the long double
6567 built-in function if __ibm128 and long double are the same type.
6568 * doc/extend.texi (PowerPC builtins): Update documention for
6569 __builtin_{,un}pack_longdouble. Add documentation for
6570 __builtin_{,un}pack_ibm128.
6571
6572 2018-06-06 Jim Wilson <jimw@sifive.com>
6573
6574 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6575 (struct machine_function): New field interrupt_mode.
6576 (riscv_handle_type_attribute): New function. Add forward declaration.
6577 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6578 (riscv_expand_epilogue): Check interrupt_mode field.
6579 (riscv_set_current_function): Check interrupt attribute args and
6580 set interrupt_mode field.
6581 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6582 (riscv_sret, riscv_uret): New.
6583 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6584 new arguments to interrupt attribute.
6585
6586 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6587
6588 PR target/63177
6589 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6590 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6591
6592 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6593
6594 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6595 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6596 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6597 several redundant entries.
6598
6599 2018-06-06 David Malcolm <dmalcolm@redhat.com>
6600
6601 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6602 type from "rtx" to "rtx_insn *".
6603 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6604 for local "call_insn", removing cast.
6605 (ix86_expand_call): Likewise, introducing a "call_insn" local.
6606
6607 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
6608
6609 PR tree-optimization/86066
6610 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6611 for BIT_INSERT_EXPR stores.
6612
6613 2018-06-06 Richard Biener <rguenther@suse.de>
6614
6615 PR tree-optimization/86062
6616 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6617 component refs ontop
6618 of to be offsetted base.
6619
6620 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6621
6622 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6623 to be static and remove check on interrupt attribute name.
6624
6625 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
6626
6627 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6628 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6629
6630 2018-06-05 Steve Ellcey <sellcey@cavium.com>
6631
6632 PR target/79924
6633 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6634 second argument.
6635 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6636 Remove second argument, change how error is called.
6637 (aarch64_layout_arg): Remove second argument from
6638 aarch64_err_no_fpadvsimd call.
6639 (aarch64_init_cumulative_args): Ditto.
6640 (aarch64_gimplify_va_arg_expr): Ditto.
6641 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6642
6643 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6644
6645 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6646 (*simple_return_indirect_internal<mode>): Rename from
6647 simple_return_indirect_internal. Use W mode iterator.
6648 (rstorssp): New expander.
6649 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6650 (clrssbsy): New expander.
6651 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6652
6653 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6654
6655 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6656 __typeof__.
6657 (cmse_check_pointed_object): Likewise.
6658
6659 2018-06-05 Martin Liska <mliska@suse.cz>
6660
6661 PR gcov-profile/47618
6662 * doc/invoke.texi: Document how -fprofile-dir format
6663 is extended.
6664
6665 2018-06-05 Richard Biener <rguenther@suse.de>
6666
6667 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6668 removal pretend DOM info isn't available so we do not update
6669 it and only remove edges, not dominated blocks. Actually free
6670 DOM info in case we removed something. Remove unreachable blocks.
6671 (mfb_keep_latches): Work with either DOM info or marked backedges.
6672 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6673 first. Mark backedges if DOM info isn't available.
6674 (Re-)compute DOM info after cleanup_control_flow_pre.
6675
6676 2018-06-05 Richard Biener <rguenther@suse.de>
6677
6678 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6679 (locus_discrim_hasher::hash): Adjust.
6680 (locus_discrim_hasher::equal): Likewise.
6681 (next_discriminator_for_locus): Work on line directly.
6682 (same_line_p): Pass in expanded locus1 as well.
6683 (assign_discriminators): Avoid redundant location expansions.
6684
6685 2018-06-05 Richard Biener <rguenther@suse.de>
6686
6687 PR tree-optimization/86046
6688 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6689 if required after clearing TREE_ADDRESSABLE.
6690
6691 2018-06-05 Richard Biener <rguenther@suse.de>
6692
6693 PR tree-optimization/86047
6694 * tree-ssa-loop.c (for_each_index): Glob handling of all
6695 decls and constants and really handle all of them.
6696
6697 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6698
6699 PR target/81497
6700 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6701 qualifier_void_pointer and qualifier_const_void_pointer.
6702 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6703 (arm_init_builtins): Handle the above.
6704 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6705 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6706 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6707 void intrinsics.
6708
6709 2018-06-05 Martin Liska <mliska@suse.cz>
6710
6711 * auto-profile.c (read_autofdo_file): Do not use
6712 gcov_ctr_summary struct.
6713 (afdo_callsite_hot_enough_for_early_inline): Likewise.
6714 * coverage.c (struct counts_entry): Likewise.
6715 (read_counts_file): Read just single summary entry.
6716 (get_coverage_counts): Use gcov_summary struct.
6717 * coverage.h (get_coverage_counts): Likewise.
6718 * gcov-dump.c (dump_working_sets): Likewise.
6719 (tag_summary): Dump just single summary.
6720 * gcov-io.c (gcov_write_summary): Write just histogram
6721 summary.
6722 (gcov_read_summary): Read just single summary.
6723 (compute_working_sets): Use gcov_summary struct.
6724 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6725 of GCOV_COUNTERS_SUMMABLE.
6726 (GCOV_COUNTERS_SUMMABLE): Remove.
6727 (GCOV_FIRST_VALUE_COUNTER): Replace with
6728 GCOV_COUNTER_V_INTERVAL.
6729 (struct gcov_ctr_summary): Remove.
6730 (struct gcov_summary): Directly use fields of former
6731 gcov_ctr_summary.
6732 (compute_working_sets): Use gcov_summary struct.
6733 * gcov.c (read_count_file): Do not use ctrs fields.
6734 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6735 struct.
6736 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6737 struct.
6738 * profile.c: Likewise.
6739 * profile.h: Likewise.
6740
6741 2018-06-05 Martin Liska <mliska@suse.cz>
6742
6743 PR gcov-profile/84846
6744 * gcov.c (output_lines): Print working directory only
6745 in intermediate format.
6746
6747 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
6748
6749 * config/s390/s390-builtin-types.def: Add void function type.
6750 * config/s390/s390-builtins.def: Use the function type for the
6751 tbeginc builtin.
6752
6753 2018-06-04 Jim Wilson <jimw@sifive.com>
6754
6755 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6756 to int.
6757 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6758 and maybe_eh_return. Change regno to unsigned int. Use new args to
6759 handle EH_RETURN_DATA_REGNO registers properly.
6760 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6761 (riscv_expand_epilogue): Update comment. Change argument name and
6762 type. Update code to use new name and type. Pass new args to
6763 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
6764 EXCEPTION_RETURN.
6765 * config/riscv/riscv.md (NORMAL_RETURN): New.
6766 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6767 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6768 (eh_return): Call gen_eh_return_internal and emit barrier.
6769 (eh_return_internal): Call riscv_expand_epilogue.
6770
6771 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
6772
6773 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6774 bit_insertion field and declare can_be_merged_into method.
6775 (merged_store_group::can_be_merged_into): New method.
6776 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6777 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
6778 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6779
6780 2018-06-04 Richard Biener <rguenther@suse.de>
6781
6782 PR tree-optimization/85955
6783 * builtins.c (fold_builtin_sincos): Convert pointers to
6784 destination to appropriate type before dereferencing.
6785
6786 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
6787
6788 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6789
6790 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6791
6792 * expr.c (expand_expr_real_1): Force the operand into memory if
6793 its TYPE_MODE is BLKmode and if there is no integer mode for
6794 the number of bits being extracted.
6795
6796 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6797
6798 PR target/85832
6799 PR target/86036
6800 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6801 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6802
6803 2018-06-04 Richard Biener <rguenther@suse.de>
6804
6805 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6806 (cleanup_tree_cfg_noloop): ... single caller. Do
6807 start_recording_case_labels later.
6808
6809 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6810
6811 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6812 to _IMMINTRIN_H_INCLUDED.
6813 * config/i386/pconfigintrin.h: Ditto.
6814 * config/i386/waitpkgintrin.h: Ditto.
6815 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6816 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6817 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6818 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6819 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6820 waitpkgintrin.h and cldemoteintrin.h.
6821
6822 2018-06-04 Richard Biener <rguenther@suse.de>
6823
6824 PR tree-optimization/86038
6825 * tracer.c (find_best_successor): Check probability for
6826 being initialized, bail out if not.
6827
6828 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6829
6830 PR target/86003
6831 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6832 of bits to ignore when comparing architectures.
6833
6834 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6835
6836 PR tree-optimization/69615
6837 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6838 maximum or minimum of the type, try to merge it also as if
6839 range1 is + [-, x - 1] or + [x + 1, -].
6840
6841 PR c++/86025
6842 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6843
6844 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6845
6846 PR tree-optimization/86034
6847 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6848 the unsigned bitfield type in a bit insertion sequence if it does not
6849 have a larger precision than the bitfield size.
6850 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6851
6852 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6853
6854 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6855
6856 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6857
6858 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6859 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6860 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6861 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6862
6863 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6864
6865 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6866 Disable -fdelete-null-pointer-checks for ELF toolchain.
6867
6868 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6869 Kito Cheng <kito.cheng@gmail.com>
6870
6871 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6872 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6873 (nds32*-*-*): Add glibc and uclibc conditions.
6874 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6875 (TARGET_EXCEPT_UNWIND_INFO): Define.
6876 * config/nds32/elf.h: New file.
6877 * config/nds32/linux.h: New file.
6878 * config/nds32/nds32-elf.opt: New file.
6879 * config/nds32/nds32-linux.opt: New file.
6880 * config/nds32/nds32-fp-as-gp.c
6881 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6882 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6883 TARGET_LINUX_ABI.
6884 (nds32_asm_file_end): Ditto.
6885 (nds32_print_operand): Ditto.
6886 (nds32_insert_attributes): Ditto.
6887 (nds32_init_libfuncs): New function.
6888 (TARGET_HAVE_TLS): Define.
6889 (TARGET_INIT_LIBFUNCS): Define.
6890 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6891 spec content.
6892 (TARGET_ELF): Apply different mcmodel setting.
6893 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6894 been migrated into elf.h and linux.h files.
6895 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6896 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6897 (mcmodel): The content has been migrated into nds32-elf.opt and
6898 nds32-linux.opt files.
6899 * config/nds32/t-elf: New file.
6900 * config/nds32/t-linux: New file.
6901
6902 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6903 Shiva Chen <shiva0217@gmail.com>
6904
6905 * config/nds32/constants.md (unspec_volatile_element): Add
6906 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6907 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6908 optimization.
6909 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6910 (make_pass_nds32_fp_as_gp): Declare.
6911 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6912 optmization pass.
6913 (nds32_asm_function_end_prologue): Remove unused asm output.
6914 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6915 (nds32_asm_file_start): Output necessary fp_as_gp information.
6916 (nds32_option_override): Adjust register usage.
6917 (nds32_expand_prologue): Consider fp_as_gp situation.
6918 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6919 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6920 (epilogue): Ditto.
6921 (return): Ditto.
6922 (simple_return): Ditto.
6923 (omit_fp_begin): Output special directive for fp_as_gp.
6924 (omit_fp_end): Output special directive for fp_as_gp.
6925 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6926 mforbid-fp-as-gp): New options.
6927
6928 2018-06-01 Mark Wielaard <mark@klomp.org>
6929
6930 * dwarf2out.c (dwarf2out_finish): Remove generation of
6931 DW_AT_loclists_base.
6932
6933 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6934
6935 * gimple-ssa-store-merging.c: Include gimple-fold.h.
6936 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6937 (struct merged_store_group): Add bit_insertion field.
6938 (dump_char_array): Use standard hexadecimal format.
6939 (merged_store_group::merged_store_group): Set bit_insertion to false.
6940 (merged_store_group::apply_stores): Use optimal buffer size. Deal
6941 with BIT_INSERT_EXPR stores. Move up code updating the mask and
6942 also print the mask in the dump file.
6943 (pass_store_merging::gate): Minor tweak.
6944 (imm_store_chain_info::coalesce_immediate): Fix wrong association
6945 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
6946 stores with INTEGER_CST stores.
6947 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6948 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6949 and use it throughout. Generate bit insertion sequences if need be.
6950 (pass_store_merging::process_store): Remove redundant condition.
6951 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6952
6953 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
6954
6955 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6956 the 128-bit floating point types. Fix function comment.
6957
6958 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6959
6960 * config/aarch64/aarch64-simd.md
6961 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6962 mnemonics.
6963 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6964 mnemonics.
6965
6966 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6967
6968 PR tree-optimization/85989
6969 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6970 variable.
6971 (backprop::intersect_uses): Check it when deciding whether this
6972 is a backedge reference.
6973 (backprop::process_block): Add each phi to m_visited_phis
6974 after visiting it, then clear it at the end.
6975
6976 2018-06-01 Richard Biener <rguenther@suse.de>
6977
6978 * tree-vectorizer.h (vect_dr_stmt): New function.
6979 (vect_get_load_cost): Adjust.
6980 (vect_get_store_cost): Likewise.
6981 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6982 Use vect_dr_stmt instead of DR_SMTT.
6983 (vect_record_base_alignments): Likewise.
6984 (vect_calculate_target_alignment): Likewise.
6985 (vect_compute_data_ref_alignment): Likewise and make static.
6986 (vect_update_misalignment_for_peel): Likewise.
6987 (vect_verify_datarefs_alignment): Likewise.
6988 (vector_alignment_reachable_p): Likewise.
6989 (vect_get_data_access_cost): Likewise. Pass down
6990 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6991 (vect_get_peeling_costs_all_drs): Likewise.
6992 (vect_peeling_hash_get_lowest_cost): Likewise.
6993 (vect_enhance_data_refs_alignment): Likewise.
6994 (vect_find_same_alignment_drs): Likewise.
6995 (vect_analyze_data_refs_alignment): Likewise.
6996 (vect_analyze_group_access_1): Likewise.
6997 (vect_analyze_group_access): Likewise.
6998 (vect_analyze_data_ref_access): Likewise.
6999 (vect_analyze_data_ref_accesses): Likewise.
7000 (vect_vfa_segment_size): Likewise.
7001 (vect_small_gap_p): Likewise.
7002 (vectorizable_with_step_bound_p): Likewise.
7003 (vect_prune_runtime_alias_test_list): Likewise.
7004 (vect_analyze_data_refs): Likewise.
7005 (vect_supportable_dr_alignment): Likewise.
7006 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7007 (vect_gen_prolog_loop_niters): Likewise.
7008 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7009 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7010 modify DR_STMT.
7011 (vect_recog_mask_conversion_pattern): Likewise.
7012 (vect_try_gather_scatter_pattern): Likewise.
7013 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7014 to vect_get_store_cost.
7015 (vect_get_store_cost): Get stmt_info instead of DR.
7016 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7017 (vect_get_load_cost): Get stmt_info instead of DR.
7018
7019 2018-06-01 Richard Biener <rguenther@suse.de>
7020
7021 PR middle-end/86017
7022 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7023 vars wrapped in MEM_REFs.
7024
7025 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7026
7027 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7028 Fix subreg tests so that we only return a choice between
7029 GENERAL_REGS and FP_REGS if the original classes included both.
7030
7031 2018-06-01 Richard Biener <rguenther@suse.de>
7032
7033 PR ipa/85960
7034 * tree-ssa-structalias.c (get_function_part_constraint):
7035 Handle NULL fi->decl.
7036 (find_func_aliases_for_call): Properly handle indirect
7037 fi from direct call.
7038 (find_func_clobbers): Likewise.
7039 (ipa_pta_execute): Likewise.
7040 (create_variable_info_for): For functions that are ifunc_resolver
7041 resolve to a varinfo that contains the result of the resolver call.
7042 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7043 aliases.
7044
7045 2018-05-31 Michael Collison <michael.collison@arm.com>
7046
7047 * config/aarch64/aarch64.md:
7048 (*fix_to_zero_extenddfdi2): New pattern.
7049 * gcc.target/aarch64/fix_extend1.c: New testcase.
7050
7051 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7052
7053 PR middle-end/78809
7054 PR middle-end/83026
7055 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7056 and BUILT_IN_STRNCMP_EQ.
7057 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7058 BUILT_IN_STRNCMP_EQ.
7059 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7060 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7061 (gimple_fold_builtin): Likewise.
7062 * tree-ssa-strlen.c (compute_string_length): New function.
7063 (determine_min_obsize): New function.
7064 (handle_builtin_string_cmp): New function to handle calls to
7065 string compare functions.
7066 (strlen_optimize_stmt): Add handling to builtin string compare
7067 calls.
7068 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7069 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7070 * tree.c (build_common_builtin_nodes): Add new defines of
7071 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7072
7073 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7074
7075 PR target/85984
7076 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7077 functions with naked attribute.
7078
7079 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7080
7081 * config/i386/sse.md (avx_vec_concat<mode>):
7082 Substitute concat_tg_mode mode attribute with xtg_mode.
7083 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7084 (concat_tg_mode): Remove mode attribute.
7085
7086 2018-05-31 Martin Sebor <msebor@redhat.com>
7087
7088 PR c/82063
7089 * calls.c (alloc_max_size): Correct a logic error/typo.
7090 Treat excessive arguments as infinite. Warn for invalid arguments.
7091 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7092
7093 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7094
7095 PR target/85829
7096 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7097 and movx for Haswell.
7098
7099 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7100 Cesar Philippidis <cesar@codesourcery.com>
7101
7102 PR middle-end/85879
7103 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7104 when emitting error on private/firstprivate reductions.
7105 * omp-low.c (lower_omp_target): Avoid reference-type processing
7106 on pointers for firstprivate clause.
7107
7108 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7109
7110 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7111 (st1x2): Likewise.
7112 (st1x3): Likewise.
7113 * config/aarch64/aarch64-simd.md
7114 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7115 (aarch64_ld1_x3_<mode>): Likewise
7116 (aarch64_st1x2<VALLDIF:mode>): Likewise
7117 (aarch64_st1_x2_<mode>): Likewise
7118 (aarch64_st1x3<VALLDIF:mode>): Likewise
7119 (aarch64_st1_x3_<mode>): Likewise
7120 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7121 (vld1_s8_x3): Likewise.
7122 (vld1_u16_x3): Likewise.
7123 (vld1_s16_x3): Likewise.
7124 (vld1_u32_x3): Likewise.
7125 (vld1_s32_x3): Likewise.
7126 (vld1_u64_x3): Likewise.
7127 (vld1_s64_x3): Likewise.
7128 (vld1_f16_x3): Likewise.
7129 (vld1_f32_x3): Likewise.
7130 (vld1_f64_x3): Likewise.
7131 (vld1_p8_x3): Likewise.
7132 (vld1_p16_x3): Likewise.
7133 (vld1_p64_x3): Likewise.
7134 (vld1q_u8_x3): Likewise.
7135 (vld1q_s8_x3): Likewise.
7136 (vld1q_u16_x3): Likewise.
7137 (vld1q_s16_x3): Likewise.
7138 (vld1q_u32_x3): Likewise.
7139 (vld1q_s32_x3): Likewise.
7140 (vld1q_u64_x3): Likewise.
7141 (vld1q_s64_x3): Likewise.
7142 (vld1q_f16_x3): Likewise.
7143 (vld1q_f32_x3): Likewise.
7144 (vld1q_f64_x3): Likewise.
7145 (vld1q_p8_x3): Likewise.
7146 (vld1q_p16_x3): Likewise.
7147 (vld1q_p64_x3): Likewise.
7148 (vst1_s64_x2): Likewise.
7149 (vst1_u64_x2): Likewise.
7150 (vst1_f64_x2): Likewise.
7151 (vst1_s8_x2): Likewise.
7152 (vst1_p8_x2): Likewise.
7153 (vst1_s16_x2): Likewise.
7154 (vst1_p16_x2): Likewise.
7155 (vst1_s32_x2): Likewise.
7156 (vst1_u8_x2): Likewise.
7157 (vst1_u16_x2): Likewise.
7158 (vst1_u32_x2): Likewise.
7159 (vst1_f16_x2): Likewise.
7160 (vst1_f32_x2): Likewise.
7161 (vst1_p64_x2): Likewise.
7162 (vst1q_s8_x2): Likewise.
7163 (vst1q_p8_x2): Likewise.
7164 (vst1q_s16_x2): Likewise.
7165 (vst1q_p16_x2): Likewise.
7166 (vst1q_s32_x2): Likewise.
7167 (vst1q_s64_x2): Likewise.
7168 (vst1q_u8_x2): Likewise.
7169 (vst1q_u16_x2): Likewise.
7170 (vst1q_u32_x2): Likewise.
7171 (vst1q_u64_x2): Likewise.
7172 (vst1q_f16_x2): Likewise.
7173 (vst1q_f32_x2): Likewise.
7174 (vst1q_f64_x2): Likewise.
7175 (vst1q_p64_x2): Likewise.
7176 (vst1_s64_x3): Likewise.
7177 (vst1_u64_x3): Likewise.
7178 (vst1_f64_x3): Likewise.
7179 (vst1_s8_x3): Likewise.
7180 (vst1_p8_x3): Likewise.
7181 (vst1_s16_x3): Likewise.
7182 (vst1_p16_x3): Likewise.
7183 (vst1_s32_x3): Likewise.
7184 (vst1_u8_x3): Likewise.
7185 (vst1_u16_x3): Likewise.
7186 (vst1_u32_x3): Likewise.
7187 (vst1_f16_x3): Likewise.
7188 (vst1_f32_x3): Likewise.
7189 (vst1_p64_x3): Likewise.
7190 (vst1q_s8_x3): Likewise.
7191 (vst1q_p8_x3): Likewise.
7192 (vst1q_s16_x3): Likewise.
7193 (vst1q_p16_x3): Likewise.
7194 (vst1q_s32_x3): Likewise.
7195 (vst1q_s64_x3): Likewise.
7196 (vst1q_u8_x3): Likewise.
7197 (vst1q_u16_x3): Likewise.
7198 (vst1q_u32_x3): Likewise.
7199 (vst1q_u64_x3): Likewise.
7200 (vst1q_f16_x3): Likewise.
7201 (vst1q_f32_x3): Likewise.
7202 (vst1q_f64_x3): Likewise.
7203 (vst1q_p64_x3): Likewise.
7204
7205 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7206
7207 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7208 user_label_prefix to name.
7209
7210 * tree-core.h: Update comment about the format of NAME string
7211 passed to handler in attribute_spec.
7212
7213 * config/msp430/msp430.md: Remove erroneous subreg expression from
7214 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7215 zero_extend{q,h}isi2.
7216
7217 2018-05-30 Borislav Petkov <bp@suse.de>
7218
7219 * doc/extend.texi: Document some architecture specific
7220 constraints and sort entries.
7221
7222 2018-05-30 Martin Sebor <msebor@redhat.com>
7223
7224 PR middle-end/85369
7225 * builtins.c (expand_builtin_stpcpy_1): New function.
7226 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7227 only if the former succeeds.
7228
7229 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7230
7231 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7232 in saphira.
7233
7234 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7235
7236 * doc/invoke.texi (-flinker-output): Document
7237
7238 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7239
7240 * passes.c (ipa_write_summaries): Only modify statements if body
7241 is in memory.
7242 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7243 incrementally linking.
7244 (ipa_passes): Likewise.
7245 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7246 pass down resolution info.
7247 * common.opt (flag_incremental_link): Update info.
7248 * gcc.c (plugin specs): Turn flinker-output=* to
7249 -plugin-opt=-linker-output-known
7250 * toplev.c (compile_file): Also cut compilation when doing incremental
7251 link.
7252 * flag-types. (enum lto_partition_model): Add
7253 LTO_LINKER_OUTPUT_NOLTOREL.
7254 (invoke.texi): Add -flinker-output docs.
7255 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7256 link same way as WPA; do not stream in dead initializers.
7257
7258 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7259 darf2out_register_external_decl): Support incremental link.
7260
7261 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7262
7263 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7264
7265 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7266
7267 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7268 it down to simple_object_copy_lto_debug_sections.
7269 (run_gcc): Determine incremental LTO link time and configure
7270 lto1 into non-wpa mode, disable renaming of debug sections.
7271
7272 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7273
7274 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7275 descriptions of various incorrectly documented functions.
7276
7277 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7278
7279 Revert:
7280 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7281 address check not strict.
7282
7283 2018-05-30 Richard Biener <rguenther@suse.de>
7284
7285 PR tree-optimization/85964
7286 * tracer.c (better_p): Drop initialized count check, we only
7287 call the function with initialized counts now.
7288 (find_best_successor): Do find a best edge if one
7289 has uninitialized count.
7290 (find_best_predecessor): Likewise. Do BB frequency check only
7291 if count is initialized.
7292
7293 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7294
7295 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7296 (aarch64_ldrstr_offset_compare): New.
7297 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7298 load/store orderings.
7299 (aarch64_gen_adjusted_ldpstp): Likewise.
7300
7301 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7302
7303 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7304 Check for subset of GENERAL_REGS and FP_REGS.
7305 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7306 r=w alternative.
7307
7308 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7309
7310 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7311 and wi::to_poly_offset. Add the current offset and then check
7312 whether the sum fits, rather than using an unchecked addition of
7313 a checked term. Check for a shwi rather than a uhwi.
7314 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7315 (store_constructor): Use poly_int_tree_p.
7316 (expand_expr_real_1): Likewise.
7317 * function.c (assign_temp): Likewise.
7318 * fold-const.c (const_binop): Use poly_int_tree_p and
7319 wi::to_poly_offset.
7320 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7321 division.
7322 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7323 to_poly_offset for MEM offsets.
7324 * ipa-icf.c (sem_variable::equals): Likewise.
7325 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7326 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7327 wi::to_poly_offset for BIT_FIELD_REF offsets.
7328 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7329 wi::to_poly_offset.
7330 * var-tracking.c (emit_note_insn_var_location): Use
7331 tree_to_poly_uint64.
7332
7333 2018-05-29 Jim Wilson <jimw@sifive.com>
7334
7335 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7336
7337 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7338
7339 PR target/85950
7340 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7341 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7342 sequence.
7343 (sse4_1_round<mode>2): Use nonimmediate_operand
7344 for operand 1 predicate.
7345
7346 2018-05-29 Martin Sebor <msebor@redhat.com>
7347 Richard Biener <rguenther@suse.de>
7348
7349 PR testsuite/85888
7350 * calls.c (get_size_range): Call determine_value_range instead
7351 of get_value_range..
7352 * tree-vrp.h (determine_value_range): Declared new function.
7353 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7354
7355 2018-05-29 Richard Biener <rguenther@suse.de>
7356
7357 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7358 sure to use non-pattern stmts for get_earlier_stmt arguments.
7359 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7360 called on pattern stmts.
7361 (get_later_stmt): Likewise.
7362
7363 2018-05-29 Martin Liska <mliska@suse.cz>
7364
7365 PR gcov-profile/85759
7366 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7367 env variables.
7368
7369 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7370
7371 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7372 VEC_UNPACK_*_EXPR.
7373 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7374 VEC_PACK_*_EXPR.
7375
7376 PR target/85918
7377 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7378 VEC_PACK_FLOAT_EXPR): New tree codes.
7379 * tree-pretty-print.c (op_code_prio): Handle
7380 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7381 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7382 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7383 * tree-inline.c (estimate_operator_cost): Likewise.
7384 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7385 * fold-const.c (const_binop): Likewise.
7386 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7387 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7388 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7389 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7390 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7391 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7392 * expr.c (expand_expr_real_2): Likewise.
7393 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7394 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7395 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7396 optabs.
7397 * optabs.c (expand_widen_pattern_expr): For
7398 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7399 sign from result type rather than operand's type.
7400 (expand_binop_directly): For vec_packu_float_optab and
7401 vec_packs_float_optab allow result type to be different from operand's
7402 type.
7403 * optabs-tree.c (optab_for_tree_code): Handle
7404 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7405 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7406 * tree-vect-generic.c (expand_vector_operations_1): Handle
7407 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7408 VEC_PACK_FLOAT_EXPR.
7409 * tree-vect-stmts.c (supportable_widening_operation): Handle
7410 FIX_TRUNC_EXPR.
7411 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7412 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7413 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7414 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7415 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7416 mode attributes.
7417 (vec_pack<floatprefix>_float_<mode>): New expander.
7418 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7419 attributes.
7420 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7421 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7422 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7423 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7424 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7425 Document.
7426 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7427 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7428 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7429 VEC_PACK_FLOAT_EXPR): Document.
7430
7431 2018-05-29 Richard Biener <rguenther@suse.de>
7432
7433 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7434 member.
7435 (stmt_vec_info_vec): Make pointer.
7436 (init_stmt_vec_info_vec): Remove.
7437 (free_stmt_vec_info_vec): Likewise.
7438 (set_stmt_vec_info_vec): New function.
7439 (free_stmt_vec_infos): Likewise.
7440 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7441 (set_vinfo_for_stmt): Likewise.
7442 (get_earlier_stmt): Likewise.
7443 (get_later_stmt): Likewise.
7444 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7445 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7446 (vec_info::~vec_info): Free stmt_vec_infos.
7447 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7448 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7449 (pass_slp_vectorize::execute): Likewise.
7450 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7451 (free_stmt_vec_info_vec): Likewise.
7452 (set_stmt_vec_info_vec): New function.
7453 (free_stmt_vec_infos): Likewise.
7454 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7455 the global stmt_vec_info_vec.
7456 * tree-parloops.c (gather_scalar_reductions): Use
7457 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7458 vector.
7459
7460 2018-05-29 Richard Biener <rguenther@suse.de>
7461
7462 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7463
7464 2018-05-29 Martin Liska <mliska@suse.cz>
7465 David Malcolm <dmalcolm@redhat.com>
7466
7467 * vec.c (test_reverse): New.
7468 (vec_c_tests): Add new test.
7469 * vec.h (vl_ptr>::reverse): New function.
7470
7471 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7472
7473 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7474
7475 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7476 and later.
7477
7478 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7479
7480 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7481
7482 2018-05-28 Richard Biener <rguenther@suse.de>
7483
7484 PR tree-optimization/85933
7485 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7486 look at stmts marked as vectorizable.
7487
7488 2018-05-28 Richard Biener <rguenther@suse.de>
7489
7490 PR tree-optimization/85934
7491 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7492 vector boolean check before scalar optimization.
7493
7494 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7495
7496 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7497 for armv5te.
7498
7499 2018-05-28 Mark Wielaard <mark@klomp.org>
7500
7501 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7502 if it is an expression containing a minus sign.
7503
7504 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7505
7506 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7507
7508 2018-05-27 Paul Koning <ni1d@arrl.net>
7509
7510 * config/pdp11/pdp11.md (truncsihi2): Remove.
7511
7512 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7513 Chung-Ju Wu <jasonwucj@gmail.com>
7514
7515 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7516 implementation.
7517 (unaligned_store_dw): Ditto.
7518 * config/nds32/nds32-memory-manipulation.c
7519 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7520 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7521 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7522 (emit_setmem_word_loop): Rename to ...
7523 (emit_setmem_doubleword_loop): ... this.
7524 (nds32_gen_dup_4_byte_to_word_value): New function.
7525 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7526 (nds32_expand_setmem_loop): Refine implementation.
7527 (nds32_expand_setmem_loop_v3m): Ditto.
7528 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7529 pattern.
7530
7531 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7532
7533 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7534
7535 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7536
7537 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7538 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7539 machine->attr_no_prologue_p.
7540 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7541 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7542 (nds32_expand_epilogue): Consider attr_naked_p.
7543 (nds32_expand_epilogue_v3pop): Likewise.
7544 (nds32_can_use_return_insn): Likewise.
7545 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7546 attr_no_prologue_p fields.
7547 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7548
7549 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7550
7551 PR target/85918
7552 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7553 attributes.
7554 * config/i386/sse.md
7555 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7556 Rename to ...
7557 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7558 ... this.
7559 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7560 Rename to ...
7561 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7562 ... this.
7563 (*<floatsuffix>floatv2div2sf2): Rename to ...
7564 (*float<floatunssuffix>v2div2sf2): ... this.
7565 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7566 (float<floatunssuffix>v2div2sf2_mask): ... this.
7567 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7568 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7569 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7570 to ...
7571 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7572 ... this.
7573 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7574 Rename to ...
7575 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7576 ... this.
7577 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7578 Rename to ...
7579 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7580 ... this.
7581 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7582 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7583 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7584 gen_ufix_truncv8dfv8si2.
7585 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7586 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7587 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7588 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7589 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7590 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7591 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7592 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7593
7594 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7595
7596 PR target/85900
7597 PR target/85345
7598 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7599
7600 2018-05-25 Jim Wilson <jimw@sifive.com>
7601
7602 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7603 * config/riscv/riscv.c (struct machine_function): Add
7604 interrupt_handler_p and attribute_checked_p fields.
7605 (riscv_attribute_table): Add interrupt.
7606 (riscv_interrupt_type_p): New.
7607 (riscv_save_reg_p): Save extra regs for interrupt handler.
7608 (riscv_use_save_libcall): Return false for interrupt handler.
7609 (riscv_first_stack_step): Add forward declaration.
7610 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
7611 for interrupt handler with large frame. Use it for saved reg list.
7612 (riscv_expand_prologue): Move flag_stack_usage_info support to
7613 eliminate duplication.
7614 (riscv_expand_epilogue): Generate mret for interrupt handler.
7615 (riscv_epilogue_uses): New.
7616 (riscv_can_use_return_insn): Return false for interrupt handler.
7617 (riscv_function_ok_for_sibcall): Likewise.
7618 (riscv_set_current_function): Add interrupt handler support.
7619 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7620 * config/riscv/riscv.md (UNSPECV_MRET): New.
7621 (GP_REGNUM): New.
7622 (riscv_frflags, riscv_fsflags): Use tab after opcode.
7623 (riscv_mret): New.
7624 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7625
7626 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
7627
7628 PR tree-optimization/85712
7629 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7630 this candidate has already been replaced in-situ by a copy.
7631
7632 2018-05-25 Jason Merrill <jason@redhat.com>
7633
7634 PR c++/80485 - inline function non-zero address.
7635 * symtab.c (nonzero_address): Check DECL_COMDAT.
7636
7637 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
7638
7639 PR target/83628
7640 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7641 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7642 extension of SImode operation. Use const123_operand predicate.
7643 (*saddsi_1): Remove.
7644 (*saddl_se_1): Ditto.
7645 (*ssubsi_1): Ditto.
7646 (*ssubl_se_1): Ditto.
7647 * config/alpha/predicates.md (const123_operand): New predicate.
7648 * config/alpha/constraints.md (P): Use IN_RANGE.
7649
7650 2018-05-25 Richard Biener <rguenther@suse.de>
7651
7652 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7653 defaulted to true.
7654 (ref_maybe_used_by_stmt_p): Likewise.
7655 (stmt_may_clobber_ref_p): Likewise.
7656 (stmt_may_clobber_ref_p_1): Likewise.
7657 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7658 and pass it along.
7659 (ref_maybe_used_by_stmt_p): Likewise.
7660 (stmt_may_clobber_ref_p): Likewise.
7661 (stmt_may_clobber_ref_p_1): Likewise.
7662 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7663 the alias oracle to disambiguate DRs with stmts DR analysis
7664 couldn't handle.
7665 (vect_analyze_data_refs): Do not give up on not analyzable
7666 DRs for BB vectorization. Remove code truncating the dataref
7667 vector.
7668
7669 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7670
7671 PR target/85832
7672 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7673 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7674 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7675
7676 2018-05-25 Richard Biener <rguenther@suse.de>
7677
7678 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7679 function, combining stmt data ref gathering and fatal analysis
7680 parts.
7681 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7682 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7683 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7684 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7685 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7686
7687 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7688
7689 PR tree-optimization/85720
7690 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7691 SCC if all partitions are builtins.
7692 (version_loop_by_alias_check): New parameter. Generate cancelable
7693 runtime alias check if all partitions are builtins.
7694 (distribute_loop): Update call to above function.
7695
7696 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7697
7698 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7699 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7700 (parm_default_def_partition_arg): Ditto.
7701 (set_parm_default_def_partition): Ditto.
7702 (get_parm_default_def_partitions): Ditto and make it static.
7703 (get_undefined_value_partitions): Ditto and make it static.
7704 (remove_ssa_form): Refactor call to init_var_map here.
7705 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7706 computation for loop region.
7707 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7708 (register_default_def): Delete.
7709 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7710 (parm_default_def_partition_arg): Ditto.
7711 (set_parm_default_def_partition): Ditto.
7712 (get_parm_default_def_partitions): Ditto and make it static.
7713 (get_undefined_value_partitions): Ditto and make it static.
7714 (coalesce_with_default, coalesce_with_default): Update comment.
7715 (create_coalesce_list_for_region): New func factored out from
7716 create_outofssa_var_map.
7717 (populate_coalesce_list_for_outofssa): New func factored out from
7718 create_outofssa_var_map and coalesce_ssa_name.
7719 (create_outofssa_var_map): Delete.
7720 (coalesce_ssa_name): Refactor to support live range computation.
7721 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7722 (get_parm_default_def_partitions): Delete.
7723 (get_undefined_value_partitions): Ditto.
7724 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7725 computation for loop region.
7726 (new_tree_live_info, loe_visit_block): Ditto.
7727 (live_worklist, set_var_live_on_entry): Ditto.
7728 (calculate_live_on_exit, verify_live_on_entry): Ditto.
7729 * tree-ssa-live.h (struct _var_map): New fields.
7730 (init_var_map): Change decl.
7731 (region_contains_p): New.
7732
7733 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7734
7735 * tree-ssa-live.h (live_merge_and_clear): Delete.
7736
7737 2018-05-25 Richard Biener <rguenther@suse.de>
7738
7739 PR c++/85912
7740 * tree-dump.c (dequeue_and_dump): Remove access to removed
7741 operand 2 of a SWITCH_EXPR.
7742
7743 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7744
7745 * doc/sourcebuild.texi (vect_double_cond_arith): Include
7746 multiplication and division.
7747 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7748 (cond_udiv@var{m}, cond_umod@var{m}): Document.
7749 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7750 (cond_udiv_optab, cond_umod_optab): New optabs.
7751 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7752 (IFN_COND_RDIV): New internal functions.
7753 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7754 TRUNC_MOD_EXPR and RDIV_EXPR.
7755 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7756 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7757 New unspecs.
7758 (SVE_INT_BINARY): Include mult.
7759 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7760 (optab, sve_int_op): Handle mult.
7761 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7762 UNSPEC_COND_DIV.
7763 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7764 for SVE_INT_BINARY_SD.
7765
7766 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7767
7768 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7769 (optab, sve_int_op): Handle div and udiv.
7770 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7771 for SVE_INT_BINARY_SD.
7772 (*<optab><mode>3): New insn for the same.
7773
7774 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7775
7776 * tree-vect-patterns.c: Include predict.h.
7777 (vect_recog_divmod_pattern): Restrict check for division support
7778 to when optimizing for size.
7779
7780 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7781
7782 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7783 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7784 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7785 (gimple_match_op::set_op): Likewise.
7786 (gimple_resimplify4): Declare.
7787 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7788 (expr::gen_transform): Likewise.
7789 (decision_tree::gen): Generate a simplification routine for 4 operands.
7790 * gimple-match-head.c (gimple_simplify): Add an overload for
7791 4 operands. In the top-level function, handle up to 4 call
7792 arguments and call gimple_resimplify4.
7793 (gimple_resimplify4): New function.
7794 (build_call_internal): Pass a fourth operand.
7795 (maybe_push_to_seq): Likewise.
7796 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7797 Fold VEC_COND_EXPRs of an operation and a default value into
7798 an IFN_COND_* function if possible.
7799 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7800 New unspecs.
7801 (SVE_COND_FP_BINARY): Include them.
7802 (optab, sve_fp_op): Handle them.
7803 (SVE_INT_BINARY_REV): New code iterator.
7804 (SVE_COND_FP_BINARY_REV): New int iterator.
7805 (commutative): New int attribute.
7806 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7807 Declare.
7808 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7809 function.
7810 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7811 (*cond_<optab><mode>): New patterns for reversed operands.
7812
7813 2018-05-25 Richard Biener <rguenther@suse.de>
7814
7815 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7816 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7817 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7818 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7819 * tree-vect-data-refs.c (everywhere): Adjust users.
7820 * tree-vect-loop.c (everywhere): Likewise.
7821 * tree-vect-slp.c (everywhere): Likewise.
7822 * tree-vect-stmts.c (everywhere): Likewise.
7823 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7824
7825 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7826
7827 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7828 Rename to...
7829 (gcc_cv_as_section_exclude): ... this.
7830 Try Solaris as #exclude syntax.
7831 * configure: Regenerate.
7832 * config.in: Regenerate.
7833 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7834 SECTION_EXCLUDE.
7835 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7836 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7837
7838 * varasm.c (default_elf_asm_named_section): Don't check if
7839 HAVE_GAS_SECTION_EXCLUDE is defined.
7840
7841 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7842
7843 * doc/md.texi: Update the documentation of the cond_* optabs
7844 to mention the new final operand. Fix GET_MODE_NUNITS call.
7845 Describe the scalar case too.
7846 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7847 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7848 instead of 2.
7849 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7850 (get_conditional_internal_fn): Update comment.
7851 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7852 accumulator value as a final argument to conditional functions.
7853 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7854 a define_expand and add an "else" operand. Assert for now that
7855 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7856 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7857 (*cond_<optab><mode>): New patterns.
7858 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7859 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7860 (UNSPEC_COND_EOR): Delete.
7861 (optab): Remove associated mappings.
7862 (SVE_INT_BINARY): New code iterator.
7863 (sve_int_op): Remove int attribute and add "minus" to the code
7864 attribute.
7865 (SVE_COND_INT_OP): Delete.
7866 (SVE_COND_FP_OP): Rename to...
7867 (SVE_COND_FP_BINARY): ...this.
7868
7869 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7870
7871 * optabs.c (can_reuse_operands_p): New function.
7872 (maybe_legitimize_operands): Try to reuse the results for
7873 earlier operands.
7874
7875 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7876
7877 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7878 Add {q} suffix to insn mnemonic.
7879
7880 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7881
7882 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7883 (msp430_warn_func_return): New.
7884
7885 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7886
7887 * fold-const.c (tree_nonzero_bits): New function.
7888 * fold-const.h (tree_nonzero_bits): Likewise.
7889 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7890 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7891
7892 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7893
7894 PR target/85900
7895 PR target/85345
7896 * varasm.c (assemble_alias): Check ifunc_resolver only on
7897 FUNCTION_DECL.
7898
7899 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7900
7901 PR target/85903
7902 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7903 when memory input operand is handled.
7904
7905 2018-05-24 Luis Machado <luis.machado@linaro.org>
7906
7907 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7908 global.
7909 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7910
7911 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7912
7913 * match.pd: Delay FMA folds until after vectorization.
7914
7915 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7916
7917 PR target/83009
7918 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7919 address check not strict.
7920
7921 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7922
7923 * gimple-match.h (gimple_match_op): New class.
7924 (mprts_hook): Replace parameters with a gimple_match_op *.
7925 (maybe_build_generic_op): Likewise.
7926 (gimple_simplified_result_is_gimple_val): Replace parameters with
7927 a const gimple_match_op *.
7928 (gimple_simplify): Replace code_helper * and tree * parameters with
7929 a gimple_match_op * parameter.
7930 (gimple_resimplify1): Replace code_helper *, tree and tree *
7931 parameters with a gimple_match_op * parameter.
7932 (gimple_resimplify2): Likewise.
7933 (gimple_resimplify3): Likewise.
7934 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7935 parameters with a gimple_match_op * parameter.
7936 * gimple-match-head.c (gimple_simplify): Change prototypes of
7937 auto-generated functions to take a gimple_match_op * instead of
7938 separate code_helper * and tree * parameters. Make the same
7939 change in the top-level overload and update calls to the
7940 gimple_resimplify routines. Update calls to the auto-generated
7941 functions and to maybe_push_res_to_seq in the publicly-facing
7942 operation-specific gimple_simplify overloads.
7943 (gimple_match_op::MAX_NUM_OPS): Define.
7944 (gimple_resimplify1): Replace rcode and ops with a single res_op
7945 parameter. Update call to gimple_simplify.
7946 (gimple_resimplify2): Likewise.
7947 (gimple_resimplify3): Likewise.
7948 (mprts_hook): Replace parameters with a gimple_match_op *.
7949 (maybe_build_generic_op): Likewise.
7950 (build_call_internal): Replace type, nargs and ops with
7951 a gimple_match_op *.
7952 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7953 with a single gimple_match_op *. Update calls to mprts_hook,
7954 build_call_internal and gimple_simplified_result_is_gimple_val.
7955 Factor out code that is common to the tree_code and combined_fn cases.
7956 * genmatch.c (expr::gen_transform): Replace tem_code and
7957 tem_ops with a gimple_match_op called tem_op. Update calls
7958 to the gimple_resimplify functions and maybe_push_res_to_seq.
7959 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7960 res_ops. Update call to the gimple_resimplify functions.
7961 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7962 (decision_tree::gen): Make the functions take a gimple_match_op *
7963 called res_op instead of separate res_code and res_ops parameters.
7964 Update call accordingly.
7965 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7966 and ops with a single res_op parameter. Update calls to
7967 maybe_build_generic_op and maybe_push_res_to_seq.
7968 (fold_stmt_1): Update calls to gimple_simplify and
7969 replace_stmt_with_simplification.
7970 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7971 and gimple_simplified_result_is_gimple_val.
7972 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7973 gimple_simplify.
7974 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7975 with a gimple_match_op *.
7976 (vn_nary_build_or_lookup): Likewise. Update call to
7977 vn_nary_build_or_lookup_1.
7978 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7979 gimple_match_op *. Update calls to the gimple_resimplify routines
7980 and to gimple_simplified_result_is_gimple_val.
7981 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7982 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7983 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7984 (visit_nary_op): Likewise.
7985 (visit_reference_op_load): Likewise.
7986
7987 2018-05-23 Luis Machado <luis.machado@linaro.org>
7988
7989 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7990 modifier for printing the step amount.
7991
7992 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
7993
7994 PR target/78849
7995 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7996 types.
7997
7998 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
7999
8000 * doc/sourcebuild.texi (Endianness): New subsubsection.
8001
8002 2018-05-23 Luis Machado <luis.machado@linaro.org>
8003
8004 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8005 <prefetch_dynamic_strides>: New const bool field.
8006 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8007 prefetch_dynamic_strides.
8008 (exynosm1_prefetch_tune): Likewise.
8009 (thunderxt88_prefetch_tune): Likewise.
8010 (thunderx_prefetch_tune): Likewise.
8011 (thunderx2t99_prefetch_tune): Likewise.
8012 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8013 false.
8014 (aarch64_override_options_internal): Update to set
8015 PARAM_PREFETCH_DYNAMIC_STRIDES.
8016 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8017 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8018 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8019 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8020 prefetch-dynamic-strides setting.
8021
8022 2018-05-23 Luis Machado <luis.machado@linaro.org>
8023
8024 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8025 <minimum_stride>: New const int field.
8026 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8027 minimum_stride field defaulting to -1.
8028 (exynosm1_prefetch_tune): Likewise.
8029 (thunderxt88_prefetch_tune): Likewise.
8030 (thunderx_prefetch_tune): Likewise.
8031 (thunderx2t99_prefetch_tune): Likewise.
8032 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8033 <default_opt_level>: Set to 3.
8034 (aarch64_override_options_internal): Update to set
8035 PARAM_PREFETCH_MINIMUM_STRIDE.
8036 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8037 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8038 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8039 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8040 stride is constant and is below the minimum stride threshold.
8041
8042 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8043
8044 * config/arm/arm-cpus.in (mode26): Delete.
8045 (armv4): Delete mode26 reference.
8046 * config/arm/arm.c (arm_configure_build_target): Delete use of
8047 isa_bit_mode26.
8048
8049 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8050
8051 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8052 New insn pattern.
8053 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8054 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8055 for non-SSE modes.
8056 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8057 (floatunsdidf2): Ditto.
8058
8059 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8060
8061 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8062 (fixuns_trunc<mode>si2_avx512f): Ditto.
8063 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8064 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8065 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8066
8067 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8068
8069 PR rtl-optimization/79985
8070 * df-scan.c (df_insn_refs_collect): Remove special case for
8071 global registers and asm statements.
8072
8073 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8074
8075 * extend.texi (Global Register Variables): Rewrite the bullet list.
8076 Note that the register is available for allocation. Note that access
8077 via inline asm must use constraints. Add note about async-signal
8078 handlers. Remove paragraph about automagic register selection.
8079
8080 2018-05-23 Richard Biener <rguenther@suse.de>
8081
8082 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8083 of fixed offset from memset VN.
8084
8085 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8086
8087 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8088 first_interp field.
8089 (alloc_cand_and_find_basis): Initialize first_interp field.
8090 (slsr_process_mul): Modify first_interp field.
8091 (slsr_process_add): Likewise.
8092 (slsr_process_cast): Modify first_interp field for each new
8093 interpretation.
8094 (slsr_process_copy): Likewise.
8095 (dump_candidate): Dump first_interp field.
8096 (replace_mult_candidate): Process all interpretations, not just
8097 subsequent ones.
8098 (replace_rhs_if_not_dup): Likewise.
8099 (replace_one_candidate): Likewise.
8100
8101 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8102
8103 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8104 Add new boolean.
8105 (aarch64_needs_frame_chain): New function.
8106 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8107
8108 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8109
8110 PR target/84882
8111 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8112 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8113 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8114 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8115 as true for strict-align.
8116 (aarch64_can_inline_p): Perform checks even when callee has no
8117 attributes to check for strict alignment.
8118 * doc/extend.texi (AArch64 Function Attributes): Document
8119 no-strict-align.
8120 * doc/invoke.texi: (AArch64 Options): Likewise.
8121
8122 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
8123
8124 PR tree-optimization/85853
8125 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8126 the handling of the root of the node to...
8127 (vect_slp_analyze_node_operations_1): ...this new function,
8128 and run the whole thing with the child nodes' def types
8129 set according to their SLP node's def type.
8130
8131 2018-05-23 Richard Biener <rguenther@suse.de>
8132
8133 PR middle-end/85874
8134 * tree-data-ref.c (create_runtime_alias_checks): Defer
8135 and ignore overflow warnings.
8136
8137 2018-05-23 Yury Gribov <tetra2005@gmail.com>
8138
8139 PR tree-optimization/85822
8140 * tree-vrp.c (is_masked_range_test): Fix handling of negative
8141 constants.
8142
8143 2018-05-23 Richard Biener <rguenther@suse.de>
8144
8145 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8146 memset constants via native_interpret_expr.
8147
8148 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
8149
8150 PR target/85345
8151 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8152 attribute.
8153 (cgraph_node::create_alias): Likewise.
8154 (cgraph_node::get_availability): Check ifunc_resolver instead
8155 of looking up ifunc attribute.
8156 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8157 * varasm.c (do_assemble_alias): Likewise.
8158 (assemble_alias): Likewise.
8159 (default_binds_local_p_3): Likewise.
8160 * cgraph.h (cgraph_node): Add ifunc_resolver.
8161 (cgraph_node::only_called_directly_or_aliased_p): Return false
8162 for IFUNC resolver.
8163 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8164 attribute.
8165 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8166 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8167 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8168 instead of looking up ifunc attribute.
8169
8170 2018-05-22 Luis Machado <luis.machado@linaro.org>
8171
8172 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8173
8174 2018-05-22 Martin Sebor <msebor@redhat.com>
8175
8176 PR middle-end/85359
8177 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8178 only when expasion succeeds.
8179 (expand_builtin_strcmp): Same.
8180 (expand_builtin_strncmp): Same.
8181
8182 2018-05-22 Martin Sebor <msebor@redhat.com>
8183
8184 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8185
8186 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8187 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8188
8189 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8190 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8191 code.
8192 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8193 Add check for legitimate_address.
8194 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8195 (aarch64_swap_ldrstr_operands): New.
8196 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8197 Define prototype.
8198
8199 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8200 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8201
8202 * config/aarch64/aarch64.md: New patterns to generate stp
8203 and ldp.
8204 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8205 single words and double words.
8206 (load_pair_sw, load_pair_dw): Likewise.
8207 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8208 Delete.
8209 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8210 Delete.
8211 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8212 for different mode ldpstp and add peephole for merged zero stores.
8213 Likewise for loads.
8214 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8215 Add size check.
8216 (aarch64_gen_store_pair): Rename calls to match new patterns.
8217 (aarch64_gen_load_pair): Rename calls to match new patterns.
8218 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8219 (load_pair<DREG:mode><DREG2:mode>): ... This.
8220 (store_pair<mode>): Rename to...
8221 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8222 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8223 New mode iterators.
8224 (V_INT_EQUIV): Handle SImode.
8225 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8226 New predicate.
8227
8228 2018-05-22 Martin Sebor <msebor@redhat.com>
8229
8230 PR c/85623
8231 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8232 or ajust the presumed bound on an operation to avoid unnecessary
8233 warnings.
8234
8235 2018-05-22 Martin Sebor <msebor@redhat.com>
8236
8237 PR tree-optimization/85826
8238 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8239 assuming that a DECL necesarily has a constant size.
8240
8241 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8242
8243 PR middle-end/85862
8244 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8245
8246 2018-05-22 Richard Biener <rguenther@suse.de>
8247
8248 PR tree-optimization/85834
8249 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8250 non-constant and non-zero memset arguments.
8251
8252 2018-05-22 Martin Liska <mliska@suse.cz>
8253
8254 PR ipa/85607
8255 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8256
8257 2018-05-22 Richard Biener <rguenther@suse.de>
8258
8259 PR tree-optimization/85863
8260 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8261 comparisons when vectype is specified.
8262 (vectorizable_condition): Do not specify vectype for
8263 vect_is_simple_cond when SLP vectorizing.
8264
8265 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8266
8267 PR target/85657
8268 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8269 define __ibm128 as long double.
8270 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8271 as a distinct type when IEEE 128-bit support is enabled.
8272 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8273 128-bit types to use the correct functions.
8274 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8275 convert between 128-bit floating point types that have different
8276 modes but the same representation, instead of using gen_lowpart to
8277 makean alias.
8278 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8279 KFmode.
8280 (IFKF_reg): New attributes to give the register constraints for
8281 IFmode and KFmode.
8282 (extend<mode>tf2_internal): New insns to mark an explicit
8283 conversion between 128-bit floating point types that have a
8284 different mode but share the same representation.
8285
8286 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8287
8288 PR tree-optimization/85814
8289 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8290 a null return from get_strinfo when unsharing the next
8291 strinfo in the chain.
8292
8293 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8294
8295 PR gcc/84923
8296 * varasm.c (weak_finish): Clean up weak_decls.
8297
8298 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8299
8300 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8301 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8302 UNSPEC_UADALP values.
8303 * config/aarch64/iterators.md (ABAL): New int iterator.
8304 (ABDL2): Likewise.
8305 (ADALP): Likewise.
8306 (sur): Add mappings for the above.
8307 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8308 New define_insn.
8309 (aarch64_<sur>abal<mode>_4): Likewise.
8310 (aarch64_<sur>adalp<mode>_3): Likewise.
8311 (<sur>sadv16qi): New define_expand.
8312
8313 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8314
8315 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8316 (*movdf_internal): Ditto.
8317 (*rcpsf2_sse): Ditto.
8318 (*rsqrtsf2_sse): Ditto.
8319 (*sqrt<mode>2_sse): Ditto.
8320
8321 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8322
8323 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8324 eor3q<mode>4.
8325 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8326 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8327 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8328 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8329 vbcaxq_s64): New.
8330 * config/aarch64/arm_neon.h: Likewise.
8331 * config/aarch64/iterators.md (VQ_I): New.
8332
8333 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8334
8335 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8336 arc*-*-linux*.
8337 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8338 MULTILIB_DIRNAMES
8339
8340 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8341
8342 * config/nds32/constraints.md (S): New constraint.
8343 * config/nds32/nds32.md (call_internal): Use constraint S.
8344 (call_value_internal): Likewise.
8345 (sibcall_internal): Likewise.
8346 (sibcall_value_internal): Likewise.
8347
8348 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8349 Chung-Ju Wu <jasonwucj@gmail.com>
8350
8351 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8352 into consideration.
8353
8354 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8355 Chung-Ju Wu <jasonwucj@gmail.com>
8356
8357 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8358 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8359 (nds32_rtx_costs_impl): Simplify.
8360 (nds32_address_cost_impl): Simplify.
8361 (nds32_init_rtx_costs): New function.
8362 (nds32_rtx_costs_speed_prefer): Likewise.
8363 (nds32_rtx_costs_size_prefer): Likewise.
8364 (nds32_address_cost_speed_prefer): Likewise.
8365 (nds32_address_cost_speed_fwprop): Likewise.
8366 (nds32_address_cost_size_prefer): Likewise.
8367 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8368 * config/nds32/nds32.c (nds32_option_override): Use
8369 nds32_init_rtx_costs function.
8370
8371 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8372
8373 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8374 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8375 (TARGET_PIPELINE_N8): Likewise.
8376 (TARGET_PIPELINE_N10): Likewise.
8377 (TARGET_PIPELINE_N13): Likewise.
8378 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8379
8380 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8381
8382 * config/nds32/nds32-fpu.md: Update copyright year.
8383
8384 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8385
8386 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8387
8388 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8389
8390 * config/nds32/nds32.c
8391 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8392 * config/nds32/nds32.opt (minline-asm-r15): New option.
8393
8394 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8395
8396 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8397 MASK_HW_ABS.
8398 * config/nds32/nds32.md (abssi2): New pattern.
8399
8400 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8401
8402 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8403 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8404 Merge insn pattern from sse_cvtsi2ss<round_name> and
8405 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8406 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8407 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8408 using SWI48 mode iterator.
8409 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8410 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8411 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8412 pattern from sse_cvttss2si<round_saeonly_name>
8413 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8414 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8415 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8416 using SWI48 mode iterator.
8417 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8418 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8419 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8420 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8421 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8422 using SWI48 mode iterator.
8423 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8424 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8425 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8426 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8427 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8428 SWI48 mode iterator.
8429 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8430 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8431 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8432 pattern from sse_cvttsd2si<round_saeonly_name>
8433 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8434
8435 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8436
8437 * config/nds32/nds32-md-auxiliary.c
8438 (nds32_valid_smw_lwm_base_p): Refine.
8439 (nds32_output_smw_single_word): Refine.
8440 (nds32_output_smw_double_word): New.
8441 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8442
8443 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8444
8445 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8446 (nds32_output_stack_pop): Refine.
8447 (nds32_expand_unaligned_load): Refine.
8448 (nds32_expand_unaligned_store): Refine.
8449
8450 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8451 Chung-Ju Wu <jasonwucj@gmail.com>
8452
8453 * config/nds32/constants.md: Add TP_REGNUM constant.
8454 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8455 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8456 UNSPEC_ADD32.
8457 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8458 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8459 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8460 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8461 and PIC code generation.
8462 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8463 code generation.
8464 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8465 optimization.
8466 * config/nds32/nds32.md: Support TLS and PIC.
8467 * config/nds32/nds32.c: Support TLS and PIC.
8468 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8469 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8470 predicate.
8471
8472 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8473
8474 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8475 mode with E_ prefix.
8476
8477 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8478 Chung-Ju Wu <jasonwucj@gmail.com>
8479
8480 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8481 * config/nds32/nds32-md-auxiliary.c
8482 (symbolic_reference_mentioned_p): New.
8483 (nds32_legitimize_ict_address): New.
8484 (nds32_expand_ict_move): New.
8485 (nds32_indirect_call_referenced_p): New.
8486 (nds32_symbol_binds_local_p): Delete.
8487 (nds32_long_call_p): Modify.
8488 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8489 * config/nds32/nds32-protos.h
8490 (symbolic_reference_mentioned_p): Declare.
8491 (nds32_legitimize_ict_address): Declare.
8492 (nds32_expand_ict_move): Declare.
8493 (nds32_indirect_call_referenced_p): Declare.
8494 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8495 (nds32_relax_group): Use nds32_ict_const_p as condition.
8496 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8497 (nds32_asm_file_start): Output ict_model directive in asm code.
8498 (nds32_legitimate_address_p): Consider indirect call.
8499 (nds32_print_operand): Consider indirect call.
8500 (nds32_print_operand_address): Consider indirect call.
8501 (nds32_insert_attributes): Handle "indirect_call" attribute.
8502 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8503 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8504 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8505 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8506 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8507 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8508 (TARGET_ICT_MODEL_SMALL): Define.
8509 (TARGET_ICT_MODEL_LARGE): Define.
8510 * config/nds32/nds32.md (movsi): Consider ict model.
8511 (call, call_value): Consider ict model.
8512 (sibcall, sibcall_value): Consider ict model.
8513 * config/nds32/nds32.opt (mict-model): New option.
8514 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8515 model.
8516
8517 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8518 Monk Chiang <sh.chiang04@gmail.com>
8519 Jim Wilson <jimw@sifive.com>
8520
8521 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8522 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8523 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8524 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8525 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8526 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8527 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8528 compute save_libcall_adjustment properly.
8529 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8530 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8531 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8532 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8533 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8534 (ABI_SPEC): Handle mabi=ilp32e.
8535 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8536 (RVE): Add RVE mask.
8537 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8538 <-march>: Add rv32e as an example.
8539
8540 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8541
8542 PR c++/82899
8543 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8544 (intra_create_variable_infos): Handle C++ constructors.
8545
8546 2018-05-18 Martin Liska <mliska@suse.cz>
8547
8548 * passes.def: Remove a redundant pass.
8549
8550 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8551
8552 PR bootstrap/85838
8553 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8554
8555 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8556
8557 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8558 (ARMv4): Update.
8559 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8560 (ARMv6m): Update.
8561 (armv2, armv2a, armv3, armv3m): Delete architectures.
8562 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8563 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8564 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8565 Delete cpus.
8566 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8567 (*mulsidi3adddi): Likewise.
8568 (mulsidi3): Likewise.
8569 (*mulsidi3_nov6): Likewise.
8570 (umulsidi3): Likewise.
8571 (umulsidi3_nov6): Likewise.
8572 (umaddsidi4): Likewise.
8573 (*umulsidi3adddi): Likewise.
8574 (smulsi3_highpart): Likewise.
8575 (*smulsi3_highpart_nov6): Likewise.
8576 (umulsi3_highpart): Likewise.
8577 (*umulsi3_highpart_nov6): Likewise.
8578 * config/arm/arm.h (arm_arch3m): Delete.
8579 * config/arm/arm.c (arm_arch3m): Delete.
8580 (arm_option_override_internal): Update armv3-related comment.
8581 (arm_configure_build_target): Delete use of isa_bit_mode32.
8582 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8583 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8584 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8585 (mulsa3): Likewise.
8586 (mulusa3): Likewise.
8587 * config/arm/arm-protos.h (arm_arch3m): Delete.
8588 * config/arm/arm-tables.opt: Regenerate.
8589 * config/arm/arm-tune.md: Likewise.
8590 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8591 deleted architectures.
8592
8593 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8594
8595 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8596 (armv5t, armv5te): New features.
8597 (ARMv5, ARMv5e): Delete fgroups.
8598 (ARMv5t, ARMv5te): Adjust for above changes.
8599 (ARMv6m): Likewise.
8600 (armv5, armv5e): Delete arches.
8601 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8602 arm_arch5.
8603 (*call_reg_arm): Likewise.
8604 (*call_value_reg_armv5): Likewise.
8605 (*call_value_reg_arm): Likewise.
8606 (*call_symbol): Likewise.
8607 (*call_value_symbol): Likewise.
8608 (*sibcall_insn): Likewise.
8609 (*sibcall_value_insn): Likewise.
8610 (clzsi2): Likewise.
8611 (prefetch): Likewise.
8612 (define_split and define_peephole2 dependent on arm_arch5):
8613 Likewise.
8614 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8615 arm_arch5e.
8616 (TARGET_ARM_QBIT): Likewise.
8617 (TARGET_DSP_MULTIPLY): Likewise.
8618 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8619 (arm_arch5, arm_arch5e): Delete.
8620 (arm_arch5t, arm_arch5te): Declare.
8621 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8622 (arm_arch5t): Declare.
8623 (arm_option_reconfigure_globals): Update for the above.
8624 (arm_options_perform_arch_sanity_checks): Update comment, replace
8625 use of arm_arch5 with arm_arch5t.
8626 (use_return_insn): Likewise.
8627 (arm_emit_call_insn): Likewise.
8628 (output_return_instruction): Likewise.
8629 (arm_final_prescan_insn): Likewise.
8630 (arm_coproc_builtin_available): Likewise.
8631 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8632 arm_arch5e with arm_arch5t and arm_arch5te.
8633 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8634 (arm_arch5t, arm_arch5te): Declare.
8635 * config/arm/arm-tables.opt: Regenerate.
8636 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8637 * config/arm/t-multilib: Likewise.
8638 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8639 instead of arm_arch5.
8640 (*call_reg_thumb1): Likewise.
8641 (*call_value_reg_thumb1_v5): Likewise.
8642 (*call_value_reg_thumb1): Likewise.
8643 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8644 unreachable path.
8645 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8646
8647 2018-05-18 Martin Liska <mliska@suse.cz>
8648
8649 PR gcov-profile/84846
8650 * doc/gcov.texi: Document -t option of gcov tool.
8651
8652 2018-05-18 Martin Liska <mliska@suse.cz>
8653
8654 PR gcov-profile/84846
8655 * gcov.c (print_usage): Add new -t option.
8656 (process_args): Handle the option.
8657 (generate_results): Use stdout as output when requested by
8658 the option.
8659
8660 2018-05-18 Martin Liska <mliska@suse.cz>
8661
8662 PR gcov-profile/84846
8663 * coverage.c (coverage_init): Write PWD to .gcno file.
8664 * doc/gcov.texi: Document how working directory is printed.
8665 * gcov-dump.c (dump_gcov_file): Print PWD.
8666 * gcov.c (output_intermediate_file): Likewise.
8667 (read_graph_file): Read PWD string.
8668 (output_lines): Print PWD.
8669
8670 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8671
8672 PR middle-end/85817
8673 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8674 for retval and return false if all args to phi are zero.
8675
8676 2018-05-18 Richard Biener <rguenther@suse.de>
8677
8678 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8679 method.
8680 (evrp_dom_walker::before_dom_children): Call it.
8681
8682 2018-05-18 Richard Biener <rguenther@suse.de>
8683
8684 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8685 results when processing array refs with variable index.
8686
8687 2018-05-18 Toon Moene <toon@moene.org>
8688
8689 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8690 directly after that of -floop-interchange. Indicate that both
8691 options are enabled by default when specifying -O3.
8692
8693 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8694
8695 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8696 iterator. Delete separate integer-mode vec_set<mode> expander.
8697 (aarch64_simd_vec_setv2di): Delete.
8698 (vec_setv2di): Delete.
8699 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8700 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
8701 the "w, r" alternative.
8702
8703 2018-05-18 Martin Liska <mliska@suse.cz>
8704
8705 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8706 * tree-pass.h (make_pass_lower_switch_O0): New function.
8707 * tree-switch-conversion.c (node_has_low_bound): Remove.
8708 (node_has_high_bound): Likewise.
8709 (node_is_bounded): Likewise.
8710 (class pass_lower_switch): Make it a template type and create
8711 two instances.
8712 (pass_lower_switch::execute): Add template argument.
8713 (make_pass_lower_switch): New function.
8714 (make_pass_lower_switch_O0): New function.
8715 (do_jump_if_equal): Remove.
8716 (emit_case_nodes): Simplify to just handle all 3 cases and leave
8717 all the hard work to tree optimization passes.
8718
8719 2018-05-18 Martin Liska <mliska@suse.cz>
8720
8721 * dbgcnt.c (limit_low): Renamed from limit.
8722 (limit_high): New variable.
8723 (dbg_cnt_is_enabled): Check for upper limit.
8724 (dbg_cnt): Adjust dumping.
8725 (dbg_cnt_set_limit_by_index): Add new argument for high
8726 value.
8727 (dbg_cnt_set_limit_by_name): Likewise.
8728 (dbg_cnt_process_single_pair): Parse new format.
8729 (dbg_cnt_process_opt): Use strtok.
8730 (dbg_cnt_list_all_counters): Remove 'value' and add
8731 'limit_high'.
8732 * doc/invoke.texi: Document changes.
8733
8734 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
8735
8736 * doc/sourcebuild.texi (scalar_all_fma): Document.
8737 * tree.def (FMA_EXPR): Delete.
8738 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8739 * internal-fn.c (ternary_direct): New macro.
8740 (expand_ternary_optab_fn): Likewise.
8741 (direct_ternary_optab_supported_p): Likewise.
8742 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8743 * builtins.c (fold_builtin_fma): Delete.
8744 (fold_builtin_3): Don't call it.
8745 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8746 * expr.c (expand_expr_real_2): Likewise.
8747 * fold-const.c (operand_equal_p): Likewise.
8748 (fold_ternary_loc): Likewise.
8749 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8750 * gimple.c (DEFTREECODE): Likewise.
8751 * gimplify.c (gimplify_expr): Likewise.
8752 * optabs-tree.c (optab_for_tree_code): Likewise.
8753 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8754 * tree-eh.c (operation_could_trap_p): Likewise.
8755 (stmt_could_throw_1_p): Likewise.
8756 * tree-inline.c (estimate_operator_cost): Likewise.
8757 * tree-pretty-print.c (dump_generic_node): Likewise.
8758 (op_code_prio): Likewise.
8759 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8760 * tree-ssa-operands.c (get_expr_operands): Likewise.
8761 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8762 * fold-const-call.h (fold_fma): Delete.
8763 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8764 CFN_FNMA and CFN_FNMS.
8765 (fold_fma): Delete.
8766 * genmatch.c (combined_fn): New enum.
8767 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8768 (commutative_op): New function.
8769 (commutate): Use it. Handle more than 2 operands.
8770 (dt_operand::gen_gimple_expr): Use commutative_op.
8771 (parser::parse_expr): Allow :c to be used with non-binary
8772 operators if the commutative operand is known.
8773 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8774 CFN_FMS, CFN_FNMA and CFN_FNMS.
8775 (backprop::process_assign_use): Remove FMA_EXPR handling.
8776 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8777 (gen_hsa_fma): New function.
8778 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8779 IFN_FNMA and IFN_FNMS.
8780 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8781 * gimple-fold.h (follow_all_ssa_edges): Declare.
8782 * gimple-fold.c (follow_all_ssa_edges): New function.
8783 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8784 gimple_build interface and use follow_all_ssa_edges to fold the result.
8785 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8786 instead of checking for optabs directly.
8787 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8788 rather than FMA_EXPRs.
8789 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8790 call to IFN_FMA instead of an FMA_EXPR.
8791
8792 2018-05-17 Jim Wilson <jimw@sifive.com>
8793
8794 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8795 sign extended promoted subreg, and the range does not have the sign bit
8796 set, then do a sign extend.
8797
8798 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8799 test, check for sign extended subreg and/or constant operands, and
8800 do a sign extend in that case.
8801
8802 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8803
8804 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8805 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8806 Add untyped.
8807 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8808 Change logics_shift_reg to logics_shift_imm.
8809 (thunderx2t99_fp_loadpair_basic): Delete.
8810 (thunderx2t99_fp_storepair_basic): Delete.
8811 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8812 (thunderx2t99_asimd_polynomial): Delete.
8813 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8814 and neon_fp_mul_d_scalar_q.
8815 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8816 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8817 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8818 (thunderx2t99_asimd_lut): Add missing tbl types.
8819 (thunderx2t99_asimd_ext): Delete.
8820 (thunderx2t99_asimd_load1_1_mult): Delete.
8821 (thunderx2t99_asimd_load1_2_mult): Delete.
8822 (thunderx2t99_asimd_load1_ldp): New.
8823 (thunderx2t99_asimd_load1): New.
8824 (thunderx2t99_asimd_load2): Add missing *load2* types.
8825 (thunderx2t99_asimd_load3): New.
8826 (thunderx2t99_asimd_load4): New.
8827 (thunderx2t99_asimd_store1_1_mult): Delete.
8828 (thunderx2t99_asimd_store1_2_mult): Delete.
8829 (thunderx2t99_asimd_store2_mult): Delete.
8830 (thunderx2t99_asimd_store2_onelane): Delete.
8831 (thunderx2t99_asimd_store_stp): New.
8832 (thunderx2t99_asimd_store1): New.
8833 (thunderx2t99_asimd_store2): New.
8834 (thunderx2t99_asimd_store3): New.
8835 (thunderx2t99_asimd_store4): New.
8836
8837 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8838
8839 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8840 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8841
8842 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8843 Segher Boessenkool <segher@kernel.crashing.org>
8844
8845 PR target/85698
8846 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8847 operand.
8848
8849 2018-05-17 Richard Biener <rguenther@suse.de>
8850
8851 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8852 for pruning loop and prune defs feeding only already visited PHIs.
8853
8854 2018-05-17 Richard Biener <rguenther@suse.de>
8855
8856 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8857
8858 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8859 Richard Biener <rguenther@suse.de>
8860
8861 PR tree-optimization/85793
8862 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8863 for VMAT_ELEMENTWISE.
8864
8865 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8866
8867 * internal-fn.h (lookup_internal_fn): Declare
8868 * internal-fn.c (lookup_internal_fn): New function.
8869 * gimple.c (gimple_build_call_from_tree): Handle calls to
8870 internal functions.
8871 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8872 internal function names.
8873 * tree-pretty-print.c (dump_generic_node): Likewise.
8874 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8875
8876 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8877
8878 * gimple-fold.h (gimple_build): Make the function forms take
8879 combined_fn rather than built_in_function.
8880 (gimple_simplify): Likewise.
8881 * gimple-match-head.c (gimple_simplify): Likewise.
8882 * gimple-fold.c (gimple_build): Likewise.
8883 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8884 rather than gimple_build_call_internal.
8885 (get_initial_defs_for_reduction): Likewise.
8886 (vect_create_epilog_for_reduction): Likewise.
8887 (vectorizable_live_operation): Likewise.
8888
8889 2018-05-17 Martin Liska <mliska@suse.cz>
8890
8891 * gimple-ssa-sprintf.c (format_directive): Do not use
8892 space in between 'G_' and '('.
8893
8894 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8895
8896 PR target/85323
8897 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8898 even if the mask is not all ones.
8899
8900 PR target/85323
8901 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8902 vector.
8903 (ix86_gimple_fold_builtin): Likewise.
8904
8905 PR target/85323
8906 * config/i386/i386.c: Include tree-vector-builder.h.
8907 (ix86_vector_shift_count): New function.
8908 (ix86_fold_builtin): Fold shift builtins by scalar count.
8909 (ix86_gimple_fold_builtin): Likewise.
8910
8911 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8912 _mm512_setzero): New intrinsics.
8913
8914 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8915 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8916
8917 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8918 code generation for cases where splatting a value is not useful.
8919 * simplify-rtx.c (simplify_ternary_operation): Simplify
8920 vec_merge across a vec_duplicate and a paradoxical subreg forming
8921 a vector mode to a vec_concat.
8922
8923 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8924
8925 * config.gcc: Support "goldmont-plus".
8926 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8927 "goldmont-plus".
8928 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8929 PROCESSOR_GOLDMONT_PLUS.
8930 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8931 (processor_target_table): Add "goldmont-plus".
8932 (PTA_GOLDMONT_PLUS): Define.
8933 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8934 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8935 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8936 (fold_builtin_cpu): Add "goldmont-plus".
8937 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8938 (ix86_option_override_internal): Add "goldmont-plus".
8939 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8940 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8941 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8942 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8943
8944 2018-05-17 Richard Biener <rguenther@suse.de>
8945
8946 PR tree-optimization/85757
8947 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8948 remove defs that only feed that PHI from further processing.
8949
8950 2018-05-16 Jim Wilson <jimw@sifive.com>
8951
8952 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8953 asterisk to name.
8954 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8955
8956 2018-05-16 Mark Wielaard <mark@klomp.org>
8957
8958 * dwarf2out.c (count_index_strings): New function.
8959 (output_indirect_strings): Call count_index_strings and generate
8960 header for dwarf_version >= 5.
8961
8962 2018-05-16 Mark Wielaard <mark@klomp.org>
8963
8964 * dwarf2out.c (dwarf_FORM): New function.
8965 (set_indirect_string): Use dwarf_FORM.
8966 (reset_indirect_string): Likewise.
8967 (size_of_die): Likewise.
8968 (value_format): Likewise.
8969 (output_die): Likewise.
8970 (add_skeleton_AT_string): Likewise.
8971 (output_macinfo_op): Likewise.
8972 (index_string): Likewise.
8973 (output_index_string_offset): Likewise.
8974 (output_index_string): Likewise.
8975 (count_index_strings): Likewise.
8976
8977 2018-05-16 Carl Love <cel@us.ibm.com>
8978
8979 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8980 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8981
8982 2018-05-16 Martin Jambor <mjambor@suse.cz>
8983
8984 * ipa-prop.c (ipa_free_all_edge_args): Remove.
8985 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8986
8987 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
8988
8989 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8990 (fnma<mode>4): Likewise.
8991 (fms<mode>4): Likewise.
8992 (fnms<mode>4): Likewise.
8993 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8994 (aarch64_fnma<mode>4): Likewise.
8995 (aarch64_fms<mode>4): Likewise.
8996 (aarch64_fnms<mode>4): Likewise.
8997 (aarch64_fnmadd<mode>4): Likewise.
8998
8999 2018-05-16 Jason Merrill <jason@redhat.com>
9000
9001 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9002
9003 2018-05-16 Richard Biener <rguenther@suse.de>
9004
9005 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9006 (dump_stmt_cost): Declare.
9007 (add_stmt_cost): Dump cost we add.
9008 (add_stmt_costs): New function.
9009 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9010 No longer exported.
9011 (vect_analyze_stmt): Adjust prototype.
9012 (vectorizable_condition): Likewise.
9013 (vectorizable_live_operation): Likewise.
9014 (vectorizable_reduction): Likewise.
9015 (vectorizable_induction): Likewise.
9016 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9017 cost vector to pass to vectorizable_ and record afterwards.
9018 (vect_model_reduction_cost): Take cost vector argument and adjust.
9019 (vect_model_induction_cost): Likewise.
9020 (vectorizable_reduction): Likewise.
9021 (vectorizable_induction): Likewise.
9022 (vectorizable_live_operation): Likewise.
9023 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9024 SLP_TREE_NUMBER_OF_VEC_STMTS.
9025 (vect_analyze_slp_cost_1): Remove.
9026 (vect_analyze_slp_cost): Likewise.
9027 (vect_slp_analyze_node_operations): Take visited args and
9028 a target cost vector. Avoid processing already visited stmt sets.
9029 (vect_slp_analyze_operations): Use a local cost vector to gather
9030 costs and register those of non-discarded instances.
9031 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9032 (vect_schedule_slp_instance): Remove copying of
9033 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9034 zero.
9035 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9036 adding cost. Record cost entry location.
9037 (vect_prologue_cost_for_slp_op): Function to compute cost of
9038 a constant or invariant generated for SLP vect in the prologue,
9039 split out from vect_analyze_slp_cost_1.
9040 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9041 (vect_model_promotion_demotion_cost): Likewise.
9042 (vect_model_store_cost): Likewise, make static.
9043 (vect_model_load_cost): Likewise.
9044 (vectorizable_bswap): Add cost vector arg and adjust.
9045 (vectorizable_call): Likewise.
9046 (vectorizable_simd_clone_call): Likewise.
9047 (vectorizable_conversion): Likewise.
9048 (vectorizable_assignment): Likewise.
9049 (vectorizable_shift): Likewise.
9050 (vectorizable_operation): Likewise.
9051 (vectorizable_store): Likewise.
9052 (vectorizable_load): Likewise.
9053 (vectorizable_condition): Likewise.
9054 (vectorizable_comparison): Likewise.
9055 (can_vectorize_live_stmts): Likewise.
9056 (vect_analyze_stmt): Likewise.
9057 (vect_transform_stmt): Adjust calls to vectorizable_*.
9058 * tree-vectorizer.c: Include gimple-pretty-print.h.
9059 (dump_stmt_cost): New function.
9060
9061 2018-05-16 Richard Biener <rguenther@suse.de>
9062
9063 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9064 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9065 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9066 (check_name): New callback.
9067 (dse_classify_store): Track cycles via a visited bitmap of PHI
9068 defs and simplify handling of in-loop and across loop dead stores
9069 and properly fail for loop-variant refs. Handle byte-tracking with
9070 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9071 limiting the walk.
9072
9073 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9074
9075 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9076 (vect_get_mask_type_for_stmt): Likewise.
9077 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9078 split out from...
9079 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9080 to determine the statement's vector type and the vector type that
9081 should be used for calculating nunits. Deal with cases in which
9082 the type has to be deferred.
9083 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9084 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9085 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9086 (vect_determine_vf_for_stmt): New functions, split out from...
9087 (vect_determine_vectorization_factor): ...here.
9088 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9089 (vect_get_mask_type_for_stmt): New functions, split out from
9090 vect_determine_vectorization_factor.
9091
9092 2018-05-16 Richard Biener <rguenther@suse.de>
9093
9094 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9095 verify the [VEC_]COND_EXPR embedded comparison.
9096
9097 2018-05-15 Martin Sebor <msebor@redhat.com>
9098
9099 PR tree-optimization/85753
9100 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9101 RECORD_TYPE in addition to ARRAY_TYPE.
9102
9103 2018-05-15 Martin Sebor <msebor@redhat.com>
9104
9105 PR middle-end/85643
9106 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9107
9108 2018-05-15 Richard Biener <rguenther@suse.de>
9109
9110 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9111 add by_clobber_p one. Change algorithm to collect all defs
9112 representing uses we need to walk and try reducing them to
9113 a single one before failing.
9114 (dse_dom_walker::dse_optimize_stmt): Adjust.
9115
9116 2018-05-13 Mark Wielaard <mark@klomp.org>
9117
9118 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9119 (size_of_loc_descr): Likewise.
9120 (output_loc_operands): Likewise.
9121 (output_loc_operands_raw): Likewise.
9122 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9123 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9124 (hash_loc_operands): Likewise.
9125 (compare_loc_operands): Likewise.
9126
9127 2018-05-14 Mark Wielaard <mark@klomp.org>
9128
9129 * dwarf2out.c (count_index_addrs): New function.
9130 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9131
9132 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9133
9134 PR tree-optimization/83648
9135 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9136 return value as malloc candidate.
9137
9138 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9139
9140 PR ipa/85734
9141 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9142 param as true in call to suggest_attribute.
9143
9144 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
9145
9146 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9147 -mreadonly-in-sdata.
9148
9149 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9150
9151 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9152 New pattern.
9153 (aarch64_crypto_aesd_fused): Likewise.
9154
9155 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
9156
9157 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9158 (movsi_aarch64): Likewise.
9159 (load_pairsi): Likewise.
9160 (load_pairdi): Likewise.
9161 (store_pairsi): Likewise.
9162 (store_pairdi): Likewise.
9163 (load_pairsf): Likewise.
9164 (load_pairdf): Likewise.
9165 (store_pairsf): Likewise.
9166 (store_pairdf): Likewise.
9167 (zero_extend): Likewise.
9168 (trunc): Swap alternatives.
9169 (fcvt_target): Add '?' to prefer w over r.
9170
9171 2018-05-14 Jakub Jelinek <jakub@redhat.com>
9172
9173 PR target/85756
9174 * config/i386/i386.md: Disallow non-commutative arithmetics in
9175 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9176 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9177 in the peephole2 before it.
9178
9179 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9180
9181 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9182 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9183 (ix86_handle_option): Handle -mcldemote.
9184 * config.gcc: New header.
9185 * config/i386/cldemoteintrin.h: New file.
9186 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9187 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9188 -mcldemote.
9189 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9190 OPTION_MASK_ISA_CLDEMOTE.
9191 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9192 (ix86_valid_target_attribute_inner_p): Ditto.
9193 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9194 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9195 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9196 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9197 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9198 (cldemote): New.
9199 * config/i386/i386.opt: Add -mcldemote.
9200 * config/i386/x86intrin.h: New header.
9201 * doc/invoke.texi: Add -mcldemote.
9202
9203 2018-05-14 Richard Biener <rguenther@suse.de>
9204
9205 * doc/match-and-simplify.texi: Adjust :s documentation.
9206
9207 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9208
9209 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9210 intended memcpy size.
9211 (REORDER_45): Likewise.
9212
9213 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9214
9215 * sort.cc: New file.
9216 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9217 * vec.c (qsort_chk): Use gcc_qsort.
9218 * Makefile.in (OBJS-libcommon): Add sort.o.
9219 (build/sort.o): New target. Use it...
9220 (BUILD_RTL): ... here, and...
9221 (build/gencfn-macros): ... here, and...
9222 (build/genmatch): ... here.
9223
9224 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9225 Chung-Ju Wu <jasonwucj@gmail.com>
9226
9227 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9228 * config/nds32/nds32-graywolf.md: New file.
9229 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9230 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9231 pipeline.
9232 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9233 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9234 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9235 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9236 * config/nds32/pipelines.md: Include n15 settings.
9237
9238 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9239 Chung-Ju Wu <jasonwucj@gmail.com>
9240
9241 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9242 * config/nds32/nds32-n13.md: New file.
9243 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9244 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9245 pipeline.
9246 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9247 * config/nds32/nds32.md (pipeline_model): Add n13.
9248 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9249 * config/nds32/pipelines.md: Include n13 settings.
9250
9251 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9252 Chung-Ju Wu <jasonwucj@gmail.com>
9253
9254 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9255 * config/nds32/nds32-n10.md: New file.
9256 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9257 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9258 pipeline.
9259 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9260 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9261 * config/nds32/nds32.md (pipeline_model): Add n10.
9262 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9263 * config/nds32/pipelines.md: Include n10 settings.
9264
9265 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9266 Kito Cheng <kito.cheng@gmail.com>
9267 Chung-Ju Wu <jasonwucj@gmail.com>
9268
9269 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9270 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9271 Add enum values for DSP extension instructions.
9272 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9273 New constraints.
9274 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9275 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9276 New code iterators.
9277 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9278 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9279 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9280 * config/nds32/nds32-intrinsic.md: Likewise.
9281 * config/nds32/nds32_intrinsic.h: Likewise.
9282 * config/nds32/nds32-md-auxiliary.c: Likewise.
9283 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9284 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9285 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9286 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9287 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9288 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9289 TYPE_DMAC in switch statement.
9290 * config/nds32/nds32.c: New checking and implementation for DSP
9291 extension instructions.
9292 * config/nds32/nds32.h: Likewise.
9293 * config/nds32/nds32.md: Likewise.
9294 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9295 * config/nds32/predicates.md: Implement new predicates for DSP
9296 extension.
9297
9298 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9299
9300 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9301 Reformat alternatives and attributes so it is easier to identify
9302 which constraints/attributes go with which instruction.
9303 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9304 (mov<mode>_softfloat32, FMOVE64): Likewise.
9305 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9306 (mov<mode>_softfloat64, FMOVE64): Likewise.
9307
9308 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9309
9310 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9311 subsection.
9312 (Basic PowerPC Built-in Functions): The new name of the
9313 subsection previously known as "PowerPC Built-in Functions".
9314 (Basic PowerPC Built-in Functions Available on all Configurations):
9315 New subsubsection.
9316 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9317 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9318 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9319 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9320
9321 2018-05-11 Martin Jambor <mjambor@suse.cz>
9322
9323 PR ipa/85655
9324 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9325 single const.
9326
9327 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9328
9329 PR target/85733
9330 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9331
9332 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9333
9334 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9335 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9336 (ix86_handle_option): Handle -mwaitpkg.
9337 * config.gcc: New header.
9338 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9339 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9340 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9341 function type.
9342 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9343 OPTION_MASK_ISA_WAITPKG.
9344 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9345 (ix86_option_override_internal): Add PTA_WAITPKG.
9346 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9347 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9348 IX86_BUILTIN_TPAUSE.
9349 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9350 __builtin_ia32_umwait and __builtin_ia32_tpause.
9351 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9352 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9353 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9354 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9355 UNSPECV_TPAUSE): New.
9356 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9357 * config/i386/i386.opt: Add -mwaitpkg.
9358 * config/i386/waitpkgintrin.h: New file.
9359 * config/i386/x86intrin.h: New header.
9360 * doc/invoke.texi: Add -mwaitpkg.
9361
9362 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9363
9364 PR target/85606
9365 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9366 equivalent.
9367 (cortex-m0): Use armv6s-m isa.
9368 (cortex-m0plus): Likewise.
9369 (cortex-m1): Likewise.
9370 (cortex-m0.small-multiply): Likewise.
9371 (cortex-m0plus.small-multiply): Likewise.
9372 (cortex-m1.small-multiply): Likewise.
9373
9374 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9375 Jakub Jelinek <jakub@redhat.com>
9376
9377 PR tree-optimization/85692
9378 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9379 source permute as well.
9380
9381 2018-05-11 Martin Liska <mliska@suse.cz>
9382
9383 PR sanitizer/85556
9384 * doc/extend.texi: Document LLVM style format for no_sanitize
9385 attribute.
9386
9387 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9388
9389 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9390 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9391 (mode_supports_vsx_dform_quad): Likewise.
9392 (mode_supports_vmx_dform): Move these functions to be next to the
9393 other mode_supports functions.
9394 (mode_supports_dq_form): Likewise.
9395 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9396 mode_supports_dq_form.
9397 (reg_offset_addressing_ok_p): Likewise.
9398 (offsettable_ok_by_alignment): Likewise.
9399 (rs6000_legitimate_offset_address_p): Likewise.
9400 (legitimate_lo_sum_address_p): Likewise.
9401 (rs6000_legitimize_address): Likewise.
9402 (rs6000_legitimize_reload_address): Likewise.
9403 (rs6000_secondary_reload_inner): Likewise.
9404 (rs6000_preferred_reload_class): Likewise.
9405 (rs6000_output_move_128bit): Likewise.
9406
9407 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9408
9409 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9410 Generate SImode target register for null target.
9411 <case IX86_BUILTIN_XGETBV>: Ditto.
9412 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9413 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9414
9415 2018-05-10 Carl Love <cel@us.ibm.com>
9416
9417 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9418 dcbtt and dcbtstt if operands[2] is 0.
9419
9420 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9421
9422 PR target/85693
9423 * config/i386/sse.md (usadv64qi): New expander.
9424
9425 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9426
9427 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9428 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9429 -maltivec=be support.
9430 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9431 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9432 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9433 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9434 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9435 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9436 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9437 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9438 altivec_vsumsws): Adjust.
9439 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9440 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9441 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9442 support.
9443 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9444 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9445 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9446 (altivec_lve<VI_char>x): Delete expand.
9447 (*altivec_lve<VI_char>x_internal): Rename to...
9448 (altivec_lve<VI_char>x): ... this.
9449 (altivec_lvxl_<mode>): Delete expand.
9450 (*altivec_lvxl_<mode>_internal): Rename to ...
9451 (altivec_lvxl_<mode>): ... this.
9452 (altivec_stvxl_<mode>): Delete expand.
9453 (*altivec_stvxl_<mode>_internal): Rename to ...
9454 (altivec_stvxl_<mode>): ... this.
9455 (altivec_stve<VI_char>x): Delete expand.
9456 (*altivec_stve<VI_char>x_internal): Rename to ...
9457 (altivec_stve<VI_char>x): ... this.
9458 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9459 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9460 reduc_plus_scal_<mode>): Adjust.
9461 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9462 comment.
9463 (rs6000_cpu_cpp_builtins): Adjust.
9464 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9465 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9466 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9467 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9468 -maltivec=be support.
9469 (rs6000_split_vec_extract_var): Adjust.
9470 (rs6000_split_v4si_init): Adjust.
9471 (swap_selector_for_mode): Delete.
9472 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9473 altivec_expand_stvex_be): Delete.
9474 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9475 -maltivec=be support.
9476 (rs6000_gimple_fold_builtin): Ditto.
9477 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9478 Adjust.
9479 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9480 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9481 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9482 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9483 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9484 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9485 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9486 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9487 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9488 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9489 anonymous split): Adjust.
9490 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9491 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9492
9493 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9494
9495 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9496 when --with-gxx-include-dir is also specified.
9497 * configure: Regenerate.
9498
9499 2018-05-09 Jim Wilson <jimw@sifive.com>
9500
9501 PR target/84797
9502 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9503 * config/riscv/t-withmultilib: New.
9504 * config/riscv/withmultilib.h: New.
9505 * doc/install.texi: Document RISC-V --with-multilib-list support.
9506
9507 2018-05-09 Richard Biener <rguenther@suse.de>
9508
9509 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9510 vector.
9511 (vect_bb_vectorization_profitable_p): Adjust. Compute
9512 actual scalar cost using the cost vector and the add_stmt_cost
9513 machinery.
9514
9515 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9516
9517 PR rtl-optimization/85645
9518 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9519 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9520
9521 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9522
9523 PR rtl-optimization/85645
9524 * shrink-wrap.c (spread_components): Return a boolean saying if
9525 anything was changed.
9526 (try_shrink_wrapping_separate): Iterate spread_components until
9527 nothing changes anymore.
9528
9529 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9530
9531 PR rtl-optimization/85645
9532 * regrename.c (build_def_use): Also kill the chains that include the
9533 destination of a REG_CFA_REGISTER note.
9534
9535 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9536
9537 PR rtl-optimization/85645
9538 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9539 insn that has a REG_CFA_REGISTER note.
9540
9541 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9542
9543 * cfgexpand.c (expand_clobber): New function.
9544 (expand_gimple_stmt_1): Use it.
9545 * tree-vect-stmts.c (vect_clobber_variable): New function,
9546 split out from...
9547 (vectorizable_simd_clone_call): ...here.
9548 (vectorizable_store): Emit a clobber either side of an
9549 IFN_STORE_LANES sequence.
9550 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9551
9552 2018-05-09 Tom de Vries <tom@codesourcery.com>
9553
9554 PR target/85626
9555 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9556 (define_insn "trap_if_false"): Add exit after trap.
9557
9558 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9559
9560 PR rtl-optimization/85638
9561 * bb-reorder.c: Include common/common-target.h.
9562 (create_forwarder_block): New function extracted from...
9563 (fix_up_crossing_landing_pad): ...here. Rename into...
9564 (dw2_fix_up_crossing_landing_pad): ...this.
9565 (sjlj_fix_up_crossing_landing_pad): New function.
9566 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9567 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9568 from both partitions and exit the loop after one iteration.
9569
9570 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9571
9572 Revert:
9573 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9574 subsection.
9575 (Basic PowerPC Built-in Functions): The new name of the
9576 subsection previously known as "PowerPC Built-in Functions".
9577 (Basic PowerPC Built-in Functions Available on all Configurations):
9578 New subsubsection.
9579 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9580 subsubsection.
9581 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9582 subsubsection.
9583 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9584 subsubsection.
9585 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9586 subsubsection.
9587
9588 2018-05-08 Jim Wilson <jimw@sifive.com>
9589
9590 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9591 (LD_EMUL_SUFFIX): New.
9592 (LINK_SPEC): Use it.
9593
9594 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9595
9596 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9597 subsection.
9598 (Basic PowerPC Built-in Functions): The new name of the
9599 subsection previously known as "PowerPC Built-in Functions".
9600 (Basic PowerPC Built-in Functions Available on all Configurations):
9601 New subsubsection.
9602 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9603 subsubsection.
9604 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9605 subsubsection.
9606 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9607 subsubsection.
9608 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9609 subsubsection.
9610
9611 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9612
9613 PR target/85683
9614 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9615 after cmpelim optimization.
9616
9617 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
9618
9619 * config.gcc: Support "goldmont".
9620 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9621 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9622 PROCESSOR_GOLDMONT.
9623 * config/i386/i386.c (m_GOLDMONT): Define.
9624 (processor_target_table): Add "goldmont".
9625 (PTA_GOLDMONT): Define.
9626 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9627 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9628 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9629 (fold_builtin_cpu): Add "goldmont".
9630 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9631 (ix86_option_override_internal): Add "goldmont".
9632 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9633 (processor_type): Add PROCESSOR_GOLDMONT.
9634 * config/i386/i386.md: Add CPU "glm".
9635 * config/i386/glm.md: New file.
9636 * config/i386/x86-tune.def: Add m_GOLDMONT.
9637 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9638
9639 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9640
9641 PR target/85572
9642 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9643 E_V4DImode.
9644 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9645 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9646 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9647
9648 PR target/85317
9649 * config/i386/i386.c (ix86_fold_builtin): Handle
9650 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9651
9652 PR target/85480
9653 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9654 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9655
9656 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9657
9658 PR target/85658
9659 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9660 (check_arch): Likewise.
9661 (check_fpu): Return the result rather than printing it.
9662 (end arch): Fix operator precedence.
9663 (end cpu): Likewise.
9664 (END): Print the result from check_fpu.
9665
9666 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9667 Alan Hayward <alan.hayward@arm.com>
9668 David Sherwood <david.sherwood@arm.com>
9669
9670 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9671 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9672 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9673 (*fcmuo<mode>_and): New patterns.
9674
9675 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9676
9677 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9678 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9679 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9680 (cmp_op, sve_imm_con): New code attributes.
9681 (SVE_COND_INT_CMP, imm_con): Delete.
9682 (cmp_op): Remove above unspecs from int attribute.
9683 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9684 to...
9685 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9686 comparison-specific unspecs.
9687 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9688 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9689 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9690 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9691 (*vec_fcm<cmp_op><mode>): Rename to...
9692 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9693 (*vec_fcmuo<mode>): Rename to...
9694 (*fcmuo<mode>): ...this and adjust likewise.
9695 (*pred_fcm<cmp_op><mode>): New pattern.
9696 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9697 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9698 functions.
9699 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9700 and UNORDERED.
9701 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9702 (aarch64_emit_sve_predicated_cond): New function.
9703 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9704 (aarch64_emit_unspec_cond_or): Replace with...
9705 (aarch64_emit_sve_or_conds): ...this new function. Use
9706 aarch64_emit_sve_ptrue_op for the individual comparisons and
9707 aarch64_emit_binop to OR them together.
9708 (aarch64_emit_inverted_unspec_cond): Replace with...
9709 (aarch64_emit_sve_inverted_cond): ...this new function. Use
9710 aarch64_emit_sve_ptrue_op for the comparison and
9711 aarch64_emit_unop to invert the result.
9712 (aarch64_expand_sve_vec_cmp_float): Update after the above
9713 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
9714
9715 2018-05-07 Nathan Sidwell <nathan@acm.org>
9716
9717 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9718 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9719 (Backwards Compatibility): Likewise.
9720
9721 2018-05-07 Luis Machado <luis.machado@linaro.org>
9722
9723 PR bootstrap/85681
9724 Revert:
9725 2018-05-07 Luis Machado <luis.machado@linaro.org>
9726
9727 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9728 <prefetch_dynamic_strides>: New const bool field.
9729 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9730 prefetch_dynamic_strides.
9731 (exynosm1_prefetch_tune): Likewise.
9732 (thunderxt88_prefetch_tune): Likewise.
9733 (thunderx_prefetch_tune): Likewise.
9734 (thunderx2t99_prefetch_tune): Likewise.
9735 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9736 to false.
9737 (aarch64_override_options_internal): Update to set
9738 PARAM_PREFETCH_DYNAMIC_STRIDES.
9739 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9740 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9741 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9742 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9743 prefetch-dynamic-strides setting.
9744
9745 2018-05-07 Luis Machado <luis.machado@linaro.org>
9746
9747 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9748 <minimum_stride>: New const int field.
9749 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9750 minimum_stride field.
9751 (exynosm1_prefetch_tune): Likewise.
9752 (thunderxt88_prefetch_tune): Likewise.
9753 (thunderx_prefetch_tune): Likewise.
9754 (thunderx2t99_prefetch_tune): Likewise.
9755 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9756 (aarch64_override_options_internal): Update to set
9757 PARAM_PREFETCH_MINIMUM_STRIDE.
9758 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9759 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9760 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9761 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9762 stride is constant and is below the minimum stride threshold.
9763
9764 2018-05-07 Luis Machado <luis.machado@linaro.org>
9765
9766 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9767 to 512.
9768
9769 2018-05-07 Luis Machado <luis.machado@linaro.org>
9770
9771 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9772 <prefetch_dynamic_strides>: New const bool field.
9773 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9774 prefetch_dynamic_strides.
9775 (exynosm1_prefetch_tune): Likewise.
9776 (thunderxt88_prefetch_tune): Likewise.
9777 (thunderx_prefetch_tune): Likewise.
9778 (thunderx2t99_prefetch_tune): Likewise.
9779 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9780 to false.
9781 (aarch64_override_options_internal): Update to set
9782 PARAM_PREFETCH_DYNAMIC_STRIDES.
9783 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9784 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9785 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9786 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9787 prefetch-dynamic-strides setting.
9788
9789 2018-05-07 Luis Machado <luis.machado@linaro.org>
9790
9791 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9792 <minimum_stride>: New const int field.
9793 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9794 minimum_stride field.
9795 (exynosm1_prefetch_tune): Likewise.
9796 (thunderxt88_prefetch_tune): Likewise.
9797 (thunderx_prefetch_tune): Likewise.
9798 (thunderx2t99_prefetch_tune): Likewise.
9799 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9800 (aarch64_override_options_internal): Update to set
9801 PARAM_PREFETCH_MINIMUM_STRIDE.
9802 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9803 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9804 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9805 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9806 stride is constant and is below the minimum stride threshold.
9807
9808 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9809
9810 PR c++/85659
9811 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9812 the type is addressable. Don't force op into register if it has
9813 BLKmode.
9814
9815 2018-05-05 Roland McGrath <mcgrathr@google.com>
9816
9817 PR other/77609
9818 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9819 any section for which we don't know a specific type it should have,
9820 regardless of name. Previously this was done only for the exact
9821 names ".init_array", ".fini_array", and ".preinit_array".
9822 (default_elf_asm_named_section): Add comment about
9823 relationship with default_section_type_flags and SECTION_NOTYPE.
9824 (get_section): Don't consider it a type conflict if one side has
9825 SECTION_NOTYPE and the other doesn't, as long as neither has the
9826 SECTION_BSS et al used in the default_section_type_flags logic.
9827
9828 2018-05-05 Tom de Vries <tom@codesourcery.com>
9829
9830 PR target/85653
9831 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9832 (workaround_barsyncs): New function.
9833 (nvptx_reorg): Use workaround_barsyncs.
9834 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9835 (define_expand "nvptx_membar_cta"): New define_expand.
9836 (define_insn "*nvptx_membar_cta"): New insn.
9837
9838 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9839
9840 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9841 To improve optimization opportunities.
9842 * builtin-types.def: The new needed builtin types for the above.
9843
9844 2018-05-04 Richard Biener <rguenther@suse.de>
9845
9846 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9847 * gimple-ssa-store-merging.c
9848 (imm_store_chain_info::output_merged_store): Remove redundant create,
9849 release split_store vector contents on failure.
9850 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9851 scalar stmt vector on cache hit.
9852
9853 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9854
9855 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9856 Xilinx FP support.
9857 * config.gcc (powerpc-xilinx-eabi*): Remove.
9858 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9859 support.
9860 (fusion_addis_mem_combo_load): Ditto.
9861 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9862 FP support.
9863 (rs6000_cpu_cpp_builtins): Ditto.
9864 * config/rs6000/rs6000-linux.c
9865 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9866 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9867 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9868 support.
9869 (rs6000_setup_reg_addr_masks): Ditto.
9870 (rs6000_init_hard_regno_mode_ok): Ditto.
9871 (rs6000_option_override_internal): Ditto.
9872 (legitimate_lo_sum_address_p): Ditto.
9873 (rs6000_legitimize_address): Ditto.
9874 (rs6000_legitimize_reload_address): Ditto.
9875 (rs6000_legitimate_address_p): Ditto.
9876 (abi_v4_pass_in_fpr): Ditto.
9877 (setup_incoming_varargs): Ditto.
9878 (rs6000_gimplify_va_arg): Ditto.
9879 (rs6000_split_multireg_move): Ditto.
9880 (rs6000_savres_strategy): Ditto.
9881 (rs6000_emit_prologue_components): Ditto.
9882 (rs6000_emit_epilogue_components): Ditto.
9883 (rs6000_emit_prologue): Ditto.
9884 (rs6000_emit_epilogue): Ditto.
9885 (rs6000_elf_file_end): Ditto.
9886 (rs6000_function_value): Ditto.
9887 (rs6000_libcall_value): Ditto.
9888 * config/rs6000/rs6000.h: Ditto.
9889 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9890 (TARGET_MINMAX): ... this. New.
9891 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9892 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9893 (*movsi_internal1_single): Delete.
9894 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9895 mfpu=, mxilinx-fpu): Delete.
9896 * config/rs6000/singlefp.h: Delete.
9897 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9898 * config/rs6000/t-rs6000: Ditto.
9899 * config/rs6000/t-xilinx: Delete.
9900 * config/rs6000/titan.md: Adjust for fp_type removal.
9901 * config/rs6000/vsx.md: Remove Xilinx FP support.
9902 (VStype_simple): Delete.
9903 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9904 * config/rs6000/xfpu.h: Delete.
9905 * config/rs6000/xfpu.md: Delete.
9906 * config/rs6000/xilinx.h: Delete.
9907 * config/rs6000/xilinx.opt: Delete.
9908 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9909 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9910
9911 2018-05-04 Tom de Vries <tom@codesourcery.com>
9912
9913 PR libgomp/85639
9914 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9915 if ignore == 0.
9916
9917 2018-05-04 Richard Biener <rguenther@suse.de>
9918
9919 PR middle-end/85627
9920 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9921 (expand_complex_div_wide): Likewise.
9922 (expand_complex_operations_1): Likewise.
9923 (expand_complex_libcall): Preserve EH info of the original stmt.
9924 (tree_lower_complex): Handle removed blocks.
9925 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9926 on complex multiplication and division libcall builtins.
9927
9928 2018-05-04 Richard Biener <rguenther@suse.de>
9929
9930 PR middle-end/85574
9931 * fold-const.c (negate_expr_p): Restrict negation of operand
9932 zero of a division to when we know that can happen without
9933 overflow.
9934 (fold_negate_expr_1): Likewise.
9935
9936 2018-05-04 Jakub Jelinek <jakub@redhat.com>
9937
9938 PR libstdc++/85466
9939 * real.h (real_nextafter): Declare.
9940 * real.c (real_nextafter): New function.
9941 * fold-const-call.c (fold_const_nextafter): New function.
9942 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9943 CASE_CFN_NEXTTOWARD.
9944 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9945 even when arg1_mode is different from arg0_mode.
9946
9947 2018-05-03 Nathan Sidwell <nathan@acm.org>
9948
9949 * doc/extend.texi (Deprecated Features): Remove
9950 -ffriend-injection.
9951 (Backwards Compatibility): Likewise.
9952 * doc/invoke.texi (C++ Language Options): Likewise.
9953 (C++ Dialect Options): Likewise.
9954
9955 2018-05-03 Jakub Jelinek <jakub@redhat.com>
9956
9957 PR target/85530
9958 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9959 _mm512_mask_mullox_epi64): New intrinsics.
9960
9961 2018-05-03 Tom de Vries <tom@codesourcery.com>
9962
9963 PR testsuite/85106
9964 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9965 dump files): Add offload-tree.
9966
9967 2018-05-03 Richard Biener <rguenther@suse.de>
9968
9969 PR tree-optimization/85615
9970 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9971 to loops not nested in BBs loop father to avoid creating multi-entry
9972 loops.
9973
9974 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9975
9976 PR tree-optimization/70291
9977 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9978 arguments. Change return type to tree. Emit libcall as a new
9979 statement rather than replacing existing one when inplace_p is true.
9980 (expand_complex_multiplication_components): New function.
9981 (expand_complex_multiplication): Expand floating-point complex
9982 multiplication using the above.
9983 (expand_complex_division): Rename inner_type parameter to type.
9984 Update expand_complex_libcall call-site.
9985 (expand_complex_operations_1): Update expand_complex_multiplication
9986 and expand_complex_division call-sites.
9987
9988 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9989
9990 PR target/85582
9991 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9992 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9993 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9994 the highest significant bit of the shift count mask is clear. In
9995 check whether and[sq]i3 is needed verify that all significant bits
9996 of the shift count other than the highest are set.
9997
9998 2018-05-02 Tom de Vries <tom@codesourcery.com>
9999
10000 PR libgomp/82428
10001 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10002 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10003 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10004 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10005 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10006 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10007 __builtin_goacc_parlevel_size.
10008
10009 2018-05-02 Richard Biener <rguenther@suse.de>
10010
10011 PR tree-optimization/85597
10012 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10013 do not use split vect_get_vec_defs call but call vect_get_slp_defs
10014 directly.
10015
10016 2018-05-02 Tom de Vries <tom@codesourcery.com>
10017
10018 PR testsuite/85106
10019 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10020 dump files): Add ltrans-tree.
10021
10022 2018-05-02 Tom de Vries <tom@codesourcery.com>
10023
10024 PR testsuite/85106
10025 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10026 dump files): Add wpa-ipa.
10027
10028 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10029
10030 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10031 powerpc*-*-linux*paired* target.
10032 * config/rs6000/750cl.h: Delete.
10033 * config/rs6000/paired.h: Delete.
10034 * config/rs6000/paired.md: Delete.
10035 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10036 float support.
10037 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10038 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10039 comment. Remove paired float support.
10040 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10041 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10042 VECTOR_PAIRED.
10043 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10044 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10045 declarations.
10046 * config/rs6000/rs6000.c: Remove paired float support.
10047 (paired_expand_vector_init, paired_expand_vector_move,
10048 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10049 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10050 paired_expand_builtin, paired_expand_predicate_builtin,
10051 paired_init_builtins): Delete.
10052 * config/rs6000/rs6000.h: Remove paired float support.
10053 * config/rs6000/rs6000.md: Remove paired float support.
10054 (move_from_CR_ov_bit): Delete.
10055 * config/rs6000/rs6000.opt (mpaired): Delete.
10056 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10057 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10058
10059 2018-05-02 Richard Biener <rguenther@suse.de>
10060
10061 PR middle-end/85567
10062 * gimplify.c (gimplify_save_expr): When in SSA form allow
10063 SAVE_EXPRs to compute to SSA vars.
10064
10065 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10066
10067 PR target/85582
10068 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10069 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10070 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10071 clobber operands[2], instead use a new pseudo. Formatting fixes.
10072
10073 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10074
10075 PR tree-optimization/85586
10076 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10077 exit early for statements in the same group if the accesses are
10078 not strided.
10079
10080 2018-05-02 Tom de Vries <tom@codesourcery.com>
10081
10082 PR lto/85451
10083 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10084 error message.
10085
10086 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10087
10088 PR tree-optimization/85143
10089 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10090
10091 2018-05-01 Tom de Vries <tom@codesourcery.com>
10092
10093 PR lto/85451
10094 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10095 not found" error message.
10096
10097 2018-05-01 Tom de Vries <tom@codesourcery.com>
10098
10099 PR other/83786
10100 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10101 * vec.c (test_ordered_remove_if): New function.
10102 (vec_c_tests): Call test_ordered_remove_if.
10103 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10104 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10105 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10106 VEC_ORDERED_REMOVE_IF.
10107
10108 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10109
10110 PR tree-optimization/82665
10111 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10112 pointer subtraction where arguments come from a memchr call.
10113
10114 2018-05-01 Jakub Jelinek <jakub@redhat.com>
10115
10116 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10117 --push-state --as-needed and --pop-state instead of --as-needed and
10118 --no-as-needed if ld supports it.
10119 * configure: Regenerated.
10120
10121 PR web/85578
10122 * doc/install.texi2html: Replace _002d with - and _002a with * in
10123 generated html files using sed.
10124
10125 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10126
10127 PR c++/85523
10128 * gcc-rich-location.c (blank_line_before_p): New function.
10129 (use_new_line): New function.
10130 (gcc_rich_location::add_fixit_insert_formatted): New function.
10131 * gcc-rich-location.h
10132 (gcc_rich_location::add_fixit_insert_formatted): New function.
10133
10134 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10135
10136 * selftest.c (assert_streq): Rename "expected" and "actual" to
10137 "val1" and "val2". Extend NULL-handling to cover both inputs
10138 symmetrically, while still requiring both to be non-NULL for a pass.
10139 * selftest.h (assert_streq): Rename "expected" and "actual" to
10140 "val1" and "val2".
10141 (ASSERT_EQ): Likewise.
10142 (ASSERT_EQ_AT): Likewise.
10143 (ASSERT_KNOWN_EQ): Likewise.
10144 (ASSERT_KNOWN_EQ_AT): Likewise.
10145 (ASSERT_NE): Likewise.
10146 (ASSERT_MAYBE_NE): Likewise.
10147 (ASSERT_MAYBE_NE_AT): Likewise.
10148 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
10149 the assertion to pass.
10150 (ASSERT_STREQ_AT): Likewise.
10151
10152 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10153
10154 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10155 interaction with -pie.
10156
10157 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10158
10159 * selftest.h: Fix alphabetization of per-source-file selftest
10160 declarations.
10161
10162 2018-04-30 Jason Merrill <jason@redhat.com>
10163
10164 PR c++/61982 - dead stores to destroyed objects.
10165 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10166 of clobber.
10167
10168 2018-04-30 Jason Merrill <jason@redhat.com>
10169
10170 * tree.c (build_clobber): New.
10171 * tree.h: Declare it.
10172 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10173
10174 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10175
10176 * diagnostic-show-locus.c (layout::layout): Update for
10177 location_get_source_line returning a char_span.
10178 (struct char_span): Move to input.h.
10179 (struct correction): Update for fields in char_span becoming
10180 private.
10181 (struct source_line): Update for location_get_source_line
10182 returning a char_span.
10183 (layout::print_line): Likewise.
10184 * edit-context.c (edited_file::print_content): Likewise.
10185 (edited_file::print_diff_hunk): Likewise.
10186 (edited_file::print_run_of_changed_lines): Likewise.
10187 (edited_file::get_num_lines): Likewise.
10188 (edited_line::edited_line): Likewise.
10189 * final.c (asm_show_source): Likewise.
10190 * input.c (location_get_source_line): Convert return type
10191 from const char * to char_span, losing the final "line_len"
10192 param.
10193 (dump_location_info): Update for the above.
10194 (get_substring_ranges_for_loc): Likewise. Use a char_span
10195 when handling the literal within the line.
10196 (test_reading_source_line): Update for location_get_source_line
10197 returning a char_span.
10198 * input.h (class char_span): Move here from
10199 diagnostic-show-locus.c, converting from a struct to a class.
10200 Make data members private.
10201 (char_span::operator bool): New.
10202 (char_span::length): New.
10203 (char_span::get_buffer): New.
10204 (char_span::operator[]): New.
10205 (char_span::subspan): Make const.
10206 (char_span::xstrdup): New.
10207 (location_get_source_line): Convert return type from const char *
10208 to char_span, losing the final "line_size" param.
10209
10210 2018-04-30 Jan Hubicka <jh@suse.cz>
10211
10212 * lto-wrapper.c (ltrans_priorities): New static var.
10213 (cmp_priority): New.
10214 (run_gcc): Read priorities and if doing parallel build order
10215 the Makefile by them.
10216
10217 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10218
10219 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10220
10221 2018-04-30 Richard Biener <rguenther@suse.de>
10222
10223 * tree-cfg.c (verify_address): Remove base argument, add
10224 flag whether to check TREE_ADDRESSABLE and do that.
10225 (verify_expr): Remove.
10226 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10227 (verify_gimple_assign_single): Likewise.
10228 (verify_gimple_switch): Likewise.
10229 (verify_expr_location_1): Dereference tp once. Add (disabled)
10230 piece from verify_expr.
10231 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10232
10233 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10234
10235 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10236
10237 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10238
10239 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10240 (small_data_pattern): Likewise.
10241 (arc_rewrite_small_data): Likewise.
10242 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10243 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10244 (get_symbol_alignment): New function.
10245 (legitimate_small_data_address_p): Likewise.
10246 (legitimate_scaled_address): Update, call
10247 legitimate_small_data_address_p.
10248 (output_sdata): New static variable.
10249 (arc_print_operand): Update how we handle small data operands.
10250 (arc_print_operand_address): Likewise.
10251 (arc_legitimate_address_p): Update, use
10252 legitimate_small_data_address_p.
10253 (arc_rewrite_small_data_p): Remove.
10254 (arc_rewrite_small_data_1): Likewise.
10255 (arc_rewrite_small_data): Likewise.
10256 (small_data_pattern): Likewise.
10257 (compact_sda_memory_operand): Update to use
10258 legitimate_small_data_address_p and get_symbol_alignment.
10259 (prepare_move_operands): Don't rewite sdata pattern.
10260 (prepare_extend_operands): Remove.
10261 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10262 pattern.
10263 (zero_extendqisi2): Likewise.
10264 (zero_extendhisi2): Likewise.
10265 (extendqihi2): Likewise.
10266 (extendqisi2): Likewise.
10267 (extendhisi2): Likewise.
10268 (addsi3): Likewise.
10269 (subsi3): Likewise.
10270 (andsi3): Likewise.
10271 * config/arc/constraints.md (Usd): Change it to memory constraint.
10272
10273 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10274
10275 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10276 as source of std instructions.
10277 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10278 allow 6-bit constants as source for store instructions.
10279 (movdi_insn): Update instruction pattern to allow 6-bit constants
10280 as source for store instructions.
10281
10282 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10283
10284 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10285
10286 2018-04-30 Nathan Sidwell <nathan@acm.org>
10287 Sandra Loosemore <sandra@codesourcery.com>
10288
10289 * dumpfile.c (dump_open): Allow '-' for stdout.
10290 * doc/invoke.texi (Developer Options): Document dump filename
10291 determination early. Document stdin/stdout selection.
10292
10293 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10294
10295 Microblaze Target: PIC data text relative
10296
10297 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10298 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10299 Add declaration.
10300 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10301 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10302 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10303 New addressing mode for data-text relative position indepenedent code.
10304 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10305 'ADDRESS_SYMBOLIC_TXT_REL'.
10306 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10307 (microblaze_legitimate_pic_operand): Exclude function calls from
10308 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10309 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10310 addresses cases.
10311 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10312 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10313 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10314 for 'address + offset'.
10315 (microblaze_expand_prologue): Add new function prologue call for
10316 'r20' assignation.
10317 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10318 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10319 table in case of TARGET_PIC_DATA_TEXT_REL.
10320 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10321 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10322 Add new macros 'UNSPEC_TEXT',
10323 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10324 + exclude function calls from 'UNSPEC_PLT' in case of data text
10325 relative mode.
10326 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10327 new target hook for generating address diff vector tables in case of
10328 flag_pic.
10329 * doc/tm.texi : Regenerate.
10330 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10331 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10332 of addr diff vector generation.
10333 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10334 target hook definition.
10335 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10336 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10337 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10338 option for data text relative.
10339
10340 2018-04-30 Richard Biener <rguenther@suse.de>
10341
10342 * tree-chrec.h (evolution_function_is_constant_p): Remove
10343 redundant check.
10344 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10345
10346 2018-04-30 Richard Biener <rguenther@suse.de>
10347
10348 PR bootstrap/85571
10349 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10350
10351 2018-04-30 Richard Biener <rguenther@suse.de>
10352
10353 PR tree-optimization/28364
10354 PR tree-optimization/85275
10355 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10356 copying first exit test.
10357
10358 2018-04-28 Mark Wielaard <mark@klomp.org>
10359
10360 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10361 dwarf_version >= 5.
10362 (dwarf_AT): Handle DW_AT_addr_base.
10363 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10364
10365 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10366
10367 PR target/84431
10368 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10369 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10370 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10371 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10372
10373 2018-04-28 Richard Biener <rguenther@suse.de>
10374
10375 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10376 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10377 to reflect use. Only add interesting stmts.
10378
10379 2018-04-27 Martin Jambor <mjambor@suse.cz>
10380
10381 PR ipa/85549
10382 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10383 the jump function allows for passing through aggregate values.
10384
10385 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10386
10387 * input.h (in_system_header_at): Convert from macro to inline
10388 function.
10389 (from_macro_expansion_at): Likewise.
10390 (from_macro_definition_at): Likewise.
10391
10392 2018-04-27 Jeff Law <law@redhat.com>
10393
10394 * config.gcc: Mark tile* targets as deprecated/obsolete.
10395
10396 2018-04-27 Richard Biener <rguenther@suse.de>
10397
10398 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10399 fix for ILP32.
10400
10401 2018-04-27 Richard Biener <rguenther@suse.de>
10402
10403 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10404
10405 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10406
10407 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10408 with Yd constraint. Set "preferred_for_speed" attribute from
10409 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10410 with Yd constraint.
10411 (*movdi_internal): Ditto.
10412 (movti_interunit splitters): Remove
10413 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10414 (movdi_interunit splitters): Ditto.
10415 * config/i386/constraints.md (Ye): Remove.
10416 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10417
10418 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10419
10420 PR target/85512
10421 * config/aarch64/constraints.md (Usg): Limit to 31.
10422 (Usj): Limit to 63.
10423
10424 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10425
10426 PR tree-optimization/85529
10427 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10428 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10429 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10430 zero extension or masking of the MSB bit.
10431 (optimize_range_tests): Add FIRST_BB argument, pass it through
10432 to optimize_range_tests_var_bound.
10433 (maybe_optimize_range_tests, reassociate_bb): Adjust
10434 optimize_range_tests callers.
10435
10436 2018-04-26 Richard Biener <rguenther@suse.de>
10437 Jakub Jelinek <jakub@redhat.com>
10438
10439 * cgraph.h (symbol_table): Just declare debug method here.
10440 * symtab.c (symbol_table::debug): Define.
10441
10442 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10443
10444 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10445
10446 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10447
10448 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10449 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10450 (*movdi_internal): Substitute Yi and Yj constraint with x
10451 and Ym and Yn constraint with y constraint. Update "isa"
10452 attribute and set "preferred_for_speed" attribute from
10453 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10454 (*movsi_internal): Ditto.
10455 (*movdf_internal): Ditto.
10456 (*movsf_internal): Ditto.
10457 (*zero_extendsidi2): Ditto.
10458 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10459 (sse2_loadld): Ditto.
10460 (*vec_extract<ssevecmodelower>_0): Ditto.
10461 (*vec_extractv4si_0_zext_sse4): Ditto.
10462 (vec_concatv2di): Ditto.
10463 (*vec_dup<mode>): Ditto.
10464 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10465 * config/i386/constraints.md (Yi): Remove.
10466 (Yj): Remove.
10467 (Ym): Remove.
10468 (Yn): Remove.
10469
10470 2018-04-26 Nathan Sidwell <nathan@acm.org>
10471
10472 * dumpfile.c (dump_open): New.
10473 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10474 (dump_finish): Detect stdio/stderr by value not name.
10475
10476 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10477
10478 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10479
10480 2018-04-26 Tom de Vries <tom@codesourcery.com>
10481
10482 PR target/84952
10483 * config/nvptx/nvptx.c (verify_neutering_jumps)
10484 (verify_neutering_labels): New function
10485 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10486
10487 2018-04-26 Tom de Vries <tom@codesourcery.com>
10488
10489 PR target/84025
10490 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10491 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10492 need neutering.
10493
10494 2018-04-26 Richard Biener <rguenther@suse.de>
10495 Tom de Vries <tom@codesourcery.com>
10496
10497 PR lto/85422
10498 * lto-streamer-out.c (output_function): Fixup loops if required to match
10499 discovery done in the reader.
10500
10501 2018-04-26 Richard Biener <rguenther@suse.de>
10502
10503 PR tree-optimization/85116
10504 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10505 have a loop exit from the single latch predecessor. Remove
10506 case of header with just condition.
10507 (ch_base::copy_headers): Exclude infinite loops from any
10508 processing.
10509 (pass_ch::execute): Record exits.
10510
10511 2018-04-26 Richard Biener <rguenther@suse.de>
10512
10513 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10514 prologue cost vector and pass it to vect_get_load_cost.
10515 (vect_get_peeling_costs_all_drs): Likewise.
10516 (vect_peeling_hash_get_lowest_cost): Likewise.
10517 (vect_enhance_data_refs_alignment): Likewise.
10518
10519 2018-04-26 Richard Biener <rguenther@suse.de>
10520
10521 PR middle-end/85450
10522 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10523 checking of integer<->pointer conversions.
10524 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10525 sign-/zero-extending pointer types.
10526 (expand_omp_for_static_chunk): Likewise.
10527
10528 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10529 Jean Lee <xiaoyur347@gmail.com>
10530
10531 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10532 (TARGET_ASAN_SHADOW_OFFSET): Define.
10533 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10534 true for -fsanitize=address.
10535
10536 2018-04-25 Mark Wielaard <mark@klomp.org>
10537
10538 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10539 shorter ones.
10540
10541 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10542
10543 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10544 than "alu", remove explicit "memory" and "imm_disp" attributes.
10545 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10546
10547 PR middle-end/85414
10548 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10549 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10550 gen_lowpart_no_emit.
10551
10552 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10553
10554 PR target/85473
10555 * config/i386/i386.c (ix86_expand_builtin): Change memory
10556 operand to XI, extend p0 to Pmode.
10557 * config/i386/i386.md: Change unspec volatile and operand
10558 1 mode to XI, change operand 0 mode to P.
10559
10560 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10561
10562 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10563 GET_MODE_MASK before any checking.
10564 (nds32_can_use_bset_p): Likewise.
10565 (nds32_can_use_btgl_p): Likewise.
10566
10567 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10568
10569 * config/nds32/nds32-doubleword.md: New define_split pattern for
10570 illegal register number.
10571
10572 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10573
10574 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10575
10576 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10577
10578 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10579
10580 2018-04-25 Richard Biener <rguenther@suse.de>
10581
10582 * lto-streamer.h (LTO_major_version): Bump to 8.
10583
10584 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10585
10586 * BASE-VER: Set to 9.0.0.
10587
10588 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10589
10590 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10591 in __abskf2 and __powikf2.
10592
10593 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10594
10595 PR target/85512
10596 * config/aarch64/constraints.md (Usg, Usj): New constraints.
10597 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10598 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10599 Use the above on operand 2. Reindent.
10600 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10601
10602 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10603
10604 PR target/85485
10605 * common/config/i386/i386-common.c (ix86_handle_option): Don't
10606 handle OPT_mcet.
10607 * config/i386/i386.opt (mcet): Removed.
10608 * doc/install.texi: Remove -mcet documentation.
10609 * doc/invoke.texi: Likewise.
10610
10611 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10612
10613 PR target/85485
10614 * doc/install.texi: Remove -mcet from bootstrap-cet.
10615
10616 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10617
10618 PR target/85511
10619 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10620 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10621 if TARGET_64BIT.
10622
10623 PR target/85503
10624 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10625 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10626 containing a CONST_VECTOR.
10627
10628 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
10629
10630 * doc/install.texi: Update newlib dependency for nvptx.
10631
10632 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10633
10634 PR target/85508
10635 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10636 instead of INTVAL when shifting x left.
10637
10638 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
10639
10640 PR tree-optimization/85478
10641 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10642 vect_grouped_store_supported for single element vectors.
10643
10644 2018-04-24 Richard Biener <rguenther@suse.de>
10645
10646 PR target/85491
10647 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10648 load cost increase to the case of non-constant step.
10649
10650 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10651
10652 PR target/84828
10653 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10654 destination if any_malformed_asm.
10655
10656 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10657
10658 PR middle-end/85496
10659 * expr.c (store_field): In the bitfield case, if the value comes from
10660 a function call and is returned in registers by means of a PARALLEL,
10661 do not change the mode of the temporary unless BLKmode and VOIDmode.
10662
10663 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10664
10665 PR rtl-optimization/85423
10666 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10667 dependencies to debug insns when the previous insn is non-debug.
10668
10669 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10670
10671 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10672 enums into a single definition.
10673 (fls): Fix predicates and printing.
10674 (seti): Likewise.
10675
10676 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10677
10678 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10679 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10680 and short u6 immediate.
10681 (check_if_valid_sleep_operand): Remove.
10682 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10683
10684 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10685
10686 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10687 flag_always_save_lp condition.
10688 * config/nds32/nds32.opt (malways-save-lp): New option.
10689
10690 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10691
10692 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10693 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10694 * config/nds32/nds32.h
10695 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10696 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10697
10698 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10699
10700 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10701 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10702
10703 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10704 Chung-Ju Wu <jasonwucj@gmail.com>
10705
10706 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10707 Declare.
10708 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10709 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10710
10711 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10712
10713 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10714
10715 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10716
10717 * config/nds32/nds32-protos.h (nds32_data_alignment,
10718 nds32_local_alignment): Declare.
10719 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10720 nds32_local_alignment): New functions.
10721 (TARGET_CONSTANT_ALIGNMENT): Define.
10722 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10723
10724 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10725
10726 * config/nds32/nds32.c
10727 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10728 (TARGET_MODES_TIEABLE_P): Likewise.
10729
10730 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10731
10732 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10733 level Ofast and Og.
10734
10735 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
10736 Chung-Ju Wu <jasonwucj@gmail.com>
10737
10738 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10739 for unaligned access.
10740 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10741 unaligned access.
10742 * config/nds32/nds32-intrinsic.md: Likewise.
10743 * config/nds32/nds32_intrinsic.h: Likewise.
10744 * config/nds32/nds32.h (nds32_builtins): Likewise.
10745 * config/nds32/nds32.opt (munaligned-access): New option.
10746 * config/nds32/nds32.c (nds32_asm_file_start): Display
10747 flag_unaligned_access status.
10748
10749 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10750
10751 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10752 -mno-relax is present.
10753 * config/riscv/linux.h (LINK_SPEC): Ditto.
10754
10755 2018-04-20 Martin Sebor <msebor@redhat.com>
10756
10757 PR c/85365
10758 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10759 for null pointers.
10760 (gimple_fold_builtin_stxcpy_chk): Same.
10761 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10762
10763 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
10764
10765 PR target/85456
10766 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10767 __powikf2 when long double is IEEE 128-bit.
10768
10769 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10770
10771 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10772 step to make sure stack always aligned.
10773
10774 2018-04-20 Carl Love <cel@us.ibm.com>
10775
10776 PR target/83402
10777 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10778 size check for arg0.
10779
10780 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
10781 Tom de Vries <tom@codesourcery.com>
10782
10783 PR target/85445
10784 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10785 Emit insns for calls too.
10786 (nvptx_find_par): Always look for worker-level predecessor insn.
10787 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
10788 calls.
10789 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10790 (nvptx_process_pars): Propagate frames for calls.
10791
10792 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10793
10794 PR target/85469
10795 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10796 Removed.
10797 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10798 (ix86_handle_option): Don't handle OPT_mibt.
10799 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10800 __SHSTK__.
10801 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10802 has_ibt and ibt.
10803 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10804 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10805 (ix86_target_macros): Define __CET__ with flag_cf_protection
10806 for -fcf-protection.
10807 * config/i386/i386.c (isa2_opts): Remove -mibt.
10808 * config/i386/i386.h (TARGET_IBT): Removed.
10809 (TARGET_IBT_P): Likewise.
10810 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10811 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10812 * config/i386/i386.opt (mcet): Update help message.
10813 (mshstk): Likewise.
10814 (mibt): Removed.
10815 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10816 -mcet as an alias for -mshstk.
10817
10818 2018-04-20 Richard Biener <rguenther@suse.de>
10819
10820 PR middle-end/85475
10821 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10822 complexity by forcing a single use of the multiply operand.
10823
10824 2018-04-20 Martin Jambor <mjambor@suse.cz>
10825
10826 ipa/85449
10827 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10828 recursion dependency to only apply to non-clones.
10829
10830 2018-04-20 Martin Jambor <mjambor@suse.cz>
10831
10832 ipa/85447
10833 * ipa-cp.c (create_specialized_node): Check that clones of
10834 self-recursive edges exist during IPA-CP.
10835
10836 2018-04-19 Toon Moene <toon@moene.org>
10837
10838 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10839 by -O3.
10840
10841 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10842
10843 PR tree-optimization/85467
10844 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10845 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10846 VECTOR_CST element to type.
10847
10848 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10849
10850 PR target/85397
10851 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10852 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10853 (builtin_longjmp): Likewise.
10854 (save_stack_nonlocal): New pattern.
10855 (restore_stack_nonlocal): Likewise.
10856
10857 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10858
10859 PR target/85404
10860 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10861 Replace ASM_OUTPUT_LABEL with fprintf.
10862
10863 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10864
10865 PR target/85417
10866 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10867 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10868 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10869 define __IBT__ and __SHSTK__ for -fcf-protection.
10870 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10871 TARGET_IBT.
10872 (ix86_trampoline_init): Likewise.
10873 (x86_output_mi_thunk): Likewise.
10874 (ix86_notrack_prefixed_insn_p): Likewise.
10875 (ix86_option_override_internal): Don't disallow -fcf-protection.
10876 * config/i386/i386.md (rdssp<mode>): Also enable for
10877 -fcf-protection.
10878 (incssp<mode>): Likewise.
10879 (nop_endbr): Likewise.
10880 * config/i386/i386.opt (mcet): Change help message to built-in
10881 functions only.
10882 (mibt): Likewise.
10883 (mshstk): Likewise.
10884 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10885 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10886 enable CET built-in functions.
10887
10888 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10889
10890 * common/config/i386/i386-common.c
10891 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10892 OPTION_MASK_ISA_MOVDIRI_UNSET,
10893 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10894 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10895 * config.gcc (movdirintrin.h): New header.
10896 * config/i386/cpuid.h (bit_MOVDIRI,
10897 bit_MOVDIR64B): New bits.
10898 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10899 and -mmvodir64b.
10900 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10901 (VOID, PVOID, PCVOID)): New function types.
10902 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10903 __builtin_ia32_directstoreu_u64,
10904 __builtin_ia32_movdir64b): New builtins.
10905 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10906 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10907 and -mmovdiri.
10908 (ix86_valid_target_attribute_inner_p): Ditto.
10909 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10910 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10911 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10912 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10913 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10914 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10915 (movdiri<mode>, movdir64b_<mode>): New.
10916 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10917 * config/i386/immintrin.h: Include movdirintrin.h.
10918 * config/i386/movdirintrin.h: New file.
10919 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10920
10921 2018-04-19 Richard Biener <rguenther@suse.de>
10922
10923 PR middle-end/85455
10924 * cfg.c (clear_bb_flags): When loop state says we have
10925 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10926
10927 2018-04-19 Richard Biener <rguenther@suse.de>
10928
10929 PR tree-optimization/84737
10930 * tree-vect-data-refs.c (vect_copy_ref_info): New function
10931 copying restrict info.
10932 (vect_setup_realignment): Use it.
10933 * tree-vectorizer.h (vect_copy_ref_info): Declare.
10934 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10935 the first DR to all generated stores.
10936 (vectorizable_load): Likewise for loads.
10937
10938 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10939
10940 PR tree-optimization/85446
10941 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10942 the integral and pointer types to have the same precision.
10943
10944 * doc/install.texi: Document --disable-cet being the default and
10945 --enable-cet=auto.
10946
10947 2018-04-18 Martin Liska <mliska@suse.cz>
10948
10949 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10950 style.
10951
10952 2018-04-18 Martin Liska <mliska@suse.cz>
10953
10954 Revert
10955 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10956
10957 PR ipa/83983
10958 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10959 arguments if they are comparable.
10960
10961 2018-04-18 Martin Liska <mliska@suse.cz>
10962
10963 Revert
10964 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10965
10966 PR lto/84805
10967 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10968 incomplete types.
10969
10970 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
10971
10972 PR target/85388
10973 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10974 ENDBR after calling __morestack.
10975
10976 2018-04-18 David Malcolm <dmalcolm@redhat.com>
10977
10978 PR jit/85384
10979 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10980 by using gcc_base_ver to generate a gcc_driver_version, and use
10981 it when generating GCC_DRIVER_NAME.
10982 * configure: Regenerate.
10983
10984 2018-04-18 Jakub Jelinek <jakub@redhat.com>
10985
10986 PR target/81084
10987 * config.gcc: Obsolete powerpc*-*-*spe*.
10988
10989 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10990
10991 PR debug/84637
10992 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10993 (stabstr_D): Change type of unum from unsigned int to
10994 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
10995 type.
10996
10997 2018-04-17 Jim Wilson <jimw@sifive.com>
10998
10999 PR 84856
11000 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11001 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11002 Set arg_pointer_offset after using pretend_args_size.
11003
11004 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11005
11006 PR rtl-optimization/85431
11007 * dse.c (record_store): Ignore zero width stores.
11008
11009 PR sanitizer/85230
11010 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11011 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11012 __builtin_stack_restore rather than after it.
11013 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11014 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11015 argument instead of virtual_dynamic_stack_rtx.
11016
11017 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11018
11019 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11020 New prototype.
11021 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11022 Add note to error message to explain internal mapping of overloaded
11023 built-in function name to non-overloaded built-in function name.
11024 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11025 function.
11026
11027 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11028
11029 PR target/85424
11030 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11031 where the inputs overlap with the output.
11032
11033 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11034
11035 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11036 (=v, v) alternative and explicit "memory" attribute.
11037 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11038 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11039 attributes.
11040 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11041 "sselog1" type instead of "sselog".
11042 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11043 "sselog". Remove explicit "memory" attribute.
11044 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11045 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11046 attributes.
11047 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11048 "sselog1" type instead of "sselog". Remove explicit "memory"
11049 attribute.
11050 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11051 use "sselog1" type instead of "sselog". Remove explicit "memory"
11052 attribute.
11053 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11054 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11055 attributes.
11056 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11057 "sselog1" type instead of "sselog". Remove explicit "memory"
11058 attribute.
11059 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11060 use "sselog1" type instead of "sselog". Remove explicit "memory"
11061 attribute.
11062
11063 PR target/85430
11064 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11065
11066 PR middle-end/85414
11067 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11068 on a SUBREG.
11069
11070 2018-04-17 Martin Jambor <mjambor@suse.cz>
11071
11072 PR ipa/85421
11073 * ipa-cp.c (create_specialized_node): Call
11074 expand_all_artificial_thunks if necessary.
11075
11076 2018-04-17 Martin Liska <mliska@suse.cz>
11077
11078 PR lto/85405
11079 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11080 in message, remote space in between '_G' and '('.
11081
11082 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11083
11084 PR target/85281
11085 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11086 avx512f_vmcmp<mode>3<round_saeonly_name>,
11087 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11088 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11089 avx512f_rndscale<mode><round_saeonly_name>,
11090 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11091 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11092 Use %<iptr>2 instead of %2 for -masm=intel.
11093 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11094 avx512f_vcvttss2usi<round_saeonly_name>,
11095 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11096 -masm=intel.
11097 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11098 avx512f_vcvttsd2usi<round_saeonly_name>,
11099 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11100 Use %q1 instead of %1 for -masm=intel.
11101 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11102 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11103 of %3 for -masm=intel.
11104 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11105 -masm=intel.
11106 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11107 -masm=intel.
11108 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11109 -masm=intel.
11110 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11111 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11112 %g1.
11113 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11114 -masm=intel.
11115 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11116 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11117 %g1 and one with %0 and %1.
11118 (avx512er_vmrcp28<mode><round_saeonly_name>,
11119 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11120 %1 for -masm=intel.
11121 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11122 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11123 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11124 of %0 and %{%4%} for -masm=intel.
11125 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11126 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11127 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11128 order of %0 and %{%5%}%{z%} for -masm=intel.
11129
11130 2018-04-17 Jan Hubicka <jh@suse.cz>
11131
11132 PR lto/85405
11133 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11134
11135 2018-04-17 Martin Liska <mliska@suse.cz>
11136
11137 PR ipa/85329
11138 * multiple_target.c (create_dispatcher_calls): Set apostrophes
11139 for target_clone error message. Make default implementation
11140 clone to be a local declaration.
11141 (separate_attrs): Add new argument and check for an empty
11142 string.
11143 (expand_target_clones): Handle it.
11144 (ipa_target_clone): Make redirection just for target_clones
11145 functions.
11146
11147 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
11148 Tom de Vries <tom@codesourcery.com>
11149
11150 PR middle-end/84955
11151 * omp-expand.c (expand_oacc_for): Add dummy false branch for
11152 tiled basic blocks without omp continue statements.
11153
11154 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
11155
11156 PR target/83660
11157 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11158 vec_extract expression as having side effects to make sure it gets
11159 a cleanup point.
11160
11161 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
11162
11163 PR target/85403
11164 * config/i386/i386.c (get_builtin_code_for_version): Check
11165 error_mark_node.
11166
11167 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
11168
11169 PR target/84331
11170 * config.gcc: Support "skylake".
11171 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11172 PROCESSOR_SKYLAKE.
11173 * config/i386/i386.c (m_SKYLAKE): Define.
11174 (processor_target_table): Add "skylake".
11175 (ix86_option_override_internal): Add "skylake".
11176 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11177 PROCESSOR_CANNONLAKE.
11178 (get_builtin_code_for_version): Fix priority for
11179 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11180 PROCESSOR_SKYLAKE-AVX512.
11181 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11182 (processor_type): Add PROCESSOR_SKYLAKE.
11183
11184 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11185 Jason Merrill <jason@redhat.com>
11186
11187 PR c++/85112
11188 * convert.c (convert_to_integer_1): Use direct recursion for
11189 enumeral types and types with a precision less than the number
11190 of bits in their mode.
11191
11192 2018-04-16 Julia Koval <julia.koval@intel.com>
11193
11194 PR target/84413
11195 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11196 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11197
11198 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11199
11200 PR target/85293
11201 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11202 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11203 and -mno-direct-move.
11204
11205 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11206
11207 PR target/83402
11208 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11209 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11210 Ensure negative shifts result in {0}.
11211
11212 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11213
11214 PR rtl-optimization/79916
11215 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11216 regs (if any) to define how to gnerate SD moves when LRA is in
11217 progress.
11218
11219 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11220
11221 PR rtl-optimization/85393
11222 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11223 * except.c (expand_dw2_landing_pad_for_region): Make static.
11224 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11225 a label and unconditional jump to old_bb, rather than
11226 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11227 basic block.
11228
11229 PR rtl-optimization/85376
11230 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11231 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11232 instead of a specific value.
11233
11234 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11235 Bin Cheng <bin.cheng@arm.com>
11236
11237 PR tree-optimization/82965
11238 PR tree-optimization/83991
11239 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11240 by_profile_only parameter.
11241 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11242 information if the loop was predicted to iterate too many times.
11243 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11244
11245 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11246
11247 PR lto/71991
11248 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11249 always inline.
11250
11251 2018-04-13 Martin Liska <mliska@suse.cz>
11252 Jakub Jelinek <jakub@redhat.com>
11253
11254 PR middle-end/81657
11255 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11256 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11257 * builtins.c (expand_builtin_memory_copy_args): Use
11258 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11259 handle dest_addr == pc_rtx.
11260
11261 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11262
11263 PR target/85291
11264 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11265 asked to not generate direct moves.
11266 (fix_trunc<mode>si2_stfiwx): Similar.
11267 (fix_trunc<mode>si2_internal): Similar.
11268
11269 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11270
11271 PR debug/83157
11272 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11273 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11274 lookup if dest in some wider mode is known to be const0_rtx and
11275 if so, record permanent equivalence for it to be ZERO_EXTEND of
11276 the narrower mode destination.
11277
11278 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11279
11280 * lto-streamer-out.c (output_function): Revert 259346.
11281 * omp-expand.c (expand_oacc_for): Likewise.
11282
11283 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11284
11285 PR rtl-optimization/85354
11286 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11287 * sel-sched.c (sel_global_init): ... here.
11288
11289 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11290
11291 PR target/85238
11292 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11293 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11294 mode for PE-COFF targets.
11295 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11296 (i386_pe_asm_lto_end): Likewise.
11297 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11298 (TARGET_ASM_LTO_END): Likewise.
11299 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11300 (i386_pe_asm_lto_start): New function.
11301 (i386_pe_asm_lto_end): Likewise.
11302
11303 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11304 Richard Biener <rguenther@suse.de>
11305
11306 PR middle-end/84955
11307 * lto-streamer-out.c (output_function): Fix CFG loop state before
11308 streaming out.
11309 * omp-expand.c (expand_oacc_for): Handle calls to internal
11310 functions like regular functions.
11311
11312 2018-04-12 Richard Biener <rguenther@suse.de>
11313
11314 PR lto/85371
11315 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11316 for the early LTO debug to properly generate references to it
11317 during DIE emission. Do not re-use that for the skeleton for
11318 split-dwarf.
11319 (dwarf2out_early_finish): Likewise.
11320
11321 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11322
11323 PR target/85328
11324 * config/i386/sse.md
11325 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11326 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11327 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11328 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11329 and output is a reg, avoid creating invalid lowpart subreg, but
11330 instead split into a 512-bit move. Don't split if not AVX512VL,
11331 input is xmm16+ reg and output is a mem.
11332 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11333 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11334 xmm16+ reg and output is a mem.
11335
11336 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11337
11338 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11339 also for flag_dwarf2_cfi_asm.
11340
11341 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11342
11343 PR rtl-optimization/85342
11344 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11345 a bool scalar var inside of the loop instead. Don't try to update
11346 recog_data.operand after failed apply_change_group.
11347
11348 2018-04-12 Tom de Vries <tom@codesourcery.com>
11349
11350 PR target/85296
11351 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11352 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11353 array with flexible array member as array without given dimension.
11354 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11355 argument for undefined param to true.
11356
11357 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11358
11359 PR target/85321
11360 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11361 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11362 from PowerPC section.
11363 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11364 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11365 help text that is too long.
11366 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11367 help text that is too long.
11368 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11369 help text that is too long.
11370
11371 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11372
11373 * config/alpha/alpha.md (stack_probe_internal): Rename
11374 from "probe_stack". Update all callers.
11375
11376 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11377
11378 PR rtl-optimization/84566
11379 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11380 sched_macro_fuse_insns.
11381
11382 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11383
11384 PR target/84301
11385 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11386 (compute_block_dependences): ... from here.
11387
11388 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11389
11390 PR tree-optimization/85331
11391 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11392 from int to HOST_WIDE_INT.
11393
11394 2018-04-11 Martin Jambor <mjambor@suse.cz>
11395
11396 PR ipa/84149
11397 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11398 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11399 not the same as the source val.
11400 (cgraph_edge_brings_value_p): New parameter.
11401 (gather_edges_for_value): Pass destination value to
11402 cgraph_edge_brings_value_p.
11403 (perhaps_add_new_callers): Likewise.
11404 (get_info_about_necessary_edges): Likewise and exclude values brought
11405 only by self-recursive edges.
11406 (create_specialized_node): Redirect only clones of self-calling edges.
11407 (+self_recursive_pass_through_p): New function.
11408 (find_more_scalar_values_for_callers_subset): Use it.
11409 (find_aggregate_values_for_callers_subset): Likewise.
11410 (known_aggs_to_agg_replacement_list): Removed.
11411 (decide_whether_version_node): Re-calculate known constants for all
11412 remaining context clones.
11413
11414 2018-04-11 Richard Biener <rguenther@suse.de>
11415
11416 PR lto/85339
11417 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11418 from early DWARF output.
11419 (dwarf2out_early_finish): Output line info unconditionally into
11420 early DWARF and add reference to it.
11421
11422 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11423
11424 PR target/85281
11425 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11426 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11427 other than V2DFmode using iptr mode attribute.
11428 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11429
11430 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11431
11432 PR rtl-optimization/84659
11433 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11434
11435 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11436
11437 PR debug/85302
11438 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11439 SIZEP is NULL.
11440 (output_loc_list): Pass address of a dummy size variable even in the
11441 locview handling loop.
11442 (index_location_lists): Add comment on why skip_loc_list_entry can't
11443 call size_of_locs.
11444
11445 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11446
11447 PR target/85261
11448 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11449 into register.
11450
11451 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11452
11453 PR target/85321
11454 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11455 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11456 and -mstring-compare-inline-limit.
11457
11458 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11459
11460 PR target/85287
11461 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11462 for stack clash protection in a register whenever we need it to be in
11463 a register.
11464
11465 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11466
11467 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11468 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11469
11470 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11471
11472 PR target/85321
11473 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11474 the help text.
11475 (mlong-double-): Ditto.
11476 * config/rs6000/sysv4.opt (msdata=): Ditto.
11477 (mtls-size=): Ditto.
11478
11479 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11480
11481 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11482 erroneous entries for
11483 "vector int vec_ldl (int, long int *)", and
11484 "vector unsigned int vec_ldl (int, unsigned long int *)".
11485 Add comments and entries for
11486 "vector bool char vec_ldl (int, bool char *)",
11487 "vector bool short vec_ldl (int, bool short *)",
11488 "vector bool int vec_ldl (int, bool int *)",
11489 "vector bool long long vec_ldl (int, bool long long *)",
11490 "vector pixel vec_ldl (int, pixel *)",
11491 "vector long long vec_ldl (int, long long *)",
11492 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11493 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11494 type tree bool_long_long_type_node and correct definition of
11495 bool_V2DI_type_node to make reference to this new type tree.
11496 (rs6000_mangle_type): Replace erroneous reference to
11497 bool_long_type_node with bool_long_long_type_node.
11498 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11499 comments to emphasize sign distinctions for char and int types and
11500 replace RS6000_BTI_bool_long constant with
11501 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11502 use of RS6000_BTI_pixel.
11503 (bool_long_type_node): Remove this macro definition.
11504 (bool_long_long_type_node): New macro definition
11505
11506 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11507
11508 PR rtl-optimization/85300
11509 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11510 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11511 simplify_unary_operation fails.
11512
11513 2018-04-10 Martin Liska <mliska@suse.cz>
11514
11515 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11516 cgraph_edge and ipa_ref.
11517
11518 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11519
11520 PR target/85177
11521 PR target/85255
11522 * config/i386/sse.md
11523 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11524 computation of the VEC_MERGE selector from mask.
11525 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11526 Fix decoding of the VEC_MERGE selector into mask.
11527
11528 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11529
11530 PR tree-optimization/85286
11531 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11532
11533 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11534
11535 * final.c (final_1): Set insn_last_address as well as
11536 insn_current_address.
11537
11538 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11539
11540 PR target/85173
11541 * explow.c (emit_stack_probe): Call validize_mem on memory location
11542 before passing it to gen_probe_stack. Create address operand and
11543 legitimize it for the probe_stack_address case.
11544
11545 2018-04-09 Jan Hubicka <jh@suse.cz>
11546
11547 PR lto/85078
11548 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11549 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11550 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11551 walk basetypes.
11552 (free_lang_data): Rebuild type inheritance graph.
11553
11554 2018-04-09 Martin Sebor <msebor@redhat.com>
11555
11556 * invoke.texi (-finline-small-functions): Mention other optimization
11557 options.
11558 (-findirect-inlining, -fpartial-inlining): Same.
11559 (-finline-functions-called-once): Same.
11560 (-freorder-blocks-and-partition): Same.
11561
11562 2018-04-09 Jan Hubicka <jh@suse.cz>
11563
11564 PR rtl/84058
11565 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11566 jumps; choose last target that matches the criteria (i.e.
11567 no partition changes for non-crossing jumps).
11568 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11569 support for redirecting crossing jumps to non-crossing.
11570
11571 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11572
11573 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11574 also for naked functions.
11575
11576 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11577
11578 * config/arc/arc.md (add_shift): New pattern.
11579 (add_shift2): Likewise.
11580 (sub_shift): Likewise.
11581 (sub_shift_cmp0_noout): Likewise.
11582 (compare_si_ashiftsi): Likewise.
11583 (xbfu_cmp0_noout): New combine pattern.
11584 (xbfu_cmp0"): Likewise.
11585 (movsi_set_cc_insn): Place the predicable variant first.
11586 (commutative_binary_cmp0_noout): Remove clobber.
11587 (commutative_binary_cmp0): New pattern.
11588 (noncommutative_binary_cmp0): Likewise.
11589 (noncommutative_binary_cmp0_noout): Likewise.
11590 (noncommutative_binary_comparison_result_used): Removed.
11591 (rsub_cmp0): New pattern.
11592 (rsub_cmp0_noout): Likewise.
11593 (extzvsi): Changed, keep only meaningful variants.
11594 (SQH, SEZ): New iterators.
11595 (SQH_postfix): New mode attribute.
11596 (SEZ_prefix): New code attribute.
11597 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11598 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11599 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11600 of numerical value.
11601 (noncommutative_operator): Check the availability of barrel
11602 shifter option.
11603
11604 2018-04-09 Richard Biener <rguenther@suse.de>
11605
11606 PR tree-optimization/85284
11607 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11608 Only use the niter constraining form of simple_iv when the exit
11609 is always executed.
11610
11611 2018-04-09 Tom de Vries <tom@codesourcery.com>
11612
11613 PR target/84041
11614 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11615 (define_expand "*memory_barrier"): New define_expand.
11616 (define_insn "memory_barrier"): New insn.
11617
11618 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11619
11620 PR rtl-optimization/80463
11621 PR rtl-optimization/83972
11622 PR rtl-optimization/83480
11623
11624 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11625 correct producer for the insn.
11626 (tidy_control_flow): Fixup seqnos in case of debug insns.
11627
11628 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11629
11630 PR rtl-optimization/83913
11631
11632 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11633 different sched-times when merging exprs.
11634
11635 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11636
11637 PR rtl-optimization/83962
11638
11639 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11640 tidy_fallthru_edge and tidy_control_flow.
11641
11642 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11643
11644 PR rtl-optimization/83530
11645
11646 * sel-sched.c (force_next_insn): New global variable.
11647 (remove_insn_for_debug): When force_next_insn is true, also leave only
11648 next insn in the ready list.
11649 (sel_sched_region): When the region wasn't scheduled, make another pass
11650 over it with force_next_insn set to 1.
11651
11652 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11653
11654 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11655 into tm_file.
11656 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11657 for interrupt control.
11658 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11659 functions for interrupt control.
11660 * config/nds32/nds32-intrinsic.md: Likewise.
11661 * config/nds32/nds32_intrinsic.h: Likewise.
11662 * config/nds32/nds32.h (nds32_builtins): Likewise.
11663
11664 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11665
11666 * config/nds32/nds32.c (nds32_init_machine_status,
11667 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11668 strict_aligned_p field.
11669 (nds32_expand_to_rtl_hook): New function.
11670 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11671 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11672
11673 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11674 Chung-Ju Wu <jasonwucj@gmail.com>
11675
11676 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11677 * config/nds32/nds32-n7.md: New file.
11678 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11679 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11680 pipeline.
11681 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11682 * config/nds32/nds32.md (pipeline_model): Add n7.
11683 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11684 * config/nds32/pipelines.md: Include n7 settings.
11685
11686 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11687 Chung-Ju Wu <jasonwucj@gmail.com>
11688
11689 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11690 * config/nds32/nds32-e8.md: New file.
11691 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11692 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11693 pipeline.
11694 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11695 * config/nds32/nds32.md (pipeline_model): Add e8.
11696 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11697 * config/nds32/pipelines.md: Include e8 settings.
11698
11699 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11700 Chung-Ju Wu <jasonwucj@gmail.com>
11701
11702 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11703 * config/nds32/nds32-n8.md: New file.
11704 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11705 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11706 pipeline.
11707 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11708 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11709 * config/nds32/nds32.md (pipeline_model): Add n8.
11710 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11711 * config/nds32/pipelines.md: Include n8 settings.
11712
11713 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11714 Chung-Ju Wu <jasonwucj@gmail.com>
11715
11716 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11717 * config/nds32/nds32-n9-2r1w.md: New file.
11718 * config/nds32/nds32-n9-3r2w.md: New file.
11719 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11720 nds32_register_ports): New or modify for cpu n9.
11721 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11722 pipeline.
11723 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11724 * config/nds32/nds32-utils.c: New file.
11725 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11726 TARGET_MUL_SLOW): Define.
11727 * config/nds32/nds32.md (pipeline_model): New attribute.
11728 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11729 New options that support cpu n9.
11730 * config/nds32/pipelines.md: Include n9 settings.
11731 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11732
11733 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11734
11735 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11736 information if necessary.
11737 (output_cond_branch_compare_zero): Likewise.
11738 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11739 (nds32_target_alignment): Refine for alignment.
11740 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11741 (FUNCTION_BOUNDARY): Modify.
11742 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11743 align case.
11744 * config/nds32/nds32.opt (malways-align, malign-functions): New.
11745
11746 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11747
11748 * config/nds32/constants.md (unspec_volatile_element): Add values for
11749 TLB operation and data prefetch.
11750 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11751 functions for TLB operation and data prefetch.
11752 * config/nds32/nds32-intrinsic.md: Likewise.
11753 * config/nds32/nds32_intrinsic.h: Likewise.
11754 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11755 (nds32_print_operand): Likewise.
11756 * config/nds32/nds32.h (nds32_builtins): Likewise.
11757
11758 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
11759 Andrew Pinski <pinsika@gcc.gnu.org>
11760
11761 PR middle-end/82976
11762 * match.pd: Use constant_boolean_node of correct type instead of
11763 boolean_true_node or boolean_false_node for simplifying
11764 pointer comparisons to zero.
11765
11766 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11767
11768 PR tree-optimization/80021
11769 * tree.c (verify_type_variant): Make error call in verify_variant_match
11770 translatable and remove final full stop.
11771
11772 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11773
11774 * config/nds32/constants.md (unspec_volatile_element): Add
11775 UNSPEC_VOLATILE_EH_RETURN.
11776 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11777 nds32_output_stack_pop): Support dwarf exception handling process.
11778 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11779 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11780 exception handling process.
11781 (nds32_compute_stack_frame): Likewise.
11782 (nds32_return_addr_rtx): Likewise.
11783 (nds32_initial_elimination_offset): Likewise.
11784 (nds32_expand_prologue): Likewise.
11785 (nds32_expand_epilogue): Likewise.
11786 (nds32_dynamic_chain_address): New function.
11787 * config/nds32/nds32.h (machine_function): Add fields for dwarf
11788 exception handling.
11789 (DYNAMIC_CHAIN_ADDRESS): Define.
11790 (EH_RETURN_DATA_REGNO): Define.
11791 (EH_RETURN_STACKADJ_RTX): Define.
11792 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11793 patterns for dwarf exception handling.
11794
11795 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11796
11797 * config/nds32/nds32.h: Clean up obsolete macros.
11798
11799 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11800
11801 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11802 Add enum values for particular instructions.
11803 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11804 particular intrinsic functions.
11805 * config/nds32/nds32-intrinsic.md: Likewise.
11806 * config/nds32/nds32_intrinsic.h: Likewise.
11807 * config/nds32/nds32.h (nds32_builtins): Likewise.
11808 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11809 (btst, ave): New patterns for particular instructions.
11810
11811 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11812
11813 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11814 Add enum values for atomic load/store and memory sync.
11815 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11816 and memory sync.
11817 * config/nds32/nds32-intrinsic.md: Likewise.
11818 * config/nds32/nds32_intrinsic.h: Likewise.
11819 * config/nds32/nds32.h (nds32_builtins): Likewise.
11820
11821 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11822
11823 PR tree-optimization/85257
11824 * fold-const.c (native_encode_vector): If not all elts could fit
11825 and off is -1, return 0 rather than offset.
11826 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11827 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11828 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11829 adjust buffer in native_interpret_expr call.
11830
11831 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11832
11833 * config/nds32/constants.md (unspec_volatile_element): Add cache
11834 control enum values.
11835 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11836 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11837 * config/nds32/nds32.c (nds32_cctl_names): New.
11838 (nds32_print_operand): Handle cache control register names.
11839 * config/nds32/nds32.h (nds32_builtins): New enum values.
11840 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11841 macros.
11842 * config/nds32/nds32.md (type): Add mmu.
11843 * config/nds32/pipelines.md (simple_insn): Add mmu.
11844
11845 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11846
11847 * config/nds32/nds32.md (type): Remove call.
11848 * config/nds32/pipelines.md (simple_insn): Likewise.
11849
11850 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11851
11852 * config/nds32/constants.md (unspec_volatile_element): Add
11853 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11854 UNSPEC_VOLATILE_FMFCFG.
11855 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11856 description for fmfcfg and fmfcsr.
11857 (bdesc_1arg): Add fmtcsr.
11858 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11859 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11860 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11861 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11862 unspec_fmfcfg): New patterns.
11863 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11864 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11865 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11866 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11867 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11868 __nds32__fmfcfg): Define.
11869
11870 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11871
11872 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11873 intrinsic register names.
11874 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11875 intrinsic register enum values and macros.
11876
11877 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11878
11879 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11880 for load/store addressing form.
11881 (nds32_print_operand_address): Likewise.
11882
11883 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11884
11885 PR target/85196
11886 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11887 based on LABEL_REF. Remove useless assertion.
11888 (pic_address_needs_scratch): Fix formatting.
11889 (sparc_legitimize_pic_address): Minor tweaks.
11890 (sparc_delegitimize_address): Adjust assertion accordingly.
11891 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11892 into symbolic_operand.
11893 (movsi_high_pic_label_ref): Likewise.
11894 (movsi_lo_sum_pic_label_ref): Likewise.
11895 (movdi_pic_label_ref): Likewise.
11896 (movdi_high_pic_label_ref): Likewise.
11897 (movdi_lo_sum_pic_label_ref): Likewise.
11898
11899 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11900
11901 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11902 custom LIB_SPEC setup.
11903
11904 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11905 Kito Cheng <kito.cheng@gmail.com>
11906
11907 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11908 * config/riscv/freebsd.h: New.
11909
11910 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11911
11912 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11913 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11914 file.
11915
11916 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11917 Kito Cheng <kito.cheng@gmail.com>
11918
11919 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11920 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11921 * config/nds32/nds32-protos.h (nds32_output_call,
11922 nds32_output_return): Declare.
11923 * config/nds32/nds32.md: Refine all the call and return patterns.
11924
11925 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11926
11927 PR debug/85252
11928 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11929 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11930
11931 PR rtl-optimization/84872
11932 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11933 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11934 EDGE_CROSSING edge.
11935
11936 2018-04-06 Tamar Christina <tamar.christina@arm.com>
11937
11938 * expr.c (copy_blkmode_to_reg): Revert 254862.
11939 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11940
11941 2018-04-06 Richard Biener <rguenther@suse.de>
11942
11943 PR middle-end/85244
11944 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11945 after seeing a component reference with an adjacent field. Treat
11946 refs to arrays at struct end of external decls similar to
11947 refs to unconstrained commons.
11948
11949 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11950
11951 PR sanitizer/85213
11952 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11953 look through SAVE_EXPRs with non-side-effects argument. Adjust
11954 recursive calls.
11955 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11956 save_p here.
11957
11958 2018-04-06 Richard Biener <rguenther@suse.de>
11959
11960 PR middle-end/85180
11961 * alias.c (find_base_term): New wrapper around find_base_term
11962 unwinding CSELIB_VAL_PTR changes.
11963 (find_base_term): Do not restore CSELIB_VAL_PTR during the
11964 recursion.
11965
11966 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11967
11968 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11969 instructions.
11970 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11971 constant definitions.
11972 ("nop"): lr 0,0 -> nopr r0
11973 ("nop_lr0", "nop_lr1"): New insn definitions.
11974
11975 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11976
11977 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11978 NDS32_V3PUSH_AVAILABLE_P macro.
11979
11980 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
11981 Chung-Ju Wu <jasonwucj@gmail.com>
11982
11983 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11984 (nds32*-*-*): Add float and fpu_config into supported_defaults.
11985 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11986 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11987 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11988 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11989 * config/nds32/constraints.md: New constraints and checking for hard
11990 float configuration.
11991 * config/nds32/iterators.md: New mode iterator and attribute for hard
11992 float configuration.
11993 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11994 patterns.
11995 * config/nds32/nds32-fpu.md: New file.
11996 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11997 deal with hard float code generation.
11998 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11999 ARCH_V3S.
12000 (abi_type, float_reg_number): New enum type.
12001 * config/nds32/nds32-predicates.c: New predicates for hard float.
12002 * config/nds32/nds32-protos.h: Declare functions for hard float.
12003 * config/nds32/nds32.c: Implementation for hard float configuration.
12004 * config/nds32/nds32.h: Definitions for hard float configuration.
12005 * config/nds32/nds32.md: Include hard float machine description and
12006 modify patterns for hard float configuration.
12007 * config/nds32/nds32.opt: New options for hard float configuration.
12008 * config/nds32/predicates.md: New predicates for hard float
12009 configuration.
12010
12011 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12012
12013 * common/config/nds32/nds32-common.c
12014 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12015
12016 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12017
12018 PR middle-end/85195
12019 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12020 CONSTRUCTOR_ELT (ctor, ...)->value.
12021
12022 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12023
12024 PR target/85193
12025 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12026
12027 2018-04-05 Tom de Vries <tom@codesourcery.com>
12028
12029 PR target/85204
12030 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12031 cond jump.
12032
12033 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12034 Kito Cheng <kito.cheng@gmail.com>
12035
12036 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12037 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12038 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12039 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12040
12041 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12042 Kito Cheng <kito.cheng@gmail.com>
12043
12044 * config/nds32/constraints.md (Ufe): New memory constraint.
12045 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12046 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12047 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12048 operands.
12049 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12050 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12051
12052 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12053
12054 * config/nds32/nds32.md: Use optimize_size in the condition for
12055 alu-shift instructions.
12056
12057 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12058
12059 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12060
12061 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12062
12063 * config/nds32/nds32.md (negsi2): Refine pattern.
12064
12065 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12066 Chung-Ju Wu <jasonwucj@gmail.com>
12067
12068 * config/nds32/iterators.md (shift_rotate): New code iterator.
12069 (shift): New code attribute.
12070 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12071 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12072 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12073 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12074 bit-wise operations.
12075 (andsi3, *andsi3): Ditto.
12076 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12077 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12078 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12079 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12080 nds32_ior_operand, nds32_xor_operand): New predicates.
12081
12082 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12083
12084 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12085 (addsi3, subsi3): ... this.
12086
12087 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12088
12089 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12090
12091 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12092
12093 * config/nds32/nds32.md: Adjust indention.
12094
12095 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12096
12097 * config/nds32/nds32.md (feature): New attribute.
12098
12099 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12100
12101 * config/nds32/nds32.md (subtype): New attribute.
12102
12103 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12104
12105 PR target/85203
12106 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12107 expansion to perform a bitwise AND of the argument followed by a
12108 boolean negation of the result.
12109
12110 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12111
12112 PR rtl-optimization/84878
12113 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12114 the basic block. Assert the use reference is not artificial and that
12115 it has an associated insn.
12116
12117 2018-04-04 Michael Matz <matz@suse.de>
12118
12119 * builtins.c (compute_objsize): Pass correct operand
12120 to array_at_struct_end_p.
12121
12122 2018-04-04 Richard Biener <rguenther@suse.de>
12123
12124 PR lto/85176
12125 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12126 from contexts for DINFO_LEVEL_TERSE and below.
12127
12128 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12129
12130 * config/nds32/nds32-doubleword.md (move_<mode>): Require
12131 resiter_operand condition.
12132 * config/nds32/nds32.md (*move<mode>): Ditto.
12133
12134 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12135 Monk Chiang <sh.chiang04@gmail.com>
12136
12137 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12138
12139 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12140
12141 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12142
12143 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12144 Kito Cheng <kito.cheng@gmail.com>
12145
12146 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12147 nds32_cond_code_str, output_cond_branch,
12148 output_cond_branch_compare_zero, nds32_expand_cbranch,
12149 nds32_expand_cstore, nds32_expand_movcc,
12150 nds32_output_cbranchsi4_equality_zero,
12151 nds32_output_cbranchsi4_equality_reg,
12152 nds32_output_cbranchsi4_equality_reg_or_const_int,
12153 nds32_output_cbranchsi4_greater_less_zero: New functions.
12154 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12155 nds32_expand_cstore, nds32_expand_movcc,
12156 nds32_output_cbranchsi4_equality_zero,
12157 nds32_output_cbranchsi4_equality_reg,
12158 nds32_output_cbranchsi4_equality_reg_or_const_int,
12159 nds32_output_cbranchsi4_greater_less_zero): Declare.
12160 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12161 nds32_rimm11s_operand): New predicates.
12162 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12163 * config/nds32/nds32.md: Rewrite all the branch and conditional move
12164 patterns.
12165
12166 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12167
12168 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12169 * config/nds32/nds32.md: Ditto.
12170 * config/nds32/pipelines.md: Ditto.
12171
12172 2018-04-04 Richard Biener <rguenther@suse.de>
12173
12174 PR tree-optimization/85168
12175 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12176 propagating abnormals.
12177
12178 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12179
12180 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12181
12182 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12183 Kito Cheng <kito.cheng@gmail.com>
12184
12185 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12186 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12187 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12188 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12189 * config/nds32/nds32.md (sibcall_internal): New.
12190 (sibcall_register): Remove.
12191 (sibcall_immediate): Remove.
12192 (sibcall_value_internal): New.
12193 (sibcall_value_register): Remove.
12194 (sibcall_value_immediate): Remove.
12195 * config/nds32/predicates.md (nds32_general_register_operand): New.
12196 (nds32_call_address_operand): New.
12197
12198 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12199
12200 PR rtl-optimization/85167
12201 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12202 bb_defs if *split_p, instead preinitialize it to NULL.
12203
12204 PR tree-optimization/85156
12205 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12206 evaluating the argument multiple times.
12207
12208 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12209
12210 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12211 than vector.
12212 (_mm_cvtpd_ps): Likewise.
12213 (_mm_cvttpd_epi32): Likewise.
12214 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12215 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12216 vector, pixel, and bool following altivec.h include.
12217
12218 2018-04-03 Martin Sebor <msebor@redhat.com>
12219
12220 * doc/extend.texi (Common Function Attributes): Clarify.
12221 (const attribute): Likewise.
12222 (pure attribute): Likewise.
12223
12224 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12225
12226 PR target/85169
12227 * config/i386/i386.c (ix86_expand_vector_set): Use
12228 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12229
12230 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12231
12232 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12233 instructions when changing rounding bits to preserve precision bits
12234 in the x87 control word.
12235
12236 2018-04-03 Martin Liska <mliska@suse.cz>
12237
12238 PR tree-optimization/82491
12239 * rtl.h (strip_offset_and_add): Replace += suboffset with
12240 poly_uint64 () + suboffset.
12241
12242 2018-03-29 Martin Liska <mliska@suse.cz>
12243 Martin Jambor <mjambor@suse.cz>
12244
12245 PR ipa/84947
12246 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12247 param_type is not an integral or pointer type.
12248
12249 2018-04-03 Richard Biener <rguenther@suse.de>
12250
12251 * sese.h (recompute_all_dominators): Remove.
12252
12253 2018-04-02 Martin Sebor <msebor@redhat.com>
12254
12255 * doc/invoke.texi (-Wrestrict): Fix typos.
12256
12257 2018-04-02 Jim Wilson <jimw@sifive.com>
12258
12259 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12260 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12261 (<optab>di3, <optab>si3_extend): Likewise.
12262 (<optab>si3_mask, <optab>si3_mask_1): New.
12263 (<optab>di3_mask, <optab>di3_mask_1): New.
12264 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12265 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12266 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12267
12268 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12269
12270 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12271 example.
12272
12273 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12274
12275 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12276 (nds32_canonicalize_comparison): New function.
12277
12278 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12279 Kito Cheng <kito.cheng@gmail.com>
12280 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12281
12282 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12283 * config/nds32/constants.md (unspec_volatile_element): Add
12284 UNSPEC_VOLATILE_RELAX_GROUP.
12285 * config/nds32/nds32-relax-opt.c: New file.
12286 * config/nds32/nds32-predicates.c
12287 (nds32_symbol_load_store_p): New function.
12288 * config/nds32/nds32-protos.h
12289 (nds32_symbol_load_store_p): Declare function.
12290 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12291 * config/nds32/nds32.c
12292 (nds32_register_pass): New function to register pass.
12293 (nds32_register_passes): New function to register passes.
12294 * config/nds32/nds32.md (relax_group): New pattern.
12295 * config/nds32/nds32.opt (mrelax-hint): New option.
12296 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12297
12298 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12299
12300 * config/nds32/t-nds32: Modify files dependency.
12301
12302 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12303
12304 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12305 (PROFILE_HOOK): Define its implementation.
12306
12307 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12308
12309 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12310 type and 32-bit size.
12311
12312 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12313
12314 PR middle-end/85090
12315 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12316 (V_128_256): New mode iterator.
12317 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12318 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12319 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12320 of V.
12321 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12322 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12323
12324 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12325
12326 PR target/83315
12327 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12328 NaN inputs correctly.
12329
12330 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12331
12332 PR target/80546
12333 * config/rs6000/vsx.md (??r): New mode attribute.
12334 (*vsx_mov<mode>_64bit): Use it.
12335 (*vsx_mov<mode>_32bit): Likewise.
12336
12337 2018-03-30 Martin Sebor <msebor@redhat.com>
12338
12339 PR tree-optimization/84818
12340 * builtins.c (check_access): Use warning_n.
12341
12342 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12343
12344 PR target/83822
12345 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12346 condition.
12347 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12348 condition.
12349
12350 2018-03-30 Julia Koval <julia.koval@intel.com>
12351
12352 PR target/84413
12353 * x86-tune.def (movx, partial_reg_dependency): Enable for
12354 m_SKYLAKE_AVX512.
12355
12356 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12357
12358 PR inline-asm/84985
12359 * lra-constraints.c (process_alt_operands): Move setting
12360 this_alternative_matches below.
12361
12362 2018-03-29 Martin Liska <mliska@suse.cz>
12363
12364 PR lto/84995.
12365 * doc/invoke.texi: Document how LTO works with debug info.
12366 Describe auto-load support of binutils. Mention 'x86-64'
12367 as valid option value of -march option.
12368
12369 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12370
12371 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12372
12373 PR c/85094
12374 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12375 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12376 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12377 checking.
12378
12379 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12380
12381 PR target/84912
12382 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12383 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12384 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12385 for RS6000_BTM_POWERPC64.
12386 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12387 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12388 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12389 definition.
12390 (DIVDE): Use it.
12391 (DIVDEU): Likewise.
12392
12393 2018-03-28 Carl Love <cel@us.ibm.com>
12394
12395 Revert
12396 2017-09-27 Carl Love <cel@us.ibm.com>
12397
12398 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12399 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12400 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12401 fctiw instruction.
12402
12403 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12404
12405 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12406 instead of __vector bool.
12407 (_mm_max_pu8): Likewise.
12408 (_mm_min_pi16): Likewise.
12409
12410 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12411
12412 PR target/84912
12413 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12414 (DIVWEUO): Likewise.
12415 (DIVDEO): Likewise.
12416 (DIVDEUO): Likewise.
12417 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12418 DIVWEUO and DIVDEUO.
12419 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12420 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12421 (div_extend): Likewise.
12422 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12423 builtin function.
12424 (__builtin_divweuo): Likewise.
12425 (__builtin_divdeo): Likewise.
12426 (__builtin_divdeuo): Likewise.
12427
12428 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12429
12430 PR target/85095
12431 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12432 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12433
12434 PR tree-optimization/82004
12435 * gimple-match-head.c (optimize_pow_to_exp): New function.
12436 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12437 Don't fold to exp if optimize_pow_to_exp is false.
12438
12439 2018-03-28 Martin Liska <mliska@suse.cz>
12440
12441 PR other/84819
12442 * calls.c (initialize_argument_information): Fix trailing space.
12443 * common.opt: Fix typo and provide better explanation for
12444 -fsanitize-coverage option.
12445 * config/i386/i386.opt: Fix typo.
12446
12447 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12448 Martin Liska <mliska@suse.cz>
12449
12450 PR sanitizer/85081
12451 * gimplify.c (asan_poison_variable): Don't do the check for
12452 gimplify_omp_ctxp here.
12453 (gimplify_decl_expr): Do it here.
12454 (gimplify_target_expr): Likewise.
12455
12456 2018-03-28 Martin Liska <mliska@suse.cz>
12457
12458 PR target/84988
12459 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12460 chkp_type_bounds_count if MPX is not enabled.
12461
12462 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12463
12464 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12465
12466 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12467
12468 PR target/84914
12469 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12470 function to create the function decl for complex long double
12471 multiply and divide for -mabi=ieeelongdouble.
12472 (init_float128_ieee): Call it.
12473
12474 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12475
12476 PR target/85044
12477 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12478 -fcf-protection=branch -mibt.
12479 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12480
12481 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12482
12483 PR target/81863
12484 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12485 arm_word_relocations.
12486
12487 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12488
12489 PR target/85056
12490 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12491 extern array declarations.
12492
12493 2018-03-27 Richard Biener <rguenther@suse.de>
12494
12495 PR middle-end/84067
12496 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12497 explicit single_use checks.
12498
12499 2018-03-27 Richard Biener <rguenther@suse.de>
12500
12501 PR tree-optimization/85082
12502 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12503 Valueize the VUSE.
12504
12505 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12506
12507 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12508 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12509 Turn on fasynchronous-unwind-tables and funwind-tables.
12510
12511 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12512
12513 PR target/85073
12514 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12515 (*bmi_blsr_<mode>_ccz): Ditto.
12516
12517 2018-03-26 Tom de Vries <tom@codesourcery.com>
12518
12519 PR tree-optimization/85063
12520 * omp-general.c (offloading_function_p): New function. Factor out
12521 of ...
12522 * omp-offload.c (pass_omp_target_link::gate): ... here.
12523 * omp-general.h (offloading_function_p): Declare.
12524 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12525 with attribute omp declare target for offloading functions.
12526
12527 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12528
12529 PR tree-optimization/84005
12530 * tree-data-ref.h (get_base_for_alignment): Declare.
12531 * tree-data-ref.c (get_base_for_alignment_1): New function.
12532 (get_base_for_alignment): Likewise.
12533 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12534 get_base_for_alignment to find a suitable base object, instead
12535 of always using drb->base_address.
12536
12537 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12538
12539 PR inline-asm/85022
12540 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12541 known size by default.
12542
12543 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12544
12545 PR inline-asm/85030
12546 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12547 and non BLKmode operands.
12548
12549 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12550
12551 PR target/85026
12552 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12553 Clean up attributes.
12554
12555 2018-03-23 Richard Biener <rguenther@suse.de>
12556
12557 PR debug/85020
12558 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12559 we are going to emit early debug for LTO.
12560
12561 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12562
12563 PR inline-asm/85034
12564 * function.c (match_asm_constraints_1): Don't optimize if input
12565 doesn't satisfy general_operand predicate for output's mode.
12566
12567 PR inline-asm/85022
12568 * alias.c (write_dependence_p): Don't require for x_canonicalized
12569 non-VOIDmode if x has VOIDmode.
12570
12571 PR sanitizer/85029
12572 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12573 just don't try to optimize it rather than assert it never happens.
12574
12575 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12576
12577 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12578 macro expansions for definition of ST_INTERNAL_<mode> and
12579 LD_INTERNAL_<mode> builtins.
12580 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12581 Remove prototype.
12582 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12583 function.
12584 (altivec_expand_st_builtin): Likewise.
12585 (altivec_expand_builtin): Remove calls to deleted functions.
12586 (rs6000_address_for_altivec): Delete this function.
12587 * config/rs6000/vector.md: Remove expands for
12588 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12589
12590 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12591
12592 PR target/84826
12593 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12594 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12595 re-computing once computed.
12596 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12597 (arm_init_machine_status): Initialize
12598 machine->static_chain_stack_bytes.
12599
12600 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12601
12602 PR target/84760
12603 * doc/extend.texi: Add four new prototypes for vec_ld.
12604 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12605 definitions for more logical presentation.
12606 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12607 entries for V1TI variants of __builtin_altivec_ld builtin.
12608 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12609 handling of V1TI variant of LVX icode pattern.
12610 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12611 (rs6000_gimple_fold_builtin): Likewise.
12612 (altivec_init_builtins): Add code to define
12613 __builtin_altivec_lvx_v1ti function.
12614
12615 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12616
12617 PR inline-asm/84941
12618 * function.c (match_asm_constraints_1): Don't do the optimization
12619 if input isn't a REG, SUBREG, MEM or constant.
12620
12621 2018-03-22 Tom de Vries <tom@codesourcery.com>
12622
12623 PR tree-optimization/84956
12624 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12625 bb_has_abnormal_pred.
12626
12627 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12628
12629 PR sanitizer/85018
12630 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12631 DECL_INITIAL (decl) to decl at the end.
12632 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12633 adjust the comment.
12634
12635 2018-03-21 Joseph Myers <joseph@codesourcery.com>
12636
12637 * doc/extend.texi (__builtin_tgmath): Document when complex
12638 integer types are treated as _Complex _Float64.
12639
12640 2018-03-21 Tom de Vries <tom@codesourcery.com>
12641
12642 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12643
12644 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12645
12646 PR tree-optimization/84960
12647 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12648 if it is ENTRY block, move them into single succ of ENTRY in that case.
12649
12650 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12651
12652 PR tree-optimization/84811
12653 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12654 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12655 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12656 (known_subrange_p): Update accordingly. Cast each value involved
12657 in the size comparison, rather than casting the result of the
12658 subtraction.
12659
12660 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12661
12662 PR tree-optimization/84982
12663 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12664 by flipping the least significant bit rather than all bits from
12665 bitpos to bitpos + bitsize - 1.
12666
12667 2018-03-21 Nathan Sidwell <nathan@acm.org>
12668
12669 * doc/extend.texi (Deprecated Features): Remove mention of
12670 long-deleted deprecations.
12671
12672 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12673
12674 PR jit/84288
12675 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12676 * configure: Regenerate.
12677
12678 2018-03-21 Tom de Vries <tom@codesourcery.com>
12679
12680 PR tree-optimization/83126
12681 * tree-parloops.c (num_phis): New function.
12682 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12683
12684 2018-03-21 Nathan Sidwell <nathan@acm.org>
12685
12686 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12687 mention anon-struct/union members and trailing attributes.
12688
12689 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12690
12691 PR tree-optimization/84969
12692 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12693 builtin memset partitions if they set different rhs values.
12694
12695 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12696
12697 PR rtl-optimization/84989
12698 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12699 VEC_DUPLICATE with scalar result mode.
12700
12701 2018-03-21 Martin Liska <mliska@suse.cz>
12702
12703 PR ipa/84963
12704 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12705 not intended return statement.
12706
12707 2018-03-21 Martin Liska <mliska@suse.cz>
12708
12709 PR target/84988
12710 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12711 (chkp_find_bound_slots_1): Limit number of iterations.
12712
12713 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
12714
12715 PR target/84838
12716 * Minor grammar fixes for x86 options.
12717
12718 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12719
12720 PR debug/84875
12721 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12722 holding REG_CFA_RESTORE notes, instead turn them into a USE.
12723
12724 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
12725
12726 PR target/83789
12727 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12728 (altivec_lvx_<mode>_1op): Likewise.
12729 (altivec_stvx_<mode>_2op): Likewise.
12730 (altivec_stvx_<mode>_1op): Likewise.
12731 (altivec_lvx_<VM2:mode>): New define_expand.
12732 (altivec_stvx_<VM2:mode>): Likewise.
12733 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12734 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12735 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12736 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12737 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12738 (rs6000_gen_lvx): Likewise.
12739 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12740 (altivec_expand_stv_builtin): Likewise.
12741 (altivec_expand_builtin): Likewise.
12742 * config/rs6000/vector.md: Likewise.
12743
12744 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12745
12746 PR target/82518
12747 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12748 BYTES_BIG_ENDIAN.
12749
12750 2018-03-20 Richard Biener <rguenther@suse.de>
12751
12752 PR target/84986
12753 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12754 sign-conversions as zero, fall back to standard scalar_stmt
12755 cost for the rest.
12756
12757 2018-03-20 Martin Liska <mliska@suse.cz>
12758
12759 PR ipa/84825
12760 * predict.c (rebuild_frequencies): Handle case when we have
12761 PROFILE_ABSENT, but flag_guess_branch_prob is false.
12762
12763 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12764
12765 PR target/84990
12766 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12767 flag_section_anchors.
12768 * varasm.c (use_blocks_for_decl_p): Remove hack for
12769 dw2_force_const_mem.
12770
12771 PR target/84845
12772 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12773 to ...
12774 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
12775 be created, use lowpart_subreg of operands[0] rather than operands[0]
12776 itself.
12777 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12778 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12779 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12780 and n constraint instead of aarch64_shift_imm_di and Usd.
12781 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12782 (*aarch64_<optab>_reg_minus<mode>3): ... this.
12783
12784 2018-03-20 Sudakshina Das <sudi.das@arm.com>
12785
12786 PR target/82989
12787 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12788 to favor GPR over NEON registers.
12789 (<shift>di3_neon): Likewise.
12790
12791 2018-03-20 Tom de Vries <tom@codesourcery.com>
12792
12793 PR target/84952
12794 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12795 (nvptx_process_pars): Emit bar.sync asap and alap.
12796
12797 2018-03-20 Tom de Vries <tom@codesourcery.com>
12798
12799 PR target/84954
12800 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12801 seen_label if seen_label is already set.
12802
12803 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12804
12805 PR target/84945
12806 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12807 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12808 Use 1U instead of 1. Formatting fixes.
12809
12810 PR c/84953
12811 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12812 instead of TREE_TYPE (s1) for the return value.
12813
12814 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12815
12816 PR tree-optimization/84946
12817 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12818 bitsize + bitsize in poly_uint64 rather than poly_int64.
12819
12820 PR sanitizer/78651
12821 * dwarf2asm.c: Include fold-const.c.
12822 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12823 of decl rather than decl itself.
12824
12825 PR rtl-optimization/84643
12826 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12827
12828 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12829
12830 PR sanitizer/78651
12831 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12832 calling assemble_variable.
12833
12834 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12835
12836 PR target/81647
12837 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12838 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12839
12840 2018-03-19 Jim Wilson <jimw@sifive.com>
12841
12842 PR bootstrap/84856
12843 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12844 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12845 (riscv_first_stack_step): Likewise.
12846 (riscv_option_override): Use STACK_BOUNDARY instead of
12847 MIN_STACK_BOUNDARY.
12848 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12849 MIN_STACK_BOUNDARY.
12850 (BIGGEST_ALIGNMENT): Set to 128.
12851 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12852 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12853 STACK_BOUNDARY.
12854
12855 2018-03-19 Richard Biener <rguenther@suse.de>
12856
12857 PR tree-optimization/84933
12858 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12859 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12860
12861 2018-03-19 Richard Biener <rguenther@suse.de>
12862
12863 PR tree-optimization/84859
12864 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12865 (cond_if_else_store_replacement): Perform sinking operation on
12866 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12867 Generalize what a BB with a single eligible store is.
12868
12869 2018-03-19 Richard Biener <rguenther@suse.de>
12870
12871 PR tree-optimization/84929
12872 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12873 chrec_is_positive against non-chrec arg.
12874
12875 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12876
12877 PR target/84711
12878 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12879
12880 2018-03-18 Martin Liska <mliska@suse.cz>
12881
12882 PR rtl-optimization/84635
12883 * regrename.c (build_def_use): Use matches_mode only when
12884 matches >= 0.
12885
12886 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12887
12888 PR tree-optimization/84913
12889 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12890 vectorize chains of COND_EXPRs.
12891
12892 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12893
12894 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12895
12896 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12897
12898 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12899
12900 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12901
12902 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12903
12904 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12905 Kito Cheng <kito.cheng@gmail.com>
12906
12907 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12908 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12909 (nds32_adjust_reg_alloc_order): New function.
12910 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12911
12912 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12913
12914 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12915 nds32_print_operand, nds32_print_operand_address): Use
12916 HOST_WIDE_INT_PRINT_DEC instead.
12917
12918 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12919
12920 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12921
12922 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12923
12924 PR target/84902
12925 * config/i386/i386.c (initial_ix86_tune_features,
12926 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12927 unsigned long long.
12928 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12929 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12930 rather than 1u << ix86_tune. Formatting fix.
12931 (ix86_option_override_internal): Change ix86_arch_mask from
12932 unsigned int to unsigned HOST_WIDE_INT, initialize to
12933 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12934 (ix86_function_specific_restore): Likewise.
12935
12936 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12937
12938 PR target/84899
12939 * postreload.c (reload_combine_recognize_pattern): Perform
12940 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12941 truncate_int_for_mode the result for the destination's mode.
12942
12943 PR c/84909
12944 * hsa-gen.c (mem_type_for_type): Fix comment typo.
12945 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12946 Likewise.
12947 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12948 Likewise.
12949
12950 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
12951
12952 PR target/84876
12953 * lra-assigns.c (lra_split_hard_reg_for): Don't use
12954 regno_allocno_class_array and sorted_pseudos.
12955 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12956 insns where regno is used.
12957
12958 2018-03-16 Martin Liska <mliska@suse.cz>
12959
12960 PR ipa/84833
12961 * multiple_target.c (create_dispatcher_calls): Redirect
12962 reference in the symbol table.
12963
12964 2018-03-16 Martin Liska <mliska@suse.cz>
12965
12966 PR ipa/84722
12967 * multiple_target.c (create_dispatcher_calls): Redirect also
12968 an alias.
12969
12970 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12971
12972 PR c++/79937
12973 PR c++/82410
12974 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12975 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12976 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12977
12978 2018-03-16 Julia Koval <julia.koval@intel.com>
12979
12980 * doc/invoke.texi (Skylake Server): Add CLWB.
12981 Cannonlake): Remove CLWB.
12982
12983 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12984
12985 PR tree-optimization/84841
12986 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12987 1 << 3.
12988 (FLOAT_ONE_CONST_TYPE): Define.
12989 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12990 (sort_by_operand_rank): Put entries with higher constant_type last
12991 rather than first to match comments.
12992
12993 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
12994
12995 * config/nios2/nios2.md (movsi_internal): Fix thinko in
12996 split predicate.
12997
12998 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12999
13000 PR c++/79085
13001 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13002 check and use address of target always.
13003
13004 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13005
13006 PR target/84574
13007 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13008 (indirect_thunk_bnd_needed): Likewise.
13009 (indirect_thunks_used): Likewise.
13010 (indirect_thunks_bnd_used): Likewise.
13011 (indirect_return_needed): New.
13012 (indirect_return_bnd_needed): Likewise.
13013 (output_indirect_thunk_function): Add a bool argument for
13014 function return.
13015 (output_indirect_thunk_function): Don't generate alias for
13016 function return thunk.
13017 (ix86_code_end): Call output_indirect_thunk_function to generate
13018 function return thunks.
13019 (ix86_output_function_return): Set indirect_return_bnd_needed
13020 and indirect_return_needed instead of indirect_thunk_bnd_needed
13021 and indirect_thunk_needed.
13022
13023 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13024
13025 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13026 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13027 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13028
13029 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13030 Paul Hua <paul.hua.gm@gmail.com>
13031
13032 PR c/84852
13033 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13034
13035 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13036
13037 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13038 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13039 resp. SFmode cases.
13040
13041 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13042
13043 PR target/84711
13044 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13045 instead of GET_MODE_SIZE when comparing Units.
13046
13047 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13048
13049 PR target/68256
13050 * varasm.c (hash_section): Return an unchangeble hash value
13051 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13052 Return !aarch64_can_use_per_function_literal_pools_p ().
13053
13054 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13055
13056 PR target/84860
13057 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13058 rather than address of cmode as last argument to prepare_cmp_insn.
13059
13060 2018-03-15 Julia Koval <julia.koval@intel.com>
13061
13062 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13063 F_AVX512VNNI, F_AVX512BITALG): New.
13064
13065 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13066
13067 PR target/83451
13068 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13069 insn for floating-point loads and stores.
13070
13071 2018-03-14 Carl Love <cel@us.ibm.com>
13072
13073 * config/rs6000/rs6000-c.c: Add macro definitions for
13074 ALTIVEC_BUILTIN_VEC_PERMXOR.
13075 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13076 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13077 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13078 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13079 UNSPEC_VPERMXOR.
13080 * config/doc/extend.texi: Add prototypes for vec_permxor.
13081
13082 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13083
13084 PR c/84852
13085 * diagnostic-show-locus.c (class layout_point): Convert m_line
13086 from int to linenum_type.
13087 (line_span::comparator): Use linenum "compare" function when
13088 comparing line numbers.
13089 (test_line_span): New function.
13090 (layout_range::contains_point): Convert param "row" from int to
13091 linenum_type.
13092 (layout_range::intersects_line_p): Likewise.
13093 (layout::will_show_line_p): Likewise.
13094 (layout::print_source_line): Likewise.
13095 (layout::should_print_annotation_line_p): Likewise.
13096 (layout::print_annotation_line): Likewise.
13097 (layout::print_leading_fixits): Likewise.
13098 (layout::annotation_line_showed_range_p): Likewise.
13099 (struct line_corrections): Likewise for field m_row.
13100 (line_corrections::line_corrections): Likewise for param "row".
13101 (layout::print_trailing_fixits): Likewise.
13102 (layout::get_state_at_point): Likewise.
13103 (layout::get_x_bound_for_row): Likewise.
13104 (layout::print_line): Likewise.
13105 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13106 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13107 * input.c (selftest::test_linenum_comparisons): New function.
13108 (selftest::input_c_tests): Call it.
13109 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13110 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13111 * selftest.h (ASSERT_GT): New macro.
13112 (ASSERT_GT_AT): New macro.
13113 (ASSERT_LT): New macro.
13114 (ASSERT_LT_AT): New macro.
13115
13116 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
13117
13118 PR rtl-optimization/84780
13119 * combine.c (distribute_links): Don't make a link based on pc_rtx.
13120
13121 2018-03-14 Martin Liska <mliska@suse.cz>
13122
13123 * tree.c (record_node_allocation_statistics): Use
13124 get_stats_node_kind.
13125 (get_stats_node_kind): New function extracted from
13126 record_node_allocation_statistics.
13127 (free_node): Use get_stats_node_kind.
13128
13129 2018-03-14 Richard Biener <rguenther@suse.de>
13130
13131 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13132 that the value-set of ANTIC_IN doesn't grow.
13133
13134 Revert
13135 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13136 member.
13137 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13138 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13139
13140 2018-03-14 Julia Koval <julia.koval@intel.com>
13141
13142 * config.gcc (icelake-client, icelake-server): New.
13143 (icelake): Remove.
13144 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13145 (initial_ix86_arch_features): Ditto.
13146 (PTA_SKYLAKE): Add SGX.
13147 (PTA_ICELAKE): Remove.
13148 (PTA_ICELAKE_CLIENT): New.
13149 (PTA_ICELAKE_SERVER): New.
13150 (ix86_option_override_internal): Split up icelake on icelake client and
13151 icelake server.
13152 (get_builtin_code_for_version): Ditto.
13153 (fold_builtin_cpu): Ditto.
13154 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13155 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13156 * config/i386/i386.h (processor_type): Ditto.
13157 * doc/invoke.texi: Ditto.
13158
13159 2018-03-14 Jakub Jelinek <jakub@redhat.com>
13160
13161 PR sanitizer/83392
13162 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13163 INTEGER_CST offset, add it together with bitpos / 8 and
13164 sign extend based on POINTER_SIZE.
13165
13166 PR target/84844
13167 Revert
13168 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
13169
13170 PR target/78090
13171 * config/i386/constraints.md (Yc): New register constraint.
13172 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13173 Use Yc constraint for alternative 2 of operand 0. Remove
13174 preferred_for_speed attribute.
13175
13176 2018-03-14 Richard Biener <rguenther@suse.de>
13177
13178 PR tree-optimization/84830
13179 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13180 with the old one to avoid oscillations.
13181
13182 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13183
13184 PR target/83712
13185 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13186 pseudos.
13187 (assign_by_spills): Return a flag of reload assignment failure.
13188 Do not process the reload assignment failures. Do not spill other
13189 reload pseudos if they has the same reg class. Update n if
13190 necessary.
13191 (lra_assign): Add a return arg. Set up from the result of
13192 assign_by_spills call.
13193 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13194 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13195 usage_insns if it is not NULL.
13196 (spill_hard_reg_in_range): New function.
13197 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13198 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13199 function prototypes.
13200 (lra_assign): Change prototype.
13201 * lra.c (lra): Add code to deal with fails by splitting hard reg
13202 live ranges.
13203
13204 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13205
13206 * config/riscv/riscv.opt (mrelax): New option.
13207 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13208 "norelax" when riscv_mrelax is disabled.
13209 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13210
13211 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13212
13213 PR target/84743
13214 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13215 reassociation for int modes.
13216
13217 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13218
13219 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13220 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13221 for big-endian.
13222 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13223 * config/aarch64/aarch64-sve.md
13224 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13225 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13226 (*extend<mode><Vwide>2): Rename to...
13227 (aarch64_sve_extend<mode><Vwide>2): ...this.
13228 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13229 renaming the old pattern to...
13230 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13231 unsigned packs.
13232 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13233 define_expand, renaming the old pattern to...
13234 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13235 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13236 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13237 account when deciding which SVE instruction the optab should use.
13238 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13239
13240 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13241
13242 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13243 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13244 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13245 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13246 (tlsdesc_small_<mode>): Turn a define_expand and use
13247 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13248 (tlsdesc_small_advsimd_<mode>): ...this.
13249 (tlsdesc_small_sve_<mode>): New pattern.
13250
13251 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13252
13253 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13254 (UNSPEC_UMUL_HIGHPART): New constants.
13255 (MUL_HIGHPART): New int iteraor.
13256 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13257 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13258 define_expand.
13259 (*<su>mul<mode>3_highpart): New define_insn.
13260
13261 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13262
13263 PR lto/84805
13264 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13265 incomplete types.
13266
13267 2018-03-13 Martin Liska <mliska@suse.cz>
13268
13269 PR ipa/84658.
13270 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13271 vector.
13272 (sem_item_optimizer::~sem_item_optimizer): Release it.
13273 (sem_item_optimizer::merge_classes): Register variable aliases.
13274 (sem_item_optimizer::fixup_pt_set): New function.
13275 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13276 * ipa-icf.h: Declare new variables and functions.
13277
13278 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13279
13280 PR middle-end/84834
13281 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13282 integer_pow2p@2 and test integer_pow2p in condition.
13283 (A < 0 ? C : 0): Similarly for @1.
13284
13285 PR middle-end/84831
13286 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13287 characters starting at p contain '\0' character, don't look beyond
13288 that.
13289
13290 PR target/84827
13291 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13292 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13293
13294 PR target/84828
13295 * reg-stack.c (change_stack): Change update_end var from int to
13296 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13297 also call set_block_for_insn on the newly added insns and rescan.
13298
13299 PR target/84786
13300 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13301 on the last operand.
13302
13303 PR c++/84704
13304 * tree.c (stabilize_reference_1): Return save_expr (e) for
13305 STATEMENT_LIST even if it doesn't have side-effects.
13306
13307 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13308
13309 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13310
13311 2018-03-12 Renlin Li <renlin.li@arm.com>
13312
13313 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13314 aarch64_output_scalar_simd_mov_immediate.
13315
13316 2018-03-12 Martin Sebor <msebor@redhat.com>
13317
13318 PR tree-optimization/83456
13319 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13320 for perfectly overlapping calls to memcpy.
13321 (gimple_fold_builtin_memory_chk): Same.
13322 (gimple_fold_builtin_strcpy): Handle no-warning.
13323 (gimple_fold_builtin_stxcpy_chk): Same.
13324 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13325
13326 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13327
13328 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13329 parameter. Use it for SFmode.
13330 (rs6000_function_arg_advance_1): Adjust.
13331 (rs6000_function_arg): Adjust.
13332 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13333
13334 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13335
13336 PR rtl-optimization/84169
13337 PR rtl-optimization/84780
13338 * combine.c (can_combine_p): Check for a 2-insn combination whether
13339 the destination register is used between the two insns, too.
13340
13341 2018-03-12 Richard Biener <rguenther@suse.de>
13342
13343 PR tree-optimization/84803
13344 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13345 for refs DR analysis didn't process.
13346
13347 2018-03-12 Richard Biener <rguenther@suse.de>
13348
13349 PR tree-optimization/84777
13350 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13351 force-vectorize loops ignore whether we are optimizing for size.
13352
13353 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13354
13355 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13356 (TARGET_MD_ASM_ADJUST): Define.
13357
13358 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13359 Kito Cheng <kito.cheng@gmail.com>
13360 Chung-Ju Wu <jasonwucj@gmail.com>
13361
13362 * config/nds32/nds32.c (nds32_compute_stack_frame,
13363 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13364 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13365 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13366 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13367 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13368 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13369 * config/nds32/nds32.md (prologue, epilogue): Use macro
13370 NDS32_V3PUSH_AVAILABLE_P to do checking.
13371
13372 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13373
13374 PR debug/58150
13375 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13376 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13377 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13378 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13379 addition of most attributes on !orig_type_die or the attribute not
13380 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13381
13382 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13383 Chung-Ju Wu <jasonwucj@gmail.com>
13384
13385 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13386 __NDS32_VH__ macro.
13387 * config/nds32/nds32.opt (mvh): New option.
13388
13389 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13390 Chung-Ju Wu <jasonwucj@gmail.com>
13391
13392 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13393 function.
13394 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13395 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13396 definition.
13397
13398 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13399 Chung-Ju Wu <jasonwucj@gmail.com>
13400
13401 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13402 function.
13403 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13404 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13405
13406 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13407 Kito Cheng <kito.cheng@gmail.com>
13408 Chung-Ju Wu <jasonwucj@gmail.com>
13409
13410 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13411 UNSPEC_FFMISM and UNSPEC_FLMISM.
13412 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13413 for ffb, ffmism and flmism.
13414 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13415 (unspec_ffmism): Ditto.
13416 (unspec_flmism): Ditto.
13417 (nds32_expand_builtin_impl): Check if string extension is available.
13418 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13419 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13420
13421 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13422
13423 Reverting patch:
13424 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13425
13426 PR target/83712
13427 * lra-assigns.c (assign_by_spills): Return a flag of reload
13428 assignment failure. Do not process the reload assignment
13429 failures. Do not spill other reload pseudos if they has the same
13430 reg class.
13431 (lra_assign): Add a return arg. Set up from the result of
13432 assign_by_spills call.
13433 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13434 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13435 usage_insns if it is not NULL.
13436 (spill_hard_reg_in_range): New function.
13437 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13438 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13439 function prototypes.
13440 (lra_assign): Change prototype.
13441 * lra.c (lra): Add code to deal with fails by splitting hard reg
13442 live ranges.
13443
13444 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13445
13446 PR target/84807
13447 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13448
13449 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13450
13451 PR debug/84620
13452 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13453 (dw_val_node): Add val_symbolic_view.
13454 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13455 (symview_upper_bound): New.
13456 (new_line_info_table): Initialize symviews_since_reset.
13457 (dwarf2out_source_line): Count symviews_since_reset and set
13458 symview_upper_bound.
13459 (dw_val_equal_p): Handle symview.
13460 (add_AT_symview): New.
13461 (print_dw_val): Handle symview.
13462 (attr_checksum, attr_checksum_ordered): Likewise.
13463 (same_dw_val_p, size_of_die): Likewise.
13464 (value_format, output_die): Likewise.
13465 (add_high_low_attributes): Use add_AT_symview for entry_view.
13466 (dwarf2out_finish): Reset symview_upper_bound, clear
13467 zero_view_p.
13468
13469 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13470
13471 PR target/83969
13472 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13473 Add strict argument and use it.
13474 (rs6000_split_multireg_move): Update for new strict argument.
13475 (mem_operand_gpr): Disallow all non-offsettable addresses.
13476 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13477
13478 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13479
13480 PR target/84772
13481 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13482 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13483 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13484
13485 PR c++/84767
13486 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13487 decl, use remap_type if we want to use the type.
13488
13489 2018-03-09 Martin Sebor <msebor@redhat.com>
13490
13491 PR tree-optimization/84526
13492 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13493 Remove dead code.
13494 (builtin_access::generic_overlap): Be prepared to handle non-array
13495 base objects.
13496
13497 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13498
13499 PR rtl-optimization/84682
13500 * lra-constraints.c (process_address_1): Check is_address flag
13501 for address constraints.
13502 (process_alt_operands): Likewise.
13503 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13504 preprocess_constraints.
13505 * recog.h (preprocess_constraints): Add oploc parameter.
13506 Adjust callers.
13507 * recog.c (preprocess_constraints): Test address_operand for
13508 CT_ADDRESS constraints.
13509
13510 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13511
13512 PR target/83712
13513 * lra-assigns.c (assign_by_spills): Return a flag of reload
13514 assignment failure. Do not process the reload assignment
13515 failures. Do not spill other reload pseudos if they has the same
13516 reg class.
13517 (lra_assign): Add a return arg. Set up from the result of
13518 assign_by_spills call.
13519 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13520 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13521 usage_insns if it is not NULL.
13522 (spill_hard_reg_in_range): New function.
13523 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13524 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13525 function prototypes.
13526 (lra_assign): Change prototype.
13527 * lra.c (lra): Add code to deal with fails by splitting hard reg
13528 live ranges.
13529
13530 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13531
13532 PR target/83193
13533 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13534 Accept complain bool parameter. Only emit errors if it is true.
13535 (arm_parse_cpu_option_name): Likewise.
13536 (arm_target_thumb_only): Adjust callers of the above.
13537 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13538 prototype to take a default true bool parameter.
13539 (arm_parse_arch_option_name): Likewise.
13540
13541 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13542 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13543
13544 PR jit/64089
13545 PR jit/84288
13546 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13547 * configure: Regenerate.
13548 * configure.ac ("linker --version-script option"): New.
13549 ("linker soname option"): New.
13550
13551 2018-03-09 Richard Biener <rguenther@suse.de>
13552
13553 PR tree-optimization/84775
13554 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13555 immediate uses of predicate stmts and mark them modified.
13556
13557 Revert
13558 PR tree-optimization/84178
13559 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13560 to caller.
13561 (version_loop_for_if_conversion): Delay update_ssa call.
13562 (tree_if_conversion): Delay update_ssa until after predicate
13563 insertion.
13564
13565 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13566
13567 PR target/84763
13568 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13569 when the function accesses prior frames.
13570
13571 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13572
13573 PR debug/84456
13574 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13575 gen_llsym, otherwise call maybe_gen_llsym.
13576
13577 PR inline-asm/84742
13578 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13579 has ',' character inside of it.
13580
13581 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13582
13583 PR target/84748
13584 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13585 as clobbering CC_REGNUM.
13586
13587 2018-03-08 Richard Biener <rguenther@suse.de>
13588
13589 PR middle-end/84552
13590 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13591 (follow_copies_to_constant): Do not follow SSA names registered
13592 for update.
13593
13594 2018-03-08 Richard Biener <rguenther@suse.de>
13595
13596 PR tree-optimization/84178
13597 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13598 to caller.
13599 (version_loop_for_if_conversion): Delay update_ssa call.
13600 (tree_if_conversion): Delay update_ssa until after predicate
13601 insertion.
13602
13603 2018-03-08 David Malcolm <dmalcolm@redhat.com>
13604
13605 PR tree-optimization/84178
13606 * tree-if-conv.c (release_bb_predicate): Remove the
13607 the assertion that the stmts have NULL use_ops.
13608 Discard the statements, asserting that they haven't
13609 yet been added to a BB.
13610
13611 2018-03-08 Richard Biener <rguenther@suse.de>
13612
13613 PR tree-optimization/84746
13614 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13615 (phi_translate): Pass in destination ANTIC_OUT set.
13616 (phi_translate_1): Likewise. For a simplified result lookup
13617 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13618 (phi_translate_set): Adjust.
13619 (do_pre_regular_insertion): Likewise.
13620 (do_pre_partial_partial_insertion): Likewise.
13621
13622 2018-03-08 Martin Liska <mliska@suse.cz>
13623
13624 PR gcov-profile/84735
13625 * doc/gcov.texi: Document usage of profile files.
13626 * gcov-io.h: Document changes in the format.
13627
13628 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
13629
13630 PR debug/84404
13631 PR debug/84408
13632 * dwarf2out.c (struct dw_line_info_table): Update comments for
13633 view == -1.
13634 (FORCE_RESET_NEXT_VIEW): New.
13635 (FORCE_RESETTING_VIEW_P): New.
13636 (RESETTING_VIEW_P): Check for -1 too.
13637 (ZERO_VIEW_P): Likewise.
13638 (new_line_info_table): Force-reset next view.
13639 (dwarf2out_begin_function): Likewise.
13640 (dwarf2out_source_line): Simplify zero_view_p initialization.
13641 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13642 view directly. Omit view when omitting .loc at line 0.
13643
13644 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13645
13646 PR tree-optimization/84740
13647 * tree-switch-conversion.c (process_switch): Call build_constructors
13648 only if info.phi_count is non-zero.
13649
13650 PR tree-optimization/84739
13651 * tree-tailcall.c (find_tail_calls): Check call arguments against
13652 DECL_ARGUMENTS (current_function_decl) rather than
13653 DECL_ARGUMENTS (func) when checking for tail recursion.
13654
13655 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13656
13657 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13658 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13659 Volker Reichelt's entry and add entries for people that perform
13660 GCC fuzzy testing and report numerous bugs.
13661
13662 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13663
13664 PR target/82411
13665 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13666 readonly data in sdata, if that is disabled.
13667 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13668 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13669 -mreadonly-in-sdata option.
13670
13671 2018-03-07 Martin Sebor <msebor@redhat.com>
13672
13673 PR tree-optimization/84468
13674 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13675 basic block when looking for nul assignment.
13676
13677 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13678
13679 PR target/84277
13680 * except.h (output_function_exception_table): Adjust prototype.
13681 * except.c (output_function_exception_table): Remove FNNAME parameter
13682 and add SECTION parameter. Ouput one part of the table at a time.
13683 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13684 the first part of the exception table and emit unwind directives.
13685 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13686 (i386_pe_seh_cold_init): Likewise.
13687 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13688 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13689 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13690 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13691 * config/i386/winnt.c: Include except.h.
13692 (struct seh_frame_state): Add reg_offset, after_prologue and
13693 in_cold_section fields.
13694 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13695 (i386_pe_seh_cold_init): New function.
13696 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13697 to seh->in_cold_section.
13698 (seh_emit_push): Record the offset of the push.
13699 (seh_emit_save): Record the offet of the save.
13700 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13701 Test seh->after_prologue to disregard the epilogue.
13702 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13703 (i386_pe_end_cold_function): New function.
13704
13705 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13706
13707 PR fortran/84565
13708 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13709 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13710
13711 PR c++/84704
13712 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13713 on tmp_var.
13714 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13715 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13716
13717 PR middle-end/84723
13718 * multiple_target.c: Include tree-inline.h and intl.h.
13719 (expand_target_clones): Diagnose and fail if node->definition and
13720 !tree_versionable_function_p (node->decl).
13721
13722 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
13723
13724 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13725 sprint_ul.
13726 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13727 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13728 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13729
13730 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13731
13732 PR target/84710
13733 * combine.c (try_combine): Use reg_or_subregno instead of handling
13734 just paradoxical SUBREGs and REGs.
13735
13736 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
13737
13738 * config/arc/arc.c (arc_finalize_pic): Remove function.
13739 (arc_must_save_register): We use single base PIC register, remove
13740 checks to save/restore the PIC register.
13741 (arc_expand_prologue): Likewise.
13742 * config/arc/arc-protos.h (arc_set_default_type_attributes):
13743 Remove.
13744 (arc_verify_short): Likewise.
13745 (arc_attr_type): Likewise.
13746 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13747 (walk_stores): Likewise.
13748 (arc_address_cost): Make it static.
13749 (arc_verify_short): Likewise.
13750 (branch_dest): Likewise.
13751 (arc_attr_type): Likewise.
13752 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13753 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13754 (arc_final_prescan_insn): Remove inserting the nops due to
13755 hardware hazards. It is done in reorg step.
13756 (insn_length_variant_t): Remove.
13757 (insn_length_parameters_t): Likewise.
13758 (arc_insn_length_parameters): Likewise.
13759 (arc_get_insn_variants): Likewise.
13760 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13761
13762 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13763
13764 PR inline-asm/84683
13765 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13766 assertion failure.
13767
13768 PR tree-optimization/84687
13769 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13770 on new_node->decl.
13771 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13772
13773 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13774
13775 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13776 Rename to ppc_speculation_barrier.
13777 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13778 __builtin_ppc_speculation_barrier.
13779
13780 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13781
13782 PR target/84700
13783 * combine.c (combine_simplify_rtx): Don't try to simplify if
13784 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13785 are equal to x.
13786
13787 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
13788
13789 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13790 to 32 bytes when compiling for POWER9.
13791
13792 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13793
13794 PR target/84564
13795 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13796 regparm >= 3 with no arg reg available also for calls with
13797 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13798
13799 PR target/84524
13800 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13801 orig,vex.
13802 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13803
13804 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13805
13806 PR target/84264
13807 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13808
13809 2018-03-05 Richard Biener <rguenther@suse.de>
13810
13811 PR tree-optimization/84486
13812 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13813 When inserting a __builtin_assume_aligned call set the LHS
13814 SSA name alignment info accordingly.
13815
13816 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13817
13818 PR tree-optimization/84114
13819 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13820 Avoid reassociation of FLOAT_MODE addition.
13821
13822 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13823
13824 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13825 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13826 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13827 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13828 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13829 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13830 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13831 and -mwbnoinvd.
13832 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13833 __builtin_ia32_wbinvd): New builtins.
13834 (SPECIAL_ARGS2): New.
13835 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13836 (SPECIAL_ARGS2): New.
13837 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13838 (ix86_valid_target_attribute_inner_p): Ditto.
13839 (ix86_init_mmx_sse_builtins): Add special_args2.
13840 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13841 TARGET_WBNOINVD_P): New.
13842 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13843 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13844 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13845 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13846 * config/i386/pconfigintrin.h: New file.
13847 * config/i386/wbnoinvdintrin.h: Ditto.
13848 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13849 wbnoinvdintrin.h.
13850 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13851
13852 2018-03-05 Richard Biener <rguenther@suse.de>
13853
13854 PR tree-optimization/84670
13855 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13856 member.
13857 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13858 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13859 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13860 doesn't grow if all successors (recursively) were visited at least
13861 once.
13862
13863 2018-03-05 Richard Biener <rguenther@suse.de>
13864
13865 PR tree-optimization/84650
13866 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13867 if executed in the loop pipeline.
13868
13869 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13870
13871 * doc/configfiles.texi (Configuration Files): Move info about
13872 conditionalizing $target-protos.h to...
13873 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13874 differs from $target-protos.h.
13875
13876 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13877 Chung-Ju Wu <jasonwucj@gmail.com>
13878
13879 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13880 * config/nds32/nds32-multiple.md (setmemsi): Define.
13881 * config/nds32/nds32-memory-manipulation.c
13882 (nds32_gen_dup_4_byte_to_word_value): New.
13883 (emit_setmem_word_loop): New.
13884 (emit_setmem_byte_loop): New.
13885 (nds32_expand_setmem_loop): New.
13886 (nds32_expand_setmem_loop_v3m): New.
13887 (nds32_expand_setmem_unroll): New.
13888 (nds32_expand_setmem): New.
13889
13890 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13891 Chung-Ju Wu <jasonwucj@gmail.com>
13892
13893 * config/nds32/nds32-memory-manipulation.c
13894 (nds32_emit_load_store): New.
13895 (nds32_emit_post_inc_load_store): New.
13896 (nds32_emit_mem_move): New.
13897 (nds32_emit_mem_move_block): New.
13898 (nds32_expand_movmemsi_loop_unknown_size): New.
13899 (nds32_expand_movmemsi_loop_known_size): New.
13900 (nds32_expand_movmemsi_loop): New.
13901 (nds32_expand_movmemsi_unroll): New.
13902 (nds32_expand_movmemqi): Rename ...
13903 (nds32_expand_movmemsi): ... to this.
13904 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13905 (movmemsi): ... to this.
13906 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13907 (nds32_expand_movmemsi): ... to this.
13908
13909 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13910 Monk Chiang <sh.chiang04@gmail.com>
13911 Chung-Ju Wu <jasonwucj@gmail.com>
13912
13913 * config/nds32/nds32-protos.h
13914 (nds32_expand_load_multiple): New arguments.
13915 (nds32_expand_store_multiple): Ditto.
13916 (nds32_valid_multiple_load_store): Rename ...
13917 (nds32_valid_multiple_load_store_p): ... to this.
13918 * config/nds32/nds32-memory-manipulation.c
13919 (nds32_expand_load_multiple): Refine implementation.
13920 (nds32_expand_store_multiple): Ditto.
13921 * config/nds32/nds32-multiple.md
13922 (load_multiple): Update nds32_expand_load_multiple interface.
13923 (store_multiple): Update nds32_expand_store_multiple interface.
13924 * config/nds32/nds32-predicates.c
13925 (nds32_valid_multiple_load_store): Rename ...
13926 (nds32_valid_multiple_load_store_p): ... to this and refine
13927 implementation.
13928 * config/nds32/predicates.md
13929 (nds32_load_multiple_and_update_address_operation): New predicate.
13930 (nds32_store_multiple_and_update_address_operation): New predicate.
13931
13932 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13933 Chung-Ju Wu <jasonwucj@gmail.com>
13934
13935 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13936 (combo): New attribute.
13937 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13938
13939 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
13940
13941 * config/nds32/nds32.opt: Change -mcmodel= default value.
13942
13943 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
13944 Monk Chiang <sh.chiang04@gmail.com>
13945 Chung-Ju Wu <jasonwucj@gmail.com>
13946
13947 * config/nds32/constants.md (unspec_element): New enum.
13948 * config/nds32/constraints.md (Umw): New constraint.
13949 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13950 * config/nds32/nds32-intrinsic.md: Likewise.
13951 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13952 (nds32_valid_smw_lwm_base_p): New.
13953 (nds32_output_smw_single_word): New.
13954 (nds32_output_lmw_single_word): New.
13955 (nds32_expand_unaligned_load): New.
13956 (nds32_expand_unaligned_store): New.
13957 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13958 (nds32_output_smw_single_word): Declare.
13959 (nds32_output_lmw_single_word): Declare.
13960 (nds32_expand_unaligned_load): Declare.
13961 (nds32_expand_unaligned_store): Declare.
13962 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13963 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13964 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13965 NDS32_BUILTIN_UASTORE_DW.
13966 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13967 predicate.
13968
13969 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
13970 Kito Cheng <kito.cheng@gmail.com>
13971 Chung-Ju Wu <jasonwucj@gmail.com>
13972
13973 * config/nds32/nds32-intrinsic.c
13974 (nds32_expand_builtin_null_ftype_reg): Delete.
13975 (nds32_expand_builtin_reg_ftype_imm): Ditto.
13976 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13977 (nds32_read_argument): New.
13978 (nds32_legitimize_target): Ditto.
13979 (nds32_legitimize_argument): Ditto.
13980 (nds32_check_constant_argument): Ditto.
13981 (nds32_expand_unop_builtin): Ditto.
13982 (nds32_expand_unopimm_builtin): Ditto.
13983 (nds32_expand_binop_builtin): Ditto.
13984 (nds32_builtin_decl_impl): Ditto.
13985 (builtin_description): Ditto.
13986 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13987 (nds32_init_builtins_impl): Ditto.
13988 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13989 (nds32_builtin_decl): New.
13990 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13991 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13992
13993 2018-03-02 Jeff Law <law@redhat.com>
13994
13995 * reorg.c (stop_search_p): Handle DEBUG_INSN.
13996 (redundant_insn, fill_simple_delay_slots): Likewise.
13997 (fill_slots_from_thread): Likewise.
13998 * resource.c (mark_referenced_resources): Likewise.
13999 (mark_set_resources, find_dead_or_set_registers): Likewise.
14000
14001 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14002
14003 * substring-locations.h (format_warning_va): Formatting fix for
14004 ATTRIBUTE_GCC_DIAG.
14005 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14006 argument.
14007 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14008 * substring-locations.c: Include intl.h.
14009 (format_warning_va): Turned into small wrapper around
14010 format_warning_n_va, renamed to ...
14011 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14012 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14013 use ngettext.
14014 (format_warning_at_substring_n): New function.
14015 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14016 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14017 format_warning_at_substring with just a shorter name instead of
14018 const function pointer.
14019 (fmtwarn_n): New function.
14020 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14021 appropriate, get rid of all the fmtstr temporaries, move conditionals
14022 with G_() wrapped string literals directly into fmtwarn arguments,
14023 cast dir.len to (int), formatting fixes.
14024
14025 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14026
14027 * doc/invoke.texi: Remove "Cilk Plus" references.
14028
14029 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14030 Richard Biener <rguenther@suse.de>
14031
14032 PR ipa/84628
14033 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14034 for error or warning attributes if CALL_FROM_THUNK_P is set.
14035 Formatting fixes.
14036
14037 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14038
14039 PR target/56540
14040 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14041 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14042
14043 PR target/56540
14044 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14045 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14046
14047 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14048 instead of -1U in last predictors element's probability member.
14049
14050 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14051
14052 PR ipa/83983
14053 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14054 arguments if they are comparable.
14055
14056 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14057
14058 PR tree-optimization/84634
14059 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14060 masks and masked_loop_p with a single loop_masks, making sure it's
14061 null for bb vectorization.
14062
14063 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14064
14065 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14066 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14067 loop->force_vectorize to check whether there is no alias.
14068
14069 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14070
14071 PR target/84614
14072 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14073 prototypes.
14074 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14075 comments.
14076 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14077 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14078 instead of a loop around prev_real_insn.
14079 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14080 prev_real_insn.
14081
14082 PR inline-asm/84625
14083 * config/i386/i386.c (ix86_print_operand): Use conditional
14084 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14085 zero vector.
14086
14087 2018-03-02 Richard Biener <rguenther@suse.de>
14088
14089 PR tree-optimization/84427
14090 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14091 (bitmap_set_subtract_values): Rewrite to handle multiple
14092 exprs per value.
14093 (clean): Likewise.
14094 (prune_clobbered_mems): Likewise.
14095 (phi_translate): Take edge instead of pred/phiblock.
14096 (phi_translate_1): Likewise.
14097 (phi_translate_set): Likewise. Insert all translated
14098 exprs for a value into the set, keeping possibly multiple
14099 expressions per value.
14100 (compute_antic_aux): Adjust for phi_translate changes.
14101 When intersecting union the expressions and prune those
14102 not in the final value set, keeping possibly multiple
14103 expressions per value. Do not use value-insertion
14104 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14105 all expressions. Add verification that the value-sets
14106 only shrink during iteration.
14107 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14108 (do_pre_regular_insertion): Likewise.
14109 (do_pre_partial_partial_insertion): Likewise.
14110
14111 2018-03-02 Richard Biener <rguenther@suse.de>
14112
14113 PR target/82005
14114 * config/darwin.c (saved_debug_info_level): New static global.
14115 (darwin_asm_lto_start): Disable debug info generation for LTO out.
14116 (darwin_asm_lto_end): Restore debug info generation settings.
14117
14118 2018-03-01 Martin Liska <mliska@suse.cz>
14119
14120 PR sanitizer/82484
14121 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14122 volatile arguments.
14123
14124 2018-03-01 Richard Biener <rguenther@suse.de>
14125
14126 PR debug/84645
14127 * dwarf2out.c (gen_variable_die): Properly handle late VLA
14128 type annotation with LTO when debug was disabled at compile-time.
14129
14130 2018-03-01 Matthew Fortune <mfortune@gmail.com>
14131
14132 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14133 XINT with INTVAL.
14134 (mips_final_postscan_insn): Likewise.
14135
14136 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
14137
14138 PR rtl-optimization/84528
14139 * alias.c (init_alias_target): Add commentary.
14140 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14141 a unique base value if the frame pointer is not eliminated
14142 to the stack pointer.
14143
14144 2018-03-01 Tom de Vries <tom@codesourcery.com>
14145
14146 PR rtl-optimization/83327
14147 * lra-int.h (hard_regs_spilled_into): Declare.
14148 * lra.c (hard_regs_spilled_into): Define.
14149 (init_reg_info): Init hard_regs_spilled_into.
14150 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14151 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14152 (process_bb_lives): Handle hard_regs_spilled_into.
14153 (lra_create_live_ranges_1): Before doing liveness propagation, clear
14154 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14155
14156 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
14157
14158 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14159 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14160 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14161 * config/rs6000/aix72.h: New file.
14162
14163 2018-02-28 Jakub Jelinek <jakub@redhat.com>
14164
14165 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14166 instead of warning_at with conditional singular and plural messages
14167 where possible.
14168
14169 PR target/52991
14170 * stor-layout.c (update_alignment_for_field): For
14171 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14172 && !DECL_PACKED (field), do the alignment update, just use
14173 only desired_align instead of MAX (type_align, desired_align)
14174 as the alignment.
14175 (place_field): Don't do known_align < desired_align handling
14176 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14177 is non-NULL, instead do it after rli->prev_field handling and
14178 only if not within a bitfield word. For DECL_PACKED (field)
14179 use type_align of BITS_PER_UNIT.
14180
14181 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14182
14183 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14184 superfluous parentheses and trailing spaces.
14185
14186 2018-02-28 Richard Biener <rguenther@suse.de>
14187
14188 PR tree-optimization/84584
14189 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14190 SCoPs with fake exit edge.
14191
14192 2018-02-28 Martin Liska <mliska@suse.cz>
14193
14194 PR testsuite/84597
14195 * timevar.c (timer::print): Fix format to properly print 100%
14196 values.
14197
14198 2018-02-28 Richard Biener <rguenther@suse.de>
14199
14200 PR middle-end/84607
14201 * genmatch.c (capture_info::walk_match): Do not mark
14202 captured expressions without operands as expr_p given
14203 they act more like predicates and should be subject to
14204 "lost tail" side-effect preserving.
14205
14206 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14207
14208 PR rtl-optimization/81611
14209 * auto-inc-dec.c (attempt_change): Move dead note from
14210 mem_insn if it's the next use of regno
14211 (find_address): Take address use of reg holding
14212 non-incremented value. Add parm to limit search to the named
14213 reg only.
14214 (merge_in_block): Attempt to use a mem insn that is the next
14215 use of the original regno.
14216
14217 2018-02-27 Martin Sebor <msebor@redhat.com>
14218
14219 PR c++/83871
14220 * doc/invoke.texi (-Wmissing-attributes): New option.
14221 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14222
14223 2018-02-27 Martin Sebor <msebor@redhat.com>
14224
14225 PR translation/84207
14226 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14227 n argument to unsigned HOST_WIDE_INT.
14228 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14229 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14230 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14231 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14232
14233 2018-02-27 Richard Biener <rguenther@suse.de>
14234
14235 PR tree-optimization/84512
14236 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14237 Do not use the estimate returned from record_stmt_cost for
14238 the scalar iteration cost but sum properly using add_stmt_cost.
14239
14240 2018-02-27 Richard Biener <rguenther@suse.de>
14241
14242 PR tree-optimization/84466
14243 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14244 Adjust last change to less strictly validate use operands.
14245
14246 2018-02-27 Martin Liska <mliska@suse.cz>
14247
14248 PR gcov-profile/84548
14249 * gcov.c (process_file): Allow partial overlap and consider it
14250 also as group functions.
14251 (output_lines): Properly calculate range of lines for a group.
14252
14253 2018-02-27 Martin Liska <mliska@suse.cz>
14254
14255 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14256 'ggc' suffixes. Change first column width.
14257 (timer::print): Fix formatting of the column.
14258
14259 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14260
14261 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14262 preserve inline entry blocks for the sake of debug inline
14263 entry point markers alone.
14264 (remove_unused_locals): Suggest in comments a better place to
14265 force the preservation of inline entry blocks that are
14266 otherwise unused, but do not preserve them.
14267
14268 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14269
14270 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14271
14272 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14273
14274 PR target/84039
14275 * config/i386/constraints.md (Bs): Replace
14276 ix86_indirect_branch_register with
14277 TARGET_INDIRECT_BRANCH_REGISTER.
14278 (Bw): Likewise.
14279 * config/i386/i386.md (indirect_jump): Likewise.
14280 (tablejump): Likewise.
14281 (*sibcall_memory): Likewise.
14282 (*sibcall_value_memory): Likewise.
14283 Peepholes of indirect call and jump via memory: Likewise.
14284 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14285 (*sibcall_value_GOT_32): Likewise.
14286 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14287 (GOT_memory_operand): Likewise.
14288 (call_insn_operand): Likewise.
14289 (sibcall_insn_operand): Likewise.
14290 (GOT32_symbol_operand): Likewise.
14291 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14292
14293 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14294
14295 PR rtl-optimization/83496
14296 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14297 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14298 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14299 redundant insn, if any.
14300 (relax_delay_slots): Likewise.
14301 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14302
14303 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14304
14305 PR tree-optimization/83965
14306 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14307 that grouped statements are part of a reduction chain. Return
14308 true if the statement is not marked as a reduction itself but
14309 is part of a group.
14310 (vect_recog_dot_prod_pattern): Don't check whether the statement
14311 is part of a group here.
14312 (vect_recog_sad_pattern): Likewise.
14313 (vect_recog_widen_sum_pattern): Likewise.
14314
14315 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14316
14317 PR debug/84545
14318 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14319
14320 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14321
14322 PR target/84530
14323 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14324 the bool argument.
14325 (ix86_output_indirect_function_return): New prototype.
14326 (ix86_split_simple_return_pop_internal): Likewise.
14327 * config/i386/i386.c (indirect_return_via_cx): New.
14328 (indirect_return_via_cx_bnd): Likewise.
14329 (indirect_thunk_name): Handle return va CX_REG.
14330 (output_indirect_thunk_function): Create alias for
14331 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14332 (ix86_output_indirect_jmp): Remove the bool argument.
14333 (ix86_output_indirect_function_return): New function.
14334 (ix86_split_simple_return_pop_internal): Likewise.
14335 * config/i386/i386.md (*indirect_jump): Don't pass false
14336 to ix86_output_indirect_jmp.
14337 (*tablejump_1): Likewise.
14338 (simple_return_pop_internal): Change it to define_insn_and_split.
14339 Call ix86_split_simple_return_pop_internal to split it for
14340 -mfunction-return=.
14341 (simple_return_indirect_internal): Call
14342 ix86_output_indirect_function_return instead of
14343 ix86_output_indirect_jmp.
14344
14345 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14346
14347 PR bootstrap/84405
14348 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14349 memset and value initialization afterwards.
14350
14351 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14352
14353 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14354
14355 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14356
14357 PR target/84521
14358 * common/config/aarch64/aarch64-common.c
14359 (aarch_option_optimization_table[]): Switch
14360 off fomit-frame-pointer
14361
14362 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14363 Chung-Ju Wu <jasonwucj@gmail.com>
14364
14365 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14366 volatile memory.
14367 (store_multiple): Ditto.
14368
14369 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14370
14371 * config.gcc: Add --with-cpu support for nds32 target.
14372 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14373 * config/nds32/nds32.opt: Add -mcpu= option.
14374
14375 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14376
14377 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14378 isel=yes): Warn for these deprecated options.
14379
14380 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14381
14382 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14383 ISA_2_5_MASKS_EMBEDDED.
14384
14385 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14386
14387 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14388 p->max as pointers rather than using iterative_hash_expr.
14389
14390 2018-02-23 Carl Love <cel@us.ibm.com>
14391
14392 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14393 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14394 BU_P8V_OVERLOAD_2.
14395 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14396 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14397 P8V_BUILTIN_VEC_VUNSIGNED2.
14398
14399 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14400
14401 PR target/81572
14402 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14403 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14404 LRA_UNKNOWN_ALT.
14405 * lra-constraints.c (curr_insn_transform): Set up
14406 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14407 LRA_UNKNOWN_ALT.
14408 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14409 * lra-eliminations.c (spill_pseudos): Ditto.
14410 (process_insn_for_elimination): Ditto.
14411 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14412 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14413 LRA_NON_CLOBBERED_ALT.
14414
14415 2018-02-22 Martin Sebor <msebor@redhat.com>
14416
14417 PR tree-optimization/84480
14418 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14419 to maybe_diag_stxncpy_trunc. Call it.
14420 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14421 from gimple_fold_builtin_strcpy. Print inlining stack.
14422 (handle_builtin_stxncpy): Print inlining stack.
14423 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14424
14425 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14426
14427 PR target/84176
14428 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14429 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14430 and -fcheck-pointer-bounds are used together.
14431 (indirect_thunk_prefix): New enum.
14432 (indirect_thunk_need_prefix): New function.
14433 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14434 "_nt" instead of "_bnd" for NOTRACK prefix.
14435 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14436 (output_indirect_thunk_function): Likewise.
14437 (): Likewise.
14438 (ix86_code_end): Update output_indirect_thunk_function calls.
14439 (ix86_output_indirect_branch_via_reg): Replace
14440 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14441 (ix86_output_indirect_branch_via_push): Likewise.
14442 (ix86_output_function_return): Likewise.
14443 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14444 incompatible with -fcf-protection=branch and
14445 -fcheck-pointer-bounds.
14446
14447 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14448
14449 PR target/83335
14450 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14451 Change gcc_assert call to output_operand_lossage.
14452
14453 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14454
14455 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14456
14457 2018-02-22 DJ Delorie <dj@redhat.com>
14458 Sebastian Perta <sebastian.perta@renesas.com>
14459 Oleg Endo <olegendo@gcc.gnu.org>
14460
14461 * config/rx/rx.c (rx_rtx_costs): New function.
14462 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14463
14464 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14465
14466 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14467
14468 2018-02-22 Martin Liska <mliska@suse.cz>
14469
14470 PR driver/83193
14471 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14472 Add "native" as a possible value.
14473
14474 2018-02-22 Martin Liska <mliska@suse.cz>
14475
14476 PR driver/83193
14477 * config/i386/i386.c (ix86_option_override_internal):
14478 Add "native" as a possible value for -march and -mtune.
14479
14480 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14481
14482 PR target/84502
14483 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14484 to all type variants.
14485
14486 PR tree-optimization/84503
14487 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14488 width as info->bitpos + info->bitsize - start.
14489 (merged_store_group::merge_overlapping): Simplify width computation.
14490 (check_no_overlap): New function.
14491 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14492 start + width and last_order of the group, fail if check_no_overlap
14493 fails.
14494 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14495 to group if check_no_overlap fails.
14496
14497 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14498
14499 * config/rs6000/altivec.md: Delete contraint arguments to
14500 define_expand, define_split, and define_peephole2, and in
14501 define_insn_and_split if always unused.
14502 * config/rs6000/darwin.md: Ditto.
14503 * config/rs6000/dfp.md: Ditto.
14504 * config/rs6000/rs6000.md: Ditto.
14505 * config/rs6000/sync.md: Ditto.
14506 * config/rs6000/vector.md: Ditto.
14507 * config/rs6000/vsx.md: Ditto.
14508
14509 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14510
14511 * config/rs6000/altivec.md: Write output control strings as braced
14512 blocks instead of double-quoted strings.
14513 * config/rs6000/darwin.md: Ditto.
14514 * config/rs6000/rs6000.md: Ditto.
14515 * config/rs6000/vector.md: Ditto.
14516 * config/rs6000/vsx.md: Ditto.
14517
14518 2018-02-21 Jason Merrill <jason@redhat.com>
14519
14520 PR c++/84314 - ICE with templates and fastcall attribute.
14521 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14522
14523 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14524
14525 * ipa-cp.c (determine_versionability): Fix comment typos.
14526
14527 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14528
14529 PR c/84229
14530 * ipa-cp.c (determine_versionability): Do not version functions caling
14531 va_arg_pack.
14532
14533 2018-02-21 Martin Liska <mliska@suse.cz>
14534
14535 PR driver/83193
14536 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14537 Add "native" as a possible value.
14538 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14539 the macro when native cpu detection is available.
14540
14541 2018-02-21 Martin Liska <mliska@suse.cz>
14542
14543 PR driver/83193
14544 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14545 Add "native" as a possible value.
14546 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14547 when native cpu detection is available.
14548
14549 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14550 Martin Sebor <msebor@redhat.com>
14551
14552 PR tree-optimization/84478
14553 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14554 false.
14555 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14556 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14557 support which is conservatively correct, for 2 only stay conservative
14558 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14559 argument to the 2 argument get_range_strlen, adjust 6 arg
14560 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14561 false.
14562 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14563 (gimple_fold_builtin_strlen): Pass true as last argument to
14564 get_range_strlen.
14565
14566 2018-02-20 Martin Sebor <msebor@redhat.com>
14567
14568 PR middle-end/84095
14569 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14570 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14571 (builtin_memref::builtin_memref): Factor out parts into
14572 set_base_and_offset and call it.
14573
14574 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14575
14576 PR middle-end/84406
14577 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14578 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14579 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14580 search at the associated MODE_INT.
14581
14582 2018-02-20 Jeff Law <law@redhat.com>
14583
14584 PR middle-end/82123
14585 PR tree-optimization/81592
14586 PR middle-end/79257
14587 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14588 for range data rather than using global data.
14589 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14590 range data rather than using global data.
14591 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14592 pass it to children as needed.
14593 (struct directive::fmtresult): Similarly.
14594 (struct directive::set_width): Similarly.
14595 (struct directive::set_precision): Similarly.
14596 (format_integer, format_directive, parse_directive): Similarly.
14597 (format_none): Accept unnamed vr_values parameter.
14598 (format_percent, format_floating, format_character): Similarly.
14599 (format_string, format_plain): Similarly.
14600 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14601 the EVRP range analyzer for range data rather than using global data.
14602 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14603 gimple-ssa-evrp-analyze.h
14604 (class sprintf_dom_walker): Add after_dom_children member function.
14605 Add evrp_range_analyzer member.
14606 (sprintf_dom_walker::before_dom_children): Call into the EVRP
14607 range analyzer as needed.
14608 (sprintf_dom_walker::after_dom_children): New member function.
14609 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14610 if not optimizing.
14611 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14612 (evrp_range_analyzer::pop_to_marker): Likewise.
14613
14614 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14615
14616 PR tree-optimization/84419
14617 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14618 with the required type if its current type is compatible but
14619 different.
14620
14621 2018-02-20 Jakub Jelinek <jakub@redhat.com>
14622
14623 PR middle-end/82004
14624 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14625 after vectorization.
14626
14627 2018-02-20 Martin Liska <mliska@suse.cz>
14628
14629 PR driver/83193
14630 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14631 possible values if we don't have a hint.
14632
14633 2018-02-20 Martin Liska <mliska@suse.cz>
14634
14635 PR c/84310
14636 PR target/79747
14637 * final.c (shorten_branches): Build align_tab array with one
14638 more element.
14639 * opts.c (finish_options): Add alignment option limit check.
14640 (MAX_CODE_ALIGN): Likewise.
14641 (MAX_CODE_ALIGN_VALUE): Likewise.
14642 * doc/invoke.texi: Document maximum allowed option value for
14643 all -falign-* options.
14644
14645 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14646
14647 PR target/84146
14648 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14649 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14650 * var-tracking.c (emit_note_insn_var_location): Remove all references
14651 to NOTE_INSN_CALL_ARG_LOCATION.
14652 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14653 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14654 Use copy_rtx_if_shared.
14655 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14656 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14657 (dwarf2out_var_location): Remove handling of
14658 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14659 on call_insn.
14660 * final.c (final_scan_insn): Remove all references to
14661 NOTE_INSN_CALL_ARG_LOCATION.
14662 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14663 before dumping final insns.
14664 * except.c (emit_note_eh_region_end): Remove all references to
14665 NOTE_INSN_CALL_ARG_LOCATION.
14666 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14667 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14668 * config/arc/arc.c (hwloop_optimize): Likewise.
14669 * config/arm/arm.c (create_fix_barrier): Likewise.
14670 * config/s390/s390.c (s390_chunkify_start): Likewise.
14671 * config/sh/sh.c (find_barrier): Likewise.
14672 * config/i386/i386.c (rest_of_insert_endbranch,
14673 ix86_seh_fixup_eh_fallthru): Likewise.
14674 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14675 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14676 * config/frv/frv.c (frv_function_prologue): Likewise.
14677 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14678 reg note.
14679 (note_outside_basic_block_p): Remove all references to
14680 NOTE_INSN_CALL_ARG_LOCATION.
14681 * gengtype.c (adjust_field_rtx_def): Likewise.
14682 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14683 Likewise.
14684 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14685 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14686
14687 PR c++/84444
14688 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14689 is ADDR_EXPR.
14690
14691 PR tree-optimization/84452
14692 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14693 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14694 is NULL.
14695
14696 2018-02-19 Martin Liska <mliska@suse.cz>
14697
14698 PR sanitizer/82183
14699 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14700
14701 2018-02-19 Martin Liska <mliska@suse.cz>
14702 Richard Sandiford <richard.sandiford@linaro.org>
14703
14704 PR tree-optimization/82491
14705 * gimple-fold.c (get_base_constructor): Make earlier bail out
14706 to prevent ubsan.
14707
14708 2018-02-19 Carl Love <cel@us.ibm.com>
14709
14710 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14711 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14712 BU_P8V_OVERLOAD_1.
14713 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14714 P8V_BUILTIN_VEC_NEG.
14715
14716 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
14717
14718 * config/rl78/rl78.md (movdf): New define expand.
14719
14720 2018-02-19 Martin Liska <mliska@suse.cz>
14721
14722 PR other/80589
14723 * doc/invoke.texi: Fix typo.
14724 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14725
14726 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
14727
14728 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14729 handle rs6000_single_float and rs6000_double_float specially for
14730 e500 family CPUs.
14731
14732 2018-02-16 Jeff Law <law@redhat.com>
14733
14734 * config/rx/rx.c (add_pop_cfi_notes): New function.;
14735 (pop_regs): Use it.
14736
14737 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14738
14739 PR ipa/84425
14740 * ipa-inline.c (inline_small_functions): Fix a typo.
14741
14742 2018-02-16 Nathan Sidwell <nathan@acm.org>
14743
14744 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14745
14746 2018-02-16 Carl Love <cel@us.ibm.com>
14747
14748 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14749 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14750 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14751 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14752 expansion to P8V_BUILTIN_VEC_FLOAT2.
14753
14754 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
14755
14756 PR rtl-optimization/70023
14757 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14758 src_regno into account.
14759
14760 2018-02-16 Carl Love <cel@us.ibm.com>
14761
14762 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14763 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14764 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14765 * config/rs6000/rs6000.c: Remove case statements for
14766 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14767 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14768 and P9V_BUILTIN_VEC_VINSERT4B.
14769 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14770 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14771 * config/rs6000/vsx.md:
14772 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14773 vec_insert4b.
14774
14775 2018-02-16 Carl Love <cel@us.ibm.com>
14776
14777 * config/rs6000/altivec.h: Add builtin names vec_extract4b
14778 vec_insert4b.
14779 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14780 definitions.
14781 * config/rs6000/rs6000-c.c: Add the definitions for
14782 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14783 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14784 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14785 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
14786 definition for insert4b and define insn *insert3b_internal.
14787 * doc/extend.texi: Add documentation for vec_extract4b.
14788
14789 2018-02-16 Nathan Sidwell <nathan@acm.org>
14790
14791 * doc/extend.texi (Backwards Compatibility): Mention friend
14792 injection. Note for-scope is deprecated.
14793 * doc/invoke.texi (-ffriend-injection): Deprecate.
14794
14795 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14796
14797 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14798 that moved to I2, also allow destinations that are a paradoxical
14799 subreg (instead of a normal reg).
14800
14801 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14802
14803 PR target/83831
14804 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14805 to QImode.
14806
14807 2018-02-16 Richard Biener <rguenther@suse.de>
14808
14809 PR tree-optimization/84037
14810 PR tree-optimization/84016
14811 PR target/82862
14812 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14813 Adjust vec_construct for the fact we need additional higher latency
14814 128bit inserts for AVX256 and AVX512 vector builds.
14815 (ix86_add_stmt_cost): Scale vector construction cost for
14816 elementwise loads.
14817
14818 2018-02-16 Richard Biener <rguenther@suse.de>
14819
14820 PR tree-optimization/84417
14821 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14822 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14823 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14824
14825 2018-02-16 Martin Liska <mliska@suse.cz>
14826
14827 PR sanitizer/84307
14828 * internal-fn.def (ASAN_CHECK): Set proper flags.
14829 (ASAN_MARK): Likewise.
14830
14831 2018-02-16 Julia Koval <julia.koval@intel.com>
14832
14833 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14834 from PTA_CANNONLAKE.
14835
14836 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14837
14838 PR target/84272
14839 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14840 Use ++iter rather than iter++ for std::list iterators.
14841 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14842 defer deleting them until all nodes in the forest are processed. Do
14843 free even leaf nodes. Change to_process into auto_vec.
14844
14845 PR bootstrap/84405
14846 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14847 * vec.h (vec_default_construct): Use memset instead of placement new
14848 if BROKEN_VALUE_INITIALIZATION is defined.
14849 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14850 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14851 is defined.
14852
14853 PR rtl-optimization/83723
14854 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14855 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14856 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14857 recursive calls.
14858 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14859 callers.
14860 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14861
14862 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14863
14864 PR rtl-optimization/81443
14865 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14866 from inner REGs to paradoxical SUBREGs.
14867
14868 2018-02-16 Richard Biener <rguenther@suse.de>
14869
14870 PR tree-optimization/84399
14871 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14872 For operands we can analyze at their definition make sure we can
14873 analyze them at each use as well.
14874
14875 2018-02-16 Richard Biener <rguenther@suse.de>
14876
14877 PR tree-optimization/84190
14878 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14879 volatile accesses if the decl isn't volatile.
14880
14881 2018-02-15 Jason Merrill <jason@redhat.com>
14882
14883 PR c++/84314 - ICE with templates and fastcall attribute.
14884 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14885 TYPE_CANONICAL on an existing type.
14886
14887 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14888
14889 PR tree-optimization/84383
14890 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14891 dstoff nor call operand_equal_p if dstbase is NULL.
14892
14893 PR tree-optimization/84334
14894 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14895 also a CONSTANT_CLASS_P, punt.
14896
14897 2018-02-14 Jim Wilson <jimw@sifive.com>
14898
14899 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14900 first SMALL_OPERAND check. New local min_second_step. Move assert
14901 to where locals are set. Add TARGET_RVC support.
14902 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14903
14904 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14905
14906 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14907
14908 2018-02-14 Martin Sebor <msebor@redhat.com>
14909
14910 PR tree-optimization/83698
14911 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14912 arrays constrain the offset range to their bounds.
14913 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14914 (builtin_access::overlap): Avoid setting the size of overlap if it's
14915 already been set.
14916 (maybe_diag_overlap): Also consider arrays when deciding what values
14917 of offsets to include in diagnostics.
14918
14919 2018-02-14 Martin Sebor <msebor@redhat.com>
14920
14921 PR c/84108
14922 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14923 that correspond to the kind of a declaration.
14924
14925 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
14926
14927 PR target/83984
14928 * config/pa/pa.md: Load address of PIC label using the linkage table
14929 if the label is nonlocal.
14930
14931 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
14932
14933 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14934 warning message if user requests -maltivec=be.
14935 * doc/invoke.texi: Document deprecation of -maltivec=be.
14936
14937 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
14938
14939 PR target/84220
14940 * config/rs6000/rs6000-c.c: Update definitions for
14941 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14942 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14943
14944 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14945
14946 PR target/84239
14947 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14948 add _get_ssp intrinsics. Remove argument from
14949 __builtin_ia32_rdssp[d|q].
14950 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14951 * config/i386/i386-builtin.def: Remove argument from
14952 __builtin_ia32_rdssp[d|q].
14953 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14954 ix86_expand_special_args_builtin for _rdssp[d|q].
14955 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14956 Clear register before usage.
14957 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14958 Add documentation for new _get_ssp and _inc_ssp intrinsics.
14959
14960 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
14961
14962 PR tree-optimization/84357
14963 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14964 operand 1 of an ARRAY_REF too.
14965
14966 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
14967
14968 PR target/83831
14969 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14970 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14971 declarations.
14972 (set_of_reg): New struct.
14973 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14974 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14975 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14976 functions.
14977 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14978 Split into bitclr, bitset, bitinvert patterns if appropriate.
14979 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14980 use rx_fuse_in_memory_bitop.
14981 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14982 to named insn, correct maximum insn length.
14983
14984 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
14985
14986 PR target/79242
14987 * machmode.def: Define a complex mode for PARTIAL_INT.
14988 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14989 MODE_PARTIAL_INT.
14990 * doc/rtl.texi: Document CSPImode.
14991 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14992 handling.
14993 (msp430_hard_regno_nregs_with_padding): Likewise.
14994
14995 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
14996
14997 PR target/84279
14998 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14999
15000 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15001
15002 PR rtl-optimization/84169
15003 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15004 we generated a parallel as new i3 and we split that to new i2 and i3
15005 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15006 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15007 those to i2, not i1. Partially rewrite this scan code.
15008
15009 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15010
15011 PR c/82210
15012 * stor-layout.c (place_field): For variable length fields, adjust
15013 offset_align afterwards not just based on the field's alignment,
15014 but also on the size.
15015
15016 PR middle-end/84309
15017 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15018 of exps and logs in the use_exp2 case.
15019
15020 2018-02-13 Jeff Law <law@redhat.com>
15021
15022 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15023 entry for "vector".
15024
15025 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15026 ARGS as unused.
15027
15028 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15029
15030 PR debug/84342
15031 PR debug/84319
15032 * common.opt (gas-loc-support, gas-locview-support): New.
15033 (ginline-points, ginternal-reset-location-views): New.
15034 * doc/invoke.texi: Document them. Use @itemx where intended.
15035 (gvariable-location-views): Adjust.
15036 * target.def (reset_location_view): New.
15037 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15038 (TARGET_RESET_LOCATION_VIEW): New.
15039 * doc/tm.texi: Rebuilt.
15040 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15041 (dwarf2out_default_as_locview_support): New.
15042 (output_asm_line_debug_info): Use option variables.
15043 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15044 (output_loc_list): Likewise.
15045 (add_high_low_attributes): Check option variables.
15046 Don't output entry view attribute in strict mode.
15047 (gen_inlined_subroutine_die): Check option variables.
15048 (dwarf2out_inline_entry): Likewise.
15049 (init_sections_and_labels): Likewise.
15050 (dwarf2out_early_finish): Likewise.
15051 (maybe_reset_location_view): New, from...
15052 (dwarf2out_var_location): ... here. Call it.
15053 * debug.h (dwarf2out_default_as_loc_support): Declare.
15054 (dwarf2out_default_as_locview_support): Declare.
15055 * hooks.c (hook_int_rtx_insn_0): New.
15056 * hooks.h (hook_int_rtx_insn_0): Declare.
15057 * toplev.c (process_options): Take -gas-loc-support and
15058 -gas-locview-support from dwarf2out. Enable
15059 -gvariable-location-views by default only with locview
15060 assembler support. Enable -ginternal-reset-location-views by
15061 default only if the target defines the corresponding hook.
15062 Enable -ginline-points by default if location views are
15063 enabled; force it disabled if statement frontiers are
15064 disabled.
15065 * tree-inline.c (expand_call_inline): Check option variables.
15066 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15067
15068 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15069
15070 PR tree-optimization/84321
15071 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15072 handling. Also check whether the anti-range contains any values
15073 that satisfy the mask; switch to a VR_RANGE if not.
15074
15075 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15076
15077 PR sanitizer/84340
15078 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15079
15080 2018-02-13 Martin Jambor <mjambor@suse.cz>
15081
15082 PR c++/83990
15083 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15084 of call statements, also set location of a load to a temporary.
15085
15086 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15087
15088 * config/rl78/rl78.c (add_vector_labels): New function.
15089 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15090 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15091 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15092 which checks that no arguments are passed.
15093 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15094 * doc/extend.texi: Documentation for the new attribute.
15095
15096 2018-02-13 Andreas Schwab <schwab@suse.de>
15097
15098 * config/riscv/linux.h (CPP_SPEC): Define.
15099
15100 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15101
15102 PR target/84335
15103 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15104 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15105 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15106 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15107 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15108 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15109 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15110 temporarily for AES and PCLMUL builtins.
15111
15112 PR tree-optimization/84339
15113 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15114 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15115 Formatting fixes.
15116
15117 PR middle-end/84309
15118 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15119 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15120 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15121 inline function.
15122 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15123 inline function.
15124 * omp-simd-clone.h: New file.
15125 * omp-simd-clone.c: Include omp-simd-clone.h.
15126 (expand_simd_clones): No longer static.
15127 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15128 cgraph.h and omp-simd-clone.h.
15129 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15130 (vect_recog_widen_shift_pattern): Formatting fix.
15131 (vect_pattern_recog_1): Don't check optab for calls.
15132
15133 PR target/84336
15134 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15135 operands[2] into a REG before using gen_lowpart on it.
15136
15137 2018-02-12 Jeff Law <law@redhat.com>
15138
15139 PR target/83760
15140 * config/sh/sh.c (find_barrier): Consider a sibling call
15141 a barrier as well.
15142
15143 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15144 successfully back substituting a reg.
15145
15146 2018-02-12 Richard Biener <rguenther@suse.de>
15147
15148 PR tree-optimization/84037
15149 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15150 parameter, move visited init to caller.
15151 (vect_slp_analyze_operations): Separate cost from validity
15152 check, initialize visited once for all instances.
15153 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15154 for all instances.
15155 * tree-vect-stmts.c (vect_model_simple_cost): Make early
15156 out an assert.
15157 (vect_model_promotion_demotion_cost): Likewise.
15158 (vectorizable_bswap): Guard cost modeling with !slp_node
15159 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15160 SLP stmts.
15161 (vectorizable_call): Likewise.
15162 (vectorizable_conversion): Likewise.
15163 (vectorizable_assignment): Likewise.
15164 (vectorizable_shift): Likewise.
15165 (vectorizable_operation): Likewise.
15166 (vectorizable_store): Likewise.
15167 (vectorizable_load): Likewise.
15168 (vectorizable_condition): Likewise.
15169 (vectorizable_comparison): Likewise.
15170
15171 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
15172
15173 PR sanitizer/84307
15174 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15175 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15176 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15177
15178 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15179
15180 PR middle-end/83665
15181 * params.def (inline-min-speedup): Increase from 8 to 15.
15182 (max-inline-insns-auto): Decrease from 40 to 30.
15183 * ipa-split.c (consider_split): Add some buffer for function to
15184 be considered inlining candidate.
15185 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15186 default values.
15187
15188 2018-02-12 Richard Biener <rguenther@suse.de>
15189
15190 PR tree-optimization/84037
15191 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15192 matched stmts if we cannot swap the non-matched ones.
15193
15194 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15195
15196 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15197 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15198 _mm_maskz_scalef_round_ss): New intrinsics.
15199 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15200 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15201 __builtin_ia32_scalefss_round): Remove.
15202 (__builtin_ia32_scalefsd_mask_round,
15203 __builtin_ia32_scalefss_mask_round): New intrinsics.
15204 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15205 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15206 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15207 "<round_constraint>")): Changed to ...
15208 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15209 "<round_scalar_constraint>")): ... this.
15210 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15211 %0, %1, %2<round_op3>}"): Changed to ...
15212 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15213 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15214 %2<round_scalar_mask_op3>}"): ... this.
15215 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15216
15217 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15218
15219 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15220 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15221 (_mm_maskz_sqrt_round_ss): New intrinsics.
15222 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15223 (__builtin_ia32_sqrtsd_mask_round)
15224 (__builtin_ia32_sqrtss_mask_round): New builtins.
15225 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15226 (__builtin_ia32_sqrtss_round): Remove.
15227 (__builtin_ia32_sqrtsd_mask_round)
15228 (__builtin_ia32_sqrtss_mask_round): New builtins.
15229 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15230 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15231 ((match_operand:VF_128 1 "vector_operand"
15232 "xBm,<round_constraint>")): Changed to ...
15233 ((match_operand:VF_128 1 "vector_operand"
15234 "xBm,<round_scalar_constraint>")): ... this.
15235 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15236 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15237 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15238 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15239 %<iptr>1<round_scalar_mask_op3>}): ... this.
15240 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15241 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15242
15243 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15244
15245 PR target/84266
15246 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15247 Cast vec_cmpeq result to correct type.
15248 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15249 Cast vec_cmpgt result to correct type.
15250
15251 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15252
15253 * final.c (final_scan_insn_1): Renamed from...
15254 (final_scan_insn): ... this. New wrapper, to recover
15255 seen from the outermost call in recursive ones.
15256 * config/sparc/sparc.c (output_return): Drop seen from call.
15257 (output_sibcall): Likewise.
15258 * config/visium/visium.c (output_branch): Likewise.
15259
15260 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15261
15262 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15263 function label.
15264
15265 2018-02-10 Alan Modra <amodra@gmail.com>
15266
15267 PR target/84300
15268 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15269 Specify LR as an input.
15270
15271 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15272
15273 PR sanitizer/83987
15274 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15275 remove_member_access_dummy_vars): New functions.
15276 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15277 lower_omp_1, execute_lower_omp): Use them.
15278
15279 PR rtl-optimization/84308
15280 * shrink-wrap.c (spread_components): Release todo vector.
15281
15282 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15283
15284 PR rtl-optimization/57193
15285 * ira-color.c (struct allocno_color_data): Add member
15286 conflict_allocno_hard_prefs.
15287 (update_conflict_allocno_hard_prefs): New.
15288 (bucket_allocno_compare_func): Add a preference based on
15289 conflict_allocno_hard_prefs.
15290 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15291 (color_allocnos): Remove a dead code. Initiate
15292 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15293
15294 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15295
15296 PR target/84226
15297 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15298 constraint from =wa to wa. Avoid a subreg on the output operand,
15299 instead use a pseudo and subreg it in a move.
15300 (p9_xxbrd_<mode>): Changed to ...
15301 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15302 (p9_xxbrd_v2df): New expander.
15303 (p9_xxbrw_<mode>): Changed to ...
15304 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15305 (p9_xxbrw_v4sf): New expander.
15306
15307 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15308
15309 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15310
15311 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15312
15313 PR target/83926
15314 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15315 multiply in 32-bit mode.
15316 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15317 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15318 mode.
15319
15320 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15321
15322 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15323 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15324 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15325 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15326
15327 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15328
15329 PR lto/84213
15330 * dwarf2out.c (is_trivial_indirect_ref): New function.
15331 (dwarf2out_late_global_decl): Do not generate a location
15332 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15333 and that are not defined in the current unit.
15334
15335 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15336
15337 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15338 instead of a libcall for UNORDERED.
15339
15340 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15341
15342 PR target/82641
15343 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15344 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15345
15346 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15347
15348 PR target/PR84295
15349 * config/s390/s390.c (s390_set_current_function): Invoke
15350 s390_indirect_branch_settings also if fndecl didn't change.
15351
15352 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15353
15354 * config/rs6000/rs6000.md (blockage): Set length to zero.
15355
15356 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15357
15358 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15359
15360 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15361
15362 PR sanitizer/84285
15363 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15364 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15365 -static-lib*san.
15366
15367 PR debug/84252
15368 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15369 PARALLEL incoming that failed vt_get_decl_and_offset check.
15370
15371 PR middle-end/84237
15372 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15373 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15374 TREE_READONLY bit.
15375 (get_variable_section): For decls in named .bss* sections pass true as
15376 second argument to bss_initializer_p.
15377
15378 2018-02-09 Marek Polacek <polacek@redhat.com>
15379 Jakub Jelinek <jakub@redhat.com>
15380
15381 PR c++/83659
15382 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15383 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15384 Sync some changes from cxx_fold_indirect_ref.
15385
15386 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15387
15388 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15389 markers.
15390 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15391 (BLOCK_INLINE_ENTRY_LABEL): New.
15392 (dwarf2out_var_location): Disregard inline entry markers.
15393 (inline_entry_data): New struct.
15394 (inline_entry_data_hasher): New hashtable type.
15395 (inline_entry_data_hasher::hash): New.
15396 (inline_entry_data_hasher::equal): New.
15397 (inline_entry_data_table): New variable.
15398 (add_high_low_attributes): Add DW_AT_entry_pc and
15399 DW_AT_GNU_entry_view attributes if a pending entry is found
15400 in inline_entry_data_table. Add old entry_pc attribute only
15401 if debug nonbinding markers are disabled.
15402 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15403 markers are enabled.
15404 (block_within_block_p, dwarf2out_inline_entry): New.
15405 (dwarf2out_finish): Check that no entries remained in
15406 inline_entry_data_table.
15407 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15408 (final_scan_insn, notice_source_line): Likewise.
15409 (rest_of_clean_state): Skip inline entry markers.
15410 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15411 markers.
15412 * gimple.c (gimple_build_debug_inline_entry): New.
15413 * gimple.h (enum gimple_debug_subcode): Add
15414 GIMPLE_DEBUG_INLINE_ENTRY.
15415 (gimple_build_debug_inline_entry): Declare.
15416 (gimple_debug_inline_entry_p): New.
15417 (gimple_debug_nonbind_marker_p): Adjust.
15418 * insn-notes.def (INLINE_ENTRY): New.
15419 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15420 inline entry marker notes.
15421 (print_insn): Likewise.
15422 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15423 (INSN_DEBUG_MARKER_KIND): Likewise.
15424 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15425 * tree-inline.c (expand_call_inline): Build and insert
15426 debug_inline_entry stmt.
15427 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15428 inline entry blocks early, if nonbind markers are enabled.
15429 (dump_scope_block): Dump fragment info.
15430 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15431 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15432 (gimple_build_debug_inline_entry): New.
15433 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15434 Enable/disable inline entry points too.
15435 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15436 (DEBUG_INSN): Describe inline entry markers.
15437
15438 * common.opt (gvariable-location-views): New.
15439 (gvariable-location-views=incompat5): New.
15440 * config.in: Rebuilt.
15441 * configure: Rebuilt.
15442 * configure.ac: Test assembler for view support.
15443 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15444 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15445 * dwarf2out.c (var_loc_view): New typedef.
15446 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15447 (dwarf2out_locviews_in_attribute): New.
15448 (dwarf2out_locviews_in_loclist): New.
15449 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15450 (enum dw_line_info_opcode): Add LI_adv_address.
15451 (struct dw_line_info_table): Add view.
15452 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15453 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15454 (zero_view_p): New variable.
15455 (ZERO_VIEW_P): New macro.
15456 (output_asm_line_debug_info): New.
15457 (struct var_loc_node): Add view.
15458 (add_AT_view_list, AT_loc_list): New.
15459 (add_var_loc_to_decl): Add view param. Test it against last.
15460 (new_loc_list): Add view params. Record them.
15461 (AT_loc_list_ptr): Handle loc and view lists.
15462 (view_list_to_loc_list_val_node): New.
15463 (print_dw_val): Handle dw_val_class_view_list.
15464 (size_of_die): Likewise.
15465 (value_format): Likewise.
15466 (loc_list_has_views): New.
15467 (gen_llsym): Set vl_symbol too.
15468 (maybe_gen_llsym, skip_loc_list_entry): New.
15469 (dwarf2out_maybe_output_loclist_view_pair): New.
15470 (output_loc_list): Output view list or entries too.
15471 (output_view_list_offset): New.
15472 (output_die): Handle dw_val_class_view_list.
15473 (output_dwarf_version): New.
15474 (output_compilation_unit_header): Use it.
15475 (output_skeleton_debug_sections): Likewise.
15476 (output_rnglists, output_line_info): Likewise.
15477 (output_pubnames, output_aranges): Update version comments.
15478 (output_one_line_info_table): Output view numbers in asm comments.
15479 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15480 Call maybe_gen_llsym.
15481 (loc_list_from_tree_1): Adjust.
15482 (add_AT_location_description): Create view list attribute if
15483 needed, check it's absent otherwise.
15484 (convert_cfa_to_fb_loc_list): Adjust.
15485 (maybe_emit_file): Call output_asm_line_debug_info for test.
15486 (dwarf2out_var_location): Reset views as needed. Precompute
15487 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15488 attribute. Set view.
15489 (new_line_info_table): Reset next view.
15490 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15491 (dwarf2out_source_line): Likewise. Output view resets and labels to
15492 the assembler, or select appropriate line info opcodes.
15493 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15494 (optimize_string_length): Catch it. Adjust.
15495 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15496 dw_val_class_view_list, and remove it if no longer needed.
15497 (hash_loc_list): Hash view numbers.
15498 (loc_list_hasher::equal): Compare them.
15499 (optimize_location_lists): Check whether a view list symbol is
15500 needed, and whether the locview attribute is present, and
15501 whether they match. Remove the locview attribute if no longer
15502 needed.
15503 (index_location_lists): Call skip_loc_list_entry for test.
15504 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15505 Use output_dwarf_version.
15506 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15507 (struct dw_val_node): Add val_view_list.
15508 * final.c (SEEN_NEXT_VIEW): New.
15509 (set_next_view_needed): New.
15510 (clear_next_view_needed): New.
15511 (maybe_output_next_view): New.
15512 (final_start_function): Rename to...
15513 (final_start_function_1): ... this. Take pointer to FIRST,
15514 add SEEN parameter. Emit param bindings in the initial view.
15515 (final_start_function): Reintroduce SEEN-less interface.
15516 (final): Rename to...
15517 (final_1): ... this. Take SEEN parameter. Output final pending
15518 next view at the end.
15519 (final): Reintroduce seen-less interface.
15520 (final_scan_insn): Output pending next view before switching
15521 sections or ending a block. Mark the next view as needed when
15522 outputting variable locations. Notify debug backend of section
15523 changes, and of location view changes.
15524 (rest_of_handle_final): Adjust.
15525 * toplev.c (process_options): Autodetect value for debug variable
15526 location views option. Warn on incompat5 without -gdwarf-5.
15527 * doc/invoke.texi (gvariable-location-views): New.
15528 (gvariable-location-views=incompat5): New.
15529 (gno-variable-location-views): New.
15530
15531 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15532
15533 PR tree-optimization/84136
15534 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15535 that the result of find_edge is non-NULL.
15536
15537 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15538
15539 PR target/83008
15540 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15541 storing integer register in SImode. Fix cost of 256 and 512
15542 byte aligned SSE register store.
15543
15544 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15545
15546 * config/i386/i386.c (ix86_multiplication_cost): Fix
15547 multiplication cost for TARGET_AVX512DQ.
15548
15549 2018-02-08 Marek Polacek <polacek@redhat.com>
15550
15551 PR tree-optimization/84238
15552 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15553 get_range_strlen.
15554
15555 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15556
15557 PR tree-optimization/84265
15558 * tree-vect-stmts.c (vectorizable_store): Don't treat
15559 VMAT_CONTIGUOUS accesses as grouped.
15560 (vectorizable_load): Likewise.
15561
15562 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15563
15564 PR tree-optimization/81635
15565 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15566 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15567 (test_round_for_mask): New functions.
15568 (wide_int_cc_tests): Call test_round_for_mask.
15569 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15570 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15571 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15572 range returned by get_range_info.
15573
15574 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15575
15576 PR ipa/81360
15577 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15578 * symtab.c: Include builtins.h
15579 (symtab_node::output_to_lto_symbol_table_p): Move here
15580 from lto-streamer-out.c:output_symbol_p.
15581 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15582 (output_symbol_p): Move all logic to symtab.c
15583 (produce_symtab): Update.
15584
15585 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15586
15587 * config/s390/s390-opts.h (enum indirect_branch): Define.
15588 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15589 (s390_indirect_branch_via_thunk)
15590 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15591 (enum s390_indirect_branch_type): Define.
15592 * config/s390/s390.c (struct s390_frame_layout, struct
15593 machine_function): Remove.
15594 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15595 (indirect_branch_table_label_no, indirect_branch_table_name):
15596 Define variables.
15597 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15598 (enum s390_indirect_branch_option): Define.
15599 (s390_return_addr_from_memory): New function.
15600 (s390_handle_string_attribute): New function.
15601 (s390_attribute_table): Add new attribute handler.
15602 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15603 (s390_indirect_branch_via_thunk): New function.
15604 (s390_indirect_branch_via_inline_thunk): New function.
15605 (s390_function_ok_for_sibcall): When jumping via thunk disallow
15606 sibling call optimization for non z10 compiles.
15607 (s390_emit_call): Force indirect branch target to be a single
15608 register. Add r1 clobber for non-z10 compiles.
15609 (s390_emit_epilogue): Emit return jump via return_use expander.
15610 (s390_reorg): Handle JUMP_INSNs as execute targets.
15611 (s390_option_override_internal): Perform validity checks for the
15612 new command line options.
15613 (s390_indirect_branch_attrvalue): New function.
15614 (s390_indirect_branch_settings): New function.
15615 (s390_set_current_function): Invoke s390_indirect_branch_settings.
15616 (s390_output_indirect_thunk_function): New function.
15617 (s390_code_end): Implement target hook.
15618 (s390_case_values_threshold): Implement target hook.
15619 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15620 macros.
15621 * config/s390/s390.h (struct s390_frame_layout)
15622 (struct machine_function): Move here from s390.c.
15623 (TARGET_INDIRECT_BRANCH_NOBP_RET)
15624 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15625 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15626 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15627 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15628 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15629 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15630 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15631 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15632 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15633 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15634 (mnemonic attribute): Add values which aren't recognized
15635 automatically.
15636 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15637 pattern for branch conversion. Fix mnemonic attribute.
15638 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15639 indirect branch via thunk if requested.
15640 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15641 ("*indirect_jump"): Disable for branch conversion using out of
15642 line thunks.
15643 ("indirect_jump_via_thunk<mode>_z10")
15644 ("indirect_jump_via_thunk<mode>")
15645 ("indirect_jump_via_inlinethunk<mode>_z10")
15646 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15647 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15648 ("casesi_jump_via_inlinethunk<mode>_z10")
15649 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15650 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15651 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15652 ("*indirect2_jump"): Disable for branch conversion.
15653 ("casesi_jump"): Turn into expander and expand patterns for branch
15654 conversion.
15655 ("return_use"): New expander.
15656 ("*return"): Emit return via thunk and rename it to ...
15657 ("*return<mode>"): ... this one.
15658 * config/s390/s390.opt: Add new options and and enum for the
15659 option values.
15660
15661 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15662
15663 * lra-constraints.c (match_reload): Unconditionally use
15664 gen_lowpart_SUBREG, rather than selecting between that
15665 and equivalent gen_rtx_SUBREG code.
15666
15667 2018-02-08 Richard Biener <rguenther@suse.de>
15668
15669 PR tree-optimization/84233
15670 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15671 changed flag instead of boguously re-using phi_inserted.
15672
15673 2018-02-08 Martin Jambor <mjambor@suse.cz>
15674
15675 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15676 static local variables.
15677
15678 2018-02-08 Richard Biener <rguenther@suse.de>
15679
15680 PR tree-optimization/84278
15681 * tree-vect-stmts.c (vectorizable_store): When looking for
15682 smaller vector types to perform grouped strided loads/stores
15683 make sure the mode is supported by the target.
15684 (vectorizable_load): Likewise.
15685
15686 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15687
15688 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15689 Increase LDP/STP opportunities by adding adjacent callee-saves.
15690
15691 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15692
15693 PR rtl-optimization/84068
15694 PR rtl-optimization/83459
15695 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15696
15697 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
15698
15699 PR tree-optimization/84224
15700 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15701 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15702 non-zero arguments.
15703
15704 2018-02-07 Iain Sandoe <iain@codesourcery.com>
15705
15706 PR target/84113
15707 * config/rs6000/altivec.md (*restore_world): Remove LR use.
15708 * config/rs6000/predicates.md (restore_world_operation): Adjust op
15709 count, remove one USE.
15710
15711 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
15712
15713 * doc/install.texi (Configuration): Document the
15714 --with-long-double-format={ibm,ieee} PowerPC configuration
15715 options.
15716
15717 PR target/84154
15718 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15719 Convert from define_expand to be define_insn_and_split. Rework
15720 float/double/_Float128 conversions to QI/HI/SImode to work with
15721 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
15722 conversions to QI/HImode types did a store and then a load to
15723 truncate the value. For conversions to VSX registers, don't split
15724 the insn, instead emit the code directly. Use the code iterator
15725 any_fix to combine signed and unsigned conversions.
15726 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15727 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15728 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15729 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15730 (fix_<mode>di2_hw): Likewise.
15731 (fixuns_<mode>di2_hw): Likewise.
15732 (fix_<mode>si2_hw): Likewise.
15733 (fixuns_<mode>si2_hw): Likewise.
15734 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15735 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15736 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15737 fix<uns>_trunc<SFDF:mode>si2_p8.
15738 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15739 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15740 (fix<uns>_<mode>_mem): Likewise.
15741 (fctiw<u>z_<mode>_mem): Likewise.
15742 (fix<uns>_<mode>_mem): Likewise.
15743 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15744 the register allocator from doing a direct move to the GPRs to do
15745 a store, and instead use the ISA 3.0 store byte/half-word from
15746 vector register instruction. For IEEE 128-bit floating point,
15747 also optimize stores of 32-bit ints.
15748 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15749
15750 2018-02-07 Alan Hayward <alan.hayward@arm.com>
15751
15752 * genextract.c (push_pathstr_operand): New function to support
15753 [a-zA-Z].
15754 (walk_rtx): Call push_pathstr_operand.
15755 (print_path): Support [a-zA-Z].
15756
15757 2018-02-07 Richard Biener <rguenther@suse.de>
15758
15759 PR tree-optimization/84037
15760 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15761 (cse_and_gimplify_to_preheader): Declare.
15762 (vect_get_place_in_interleaving_chain): Likewise.
15763 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15764 ivexpr_map.
15765 (_loop_vec_info::~_loop_vec_info): Delete it.
15766 (cse_and_gimplify_to_preheader): New function.
15767 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15768 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15769 (vectorizable_load): Likewise. For grouped stores always base
15770 the IV on the first element.
15771 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15772 condition before gimplifying.
15773
15774 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15775
15776 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15777 *DIV_EXPR and *MOD_EXPR.
15778
15779 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
15780
15781 PR target/84248
15782 * config/i386/i386.c (ix86_option_override_internal): Mask out
15783 the CF_SET bit when checking -fcf-protection.
15784
15785 2018-02-07 Tom de Vries <tom@codesourcery.com>
15786
15787 PR libgomp/84217
15788 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15789 enough.
15790
15791 2018-02-07 Richard Biener <rguenther@suse.de>
15792
15793 PR tree-optimization/84204
15794 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15795 this place.
15796
15797 PR tree-optimization/84205
15798 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15799 special-case isl_ast_op_zdiv_r.
15800
15801 PR tree-optimization/84223
15802 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15803 Only add conditions from within the region.
15804 (gather_bbs::after_dom_children): Adjust.
15805
15806 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15807
15808 PR target/84209
15809 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15810 * config/avr/avr.md: Only post-reload split REG-REG moves if
15811 either register is GENERAL_REG_P.
15812
15813 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15814
15815 PR tree-optimization/84235
15816 * tree-ssa-scopedtables.c
15817 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15818 if the subtraction is performed in floating point type where NaNs are
15819 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15820 build 1. Formatting fix.
15821
15822 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15823
15824 PR target/84146
15825 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15826 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15827 and skip it regardless of bb boundaries. Use CALL_P macro,
15828 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15829 unnecessarily, formatting fix.
15830
15831 2018-02-06 Michael Collison <michael.collison@arm.com>
15832
15833 * config/arm/thumb2.md:
15834 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15835 (*thumb_mov_notscc): Ditto.
15836
15837 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15838
15839 PR target/84154
15840 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15841 unsigned_fix, not "s".
15842
15843 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15844
15845 * configure.ac (gcc_fn_eh_frame_ro): New function.
15846 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15847 correct .eh_frame permissions.
15848 * configure: Regenerate.
15849
15850 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15851
15852 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15853 irrelevant options.
15854
15855 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15856
15857 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15858 Display warning message for -mno-speculate-indirect-jumps.
15859
15860 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15861
15862 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15863 Undocumented.
15864 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15865
15866 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15867
15868 PR tree-optimization/84225
15869 * tree-eh.c (find_trapping_overflow): Only call
15870 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15871
15872 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15873
15874 PR target/84145
15875 * config/i386/i386.c: Reimplement the check of possible options
15876 -mibt/-mshstk conbination. Change error messages.
15877 * doc/invoke.texi: Fix a typo: remove extra '='.
15878
15879 2018-02-06 Marek Polacek <polacek@redhat.com>
15880
15881 PR tree-optimization/84228
15882 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15883
15884 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15885
15886 PR target/82641
15887 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15888 emitted arch directives.
15889 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15890 __ARM_FEATURE_COPROC before changing architectures.
15891
15892 2018-02-06 Richard Biener <rguenther@suse.de>
15893
15894 * config/i386/i386.c (print_reg): Fix typo.
15895 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15896
15897 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15898
15899 * configure: Regenerate.
15900
15901 2018-02-05 Martin Sebor <msebor@redhat.com>
15902
15903 PR tree-optimization/83369
15904 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15905 inlining context.
15906
15907 2018-02-05 Martin Liska <mliska@suse.cz>
15908
15909 * doc/invoke.texi: Cherry-pick upstream r323995.
15910
15911 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15912
15913 * ira.c (ira_init_register_move_cost): Adjust comment.
15914
15915 2018-02-05 Martin Liska <mliska@suse.cz>
15916
15917 PR gcov-profile/84137
15918 * doc/gcov.texi: Fix typo in documentation.
15919
15920 2018-02-05 Martin Liska <mliska@suse.cz>
15921
15922 PR gcov-profile/83879
15923 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15924 using dlopen functionality.
15925
15926 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
15927
15928 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15929 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15930 _mm_maskz_range_ss, _mm_mask_range_round_ss,
15931 _mm_maskz_range_round_ss): New intrinsics.
15932 (__builtin_ia32_rangesd128_round)
15933 (__builtin_ia32_rangess128_round): Remove.
15934 (__builtin_ia32_rangesd128_mask_round,
15935 __builtin_ia32_rangess128_mask_round): New builtins.
15936 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15937 __builtin_ia32_rangess128_round): Remove.
15938 (__builtin_ia32_rangesd128_mask_round,
15939 __builtin_ia32_rangess128_mask_round): New builtins.
15940 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15941 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15942 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15943 "<round_saeonly_constraint>")): Changed to ...
15944 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15945 "<round_saeonly_scalar_constraint>")): ... this.
15946 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15947 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15948 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15949 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15950 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15951
15952 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
15953
15954 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15955 options.
15956 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15957 Remove all values except native, 8540 and 8548.
15958
15959 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
15960
15961 * config/i386/i386.c (ix86_output_function_return): Pass
15962 INVALID_REGNUM, instead of -1, as invalid register number to
15963 indirect_thunk_name and output_indirect_thunk.
15964
15965 2018-02-02 Julia Koval <julia.koval@intel.com>
15966
15967 * config.gcc: Add -march=icelake.
15968 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15969 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15970 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15971 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15972 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15973 (processor_target_table): Add icelake.
15974 (ix86_option_override_internal): Handle new PTAs.
15975 (get_builtin_code_for_version): Handle icelake.
15976 (M_INTEL_COREI7_ICELAKE): New.
15977 (fold_builtin_cpu): Handle icelake.
15978 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15979 * doc/invoke.texi: Add -march=icelake.
15980
15981 2018-02-02 Julia Koval <julia.koval@intel.com>
15982
15983 * config/i386/i386.c (ix86_option_override_internal): Change flags type
15984 to wide_int_bitmask.
15985 * wide-int-bitmask.h: New.
15986
15987 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15988
15989 PR target/84066
15990 * config/i386/i386.md: Replace Pmode with word_mode in
15991 builtin_setjmp_setup and builtin_longjmp to support x32.
15992
15993 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
15994
15995 PR target/56010
15996 PR target/83743
15997 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15998 #include "opts.h".
15999 (rs6000_supported_cpu_names): New static variable.
16000 (linux_cpu_translation_table): Likewise.
16001 (elf_platform) <cpu>: Define new static variable and use it.
16002 Translate kernel AT_PLATFORM name to canonical name if needed.
16003 Error if platform name is unknown.
16004
16005 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16006
16007 PR target/84089
16008 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16009
16010 2018-02-01 Jeff Law <law@redhat.com>
16011
16012 PR target/84128
16013 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16014 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16015 the scratch if RELEASE_VIA_POP is false.
16016 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16017 If we have to save a temporary register, decrement SIZE appropriately.
16018 Pass new arguments to release_scratch_register_on_entry.
16019 (ix86_adjust_stack_and_probe): Likewise.
16020 (ix86_emit_probe_stack_range): Pass new arguments to
16021 release_scratch_register_on_entry.
16022
16023 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16024
16025 PR rtl-optimization/84157
16026 * combine.c (change_zero_ext): Use REG_P predicate in
16027 front of HARD_REGISTER_P predicate.
16028
16029 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16030
16031 * config/avr/avr.c (avr_option_override): Move disabling of
16032 -fdelete-null-pointer-checks to...
16033 * common/config/avr/avr-common.c (avr_option_optimization_table):
16034 ...here.
16035
16036 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16037
16038 PR tree-optimization/81635
16039 * tree-data-ref.c (split_constant_offset_1): For types that
16040 wrap on overflow, try to use range info to prove that wrapping
16041 cannot occur.
16042
16043 2018-02-01 Renlin Li <renlin.li@arm.com>
16044
16045 PR target/83370
16046 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16047 TAILCALL_ADDR_REGS.
16048 (aarch64_register_move_cost): Likewise.
16049 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16050 TAILCALL_ADDR_REGS.
16051 (REG_CLASS_NAMES): Likewise.
16052 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16053 TAILCALL_ADDR_REGS. Remove IP registers.
16054 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16055
16056 2018-02-01 Richard Biener <rguenther@suse.de>
16057
16058 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16059 for specifying RPO order and allow NULL for that.
16060 * domwalk.c (dom_walker::dom_walker): Likewise.
16061 (dom_walker::walk): Handle NULL RPO order.
16062 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16063 in RPO order.
16064 (rewrite_update_dom_walker): Likewise.
16065 (mark_def_dom_walker): Likewise.
16066
16067 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16068
16069 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16070 (aarch64_maybe_expand_sve_subreg_move): Declare.
16071 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16072 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16073 predicate.
16074 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16075 that are semantically a reverse operation.
16076 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16077 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16078 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16079 functions.
16080 (aarch64_can_change_mode_class): For big-endian, forbid changes
16081 between two SVE modes if they have different element sizes.
16082
16083 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16084
16085 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16086 the TImode handling for big-endian targets.
16087
16088 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16089
16090 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16091 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16092 not just bytes.
16093 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16094 Remove BSWAP handing for big-endian targets and use the form of
16095 LD1RQ appropariate for the mode.
16096
16097 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16098
16099 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16100 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16101 duplicated element.
16102
16103 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16104
16105 PR tearget/83845
16106 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16107 check for operands that need to go through aarch64_sve_reload_be.
16108
16109 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16110
16111 PR tree-optimization/81661
16112 PR tree-optimization/84117
16113 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16114 * tree-eh.c: Include gimplify.h.
16115 (find_trapping_overflow, replace_trapping_overflow,
16116 rewrite_to_non_trapping_overflow): New functions.
16117 * tree-vect-loop.c: Include tree-eh.h.
16118 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16119 * tree-data-ref.c: Include tree-eh.h.
16120 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16121
16122 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
16123
16124 PR rtl-optimization/84123
16125 * combine.c (change_zero_ext): Check if hard register satisfies
16126 can_change_dest_mode before calling gen_lowpart_SUBREG.
16127
16128 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
16129
16130 PR target/82444
16131 * ira.c (ira_init_register_move_cost): Remove assert.
16132
16133 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16134
16135 PR rtl-optimization/84071
16136 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16137 * doc/tm.texi: Regenerate.
16138
16139 2018-01-31 Richard Biener <rguenther@suse.de>
16140
16141 PR tree-optimization/84132
16142 * tree-data-ref.c (analyze_miv_subscript): Properly
16143 check whether evolution_function_is_affine_multivariate_p
16144 before calling gcd_of_steps_may_divide_p.
16145
16146 2018-01-31 Julia Koval <julia.koval@intel.com>
16147
16148 PR target/83618
16149 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16150 * config/i386/i386.md (rdpid_rex64) New.
16151 (rdpid): Make 32bit only.
16152
16153 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
16154
16155 PR lto/84105
16156 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16157 an IDENTIFIER_NODE for FUNCTION_TYPE's.
16158
16159 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16160
16161 Revert
16162 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16163
16164 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16165
16166 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16167
16168 PR rtl-optimization/84071
16169 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16170 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16171
16172 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16173
16174 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16175 (arc_attribute_table): Add 'aux' attribute.
16176 (arc_in_small_data_p): Consider aux like variables.
16177 (arc_is_aux_reg_p): New function.
16178 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16179 (arc_get_aux_arg): New function.
16180 (prepare_move_operands): Handle aux-register access.
16181 (arc_handle_aux_attribute): New function.
16182 * doc/extend.texi (ARC Variable attributes): Add subsection.
16183
16184 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16185
16186 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16187 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16188 (arc_attribute_table): Add 'uncached' attribute.
16189 (arc_print_operand): Print '.di' flag for uncached memory
16190 accesses.
16191 (arc_in_small_data_p): Do not consider for small data the uncached
16192 types.
16193 (arc_is_uncached_mem_p): New function.
16194 * config/arc/predicates.md (compact_store_memory_operand): Check
16195 for uncached memory accesses.
16196 (nonvol_nonimm_operand): Likewise.
16197 * doc/extend.texi (ARC Type Attribute): New subsection.
16198
16199 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16200
16201 PR c/84100
16202 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16203 falign-loops=): Add Optimization flag.
16204
16205 2018-01-30 Jeff Law <law@redhat.com>
16206
16207 PR target/84064
16208 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16209 INT_REGISTERS_SAVED. Check it prior to calling
16210 get_scratch_register_on_entry.
16211 (ix86_adjust_stack_and_probe): Similarly.
16212 (ix86_emit_probe_stack_range): Similarly.
16213 (ix86_expand_prologue): Corresponding changes.
16214
16215 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16216
16217 PR target/40411
16218 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16219 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16220
16221 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16222
16223 PR target/84112
16224 * lra-constraints.c (curr_insn_transform): Process AND in the
16225 address.
16226
16227 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16228
16229 PR rtl-optimization/83986
16230 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16231 dependence against last_pending_memory_flush in addition to
16232 pending_jump_insns.
16233
16234 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16235
16236 PR tree-optimization/81611
16237 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16238 copies.
16239
16240 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16241
16242 PR target/83758
16243 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16244 a reg rtx.
16245
16246 2018-01-30 Richard Biener <rguenther@suse.de>
16247 Jakub Jelinek <jakub@redhat.com>
16248
16249 PR tree-optimization/84111
16250 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16251 inner loops added during recursion, as they don't have up-to-date
16252 SSA form.
16253
16254 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16255
16256 PR ipa/81360
16257 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16258 (can_inline_edge_by_limits_p): ... here.
16259 (can_early_inline_edge_p, check_callers,
16260 update_caller_keys, update_callee_keys, recursive_inlining,
16261 add_new_edges_to_heap, speculation_useful_p,
16262 inline_small_functions,
16263 inline_small_functions, flatten_function,
16264 inline_to_all_callers_1): Update.
16265
16266 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16267
16268 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16269 zeros correctly.
16270
16271 2018-01-30 Richard Biener <rguenther@suse.de>
16272
16273 PR tree-optimization/83008
16274 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16275 invariant and constant vector uses in stmts when they need
16276 more than one stmt.
16277
16278 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16279
16280 PR bootstrap/84017
16281 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16282 * configure: Regenerate.
16283
16284 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16285
16286 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16287 pattern.
16288 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16289 Use gen_rtx_REG rather than gen_lowpart.
16290
16291 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16292
16293 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16294 rather than 0 when creating partial subregs.
16295
16296 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16297
16298 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16299 of usage.
16300
16301 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16302
16303 PR target/81550
16304 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16305 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16306 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16307 flags. This restores the settings used before the 2017-07-24.
16308 Turning off pre increment/decrement/modify allows IVOPTS to
16309 optimize DF/SF loops where the index is an int.
16310
16311 2018-01-29 Richard Biener <rguenther@suse.de>
16312 Kelvin Nilsen <kelvin@gcc.gnu.org>
16313
16314 PR bootstrap/80867
16315 * tree-vect-stmts.c (vectorizable_call): Don't call
16316 targetm.vectorize_builtin_md_vectorized_function if callee is
16317 NULL.
16318
16319 2018-01-22 Carl Love <cel@us.ibm.com>
16320
16321 * doc/extend.tex: Fix typo in second arg in
16322 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16323
16324 2018-01-29 Richard Biener <rguenther@suse.de>
16325
16326 PR tree-optimization/84086
16327 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16328 (flush_ssaname_freelist): When SSA names were released reset
16329 the SCEV hash table.
16330
16331 2018-01-29 Richard Biener <rguenther@suse.de>
16332
16333 PR tree-optimization/84057
16334 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16335 removed paths when removing edges.
16336
16337 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16338
16339 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16340 -mfunction-return=@var{choice}.
16341
16342 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16343
16344 PR diagnostic/84034
16345 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16346 Handle CR like TAB.
16347 (layout::print_source_line): Likewise.
16348 (test_get_line_width_without_trailing_whitespace): Add test cases.
16349
16350 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16351
16352 PR middle-end/84040
16353 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16354 debug insns.
16355
16356 2018-01-26 Jim Wilson <jimw@sifive.com>
16357
16358 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16359
16360 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16361 specified.
16362
16363 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16364
16365 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16366 and CMP + SUB-immediate -> SUBS.
16367
16368 2018-01-26 Martin Sebor <msebor@redhat.com>
16369
16370 PR tree-optimization/83896
16371 * tree-ssa-strlen.c (get_string_len): Rename...
16372 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16373 Avoid assuming length is constant.
16374 (handle_char_store): Use HOST_WIDE_INT for string length.
16375
16376 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16377
16378 PR target/81763
16379 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16380 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16381
16382 2018-01-26 Richard Biener <rguenther@suse.de>
16383
16384 PR rtl-optimization/84003
16385 * dse.c (record_store): Only record redundant stores when
16386 the earlier store aliases at least all accesses the later one does.
16387
16388 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16389
16390 PR rtl-optimization/83985
16391 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16392 REG_CFA_RESTORE insns.
16393 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16394 REG_CFA_RESTORE insns here.
16395
16396 PR c/83989
16397 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16398 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16399
16400 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16401
16402 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16403 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16404 (arc_init): Likewise.
16405 (arc_override_options): Likewise.
16406 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16407 value.
16408 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16409 support.
16410 * config/arc/arc.h (TARGET_DBNZ): Define.
16411 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16412 properly set the tune attribute.
16413 (dbnz): Use TARGET_DBNZ guard.
16414 * config/arc/arc.opt (mtune): Add core3 option.
16415
16416 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16417
16418 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16419 recognize new pic like addresses.
16420 (arc_delegitimize_address): Clean up.
16421
16422 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16423
16424 * config/arc/arc-arches.def: Option mrf16 valid for all
16425 architectures.
16426 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16427 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16428 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16429 * config/arc/arc-tables.opt: Regenerate.
16430 * config/arc/arc.c (arc_conditional_register_usage): Handle
16431 reduced register file case.
16432 (arc_file_start): Set must have build attributes.
16433 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16434 mrf16 option value.
16435 * config/arc/arc.opt (mrf16): Add new option.
16436 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16437 * config/arc/genmultilib.awk: Handle new mrf16 option.
16438 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16439 * config/arc/t-multilib: Regenerate.
16440 * doc/invoke.texi (ARC Options): Document mrf16 option.
16441
16442 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16443
16444 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16445 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16446 (arc_attribute_table): Add 'secure_call' attribute.
16447 (arc_print_operand): Print secure call operand.
16448 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16449 secure.
16450 (arc_is_secure_call_p): New function. * config/arc/arc.md
16451 (call_i): Add support for sjli instruction.
16452 (call_value_i): Likewise.
16453 * config/arc/constraints.md (Csc): New constraint.
16454
16455 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16456 John Eric Martin <John.Martin@emmicro-us.com>
16457
16458 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16459 * config/arc/arc.c (_arc_jli_section): New struct.
16460 (arc_jli_section): New type.
16461 (rc_jli_sections): New static variable.
16462 (arc_handle_jli_attribute): New function.
16463 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16464 (arc_file_end): New function.
16465 (TARGET_ASM_FILE_END): Define.
16466 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16467 (arc_add_jli_section): New function.
16468 (jli_call_scan): Likewise.
16469 (arc_reorg): Call jli_call_scan.
16470 (arc_output_addsi): Remove 'S' from printing asm operand.
16471 (arc_is_jli_call_p): New function.
16472 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16473 operand.
16474 (movhi_insn): Likewise.
16475 (movsi_insn): Likewise.
16476 (movsi_set_cc_insn): Likewise.
16477 (loadqi_update): Likewise.
16478 (load_zeroextendqisi_update): Likewise.
16479 (load_signextendqisi_update): Likewise.
16480 (loadhi_update): Likewise.
16481 (load_zeroextendhisi_update): Likewise.
16482 (load_signextendhisi_update): Likewise.
16483 (loadsi_update): Likewise.
16484 (loadsf_update): Likewise.
16485 (movsicc_insn): Likewise.
16486 (bset_insn): Likewise.
16487 (bxor_insn): Likewise.
16488 (bclr_insn): Likewise.
16489 (bmsk_insn): Likewise.
16490 (bicsi3_insn): Likewise.
16491 (cmpsi_cc_c_insn): Likewise.
16492 (movsi_ne): Likewise.
16493 (movsi_cond_exec): Likewise.
16494 (clrsbsi2): Likewise.
16495 (norm_f): Likewise.
16496 (normw): Likewise.
16497 (swap): Likewise.
16498 (divaw): Likewise.
16499 (flag): Likewise.
16500 (sr): Likewise.
16501 (kflag): Likewise.
16502 (ffs): Likewise.
16503 (ffs_f): Likewise.
16504 (fls): Likewise.
16505 (call_i): Remove 'S' asm letter, add jli instruction.
16506 (call_value_i): Likewise.
16507 * config/arc/arc.op (mjli-always): New option.
16508 * config/arc/constraints.md (Cji): New constraint.
16509 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16510 operand.
16511 (subsf3_fpx): Likewise.
16512 (mulsf3_fpx): Likewise.
16513 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16514 asm operand.
16515 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16516 function attrbutes.
16517 * doc/invoke.texi (ARC): Document mjli-always option.
16518
16519 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16520
16521 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16522 avoid addition with 0 and use incw and decw where possible.
16523
16524 2018-01-26 Richard Biener <rguenther@suse.de>
16525
16526 PR tree-optimization/81082
16527 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16528 association if it requires casting to unsigned.
16529 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16530 from fold_plusminus_mult_expr to catch important cases late when
16531 range info is available.
16532
16533 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16534
16535 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16536 * configure.ac (hidden_linkonce): New test.
16537 * configure: Regenerate.
16538 * config.in: Regenerate.
16539
16540 2018-01-26 Julia Koval <julia.koval@intel.com>
16541
16542 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16543 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16544 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16545 _mm_mask_bitshuffle_epi64_mask): Fix type.
16546 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16547 USI_FTYPE_V4DI_V4DI_USI): Remove.
16548 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16549 __builtin_ia32_vpshufbitqmb256_mask,
16550 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16551 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16552 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16553
16554 2018-01-26 Alan Modra <amodra@gmail.com>
16555
16556 PR target/84033
16557 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16558 UNSPEC_VBPERMQ. Sort other unspecs.
16559
16560 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16561
16562 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16563
16564 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16565
16566 PR middle-end/83055
16567 * predict.c (drop_profile): Do not push/pop cfun; update also
16568 node->count.
16569 (handle_missing_profiles): Fix logic looking for zero profiles.
16570
16571 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16572
16573 PR middle-end/83977
16574 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16575 on functions with #pragma omp declare simd or functions with simd
16576 attribute.
16577 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16578 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16579 Remove trailing \n from warning_at calls.
16580
16581 2018-01-25 Tom de Vries <tom@codesourcery.com>
16582
16583 PR target/84028
16584 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16585 for neutered workers.
16586
16587 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16588
16589 PR target/68467
16590 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16591 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16592
16593 2018-01-24 Jeff Law <law@redhat.com>
16594
16595 PR target/83994
16596 * i386.c (get_probe_interval): Move to earlier point.
16597 (ix86_compute_frame_layout): If -fstack-clash-protection and
16598 the frame is larger than the probe interval, then use pushes
16599 to save registers rather than reg->mem moves.
16600 (ix86_expand_prologue): Remove conditional for int_registers_saved
16601 assertion.
16602
16603 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
16604
16605 PR target/84014
16606 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16607 min/max for never referenced object.
16608
16609 2018-01-24 Jakub Jelinek <jakub@redhat.com>
16610
16611 PR middle-end/83977
16612 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16613 here.
16614 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16615 attributes from DECL_ATTRIBUTES (decl) without affecting
16616 DECL_ATTRIBUTES (current_function_decl).
16617 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16618 functions with non-NULL DECL_ABSTRACT_ORIGIN.
16619
16620 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
16621
16622 PR tree-optimization/83979
16623 * fold-const.c (fold_comparison): Use constant_boolean_node
16624 instead of boolean_{true,false}_node.
16625
16626 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
16627
16628 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16629 with zero counts.
16630
16631 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16632
16633 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16634 Simplify the clause that sets the length attribute.
16635 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16636 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16637 clause that sets the length attribute.
16638 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16639
16640 2018-01-24 Tom de Vries <tom@codesourcery.com>
16641
16642 PR target/83589
16643 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16644 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16645 Add strict parameter.
16646 (prevent_branch_around_nothing): Insert dummy insn between branch to
16647 label and label with no ptx insn inbetween.
16648 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16649
16650 2018-01-24 Tom de Vries <tom@codesourcery.com>
16651
16652 PR target/81352
16653 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16654 for neutered threads in warp.
16655 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16656
16657 2018-01-24 Richard Biener <rguenther@suse.de>
16658
16659 PR tree-optimization/83176
16660 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16661 operands.
16662
16663 2018-01-24 Richard Biener <rguenther@suse.de>
16664
16665 PR tree-optimization/82819
16666 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16667 code generating pluses that are no-ops in the target precision.
16668
16669 2018-01-24 Richard Biener <rguenther@suse.de>
16670
16671 PR middle-end/84000
16672 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16673
16674 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16675
16676 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16677 to merge probabilities.
16678 * predict.c (probably_never_executed): Also mark as cold functions
16679 with global 0 profile and guessed local profile.
16680 * profile-count.c (profile_probability::combine_with_count): New
16681 member function.
16682 * profile-count.h (profile_probability::operator*,
16683 profile_probability::operator*=, profile_probability::operator/,
16684 profile_probability::operator/=): Reduce precision to adjusted
16685 and set value to guessed on contradictory divisions.
16686 (profile_probability::combine_with_freq): Remove.
16687 (profile_probability::combine_wiht_count): Declare.
16688 (profile_count::force_nonzero):: Set to adjusted.
16689 (profile_count::probability_in):: Set quality to adjusted.
16690 * tree-ssa-tail-merge.c (replace_block_by): Use
16691 combine_with_count.
16692
16693 2018-01-23 Andrew Waterman <andrew@sifive.com>
16694 Jim Wilson <jimw@sifive.com>
16695
16696 * config/riscv/riscv.c (riscv_stack_boundary): New.
16697 (riscv_option_override): Set riscv_stack_boundary. Handle
16698 riscv_preferred_stack_boundary_arg.
16699 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16700 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16701 (STACK_BOUNDARY): Set to riscv_stack_boundary.
16702 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16703 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16704 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16705
16706 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
16707
16708 PR target/83905
16709 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16710 of struct ix86_frame.
16711 (ix86_expand_epilogue): Likewise. Add a local variable for
16712 the reg_save_offset field in struct ix86_frame.
16713
16714 2018-01-23 Bin Cheng <bin.cheng@arm.com>
16715
16716 PR tree-optimization/82604
16717 * tree-loop-distribution.c (enum partition_kind): New enum item
16718 PKIND_PARTIAL_MEMSET.
16719 (partition_builtin_p): Support above new enum item.
16720 (generate_code_for_partition): Ditto.
16721 (compute_access_range): Differentiate cases that equality can be
16722 proven at all loops, the innermost loops or no loops.
16723 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16724 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
16725 (finalize_partitions, distribute_loop): Don't fuse partition of
16726 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16727 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16728 parloop is enabled.
16729
16730 2018-01-23 Martin Liska <mliska@suse.cz>
16731
16732 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16733 order to ignore the predictor.
16734 (PRED_POLYMORPHIC_CALL): Likewise.
16735 (PRED_RECURSIVE_CALL): Likewise.
16736
16737 2018-01-23 Martin Liska <mliska@suse.cz>
16738
16739 * tree-profile.c (tree_profiling): Print function header to
16740 aware reader which function we are working on.
16741 * value-prof.c (gimple_find_values_to_profile): Do not print
16742 not interesting value histograms.
16743
16744 2018-01-23 Martin Liska <mliska@suse.cz>
16745
16746 * profile-count.h (enum profile_quality): Add
16747 profile_uninitialized as the first value. Do not number values
16748 as they are zero based.
16749 (profile_count::verify): Update sanity check.
16750 (profile_probability::verify): Likewise.
16751
16752 2018-01-23 Nathan Sidwell <nathan@acm.org>
16753
16754 * doc/invoke.texi (ffor-scope): Deprecate.
16755
16756 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16757
16758 PR tree-optimization/83510
16759 * domwalk.c (set_all_edges_as_executable): New function.
16760 (dom_walker::dom_walker): Convert bool param
16761 "skip_unreachable_blocks" to enum reachability. Move setup of
16762 edge flags to set_all_edges_as_executable and only do it when
16763 reachability is REACHABLE_BLOCKS.
16764 * domwalk.h (enum dom_walker::reachability): New enum.
16765 (dom_walker::dom_walker): Convert bool param
16766 "skip_unreachable_blocks" to enum reachability.
16767 (set_all_edges_as_executable): New decl.
16768 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
16769 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16770 "reachability".
16771 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16772 but converting true to REACHABLE_BLOCKS.
16773 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16774 * tree-vrp.c
16775 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16776 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16777 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16778 REACHABLE_BLOCKS.
16779 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16780 if check_all_array_refs will be called.
16781
16782 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16783
16784 * tree.c (selftest::test_location_wrappers): Add more test
16785 coverage.
16786
16787 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16788
16789 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16790 (selftest::test_bit_in_range): Likewise.
16791
16792 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16793
16794 PR testsuite/83888
16795 * doc/sourcebuild.texi (vect_float): Say that the selector
16796 only describes the situation when -funsafe-math-optimizations is on.
16797 (vect_float_strict): Document.
16798
16799 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16800
16801 PR tree-optimization/83965
16802 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16803 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16804 instead of checking only for a reduction.
16805 (vect_recog_widen_sum_pattern): Likewise.
16806
16807 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16808
16809 * predict.c (probably_never_executed): Only use precise profile info.
16810 (compute_function_frequency): Skip after inlining hack since we now
16811 have quality checking.
16812
16813 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16814
16815 * profile-count.h (profile_probability::very_unlikely,
16816 profile_probability::unlikely, profile_probability::even): Set
16817 precision to guessed.
16818
16819 2018-01-23 Richard Biener <rguenther@suse.de>
16820
16821 PR tree-optimization/83963
16822 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16823 Properly terminate dominator walk when crossing the exit edge not
16824 when visiting its source block.
16825
16826 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16827
16828 PR c++/83918
16829 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16830 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16831
16832 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16833
16834 PR tree-optimization/83957
16835 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16836 semicolon after for body surrounded by braces.
16837
16838 PR tree-optimization/83081
16839 * profile-count.h (profile_probability::split): New method.
16840 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16841 Use profile_probability::split.
16842 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16843 when splitting a single conditional jump into 2.
16844
16845 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16846
16847 PR tree-optimization/69452
16848 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16849 decl.
16850
16851 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16852
16853 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16854 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16855 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16856
16857 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16858
16859 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16860 declaration.
16861 * config/rl78/rl78.md (movdi): New define_expand.
16862 * config/rl78/rl78.c (rl78_split_movdi): New function.
16863
16864 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16865
16866 PR target/83862
16867 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16868 no longer used.
16869 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16870 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16871 128-bit to produce an UNSPEC move to get the double word with the
16872 signbit and then a shift directly to do signbit.
16873 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16874 implementation with a new version that just does either a direct
16875 move or a regular move. Move memory interface to separate insns.
16876 Move insns so they are next to the expander.
16877 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16878 with signbit move. Split big and little endian case.
16879 (signbit<mode>2_dm_mem_le): Likewise.
16880 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16881 (signbit<mode>2_dm2): Likewise.
16882
16883 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16884
16885 * config/rl78/rl78.md (anddi3): New define_expand.
16886
16887 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16888
16889 * config/rl78/rl78.md (umindi3): New define_expand.
16890
16891 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16892
16893 * config/rl78/rl78.md (smindi3): New define_expand.
16894
16895 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16896
16897 * config/rl78/rl78.md (smaxdi3): New define_expand.
16898
16899 2018-01-22 Carl Love <cel@us.ibm.com>
16900
16901 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16902 LVX_V1TI): Add macro expansion.
16903 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16904 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16905 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16906 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16907 Change check to determine if the instruction is a byte reversing
16908 entry. Fix typo in comment.
16909 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16910 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16911 Add def_builtin calls for new builtins.
16912 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16913 Add define_insn expansion.
16914
16915 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16916
16917 * config/rl78/rl78.md (umaxdi3): New define_expand.
16918
16919 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16920
16921 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16922 for non-QImode registers.
16923
16924 2018-01-22 Richard Biener <rguenther@suse.de>
16925
16926 PR tree-optimization/83963
16927 * graphite-scop-detection.c (scop_detection::get_sese): Delay
16928 including the loop exit block.
16929 (scop_detection::merge_sese): Likewise.
16930 (scop_detection::add_scop): Do it here instead.
16931
16932 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16933
16934 * doc/sourcebuild.texi (arm_softfloat): Document.
16935
16936 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
16937
16938 PR gcc/77734
16939 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16940 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16941 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16942
16943 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16944 David Edelsohn <dje.gcc@gmail.com>
16945
16946 PR target/83946
16947 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16948 Change "crset eq" to "crset 2".
16949 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16950 (*call_indirect_aix<mode>_nospec): Likewise.
16951 (*call_value_indirect_aix<mode>_nospec): Likewise.
16952 (*call_indirect_elfv2<mode>_nospec): Likewise.
16953 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16954 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16955 change assembly output from . to $.
16956 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16957 (indirect_jump<mode>_nospec): Change assembly output from . to $.
16958 (*tablejump<mode>_internal1_nospec): Likewise.
16959
16960 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
16961
16962 PR target/80870
16963 * config/sh/sh_optimize_sett_clrt.cc:
16964 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16965
16966 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
16967
16968 PR tree-optimization/83940
16969 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16970 offset_dt to vect_constant_def rather than vect_unknown_def_type.
16971 (vect_check_load_store_mask): Add a mask_dt_out parameter and
16972 use it to pass back the definition type.
16973 (vect_check_store_rhs): Likewise rhs_dt_out.
16974 (vect_build_gather_load_calls): Add a mask_dt argument and use
16975 it instead of a call to vect_is_simple_use.
16976 (vectorizable_store): Update calls to vect_check_load_store_mask
16977 and vect_check_store_rhs. Use the dt returned by the latter instead
16978 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
16979 instead of calls to vect_is_simple_use. Pass the scalar rather
16980 than the vector operand to vect_is_simple_use when handling
16981 second and subsequent copies of an rhs value.
16982 (vectorizable_load): Update calls to vect_check_load_store_mask
16983 and vect_build_gather_load_calls. Use the cached mask_dt and
16984 gs_info.offset_dt instead of calls to vect_is_simple_use.
16985
16986 2018-01-20 Jakub Jelinek <jakub@redhat.com>
16987
16988 PR middle-end/83945
16989 * tree-emutls.c: Include gimplify.h.
16990 (lower_emutls_2): New function.
16991 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16992 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16993 it before further processing.
16994
16995 PR target/83930
16996 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16997 UINTVAL (trueop1) instead of INTVAL (op1).
16998
16999 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17000
17001 PR debug/81570
17002 PR debug/83728
17003 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17004 INCOMING_FRAME_SP_OFFSET if not defined.
17005 (scan_trace): Add ENTRY argument. If true and
17006 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17007 emit a note to adjust the CFA offset.
17008 (create_cfi_notes): Adjust scan_trace callers.
17009 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17010 INCOMING_FRAME_SP_OFFSET in the CIE.
17011 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17012 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17013 Likewise.
17014 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17015 * doc/tm.texi: Regenerated.
17016
17017 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17018
17019 PR rtl-optimization/83147
17020 * lra-constraints.c (remove_inheritance_pseudos): Use
17021 lra_substitute_pseudo_within_insn.
17022
17023 2018-01-19 Tom de Vries <tom@codesourcery.com>
17024 Cesar Philippidis <cesar@codesourcery.com>
17025
17026 PR target/83920
17027 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17028
17029 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17030
17031 PR target/83790
17032 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17033 spaces for function labels.
17034
17035 2018-01-19 Martin Liska <mliska@suse.cz>
17036
17037 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17038 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17039 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17040 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17041 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17042 (PRED_CONST_RETURN): Change from 69 to 65.
17043 (PRED_NULL_RETURN): Change from 91 to 71.
17044 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17045 (PRED_LOOP_GUARD): Change from 66 to 73.
17046
17047 2018-01-19 Martin Liska <mliska@suse.cz>
17048
17049 * predict.c (predict_insn_def): Add new assert.
17050 (struct branch_predictor): Change type to signed integer.
17051 (test_prediction_value_range): Amend test to cover
17052 PROB_UNINITIALIZED.
17053 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17054 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17055 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17056 (PRED_LOOP_IV_COMPARE): Likewise.
17057 * predict.h (PROB_UNINITIALIZED): Define new constant.
17058
17059 2018-01-19 Martin Liska <mliska@suse.cz>
17060
17061 * predict.c (dump_prediction): Add new format for
17062 analyze_brprob.py script which is enabled with -details
17063 suboption.
17064 * profile-count.h (precise_p): New function.
17065
17066 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17067
17068 PR tree-optimization/83922
17069 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17070 there are no statements that need masking.
17071 (vect_active_double_reduction_p): New function.
17072 (vect_analyze_loop_operations): Use it when handling phis that
17073 are not in the loop header.
17074
17075 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17076
17077 PR tree-optimization/83914
17078 * tree-vect-loop.c (vectorizable_induction): Don't convert
17079 init_expr or apply the peeling adjustment for inductions
17080 that are nested within the vectorized loop.
17081
17082 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17083
17084 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17085 instead of NEG.
17086
17087 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17088
17089 PR sanitizer/81715
17090 PR testsuite/83882
17091 * function.h (gimplify_parameters): Add gimple_seq * argument.
17092 * function.c: Include gimple.h and options.h.
17093 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17094 for the added local temporaries if needed.
17095 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17096 if there are any parameter cleanups, wrap whole body into a
17097 try/finally with the cleanups.
17098
17099 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17100
17101 PR target/82964
17102 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17103 Use GET_MODE_CLASS for scalar floating point.
17104
17105 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17106
17107 PR ipa/82256
17108 patch by PaX Team
17109 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17110 Fix call of call_cgraph_insertion_hooks.
17111
17112 2018-01-18 Martin Sebor <msebor@redhat.com>
17113
17114 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17115
17116 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17117
17118 PR ipa/83619
17119 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17120 frequencies.
17121
17122 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
17123
17124 PR other/70268
17125 * common.opt: (-ffile-prefix-map): New option.
17126 * opts.c (common_handle_option): Defer it.
17127 * opts-global.c (handle_common_deferred_options): Handle it.
17128 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17129 * file-prefix-map.h: New file.
17130 (remap_debug_filename, add_debug_prefix_map): ...here.
17131 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17132 * final.c (debug_prefix_map, add_debug_prefix_map
17133 remap_debug_filename): Move to...
17134 * file-prefix-map.c: New file.
17135 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17136 generalize, get rid of alloca(), use strrchr() instead of strchr().
17137 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17138 Implement in terms of add_prefix_map().
17139 (remap_macro_filename, remap_debug_filename): Implement in term of
17140 remap_filename().
17141 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17142 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17143 * dbxout.c: Include file-prefix-map.h.
17144 * varasm.c: Likewise.
17145 * vmsdbgout.c: Likewise.
17146 * xcoffout.c: Likewise.
17147 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17148 * doc/cppopts.texi (-fmacro-prefix-map): Document.
17149 * doc/invoke.texi (-ffile-prefix-map): Document.
17150 (-fdebug-prefix-map): Update description.
17151
17152 2018-01-18 Martin Liska <mliska@suse.cz>
17153
17154 * config/i386/i386.c (indirect_thunk_name): Document that also
17155 lfence is emitted.
17156 (output_indirect_thunk): Document why both instructions
17157 (pause and lfence) are generated.
17158
17159 2018-01-18 Richard Biener <rguenther@suse.de>
17160
17161 PR tree-optimization/83887
17162 * graphite-scop-detection.c
17163 (scop_detection::get_nearest_dom_with_single_entry): Remove.
17164 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17165 (scop_detection::merge_sese): Re-implement with a flood-fill
17166 algorithm that properly finds a SESE region if it exists.
17167
17168 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17169
17170 PR c/61240
17171 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17172 pointer_diff optimizations use view_convert instead of convert.
17173
17174 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17175
17176 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17177 Generate different code for -mno-speculate-indirect-jumps.
17178 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17179 (*call_indirect_aix<mode>): Disable for
17180 -mno-speculate-indirect-jumps.
17181 (*call_indirect_aix<mode>_nospec): New define_insn.
17182 (*call_value_indirect_aix<mode>): Disable for
17183 -mno-speculate-indirect-jumps.
17184 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17185 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17186 -mno-speculate-indirect-jumps.
17187 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17188
17189 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17190
17191 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17192 long double type, set the flags for noting the default long double
17193 type, even if we don't pass or return a long double type.
17194
17195 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17196
17197 PR ipa/83051
17198 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17199 failure.
17200
17201 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17202
17203 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17204 support for merge[hl].
17205 (fold_mergehl_helper): New helper function.
17206 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17207 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17208 (altivec_vmrglw_direct): Add xxmrglw insn.
17209
17210 2018-01-17 Andrew Waterman <andrew@sifive.com>
17211
17212 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17213 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17214
17215 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17216
17217 PR lto/83121
17218 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17219 call the lto_location_cache before reading the
17220 DECL_SOURCE_LOCATION of the types.
17221
17222 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17223 Richard Sandiford <richard.sandiford@linaro.org>
17224
17225 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17226 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17227 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17228 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17229 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17230 Add declaration.
17231 * config/aarch64/constraints.md (aarch64_movti_operand):
17232 Limit immediates.
17233 * config/aarch64/predicates.md (Uti): Add new constraint.
17234
17235 2018-01-17 Carl Love <cel@us.ibm.com>
17236
17237 * config/rs6000/vsx.md (define_expand xl_len_r,
17238 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17239 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17240 lxvll.
17241 (define_expand, define_insn): Move the shift left from the
17242 define_insn to the define_expand for lxvl and stxvl instructions.
17243 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17244 and XL_LEN_R definitions to PURE.
17245
17246 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17247
17248 * config/i386/i386.c (indirect_thunk_name): Declare regno
17249 as unsigned int. Compare regno with INVALID_REGNUM.
17250 (output_indirect_thunk): Ditto.
17251 (output_indirect_thunk_function): Ditto.
17252 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17253 in the call to output_indirect_thunk_function.
17254
17255 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17256
17257 PR middle-end/83884
17258 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17259 rather than the size of inner_type to determine the stack slot size
17260 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17261
17262 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17263
17264 PR target/83546
17265 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17266 to PTA_SILVERMONT.
17267
17268 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17269
17270 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17271 endian Linux systems to optionally enable multilibs for selecting
17272 the long double type if the user configured an explicit type.
17273 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17274 have no long double multilibs if not defined.
17275 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17276 warn if the user used -mabi={ieee,ibm}longdouble and we built
17277 multilibs for long double.
17278 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17279 appropriate multilib option.
17280 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17281 multilib options.
17282 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17283 for building long double multilibs.
17284 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17285
17286 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17287
17288 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17289 copies.
17290
17291 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17292 64 bits.
17293 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17294 128 bits.
17295
17296 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17297 variables.
17298
17299 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17300 return value.
17301
17302 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17303
17304 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17305 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17306
17307 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17308
17309 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17310 different rtl trees depending on TARGET_64BIT.
17311 (rs6000_gen_lvx): Likewise.
17312
17313 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17314
17315 * config/visium/visium.md (nop): Tweak comment.
17316 (hazard_nop): Likewise.
17317
17318 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17319
17320 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17321 -mspeculate-indirect-jumps.
17322 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17323 for -mno-speculate-indirect-jumps.
17324 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17325 (*call_value_indirect_elfv2<mode>): Disable for
17326 -mno-speculate-indirect-jumps.
17327 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17328 (indirect_jump): Emit different RTL for
17329 -mno-speculate-indirect-jumps.
17330 (*indirect_jump<mode>): Disable for
17331 -mno-speculate-indirect-jumps.
17332 (*indirect_jump<mode>_nospec): New define_insn.
17333 (tablejump): Emit different RTL for
17334 -mno-speculate-indirect-jumps.
17335 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17336 (tablejumpsi_nospec): New define_expand.
17337 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17338 (tablejumpdi_nospec): New define_expand.
17339 (*tablejump<mode>_internal1): Disable for
17340 -mno-speculate-indirect-jumps.
17341 (*tablejump<mode>_internal1_nospec): New define_insn.
17342 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17343 option.
17344
17345 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17346
17347 * caller-save.c (insert_save): Drop unnecessary parameter. All
17348 callers updated.
17349
17350 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17351 Richard Biener <rguenth@suse.de>
17352
17353 PR libgomp/83590
17354 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17355 return early, inline manually is_gimple_sizepos. Make sure if we
17356 call gimplify_expr we don't end up with a gimple constant.
17357 * tree.c (variably_modified_type_p): Don't return true for
17358 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17359 * gimplify.h (is_gimple_sizepos): Remove.
17360
17361 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17362
17363 PR tree-optimization/83857
17364 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17365 vectorizable_live_operation for pure SLP statements.
17366 (vectorizable_live_operation): Handle PHIs.
17367
17368 2018-01-16 Richard Biener <rguenther@suse.de>
17369
17370 PR tree-optimization/83867
17371 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17372 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17373
17374 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17375
17376 PR c/83844
17377 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17378 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17379 If off is not INTEGER_CST, issue a may not be aligned warning
17380 rather than isn't aligned. Use isn%'t rather than isn't.
17381 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17382 into MULT_EXPR.
17383 <case MULT_EXPR>: Improve the case when bottom and one of the
17384 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17385 operand, in that case check if the other operand is multiple of
17386 bottom divided by the INTEGER_CST operand.
17387
17388 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17389
17390 PR target/83858
17391 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17392 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17393 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17394 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17395 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17396 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17397 (pa_function_arg_size): New function.
17398
17399 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17400
17401 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17402 in a separate statement.
17403
17404 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17405
17406 PR tree-optimization/83847
17407 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17408 group gathers and scatters.
17409
17410 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17411
17412 PR rtl-optimization/86620
17413 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17414
17415 PR rtl-optimization/83213
17416 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17417 to last if both are JUMP_INSNs.
17418
17419 PR tree-optimization/83843
17420 * gimple-ssa-store-merging.c
17421 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17422 store_immediate_info for bswap/nop orig_stores.
17423
17424 2018-01-15 Andrew Waterman <andrew@sifive.com>
17425
17426 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17427 !TARGET_MUL.
17428 <UDIV>: Increase cost if !TARGET_DIV.
17429
17430 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17431
17432 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17433 (define_attr "cr_logical_3op"): New.
17434 (cceq_ior_compare): Adjust.
17435 (cceq_ior_compare_complement): Adjust.
17436 (*cceq_rev_compare): Adjust.
17437 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17438 (is_cracked_insn): Adjust.
17439 (insn_must_be_first_in_group): Adjust.
17440 * config/rs6000/40x.md: Adjust.
17441 * config/rs6000/440.md: Adjust.
17442 * config/rs6000/476.md: Adjust.
17443 * config/rs6000/601.md: Adjust.
17444 * config/rs6000/603.md: Adjust.
17445 * config/rs6000/6xx.md: Adjust.
17446 * config/rs6000/7450.md: Adjust.
17447 * config/rs6000/7xx.md: Adjust.
17448 * config/rs6000/8540.md: Adjust.
17449 * config/rs6000/cell.md: Adjust.
17450 * config/rs6000/e300c2c3.md: Adjust.
17451 * config/rs6000/e500mc.md: Adjust.
17452 * config/rs6000/e500mc64.md: Adjust.
17453 * config/rs6000/e5500.md: Adjust.
17454 * config/rs6000/e6500.md: Adjust.
17455 * config/rs6000/mpc.md: Adjust.
17456 * config/rs6000/power4.md: Adjust.
17457 * config/rs6000/power5.md: Adjust.
17458 * config/rs6000/power6.md: Adjust.
17459 * config/rs6000/power7.md: Adjust.
17460 * config/rs6000/power8.md: Adjust.
17461 * config/rs6000/power9.md: Adjust.
17462 * config/rs6000/rs64.md: Adjust.
17463 * config/rs6000/titan.md: Adjust.
17464
17465 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17466
17467 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17468 ix86_indirect_branch_register logic.
17469
17470 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17471
17472 * config/i386/constraints.md (Bs): Update
17473 ix86_indirect_branch_register check. Don't check
17474 ix86_indirect_branch_register with GOT_memory_operand.
17475 (Bw): Likewise.
17476 * config/i386/predicates.md (GOT_memory_operand): Don't check
17477 ix86_indirect_branch_register here.
17478 (GOT32_symbol_operand): Likewise.
17479
17480 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17481
17482 * config/i386/predicates.md (constant_call_address_operand):
17483 Rewrite ix86_indirect_branch_register logic.
17484 (sibcall_insn_operand): Likewise.
17485
17486 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17487
17488 * config/i386/constraints.md (Bs): Replace
17489 ix86_indirect_branch_thunk_register with
17490 ix86_indirect_branch_register.
17491 (Bw): Likewise.
17492 * config/i386/i386.md (indirect_jump): Likewise.
17493 (tablejump): Likewise.
17494 (*sibcall_memory): Likewise.
17495 (*sibcall_value_memory): Likewise.
17496 Peepholes of indirect call and jump via memory: Likewise.
17497 * config/i386/i386.opt: Likewise.
17498 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17499 (GOT_memory_operand): Likewise.
17500 (call_insn_operand): Likewise.
17501 (sibcall_insn_operand): Likewise.
17502 (GOT32_symbol_operand): Likewise.
17503
17504 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17505
17506 PR middle-end/83837
17507 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17508 type rather than type addr's type points to.
17509 (expand_omp_atomic_mutex): Likewise.
17510 (expand_omp_atomic): Likewise.
17511
17512 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17513
17514 PR target/83839
17515 * config/i386/i386.c (output_indirect_thunk_function): Use
17516 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17517 for __x86_return_thunk.
17518
17519 2018-01-15 Richard Biener <rguenther@suse.de>
17520
17521 PR middle-end/83850
17522 * expmed.c (extract_bit_field_1): Fix typo.
17523
17524 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17525
17526 PR target/83687
17527 * config/arm/iterators.md (VF): New mode iterator.
17528 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17529 Remove integer-related logic from pattern.
17530 (neon_vabd<mode>_3): Likewise.
17531
17532 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17533
17534 PR middle-end/82694
17535 * common.opt (fstrict-overflow): No longer an alias.
17536 (fwrapv-pointer): New option.
17537 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17538 also for pointer types based on flag_wrapv_pointer.
17539 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17540 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17541 opts->x_flag_wrapv got set.
17542 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17543 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17544 POINTER_TYPE_OVERFLOW_UNDEFINED.
17545 * match.pd: Likewise in address comparison pattern.
17546 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17547
17548 2018-01-15 Richard Biener <rguenther@suse.de>
17549
17550 PR lto/83804
17551 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17552 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17553 Reset type names to their identifier if their TYPE_DECL doesn't
17554 have linkage (and thus is used for ODR and devirt).
17555 (save_debug_info_for_decl): Remove.
17556 (save_debug_info_for_type): Likewise.
17557 (add_tree_to_fld_list): Adjust.
17558 * tree-pretty-print.c (dump_generic_node): Make dumping of
17559 type names more robust.
17560
17561 2018-01-15 Richard Biener <rguenther@suse.de>
17562
17563 * BASE-VER: Bump to 8.0.1.
17564
17565 2018-01-14 Martin Sebor <msebor@redhat.com>
17566
17567 PR other/83508
17568 * builtins.c (check_access): Avoid warning when the no-warning bit
17569 is set.
17570
17571 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17572
17573 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17574 * ira-color (allocno_hard_regs_compare): Likewise.
17575
17576 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17577
17578 PR target/83013
17579 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17580 Use .pushsection/.popsection.
17581
17582 2018-01-14 Martin Sebor <msebor@redhat.com>
17583
17584 PR c++/81327
17585 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17586
17587 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17588
17589 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17590 entry from extra_headers.
17591 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17592 extra_headers, make the list bitwise identical to the i?86-*-* one.
17593
17594 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17595
17596 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17597 -mcmodel=large with -mindirect-branch=thunk,
17598 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17599 -mfunction-return=thunk-extern.
17600 * doc/invoke.texi: Document -mcmodel=large is incompatible with
17601 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17602 -mfunction-return=thunk and -mfunction-return=thunk-extern.
17603
17604 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17605
17606 * config/i386/i386.c (print_reg): Print the name of the full
17607 integer register without '%'.
17608 (ix86_print_operand): Handle 'V'.
17609 * doc/extend.texi: Document 'V' modifier.
17610
17611 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17612
17613 * config/i386/constraints.md (Bs): Disallow memory operand for
17614 -mindirect-branch-register.
17615 (Bw): Likewise.
17616 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17617 (GOT_memory_operand): Likewise.
17618 (call_insn_operand): Likewise.
17619 (sibcall_insn_operand): Likewise.
17620 (GOT32_symbol_operand): Likewise.
17621 * config/i386/i386.md (indirect_jump): Call convert_memory_address
17622 for -mindirect-branch-register.
17623 (tablejump): Likewise.
17624 (*sibcall_memory): Likewise.
17625 (*sibcall_value_memory): Likewise.
17626 Disallow peepholes of indirect call and jump via memory for
17627 -mindirect-branch-register.
17628 (*call_pop): Replace m with Bw.
17629 (*call_value_pop): Likewise.
17630 (*sibcall_pop_memory): Replace m with Bs.
17631 * config/i386/i386.opt (mindirect-branch-register): New option.
17632 * doc/invoke.texi: Document -mindirect-branch-register option.
17633
17634 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17635
17636 * config/i386/i386-protos.h (ix86_output_function_return): New.
17637 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17638 set function_return_type.
17639 (indirect_thunk_name): Add ret_p to indicate thunk for function
17640 return.
17641 (output_indirect_thunk_function): Pass false to
17642 indirect_thunk_name.
17643 (ix86_output_indirect_branch_via_reg): Likewise.
17644 (ix86_output_indirect_branch_via_push): Likewise.
17645 (output_indirect_thunk_function): Create alias for function
17646 return thunk if regno < 0.
17647 (ix86_output_function_return): New function.
17648 (ix86_handle_fndecl_attribute): Handle function_return.
17649 (ix86_attribute_table): Add function_return.
17650 * config/i386/i386.h (machine_function): Add
17651 function_return_type.
17652 * config/i386/i386.md (simple_return_internal): Use
17653 ix86_output_function_return.
17654 (simple_return_internal_long): Likewise.
17655 * config/i386/i386.opt (mfunction-return=): New option.
17656 (indirect_branch): Mention -mfunction-return=.
17657 * doc/extend.texi: Document function_return function attribute.
17658 * doc/invoke.texi: Document -mfunction-return= option.
17659
17660 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17661
17662 * config/i386/i386-opts.h (indirect_branch): New.
17663 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17664 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17665 with local indirect jump when converting indirect call and jump.
17666 (ix86_set_indirect_branch_type): New.
17667 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17668 (indirectlabelno): New.
17669 (indirect_thunk_needed): Likewise.
17670 (indirect_thunk_bnd_needed): Likewise.
17671 (indirect_thunks_used): Likewise.
17672 (indirect_thunks_bnd_used): Likewise.
17673 (INDIRECT_LABEL): Likewise.
17674 (indirect_thunk_name): Likewise.
17675 (output_indirect_thunk): Likewise.
17676 (output_indirect_thunk_function): Likewise.
17677 (ix86_output_indirect_branch_via_reg): Likewise.
17678 (ix86_output_indirect_branch_via_push): Likewise.
17679 (ix86_output_indirect_branch): Likewise.
17680 (ix86_output_indirect_jmp): Likewise.
17681 (ix86_code_end): Call output_indirect_thunk_function if needed.
17682 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17683 needed.
17684 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17685 (ix86_attribute_table): Add indirect_branch.
17686 * config/i386/i386.h (machine_function): Add indirect_branch_type
17687 and has_local_indirect_jump.
17688 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17689 to true.
17690 (tablejump): Likewise.
17691 (*indirect_jump): Use ix86_output_indirect_jmp.
17692 (*tablejump_1): Likewise.
17693 (simple_return_indirect_internal): Likewise.
17694 * config/i386/i386.opt (mindirect-branch=): New option.
17695 (indirect_branch): New.
17696 (keep): Likewise.
17697 (thunk): Likewise.
17698 (thunk-inline): Likewise.
17699 (thunk-extern): Likewise.
17700 * doc/extend.texi: Document indirect_branch function attribute.
17701 * doc/invoke.texi: Document -mindirect-branch= option.
17702
17703 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
17704
17705 PR ipa/83051
17706 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17707
17708 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
17709
17710 * ipa-inline.c (want_inline_small_function_p): Return false if
17711 inlining has already failed with CIF_FINAL_ERROR.
17712 (update_caller_keys): Call want_inline_small_function_p before
17713 can_inline_edge_p.
17714 (update_callee_keys): Likewise.
17715
17716 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17717
17718 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17719 New function.
17720 (rs6000_quadword_masked_address_p): Likewise.
17721 (quad_aligned_load_p): Likewise.
17722 (quad_aligned_store_p): Likewise.
17723 (const_load_sequence_p): Add comment to describe the outer-most loop.
17724 (mimic_memory_attributes_and_flags): New function.
17725 (rs6000_gen_stvx): Likewise.
17726 (replace_swapped_aligned_store): Likewise.
17727 (rs6000_gen_lvx): Likewise.
17728 (replace_swapped_aligned_load): Likewise.
17729 (replace_swapped_load_constant): Capitalize argument name in
17730 comment describing this function.
17731 (rs6000_analyze_swaps): Add a third pass to search for vector loads
17732 and stores that access quad-word aligned addresses and replace
17733 with stvx or lvx instructions when appropriate.
17734 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17735 New function prototype.
17736 (rs6000_quadword_masked_address_p): Likewise.
17737 (rs6000_gen_lvx): Likewise.
17738 (rs6000_gen_stvx): Likewise.
17739 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17740 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17741 when memory address is aligned.
17742 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17743 this split to select lvx instruction when memory address is aligned.
17744 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17745 instruction when memory address is aligned.
17746 (*vsx_le_perm_load_v16qi): Likewise.
17747 (four unnamed splitters): Modify to select the stvx instruction
17748 when memory is aligned.
17749
17750 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
17751
17752 * predict.c (determine_unlikely_bbs): Handle correctly BBs
17753 which appears in the queue multiple times.
17754
17755 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17756 Alan Hayward <alan.hayward@arm.com>
17757 David Sherwood <david.sherwood@arm.com>
17758
17759 * tree-vectorizer.h (vec_lower_bound): New structure.
17760 (_loop_vec_info): Add check_nonzero and lower_bounds.
17761 (LOOP_VINFO_CHECK_NONZERO): New macro.
17762 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17763 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17764 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17765 fields. Make seg_len the distance travelled, not including the
17766 access size.
17767 (dr_direction_indicator): Declare.
17768 (dr_zero_step_indicator): Likewise.
17769 (dr_known_forward_stride_p): Likewise.
17770 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17771 tree-ssanames.h.
17772 (runtime_alias_check_p): Allow runtime alias checks with
17773 variable strides.
17774 (operator ==): Compare access_size and align.
17775 (prune_runtime_alias_test_list): Rework for new distinction between
17776 the access_size and seg_len.
17777 (create_intersect_range_checks_index): Likewise. Cope with polynomial
17778 segment lengths.
17779 (get_segment_min_max): New function.
17780 (create_intersect_range_checks): Use it.
17781 (dr_step_indicator): New function.
17782 (dr_direction_indicator): Likewise.
17783 (dr_zero_step_indicator): Likewise.
17784 (dr_known_forward_stride_p): Likewise.
17785 * tree-loop-distribution.c (data_ref_segment_size): Return
17786 DR_STEP * (niters - 1).
17787 (compute_alias_check_pairs): Update call to the dr_with_seg_len
17788 constructor.
17789 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17790 (vect_preserves_scalar_order_p): New function, split out from...
17791 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17792 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17793 (vect_vfa_access_size): New function.
17794 (vect_vfa_align): Likewise.
17795 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17796 (dump_lower_bound): New function.
17797 (vect_check_lower_bound): Likewise.
17798 (vect_small_gap_p): Likewise.
17799 (vectorizable_with_step_bound_p): Likewise.
17800 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17801 depencies if the vectorization factor is 1. Convert the checks
17802 for nonzero steps into checks on the bounds of DR_STEP. Try using
17803 a bunds check for variable steps if the minimum required step is
17804 relatively small. Update calls to the dr_with_seg_len
17805 constructor and to vect_compile_time_alias.
17806 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17807 function.
17808 (vect_loop_versioning): Call it.
17809 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17810 when retrying.
17811 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17812
17813 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17814 Alan Hayward <alan.hayward@arm.com>
17815 David Sherwood <david.sherwood@arm.com>
17816
17817 * doc/sourcebuild.texi (vect_scatter_store): Document.
17818 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17819 optabs.
17820 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17821 Document.
17822 * genopinit.c (main): Add supports_vec_scatter_store and
17823 supports_vec_scatter_store_cached to target_optabs.
17824 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17825 IFN_MASK_SCATTER_STORE.
17826 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17827 functions.
17828 * internal-fn.h (internal_store_fn_p): Declare.
17829 (internal_fn_stored_value_index): Likewise.
17830 * internal-fn.c (scatter_store_direct): New macro.
17831 (expand_scatter_store_optab_fn): New function.
17832 (direct_scatter_store_optab_supported_p): New macro.
17833 (internal_store_fn_p): New function.
17834 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17835 IFN_MASK_SCATTER_STORE.
17836 (internal_fn_mask_index): Likewise.
17837 (internal_fn_stored_value_index): New function.
17838 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17839 for scatter stores.
17840 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17841 * optabs-query.c (supports_vec_scatter_store_p): New function.
17842 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17843 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17844 true for scatter stores.
17845 (vect_gather_scatter_fn_p): Handle scatter stores too.
17846 (vect_check_gather_scatter): Consider using scatter stores if
17847 supports_vec_scatter_store_p.
17848 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17849 scatter stores too.
17850 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17851 internal_fn_stored_value_index.
17852 (check_load_store_masking): Handle scatter stores too.
17853 (vect_get_store_rhs): Make public.
17854 (vectorizable_call): Use internal_store_fn_p.
17855 (vectorizable_store): Handle scatter store internal functions.
17856 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17857 when deciding whether the end of the group has been reached.
17858 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17859 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17860 (mask_scatter_store<mode>): New insns.
17861
17862 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17863 Alan Hayward <alan.hayward@arm.com>
17864 David Sherwood <david.sherwood@arm.com>
17865
17866 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17867 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17868 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17869 function.
17870 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17871 Use vect_truncate_gather_scatter_offset if we can't treat the
17872 operation as a normal gather load or scatter store.
17873 (get_group_load_store_type): Take the gather_scatter_info
17874 as argument. Try using a gather load or scatter store for
17875 single-element groups.
17876 (get_load_store_type): Update calls to get_group_load_store_type
17877 and vect_use_strided_gather_scatters_p.
17878
17879 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17880 Alan Hayward <alan.hayward@arm.com>
17881 David Sherwood <david.sherwood@arm.com>
17882
17883 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17884 optional tree argument.
17885 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17886 null target hooks.
17887 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17888 but continue to use the current value as a fallback.
17889 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17890 to compare the updates.
17891 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17892 (get_load_store_type): Use it when handling a strided access.
17893 (vect_get_strided_load_store_ops): New function.
17894 (vect_get_data_ptr_increment): Likewise.
17895 (vectorizable_load): Handle strided gather loads. Always pass
17896 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17897
17898 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17899 Alan Hayward <alan.hayward@arm.com>
17900 David Sherwood <david.sherwood@arm.com>
17901
17902 * doc/md.texi (gather_load@var{m}): Document.
17903 (mask_gather_load@var{m}): Likewise.
17904 * genopinit.c (main): Add supports_vec_gather_load and
17905 supports_vec_gather_load_cached to target_optabs.
17906 * optabs-tree.c (init_tree_optimization_optabs): Use
17907 ggc_cleared_alloc to allocate target_optabs.
17908 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17909 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17910 functions.
17911 * internal-fn.h (internal_load_fn_p): Declare.
17912 (internal_gather_scatter_fn_p): Likewise.
17913 (internal_fn_mask_index): Likewise.
17914 (internal_gather_scatter_fn_supported_p): Likewise.
17915 * internal-fn.c (gather_load_direct): New macro.
17916 (expand_gather_load_optab_fn): New function.
17917 (direct_gather_load_optab_supported_p): New macro.
17918 (direct_internal_fn_optab): New function.
17919 (internal_load_fn_p): Likewise.
17920 (internal_gather_scatter_fn_p): Likewise.
17921 (internal_fn_mask_index): Likewise.
17922 (internal_gather_scatter_fn_supported_p): Likewise.
17923 * optabs-query.c (supports_at_least_one_mode_p): New function.
17924 (supports_vec_gather_load_p): Likewise.
17925 * optabs-query.h (supports_vec_gather_load_p): Declare.
17926 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17927 and memory_type field.
17928 (NUM_PATTERNS): Bump to 15.
17929 * tree-vect-data-refs.c: Include internal-fn.h.
17930 (vect_gather_scatter_fn_p): New function.
17931 (vect_describe_gather_scatter_call): Likewise.
17932 (vect_check_gather_scatter): Try using internal functions for
17933 gather loads. Recognize existing calls to a gather load function.
17934 (vect_analyze_data_refs): Consider using gather loads if
17935 supports_vec_gather_load_p.
17936 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17937 (vect_get_gather_scatter_offset_type): Likewise.
17938 (vect_convert_mask_for_vectype): Likewise.
17939 (vect_add_conversion_to_patterm): Likewise.
17940 (vect_try_gather_scatter_pattern): Likewise.
17941 (vect_recog_gather_scatter_pattern): New pattern recognizer.
17942 (vect_vect_recog_func_ptrs): Add it.
17943 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17944 internal_fn_mask_index and internal_gather_scatter_fn_p.
17945 (check_load_store_masking): Take the gather_scatter_info as an
17946 argument and handle gather loads.
17947 (vect_get_gather_scatter_ops): New function.
17948 (vectorizable_call): Check internal_load_fn_p.
17949 (vectorizable_load): Likewise. Handle gather load internal
17950 functions.
17951 (vectorizable_store): Update call to check_load_store_masking.
17952 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17953 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17954 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17955 (aarch64_gather_scale_operand_d): New predicates.
17956 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17957 (mask_gather_load<mode>): New insns.
17958
17959 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17960 Alan Hayward <alan.hayward@arm.com>
17961 David Sherwood <david.sherwood@arm.com>
17962
17963 * optabs.def (fold_left_plus_optab): New optab.
17964 * doc/md.texi (fold_left_plus_@var{m}): Document.
17965 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17966 * internal-fn.c (fold_left_direct): Define.
17967 (expand_fold_left_optab_fn): Likewise.
17968 (direct_fold_left_optab_supported_p): Likewise.
17969 * fold-const-call.c (fold_const_fold_left): New function.
17970 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17971 * tree-parloops.c (valid_reduction_p): New function.
17972 (gather_scalar_reductions): Use it.
17973 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17974 (vect_finish_replace_stmt): Declare.
17975 * tree-vect-loop.c (fold_left_reduction_fn): New function.
17976 (needs_fold_left_reduction_p): New function, split out from...
17977 (vect_is_simple_reduction): ...here. Accept reductions that
17978 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17979 (vect_force_simple_reduction): Also store the reduction type in
17980 the assignment's STMT_VINFO_REDUC_TYPE.
17981 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17982 (merge_with_identity): New function.
17983 (vect_expand_fold_left): Likewise.
17984 (vectorize_fold_left_reduction): Likewise.
17985 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
17986 scalar phi in place for it. Check for target support and reject
17987 cases that would reassociate the operation. Defer the transform
17988 phase to vectorize_fold_left_reduction.
17989 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17990 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17991 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17992
17993 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17994
17995 * tree-if-conv.c (predicate_mem_writes): Remove redundant
17996 call to ifc_temp_var.
17997
17998 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17999 Alan Hayward <alan.hayward@arm.com>
18000 David Sherwood <david.sherwood@arm.com>
18001
18002 * target.def (legitimize_address_displacement): Take the original
18003 offset as a poly_int.
18004 * targhooks.h (default_legitimize_address_displacement): Update
18005 accordingly.
18006 * targhooks.c (default_legitimize_address_displacement): Likewise.
18007 * doc/tm.texi: Regenerate.
18008 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18009 as an argument, moving assert of ad->disp == ad->disp_term to...
18010 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18011 Try calling targetm.legitimize_address_displacement before expanding
18012 the address rather than afterwards, and adjust for the new interface.
18013 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18014 Match the new hook interface. Handle SVE addresses.
18015 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18016 new hook interface.
18017
18018 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18019
18020 * Makefile.in (OBJS): Add early-remat.o.
18021 * target.def (select_early_remat_modes): New hook.
18022 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18023 * doc/tm.texi: Regenerate.
18024 * targhooks.h (default_select_early_remat_modes): Declare.
18025 * targhooks.c (default_select_early_remat_modes): New function.
18026 * timevar.def (TV_EARLY_REMAT): New timevar.
18027 * passes.def (pass_early_remat): New pass.
18028 * tree-pass.h (make_pass_early_remat): Declare.
18029 * early-remat.c: New file.
18030 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18031 function.
18032 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18033
18034 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18035 Alan Hayward <alan.hayward@arm.com>
18036 David Sherwood <david.sherwood@arm.com>
18037
18038 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18039 vfm1 with a bound_epilog parameter.
18040 (vect_do_peeling): Update calls accordingly, and move the prologue
18041 call earlier in the function. Treat the base bound_epilog as 0 for
18042 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18043 this base when peeling for gaps.
18044 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18045 with fully-masked loops.
18046 (vect_estimate_min_profitable_iters): Handle the single peeled
18047 iteration in that case.
18048
18049 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18050 Alan Hayward <alan.hayward@arm.com>
18051 David Sherwood <david.sherwood@arm.com>
18052
18053 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18054 single-element interleaving even if the size is not a power of 2.
18055 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18056 accesses for single-element interleaving if the group size is
18057 not a power of 2.
18058
18059 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18060 Alan Hayward <alan.hayward@arm.com>
18061 David Sherwood <david.sherwood@arm.com>
18062
18063 * doc/md.texi (fold_extract_last_@var{m}): Document.
18064 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18065 * optabs.def (fold_extract_last_optab): New optab.
18066 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18067 * internal-fn.c (fold_extract_direct): New macro.
18068 (expand_fold_extract_optab_fn): Likewise.
18069 (direct_fold_extract_optab_supported_p): Likewise.
18070 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18071 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18072 EXTRACT_LAST_REDUCTION.
18073 (get_initial_def_for_reduction): Do not create an initial vector
18074 for EXTRACT_LAST_REDUCTION reductions.
18075 (vectorizable_reduction): Leave the scalar phi in place for
18076 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18077 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18078 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18079 transform phase to vectorizable_condition.
18080 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18081 split out from...
18082 (vect_finish_stmt_generation): ...here.
18083 (vect_finish_replace_stmt): New function.
18084 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18085 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18086 pattern.
18087 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18088
18089 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18090 Alan Hayward <alan.hayward@arm.com>
18091 David Sherwood <david.sherwood@arm.com>
18092
18093 * doc/md.texi (extract_last_@var{m}): Document.
18094 * optabs.def (extract_last_optab): New optab.
18095 * internal-fn.def (EXTRACT_LAST): New internal function.
18096 * internal-fn.c (cond_unary_direct): New macro.
18097 (expand_cond_unary_optab_fn): Likewise.
18098 (direct_cond_unary_optab_supported_p): Likewise.
18099 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18100 loops using EXTRACT_LAST.
18101 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18102 (extract_last_<mode>): ...this optab.
18103 (vec_extract<mode><Vel>): Update accordingly.
18104
18105 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18106 Alan Hayward <alan.hayward@arm.com>
18107 David Sherwood <david.sherwood@arm.com>
18108
18109 * target.def (empty_mask_is_expensive): New hook.
18110 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18111 * doc/tm.texi: Regenerate.
18112 * targhooks.h (default_empty_mask_is_expensive): Declare.
18113 * targhooks.c (default_empty_mask_is_expensive): New function.
18114 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18115 if the target says that empty masks are expensive.
18116 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18117 New function.
18118 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18119
18120 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18121 Alan Hayward <alan.hayward@arm.com>
18122 David Sherwood <david.sherwood@arm.com>
18123
18124 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18125 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18126 (vect_use_loop_mask_for_alignment_p): New function.
18127 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18128 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18129 niters_skip argument. Make sure that the first niters_skip elements
18130 of the first iteration are inactive.
18131 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18132 Update call to vect_set_loop_masks_directly.
18133 (get_misalign_in_elems): New function, split out from...
18134 (vect_gen_prolog_loop_niters): ...here.
18135 (vect_update_init_of_dr): Take a code argument that specifies whether
18136 the adjustment should be added or subtracted.
18137 (vect_update_init_of_drs): Likewise.
18138 (vect_prepare_for_masked_peels): New function.
18139 (vect_do_peeling): Skip prologue peeling if we're using a mask
18140 instead. Update call to vect_update_inits_of_drs.
18141 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18142 mask_skip_niters.
18143 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18144 alignment. Do not include the number of peeled iterations in
18145 the minimum threshold in that case.
18146 (vectorizable_induction): Adjust the start value down by
18147 LOOP_VINFO_MASK_SKIP_NITERS iterations.
18148 (vect_transform_loop): Call vect_prepare_for_masked_peels.
18149 Take the number of skipped iterations into account when calculating
18150 the loop bounds.
18151 * tree-vect-stmts.c (vect_gen_while_not): New function.
18152
18153 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18154 Alan Hayward <alan.hayward@arm.com>
18155 David Sherwood <david.sherwood@arm.com>
18156
18157 * doc/sourcebuild.texi (vect_fully_masked): Document.
18158 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18159 default value to 0.
18160 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18161 split out from...
18162 (vect_analyze_loop_2): ...here. Don't check the vectorization
18163 factor against the number of loop iterations if the loop is
18164 fully-masked.
18165
18166 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18167 Alan Hayward <alan.hayward@arm.com>
18168 David Sherwood <david.sherwood@arm.com>
18169
18170 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18171 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18172 (dump_groups): Update accordingly.
18173 (iv_use::mem_type): New member variable.
18174 (address_p): New function.
18175 (record_use): Add a mem_type argument and initialize the new
18176 mem_type field.
18177 (record_group_use): Add a mem_type argument. Use address_p.
18178 Remove obsolete null checks of base_object. Update call to record_use.
18179 (find_interesting_uses_op): Update call to record_group_use.
18180 (find_interesting_uses_cond): Likewise.
18181 (find_interesting_uses_address): Likewise.
18182 (get_mem_type_for_internal_fn): New function.
18183 (find_address_like_use): Likewise.
18184 (find_interesting_uses_stmt): Try find_address_like_use before
18185 calling find_interesting_uses_op.
18186 (addr_offset_valid_p): Use the iv mem_type field as the type
18187 of the addressed memory.
18188 (add_autoinc_candidates): Likewise.
18189 (get_address_cost): Likewise.
18190 (split_small_address_groups_p): Use address_p.
18191 (split_address_groups): Likewise.
18192 (add_iv_candidate_for_use): Likewise.
18193 (autoinc_possible_for_pair): Likewise.
18194 (rewrite_groups): Likewise.
18195 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18196 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18197 (get_alias_ptr_type_for_ptr_address): New function.
18198 (rewrite_use_address): Rewrite address uses in calls that were
18199 identified by find_address_like_use.
18200
18201 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18202 Alan Hayward <alan.hayward@arm.com>
18203 David Sherwood <david.sherwood@arm.com>
18204
18205 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18206 TARGET_MEM_REFs.
18207 * gimple-expr.h (is_gimple_addressable: Likewise.
18208 * gimple-expr.c (is_gimple_address): Likewise.
18209 * internal-fn.c (expand_call_mem_ref): New function.
18210 (expand_mask_load_optab_fn): Use it.
18211 (expand_mask_store_optab_fn): Likewise.
18212
18213 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18214 Alan Hayward <alan.hayward@arm.com>
18215 David Sherwood <david.sherwood@arm.com>
18216
18217 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18218 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18219 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18220 (cond_umax@var{mode}): Document.
18221 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18222 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18223 (cond_umin_optab, cond_umax_optab): New optabs.
18224 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18225 (COND_IOR, COND_XOR): New internal functions.
18226 * internal-fn.h (get_conditional_internal_fn): Declare.
18227 * internal-fn.c (cond_binary_direct): New macro.
18228 (expand_cond_binary_optab_fn): Likewise.
18229 (direct_cond_binary_optab_supported_p): Likewise.
18230 (get_conditional_internal_fn): New function.
18231 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18232 Cope with reduction statements that are vectorized as calls rather
18233 than assignments.
18234 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18235 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18236 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18237 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18238 (UNSPEC_COND_EOR): New unspecs.
18239 (optab): Add mappings for them.
18240 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18241 (sve_int_op, sve_fp_op): New int attributes.
18242
18243 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18244 Alan Hayward <alan.hayward@arm.com>
18245 David Sherwood <david.sherwood@arm.com>
18246
18247 * optabs.def (while_ult_optab): New optab.
18248 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18249 * internal-fn.def (WHILE_ULT): New internal function.
18250 * internal-fn.h (direct_internal_fn_supported_p): New override
18251 that takes two types as argument.
18252 * internal-fn.c (while_direct): New macro.
18253 (expand_while_optab_fn): New function.
18254 (convert_optab_supported_p): Likewise.
18255 (direct_while_optab_supported_p): New macro.
18256 * wide-int.h (wi::udiv_ceil): New function.
18257 * tree-vectorizer.h (rgroup_masks): New structure.
18258 (vec_loop_masks): New typedef.
18259 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18260 and fully_masked_p.
18261 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18262 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18263 (vect_max_vf): New function.
18264 (slpeel_make_loop_iterate_ntimes): Delete.
18265 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18266 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18267 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18268 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18269 internal-fn.h, stor-layout.h and optabs-query.h.
18270 (vect_set_loop_mask): New function.
18271 (add_preheader_seq): Likewise.
18272 (add_header_seq): Likewise.
18273 (interleave_supported_p): Likewise.
18274 (vect_maybe_permute_loop_masks): Likewise.
18275 (vect_set_loop_masks_directly): Likewise.
18276 (vect_set_loop_condition_masked): Likewise.
18277 (vect_set_loop_condition_unmasked): New function, split out from
18278 slpeel_make_loop_iterate_ntimes.
18279 (slpeel_make_loop_iterate_ntimes): Rename to..
18280 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18281 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18282 (vect_do_peeling): Update call accordingly.
18283 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18284 loops.
18285 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18286 mask_compare_type, can_fully_mask_p and fully_masked_p.
18287 (release_vec_loop_masks): New function.
18288 (_loop_vec_info): Use it to free the loop masks.
18289 (can_produce_all_loop_masks_p): New function.
18290 (vect_get_max_nscalars_per_iter): Likewise.
18291 (vect_verify_full_masking): Likewise.
18292 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18293 retries, and free the mask rgroups before retrying. Check loop-wide
18294 reasons for disallowing fully-masked loops. Make the final decision
18295 about whether use a fully-masked loop or not.
18296 (vect_estimate_min_profitable_iters): Do not assume that peeling
18297 for the number of iterations will be needed for fully-masked loops.
18298 (vectorizable_reduction): Disable fully-masked loops.
18299 (vectorizable_live_operation): Likewise.
18300 (vect_halve_mask_nunits): New function.
18301 (vect_double_mask_nunits): Likewise.
18302 (vect_record_loop_mask): Likewise.
18303 (vect_get_loop_mask): Likewise.
18304 (vect_transform_loop): Handle the case in which the final loop
18305 iteration might handle a partial vector. Call vect_set_loop_condition
18306 instead of slpeel_make_loop_iterate_ntimes.
18307 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18308 (check_load_store_masking): New function.
18309 (prepare_load_store_mask): Likewise.
18310 (vectorizable_store): Handle fully-masked loops.
18311 (vectorizable_load): Likewise.
18312 (supportable_widening_operation): Use vect_halve_mask_nunits for
18313 booleans.
18314 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18315 (vect_gen_while): New function.
18316 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18317 (aarch64_uqdec<mode>): New insn.
18318
18319 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18320 Alan Hayward <alan.hayward@arm.com>
18321 David Sherwood <david.sherwood@arm.com>
18322
18323 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18324 (reduc_xor_scal_optab): New optabs.
18325 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18326 (reduc_xor_scal_@var{m}): Document.
18327 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18328 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18329 internal functions.
18330 * fold-const-call.c (fold_const_call): Handle them.
18331 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18332 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18333 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18334 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18335 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18336 (UNSPEC_XORV): New unspecs.
18337 (optab): Add entries for them.
18338 (BITWISEV): New int iterator.
18339 (bit_reduc_op): New int attributes.
18340
18341 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18342 Alan Hayward <alan.hayward@arm.com>
18343 David Sherwood <david.sherwood@arm.com>
18344
18345 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18346 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18347 * optabs.def (vec_shl_insert_optab): New optab.
18348 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18349 (duplicate_and_interleave): Likewise.
18350 * tree-vect-loop.c: Include internal-fn.h.
18351 (neutral_op_for_slp_reduction): New function, split out from
18352 get_initial_defs_for_reduction.
18353 (get_initial_def_for_reduction): Handle option 2 for variable-length
18354 vectors by loading the neutral value into a vector and then shifting
18355 the initial value into element 0.
18356 (get_initial_defs_for_reduction): Replace the code argument with
18357 the neutral value calculated by neutral_op_for_slp_reduction.
18358 Use gimple_build_vector for constant-length vectors.
18359 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18360 but the first group_size elements have a neutral value.
18361 Use duplicate_and_interleave otherwise.
18362 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18363 Update call to get_initial_defs_for_reduction. Handle SLP
18364 reductions for variable-length vectors by creating one vector
18365 result for each scalar result, with the elements associated
18366 with other scalar results stubbed out with the neutral value.
18367 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18368 Require IFN_VEC_SHL_INSERT for double reductions on
18369 variable-length vectors, or SLP reductions that have
18370 a neutral value. Require can_duplicate_and_interleave_p
18371 support for variable-length unchained SLP reductions if there
18372 is no neutral value, such as for MIN/MAX reductions. Also require
18373 the number of vector elements to be a multiple of the number of
18374 SLP statements when doing variable-length unchained SLP reductions.
18375 Update call to vect_create_epilog_for_reduction.
18376 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18377 and remove initial values.
18378 (duplicate_and_interleave): Make public.
18379 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18380 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18381
18382 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18383 Alan Hayward <alan.hayward@arm.com>
18384 David Sherwood <david.sherwood@arm.com>
18385
18386 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18387 (can_duplicate_and_interleave_p): New function.
18388 (vect_get_and_check_slp_defs): Take the vector of statements
18389 rather than just the current one. Remove excess parentheses.
18390 Restriction rejectinon of vect_constant_def and vect_external_def
18391 for variable-length vectors to boolean types, or types for which
18392 can_duplicate_and_interleave_p is false.
18393 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18394 (duplicate_and_interleave): New function.
18395 (vect_get_constant_vectors): Use gimple_build_vector for
18396 constant-length vectors and suitable variable-length constant
18397 vectors. Use duplicate_and_interleave for other variable-length
18398 vectors. Don't defer the update when inserting new statements.
18399
18400 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18401 Alan Hayward <alan.hayward@arm.com>
18402 David Sherwood <david.sherwood@arm.com>
18403
18404 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18405 min_profitable_iters doesn't go negative.
18406
18407 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18408 Alan Hayward <alan.hayward@arm.com>
18409 David Sherwood <david.sherwood@arm.com>
18410
18411 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18412 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18413 * optabs.def (vec_mask_load_lanes_optab): New optab.
18414 (vec_mask_store_lanes_optab): Likewise.
18415 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18416 (MASK_STORE_LANES): Likewise.
18417 * internal-fn.c (mask_load_lanes_direct): New macro.
18418 (mask_store_lanes_direct): Likewise.
18419 (expand_mask_load_optab_fn): Handle masked operations.
18420 (expand_mask_load_lanes_optab_fn): New macro.
18421 (expand_mask_store_optab_fn): Handle masked operations.
18422 (expand_mask_store_lanes_optab_fn): New macro.
18423 (direct_mask_load_lanes_optab_supported_p): Likewise.
18424 (direct_mask_store_lanes_optab_supported_p): Likewise.
18425 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18426 parameter.
18427 (vect_load_lanes_supported): Likewise.
18428 * tree-vect-data-refs.c (strip_conversion): New function.
18429 (can_group_stmts_p): Likewise.
18430 (vect_analyze_data_ref_accesses): Use it instead of checking
18431 for a pair of assignments.
18432 (vect_store_lanes_supported): Take a masked_p parameter.
18433 (vect_load_lanes_supported): Likewise.
18434 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18435 vect_store_lanes_supported and vect_load_lanes_supported.
18436 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18437 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18438 parameter. Don't allow gaps for masked accesses.
18439 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18440 and vect_load_lanes_supported.
18441 (get_load_store_type): Take a masked_p parameter and update
18442 call to get_group_load_store_type.
18443 (vectorizable_store): Update call to get_load_store_type.
18444 Handle IFN_MASK_STORE_LANES.
18445 (vectorizable_load): Update call to get_load_store_type.
18446 Handle IFN_MASK_LOAD_LANES.
18447
18448 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18449 Alan Hayward <alan.hayward@arm.com>
18450 David Sherwood <david.sherwood@arm.com>
18451
18452 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18453 modes for SVE.
18454 * config/aarch64/aarch64-protos.h
18455 (aarch64_sve_struct_memory_operand_p): Declare.
18456 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18457 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18458 (VPRED, vpred): Handle SVE structure modes.
18459 * config/aarch64/constraints.md (Utx): New constraint.
18460 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18461 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18462 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18463 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18464 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18465 structure modes. Split into pieces after RA.
18466 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18467 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18468 New patterns.
18469 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18470 SVE structure modes.
18471 (aarch64_classify_address): Likewise.
18472 (sizetochar): Move earlier in file.
18473 (aarch64_print_operand): Handle SVE register lists.
18474 (aarch64_array_mode): New function.
18475 (aarch64_sve_struct_memory_operand_p): Likewise.
18476 (TARGET_ARRAY_MODE): Redefine.
18477
18478 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18479 Alan Hayward <alan.hayward@arm.com>
18480 David Sherwood <david.sherwood@arm.com>
18481
18482 * target.def (array_mode): New target hook.
18483 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18484 * doc/tm.texi: Regenerate.
18485 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18486 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18487 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18488 targetm.array_mode.
18489 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18490 type sizes.
18491
18492 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18493 Alan Hayward <alan.hayward@arm.com>
18494 David Sherwood <david.sherwood@arm.com>
18495
18496 * fold-const.c (fold_binary_loc): Check the argument types
18497 rather than the result type when testing for a vector operation.
18498
18499 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18500
18501 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18502 * doc/tm.texi: Regenerate.
18503
18504 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18505 Alan Hayward <alan.hayward@arm.com>
18506 David Sherwood <david.sherwood@arm.com>
18507
18508 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18509 (sve): Document new AArch64 extension.
18510 * doc/md.texi (w): Extend the description of the AArch64
18511 constraint to include SVE vectors.
18512 (Upl, Upa): Document new AArch64 predicate constraints.
18513 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18514 enum.
18515 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18516 (msve-vector-bits=): New option.
18517 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18518 SVE when these are disabled.
18519 (sve): New extension.
18520 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18521 modes. Adjust their number of units based on aarch64_sve_vg.
18522 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18523 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18524 aarch64_addr_query_type.
18525 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18526 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18527 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18528 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18529 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18530 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18531 (aarch64_simd_imm_zero_p): Delete.
18532 (aarch64_check_zero_based_sve_index_immediate): Declare.
18533 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18534 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18535 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18536 (aarch64_sve_float_mul_immediate_p): Likewise.
18537 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18538 rather than an rtx.
18539 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18540 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18541 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18542 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18543 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18544 (aarch64_regmode_natural_size): Likewise.
18545 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18546 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18547 left one place.
18548 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18549 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18550 for VG and the SVE predicate registers.
18551 (V_ALIASES): Add a "z"-prefixed alias.
18552 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18553 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18554 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18555 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18556 (REG_CLASS_NAMES): Add entries for them.
18557 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18558 and the predicate registers.
18559 (aarch64_sve_vg): Declare.
18560 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18561 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18562 (REGMODE_NATURAL_SIZE): Define.
18563 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18564 SVE macros.
18565 * config/aarch64/aarch64.c: Include cfgrtl.h.
18566 (simd_immediate_info): Add a constructor for series vectors,
18567 and an associated step field.
18568 (aarch64_sve_vg): New variable.
18569 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18570 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18571 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18572 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18573 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18574 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18575 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18576 (aarch64_get_mask_mode): New functions.
18577 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18578 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18579 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18580 predicate modes and predicate registers. Explicitly restrict
18581 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18582 to store a vector mode if it is recognized by
18583 aarch64_classify_vector_mode.
18584 (aarch64_regmode_natural_size): New function.
18585 (aarch64_hard_regno_caller_save_mode): Return the original mode
18586 for predicates.
18587 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18588 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18589 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18590 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18591 functions.
18592 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18593 does not overlap dest if the function is frame-related. Handle
18594 SVE constants.
18595 (aarch64_split_add_offset): New function.
18596 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18597 them aarch64_add_offset.
18598 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18599 and update call to aarch64_sub_sp.
18600 (aarch64_add_cfa_expression): New function.
18601 (aarch64_expand_prologue): Pass extra temporary registers to the
18602 functions above. Handle the case in which we need to emit new
18603 DW_CFA_expressions for registers that were originally saved
18604 relative to the stack pointer, but now have to be expressed
18605 relative to the frame pointer.
18606 (aarch64_output_mi_thunk): Pass extra temporary registers to the
18607 functions above.
18608 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
18609 IP0 and IP1 values for SVE frames.
18610 (aarch64_expand_vec_series): New function.
18611 (aarch64_expand_sve_widened_duplicate): Likewise.
18612 (aarch64_expand_sve_const_vector): Likewise.
18613 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18614 Handle SVE constants. Use emit_move_insn to move a force_const_mem
18615 into the register, rather than emitting a SET directly.
18616 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18617 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18618 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18619 (offset_9bit_signed_scaled_p): New functions.
18620 (aarch64_replicate_bitmask_imm): New function.
18621 (aarch64_bitmask_imm): Use it.
18622 (aarch64_cannot_force_const_mem): Reject expressions involving
18623 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
18624 (aarch64_classify_index): Handle SVE indices, by requiring
18625 a plain register index with a scale that matches the element size.
18626 (aarch64_classify_address): Handle SVE addresses. Assert that
18627 the mode of the address is VOIDmode or an integer mode.
18628 Update call to aarch64_classify_symbol.
18629 (aarch64_classify_symbolic_expression): Update call to
18630 aarch64_classify_symbol.
18631 (aarch64_const_vec_all_in_range_p): New function.
18632 (aarch64_print_vector_float_operand): Likewise.
18633 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
18634 "vN" for FP registers with SVE modes. Handle (const ...) vectors
18635 and the FP immediates 1.0 and 0.5.
18636 (aarch64_print_address_internal): Handle SVE addresses.
18637 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18638 (aarch64_regno_regclass): Handle predicate registers.
18639 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18640 data modes.
18641 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18642 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18643 (aarch64_convert_sve_vector_bits): New function.
18644 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18645 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18646 rather than an rtx.
18647 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18648 Handle SVE vector and predicate modes. Accept VL-based constants
18649 that need only one temporary register, and VL offsets that require
18650 no temporary registers.
18651 (aarch64_conditional_register_usage): Mark the predicate registers
18652 as fixed if SVE isn't available.
18653 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18654 Return true for SVE vector and predicate modes.
18655 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18656 rather than an unsigned int. Handle SVE modes.
18657 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18658 SVE modes.
18659 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18660 if SVE is enabled.
18661 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18662 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18663 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18664 (aarch64_sve_float_mul_immediate_p): New functions.
18665 (aarch64_sve_valid_immediate): New function.
18666 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18667 Explicitly reject structure modes. Check for INDEX constants.
18668 Handle PTRUE and PFALSE constants.
18669 (aarch64_check_zero_based_sve_index_immediate): New function.
18670 (aarch64_simd_imm_zero_p): Delete.
18671 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18672 vector modes. Accept constants in the range of CNT[BHWD].
18673 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18674 ask for an Advanced SIMD mode.
18675 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18676 (aarch64_simd_vector_alignment): Handle SVE predicates.
18677 (aarch64_vectorize_preferred_vector_alignment): New function.
18678 (aarch64_simd_vector_alignment_reachable): Use it instead of
18679 the vector size.
18680 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18681 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18682 functions.
18683 (MAX_VECT_LEN): Delete.
18684 (expand_vec_perm_d): Add a vec_flags field.
18685 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18686 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18687 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18688 for SVE modes.
18689 (aarch64_evpc_rev): Rename to...
18690 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18691 (aarch64_evpc_rev_global): New function.
18692 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18693 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18694 MAX_VECT_LEN.
18695 (aarch64_evpc_sve_tbl): New function.
18696 (aarch64_expand_vec_perm_const_1): Update after rename of
18697 aarch64_evpc_rev. Handle SVE permutes too, trying
18698 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18699 than aarch64_evpc_tbl.
18700 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18701 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18702 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18703 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18704 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18705 (aarch64_expand_sve_vcond): New functions.
18706 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18707 of aarch64_vector_mode_p.
18708 (aarch64_dwarf_poly_indeterminate_value): New function.
18709 (aarch64_compute_pressure_classes): Likewise.
18710 (aarch64_can_change_mode_class): Likewise.
18711 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18712 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18713 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18714 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18715 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18716 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18717 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18718 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18719 constraints.
18720 (Dn, Dl, Dr): Accept const as well as const_vector.
18721 (Dz): Likewise. Compare against CONST0_RTX.
18722 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18723 of "vector" where appropriate.
18724 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18725 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18726 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18727 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18728 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18729 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18730 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18731 (v_int_equiv): Extend to SVE modes.
18732 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18733 mode attributes.
18734 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18735 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18736 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18737 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18738 (SVE_COND_FP_CMP): New int iterators.
18739 (perm_hilo): Handle the new unpack unspecs.
18740 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18741 attributes.
18742 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18743 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18744 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18745 (aarch64_equality_operator, aarch64_constant_vector_operand)
18746 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18747 (aarch64_sve_nonimmediate_operand): Likewise.
18748 (aarch64_sve_general_operand): Likewise.
18749 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18750 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18751 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18752 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18753 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18754 (aarch64_sve_float_arith_immediate): Likewise.
18755 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18756 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18757 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18758 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18759 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18760 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18761 (aarch64_sve_float_arith_operand): Likewise.
18762 (aarch64_sve_float_arith_with_sub_operand): Likewise.
18763 (aarch64_sve_float_mul_operand): Likewise.
18764 (aarch64_sve_vec_perm_operand): Likewise.
18765 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18766 (aarch64_mov_operand): Accept const_poly_int and const_vector.
18767 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18768 as well as const_vector.
18769 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18770 in file. Use CONST0_RTX and CONSTM1_RTX.
18771 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
18772 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18773 Use aarch64_simd_imm_zero.
18774 * config/aarch64/aarch64-sve.md: New file.
18775 * config/aarch64/aarch64.md: Include it.
18776 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18777 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18778 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18779 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18780 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18781 (sve): New attribute.
18782 (enabled): Disable instructions with the sve attribute unless
18783 TARGET_SVE.
18784 (movqi, movhi): Pass CONST_POLY_INT operaneds through
18785 aarch64_expand_mov_immediate.
18786 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18787 CNT[BHSD] immediates.
18788 (movti): Split CONST_POLY_INT moves into two halves.
18789 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18790 Split additions that need a temporary here if the destination
18791 is the stack pointer.
18792 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18793 (*add<mode>3_poly_1): New instruction.
18794 (set_clobber_cc): New expander.
18795
18796 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18797
18798 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18799 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18800 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18801 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18802 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18803 Change innermode from fixed_mode_size to machine_mode.
18804 (simplify_subreg): Update call accordingly. Handle a constant-sized
18805 subreg of a variable-length CONST_VECTOR.
18806
18807 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18808 Alan Hayward <alan.hayward@arm.com>
18809 David Sherwood <david.sherwood@arm.com>
18810
18811 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18812 (add_offset_to_base): New function, split out from...
18813 (create_mem_ref): ...here. When handling a scale other than 1,
18814 check first whether the address is valid without the offset.
18815 Add it into the base if so, leaving the index and scale as-is.
18816
18817 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18818
18819 PR c++/83778
18820 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18821 fold_for_warn before checking if arg2 is INTEGER_CST.
18822
18823 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18824
18825 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18826 (store_multiple_operation): Delete.
18827 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18828 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18829 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18830 guarded by TARGET_STRING.
18831 (rs6000_output_load_multiple): Delete.
18832 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18833 OPTION_MASK_STRING / TARGET_STRING handling.
18834 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18835 (const rs6000_opt_masks) <"string">: Change mask to 0.
18836 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18837 (MASK_STRING): Delete.
18838 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18839 parts. Simplify.
18840 (load_multiple): Delete.
18841 (*ldmsi8): Delete.
18842 (*ldmsi7): Delete.
18843 (*ldmsi6): Delete.
18844 (*ldmsi5): Delete.
18845 (*ldmsi4): Delete.
18846 (*ldmsi3): Delete.
18847 (store_multiple): Delete.
18848 (*stmsi8): Delete.
18849 (*stmsi7): Delete.
18850 (*stmsi6): Delete.
18851 (*stmsi5): Delete.
18852 (*stmsi4): Delete.
18853 (*stmsi3): Delete.
18854 (movmemsi_8reg): Delete.
18855 (corresponding unnamed define_insn): Delete.
18856 (movmemsi_6reg): Delete.
18857 (corresponding unnamed define_insn): Delete.
18858 (movmemsi_4reg): Delete.
18859 (corresponding unnamed define_insn): Delete.
18860 (movmemsi_2reg): Delete.
18861 (corresponding unnamed define_insn): Delete.
18862 (movmemsi_1reg): Delete.
18863 (corresponding unnamed define_insn): Delete.
18864 * config/rs6000/rs6000.opt (mno-string): New.
18865 (mstring): Replace by deprecation warning stub.
18866 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18867
18868 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18869
18870 * regrename.c (regrename_do_replace): If replacing the same
18871 reg multiple times, try to reuse last created gen_raw_REG.
18872
18873 PR debug/81155
18874 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18875 main to workaround a bug in GDB.
18876
18877 2018-01-12 Tom de Vries <tom@codesourcery.com>
18878
18879 PR target/83737
18880 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18881
18882 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18883
18884 PR rtl-optimization/80481
18885 * ira-color.c (get_cap_member): New function.
18886 (allocnos_conflict_by_live_ranges_p): Use it.
18887 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18888 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18889
18890 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18891
18892 PR target/83628
18893 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18894 (*saddl_se_1): Ditto.
18895 (*ssubsi_1): Ditto.
18896 (*ssubl_se_1): Ditto.
18897
18898 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18899
18900 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18901 rather than wi::to_widest for DR_INITs.
18902 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18903 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18904 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18905 INTEGER_CSTs.
18906 (vect_analyze_group_access_1): Note that here.
18907
18908 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18909
18910 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18911 polynomial type sizes.
18912
18913 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18914
18915 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18916 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18917 (gimple_add_tmp_var): Likewise.
18918
18919 2018-01-12 Martin Liska <mliska@suse.cz>
18920
18921 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18922 (gimple_alloc_sizes): Likewise.
18923 (dump_gimple_statistics): Use PRIu64 in printf format.
18924 * gimple.h: Change uint64_t to int.
18925
18926 2018-01-12 Martin Liska <mliska@suse.cz>
18927
18928 * tree-core.h: Use uint64_t instead of int.
18929 * tree.c (tree_node_counts): Likewise.
18930 (tree_node_sizes): Likewise.
18931 (dump_tree_statistics): Use PRIu64 in printf format.
18932
18933 2018-01-12 Martin Liska <mliska@suse.cz>
18934
18935 * Makefile.in: As qsort_chk is implemented in vec.c, add
18936 vec.o to linkage of gencfn-macros.
18937 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18938 passing the info to record_node_allocation_statistics.
18939 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18940 and pass the info.
18941 * ggc-common.c (struct ggc_usage): Add operator== and use
18942 it in operator< and compare function.
18943 * mem-stats.h (struct mem_usage): Likewise.
18944 * vec.c (struct vec_usage): Remove operator< and compare
18945 function. Can be simply inherited.
18946
18947 2018-01-12 Martin Jambor <mjambor@suse.cz>
18948
18949 PR target/81616
18950 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18951 * tree-ssa-math-opts.c: Include domwalk.h.
18952 (convert_mult_to_fma_1): New function.
18953 (fma_transformation_info): New type.
18954 (fma_deferring_state): Likewise.
18955 (cancel_fma_deferring): New function.
18956 (result_of_phi): Likewise.
18957 (last_fma_candidate_feeds_initial_phi): Likewise.
18958 (convert_mult_to_fma): Added deferring logic, split actual
18959 transformation to convert_mult_to_fma_1.
18960 (math_opts_dom_walker): New type.
18961 (math_opts_dom_walker::after_dom_children): New method, body moved
18962 here from pass_optimize_widening_mul::execute, added deferring logic
18963 bits.
18964 (pass_optimize_widening_mul::execute): Moved most of code to
18965 math_opts_dom_walker::after_dom_children.
18966 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18967 * config/i386/i386.c (ix86_option_override_internal): Added
18968 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18969
18970 2018-01-12 Richard Biener <rguenther@suse.de>
18971
18972 PR debug/83157
18973 * dwarf2out.c (gen_variable_die): Do not reset old_die for
18974 inline instance vars.
18975
18976 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
18977
18978 PR target/81819
18979 * config/rx/rx.c (rx_is_restricted_memory_address):
18980 Handle SUBREG case.
18981
18982 2018-01-12 Richard Biener <rguenther@suse.de>
18983
18984 PR tree-optimization/80846
18985 * target.def (split_reduction): New target hook.
18986 * targhooks.c (default_split_reduction): New function.
18987 * targhooks.h (default_split_reduction): Declare.
18988 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18989 target requests first reduce vectors by combining low and high
18990 parts.
18991 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18992 (get_vectype_for_scalar_type_and_size): Export.
18993 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18994 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18995 * doc/tm.texi: Regenerate.
18996 * config/i386/i386.c (ix86_split_reduction): Implement
18997 TARGET_VECTORIZE_SPLIT_REDUCTION.
18998
18999 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19000
19001 PR target/83368
19002 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19003 in PIC mode except for TARGET_VXWORKS_RTP.
19004 * config/sparc/sparc.c: Include cfgrtl.h.
19005 (TARGET_INIT_PIC_REG): Define.
19006 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19007 (sparc_pic_register_p): New predicate.
19008 (sparc_legitimate_address_p): Use it.
19009 (sparc_legitimize_pic_address): Likewise.
19010 (sparc_delegitimize_address): Likewise.
19011 (sparc_mode_dependent_address_p): Likewise.
19012 (gen_load_pcrel_sym): Remove 4th parameter.
19013 (load_got_register): Adjust call to above. Remove obsolete stuff.
19014 (sparc_expand_prologue): Do not call load_got_register here.
19015 (sparc_flat_expand_prologue): Likewise.
19016 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19017 (sparc_use_pseudo_pic_reg): New function.
19018 (sparc_init_pic_reg): Likewise.
19019 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19020 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19021
19022 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19023
19024 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19025 Add item for branch_cost.
19026
19027 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19028
19029 PR rtl-optimization/83565
19030 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19031 not extend the result to a larger mode for rotate operations.
19032 (num_sign_bit_copies1): Likewise.
19033
19034 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19035
19036 PR target/40411
19037 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19038 -symbolic.
19039 Use values-Xc.o for -pedantic.
19040 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19041
19042 2018-01-12 Martin Liska <mliska@suse.cz>
19043
19044 PR ipa/83054
19045 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19046 New function.
19047 (possible_polymorphic_call_targets): Use it.
19048 (ipa_devirt): Likewise.
19049
19050 2018-01-12 Martin Liska <mliska@suse.cz>
19051
19052 * profile-count.h (enum profile_quality): Use 0 as invalid
19053 enum value of profile_quality.
19054
19055 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19056
19057 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19058 -mext-string options.
19059
19060 2018-01-12 Richard Biener <rguenther@suse.de>
19061
19062 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19063 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19064 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19065 Likewise.
19066 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19067
19068 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19069
19070 * configure.ac (--with-long-double-format): Add support for the
19071 configuration option to change the default long double format on
19072 PowerPC systems.
19073 * config.gcc (powerpc*-linux*-*): Likewise.
19074 * configure: Regenerate.
19075 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19076 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19077 used without modification.
19078
19079 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19080
19081 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19082 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19083 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19084 MISC_BUILTIN_SPEC_BARRIER.
19085 (rs6000_init_builtins): Likewise.
19086 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19087 enum value.
19088 (speculation_barrier): New define_insn.
19089 * doc/extend.texi: Document __builtin_speculation_barrier.
19090
19091 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19092
19093 PR target/83203
19094 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19095 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19096 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19097 iterators.
19098 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19099 integral modes instead of "ss" and "sd".
19100 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19101 vectors with 32-bit and 64-bit elements.
19102 (vecdupssescalarmodesuffix): New mode attribute.
19103 (vec_dup<mode>): Use it.
19104
19105 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19106
19107 PR target/83330
19108 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19109 frame if argument is passed on stack.
19110
19111 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19112
19113 PR target/82682
19114 * ree.c (combine_reaching_defs): Optimize also
19115 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19116 reg2=any_extend(exp); reg1=reg2;, formatting fix.
19117
19118 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19119
19120 PR middle-end/83189
19121 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19122
19123 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19124
19125 PR middle-end/83718
19126 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19127 after they are computed.
19128
19129 2018-01-11 Bin Cheng <bin.cheng@arm.com>
19130
19131 PR tree-optimization/83695
19132 * gimple-loop-linterchange.cc
19133 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19134 reset cached scev information after interchange.
19135 (pass_linterchange::execute): Remove call to scev_reset_htab.
19136
19137 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19138
19139 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19140 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19141 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19142 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19143 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19144 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19145 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19146 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19147 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19148 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19149 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19150 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19151 (V_lane_reg): Likewise.
19152 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19153 New define_expand.
19154 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19155 (vfmal_lane_low<mode>_intrinsic,
19156 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19157 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19158 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19159 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19160 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19161 vfmsl_lane_high<mode>_intrinsic): New define_insns.
19162
19163 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19164
19165 * config/arm/arm-cpus.in (fp16fml): New feature.
19166 (ALL_SIMD): Add fp16fml.
19167 (armv8.2-a): Add fp16fml as an option.
19168 (armv8.3-a): Likewise.
19169 (armv8.4-a): Add fp16fml as part of fp16.
19170 * config/arm/arm.h (TARGET_FP16FML): Define.
19171 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19172 when appropriate.
19173 * config/arm/arm-modes.def (V2HF): Define.
19174 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19175 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19176 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19177 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19178 vfmsl_low, vfmsl_high): New set of builtins.
19179 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19180 (vfml_op): New code attribute.
19181 (VFMLHALVES): New int iterator.
19182 (VFML, VFMLSEL): New mode attributes.
19183 (V_reg): Define mapping for V2HF.
19184 (V_hi, V_lo): New mode attributes.
19185 (VF_constraint): Likewise.
19186 (vfml_half, vfml_half_selector): New int attributes.
19187 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19188 define_expand.
19189 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19190 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19191 New define_insn.
19192 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19193 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19194 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19195 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19196 documentation.
19197 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19198 Document new effective target and option set.
19199
19200 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19201
19202 * config/arm/arm-cpus.in (armv8_4): New feature.
19203 (ARMv8_4a): New fgroup.
19204 (armv8.4-a): New arch.
19205 * config/arm/arm-tables.opt: Regenerate.
19206 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19207 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19208 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19209 Add matching rules for -march=armv8.4-a and extensions.
19210 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19211
19212 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19213
19214 PR target/81821
19215 * config/rx/rx.md (BW): New mode attribute.
19216 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19217
19218 2018-01-11 Richard Biener <rguenther@suse.de>
19219
19220 PR tree-optimization/83435
19221 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19222 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19223 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19224
19225 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19226 Alan Hayward <alan.hayward@arm.com>
19227 David Sherwood <david.sherwood@arm.com>
19228
19229 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19230 field.
19231 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19232 (aarch64_print_address_internal): Use it to check for a zero offset.
19233
19234 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19235 Alan Hayward <alan.hayward@arm.com>
19236 David Sherwood <david.sherwood@arm.com>
19237
19238 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19239 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19240 Return a poly_int64 rather than a HOST_WIDE_INT.
19241 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19242 rather than a HOST_WIDE_INT.
19243 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19244 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19245 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19246 final_offset from HOST_WIDE_INT to poly_int64.
19247 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19248 to_constant when getting the number of units in an Advanced SIMD
19249 mode.
19250 (aarch64_builtin_vectorized_function): Check for a constant number
19251 of units.
19252 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19253 GET_MODE_SIZE.
19254 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19255 attribute instead of GET_MODE_NUNITS.
19256 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19257 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19258 GET_MODE_SIZE for fixed-size registers.
19259 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19260 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19261 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19262 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19263 (aarch64_print_operand, aarch64_print_address_internal)
19264 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19265 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19266 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19267 Handle polynomial GET_MODE_SIZE.
19268 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19269 wider than SImode without modification.
19270 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19271 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19272 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19273 passing and returning SVE modes.
19274 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19275 rather than GEN_INT.
19276 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19277 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19278 (aarch64_allocate_and_probe_stack_space): Likewise.
19279 (aarch64_layout_frame): Cope with polynomial offsets.
19280 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19281 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19282 polynomial offsets.
19283 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19284 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19285 poly_int64 rather than a HOST_WIDE_INT.
19286 (aarch64_get_separate_components, aarch64_process_components)
19287 (aarch64_expand_prologue, aarch64_expand_epilogue)
19288 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19289 (aarch64_anchor_offset): New function, split out from...
19290 (aarch64_legitimize_address): ...here.
19291 (aarch64_builtin_vectorization_cost): Handle polynomial
19292 TYPE_VECTOR_SUBPARTS.
19293 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19294 GET_MODE_NUNITS.
19295 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19296 number of elements from the PARALLEL rather than the mode.
19297 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19298 rather than GET_MODE_BITSIZE.
19299 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19300 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19301 (aarch64_expand_vec_perm_const_1): Handle polynomial
19302 d->perm.length () and d->perm elements.
19303 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19304 Apply to_constant to d->perm elements.
19305 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19306 polynomial CONST_VECTOR_NUNITS.
19307 (aarch64_move_pointer): Take amount as a poly_int64 rather
19308 than an int.
19309 (aarch64_progress_pointer): Avoid temporary variable.
19310 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19311 the mode attribute instead of GET_MODE.
19312
19313 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19314 Alan Hayward <alan.hayward@arm.com>
19315 David Sherwood <david.sherwood@arm.com>
19316
19317 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19318 x exists before using it.
19319 (aarch64_add_constant_internal): Rename to...
19320 (aarch64_add_offset_1): ...this. Replace regnum with separate
19321 src and dest rtxes. Handle the case in which they're different,
19322 including when the offset is zero. Replace scratchreg with an rtx.
19323 Use 2 additions if there is no spare register into which we can
19324 move a 16-bit constant.
19325 (aarch64_add_constant): Delete.
19326 (aarch64_add_offset): Replace reg with separate src and dest
19327 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19328 Use aarch64_add_offset_1.
19329 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19330 an rtx rather than an int. Take the delta as a poly_int64
19331 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19332 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19333 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19334 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19335 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19336 and aarch64_add_sp.
19337 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19338 aarch64_add_constant.
19339
19340 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19341
19342 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19343 Use scalar_float_mode.
19344
19345 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19346
19347 * config/aarch64/aarch64-simd.md
19348 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19349 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19350 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19351 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19352 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19353 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19354 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19355 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19356 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19357 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19358
19359 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19360
19361 PR target/83514
19362 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19363 targ_options->x_arm_arch_string is non NULL.
19364
19365 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19366
19367 * config/aarch64/aarch64.h
19368 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19369
19370 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19371
19372 PR target/82096
19373 * expmed.c (emit_store_flag_force): Swap if const op0
19374 and change VOIDmode to mode of op0.
19375
19376 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19377
19378 PR rtl-optimization/83761
19379 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19380 than bytes to mode_for_size.
19381
19382 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19383
19384 PR middle-end/83189
19385 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19386 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19387 profile.
19388
19389 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19390
19391 PR middle-end/83575
19392 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19393 when in layout mode.
19394 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19395 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19396 partition fixup.
19397
19398 2018-01-10 Michael Collison <michael.collison@arm.com>
19399
19400 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19401 * config/aarch64/aarch64-option-extension.def: Add
19402 AARCH64_OPT_EXTENSION of 'fp16fml'.
19403 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19404 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19405 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19406 * config/aarch64/constraints.md (Ui7): New constraint.
19407 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19408 (VFMLA_SEL_W): Ditto.
19409 (f16quad): Ditto.
19410 (f16mac1): Ditto.
19411 (VFMLA16_LOW): New int iterator.
19412 (VFMLA16_HIGH): Ditto.
19413 (UNSPEC_FMLAL): New unspec.
19414 (UNSPEC_FMLSL): Ditto.
19415 (UNSPEC_FMLAL2): Ditto.
19416 (UNSPEC_FMLSL2): Ditto.
19417 (f16mac): New code attribute.
19418 * config/aarch64/aarch64-simd-builtins.def
19419 (aarch64_fmlal_lowv2sf): Ditto.
19420 (aarch64_fmlsl_lowv2sf): Ditto.
19421 (aarch64_fmlalq_lowv4sf): Ditto.
19422 (aarch64_fmlslq_lowv4sf): Ditto.
19423 (aarch64_fmlal_highv2sf): Ditto.
19424 (aarch64_fmlsl_highv2sf): Ditto.
19425 (aarch64_fmlalq_highv4sf): Ditto.
19426 (aarch64_fmlslq_highv4sf): Ditto.
19427 (aarch64_fmlal_lane_lowv2sf): Ditto.
19428 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19429 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19430 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19431 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19432 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19433 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19434 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19435 (aarch64_fmlal_lane_highv2sf): Ditto.
19436 (aarch64_fmlsl_lane_highv2sf): Ditto.
19437 (aarch64_fmlal_laneq_highv2sf): Ditto.
19438 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19439 (aarch64_fmlalq_lane_highv4sf): Ditto.
19440 (aarch64_fmlsl_lane_highv4sf): Ditto.
19441 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19442 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19443 * config/aarch64/aarch64-simd.md:
19444 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19445 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19446 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19447 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19448 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19449 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19450 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19451 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19452 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19453 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19454 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19455 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19456 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19457 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19458 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19459 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19460 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19461 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19462 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19463 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19464 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19465 (vfmlsl_low_u32): Ditto.
19466 (vfmlalq_low_u32): Ditto.
19467 (vfmlslq_low_u32): Ditto.
19468 (vfmlal_high_u32): Ditto.
19469 (vfmlsl_high_u32): Ditto.
19470 (vfmlalq_high_u32): Ditto.
19471 (vfmlslq_high_u32): Ditto.
19472 (vfmlal_lane_low_u32): Ditto.
19473 (vfmlsl_lane_low_u32): Ditto.
19474 (vfmlal_laneq_low_u32): Ditto.
19475 (vfmlsl_laneq_low_u32): Ditto.
19476 (vfmlalq_lane_low_u32): Ditto.
19477 (vfmlslq_lane_low_u32): Ditto.
19478 (vfmlalq_laneq_low_u32): Ditto.
19479 (vfmlslq_laneq_low_u32): Ditto.
19480 (vfmlal_lane_high_u32): Ditto.
19481 (vfmlsl_lane_high_u32): Ditto.
19482 (vfmlal_laneq_high_u32): Ditto.
19483 (vfmlsl_laneq_high_u32): Ditto.
19484 (vfmlalq_lane_high_u32): Ditto.
19485 (vfmlslq_lane_high_u32): Ditto.
19486 (vfmlalq_laneq_high_u32): Ditto.
19487 (vfmlslq_laneq_high_u32): Ditto.
19488 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19489 (AARCH64_FL_FOR_ARCH8_4): New.
19490 (AARCH64_ISA_F16FML): New ISA flag.
19491 (TARGET_F16FML): New feature flag for fp16fml.
19492 (doc/invoke.texi): Document new fp16fml option.
19493
19494 2018-01-10 Michael Collison <michael.collison@arm.com>
19495
19496 * config/aarch64/aarch64-builtins.c:
19497 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19498 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19499 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19500 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19501 (AARCH64_ISA_SHA3): New ISA flag.
19502 (TARGET_SHA3): New feature flag for sha3.
19503 * config/aarch64/iterators.md (sha512_op): New int attribute.
19504 (CRYPTO_SHA512): New int iterator.
19505 (UNSPEC_SHA512H): New unspec.
19506 (UNSPEC_SHA512H2): Ditto.
19507 (UNSPEC_SHA512SU0): Ditto.
19508 (UNSPEC_SHA512SU1): Ditto.
19509 * config/aarch64/aarch64-simd-builtins.def
19510 (aarch64_crypto_sha512hqv2di): New builtin.
19511 (aarch64_crypto_sha512h2qv2di): Ditto.
19512 (aarch64_crypto_sha512su0qv2di): Ditto.
19513 (aarch64_crypto_sha512su1qv2di): Ditto.
19514 (aarch64_eor3qv8hi): Ditto.
19515 (aarch64_rax1qv2di): Ditto.
19516 (aarch64_xarqv2di): Ditto.
19517 (aarch64_bcaxqv8hi): Ditto.
19518 * config/aarch64/aarch64-simd.md:
19519 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19520 (aarch64_crypto_sha512su0qv2di): Ditto.
19521 (aarch64_crypto_sha512su1qv2di): Ditto.
19522 (aarch64_eor3qv8hi): Ditto.
19523 (aarch64_rax1qv2di): Ditto.
19524 (aarch64_xarqv2di): Ditto.
19525 (aarch64_bcaxqv8hi): Ditto.
19526 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19527 (vsha512h2q_u64): Ditto.
19528 (vsha512su0q_u64): Ditto.
19529 (vsha512su1q_u64): Ditto.
19530 (veor3q_u16): Ditto.
19531 (vrax1q_u64): Ditto.
19532 (vxarq_u64): Ditto.
19533 (vbcaxq_u16): Ditto.
19534 * config/arm/types.md (crypto_sha512): New type attribute.
19535 (crypto_sha3): Ditto.
19536 (doc/invoke.texi): Document new sha3 option.
19537
19538 2018-01-10 Michael Collison <michael.collison@arm.com>
19539
19540 * config/aarch64/aarch64-builtins.c:
19541 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19542 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19543 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19544 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19545 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19546 (AARCH64_ISA_SM4): New ISA flag.
19547 (TARGET_SM4): New feature flag for sm4.
19548 * config/aarch64/aarch64-simd-builtins.def
19549 (aarch64_sm3ss1qv4si): Ditto.
19550 (aarch64_sm3tt1aq4si): Ditto.
19551 (aarch64_sm3tt1bq4si): Ditto.
19552 (aarch64_sm3tt2aq4si): Ditto.
19553 (aarch64_sm3tt2bq4si): Ditto.
19554 (aarch64_sm3partw1qv4si): Ditto.
19555 (aarch64_sm3partw2qv4si): Ditto.
19556 (aarch64_sm4eqv4si): Ditto.
19557 (aarch64_sm4ekeyqv4si): Ditto.
19558 * config/aarch64/aarch64-simd.md:
19559 (aarch64_sm3ss1qv4si): Ditto.
19560 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19561 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19562 (aarch64_sm4eqv4si): Ditto.
19563 (aarch64_sm4ekeyqv4si): Ditto.
19564 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19565 (sm3part_op): Ditto.
19566 (CRYPTO_SM3TT): Ditto.
19567 (CRYPTO_SM3PART): Ditto.
19568 (UNSPEC_SM3SS1): New unspec.
19569 (UNSPEC_SM3TT1A): Ditto.
19570 (UNSPEC_SM3TT1B): Ditto.
19571 (UNSPEC_SM3TT2A): Ditto.
19572 (UNSPEC_SM3TT2B): Ditto.
19573 (UNSPEC_SM3PARTW1): Ditto.
19574 (UNSPEC_SM3PARTW2): Ditto.
19575 (UNSPEC_SM4E): Ditto.
19576 (UNSPEC_SM4EKEY): Ditto.
19577 * config/aarch64/constraints.md (Ui2): New constraint.
19578 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19579 * config/arm/types.md (crypto_sm3): New type attribute.
19580 (crypto_sm4): Ditto.
19581 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19582 (vsm3tt1aq_u32): Ditto.
19583 (vsm3tt1bq_u32): Ditto.
19584 (vsm3tt2aq_u32): Ditto.
19585 (vsm3tt2bq_u32): Ditto.
19586 (vsm3partw1q_u32): Ditto.
19587 (vsm3partw2q_u32): Ditto.
19588 (vsm4eq_u32): Ditto.
19589 (vsm4ekeyq_u32): Ditto.
19590 (doc/invoke.texi): Document new sm4 option.
19591
19592 2018-01-10 Michael Collison <michael.collison@arm.com>
19593
19594 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19595 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19596 (AARCH64_FL_FOR_ARCH8_4): New.
19597 (AARCH64_FL_V8_4): New flag.
19598 (doc/invoke.texi): Document new armv8.4-a option.
19599
19600 2018-01-10 Michael Collison <michael.collison@arm.com>
19601
19602 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19603 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19604 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19605 * config/aarch64/aarch64-option-extension.def: Add
19606 AARCH64_OPT_EXTENSION of 'sha2'.
19607 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19608 (crypto): Disable sha2 and aes if crypto disabled.
19609 (crypto): Enable aes and sha2 if enabled.
19610 (simd): Disable sha2 and aes if simd disabled.
19611 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19612 New flags.
19613 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19614 (TARGET_SHA2): New feature flag for sha2.
19615 (TARGET_AES): New feature flag for aes.
19616 * config/aarch64/aarch64-simd.md:
19617 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19618 conditional on TARGET_AES.
19619 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19620 (aarch64_crypto_sha1hsi): Make pattern conditional
19621 on TARGET_SHA2.
19622 (aarch64_crypto_sha1hv4si): Ditto.
19623 (aarch64_be_crypto_sha1hv4si): Ditto.
19624 (aarch64_crypto_sha1su1v4si): Ditto.
19625 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19626 (aarch64_crypto_sha1su0v4si): Ditto.
19627 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19628 (aarch64_crypto_sha256su0v4si): Ditto.
19629 (aarch64_crypto_sha256su1v4si): Ditto.
19630 (doc/invoke.texi): Document new aes and sha2 options.
19631
19632 2018-01-10 Martin Sebor <msebor@redhat.com>
19633
19634 PR tree-optimization/83781
19635 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19636 as string arrays.
19637
19638 2018-01-11 Martin Sebor <msebor@gmail.com>
19639 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19640
19641 PR tree-optimization/83501
19642 PR tree-optimization/81703
19643
19644 * tree-ssa-strlen.c (get_string_cst): Rename...
19645 (get_string_len): ...to this. Handle global constants.
19646 (handle_char_store): Adjust.
19647
19648 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19649 Jim Wilson <jimw@sifive.com>
19650
19651 * config/riscv/riscv-protos.h (riscv_output_return): New.
19652 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19653 (riscv_attribute_table, riscv_output_return),
19654 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19655 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19656 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19657 function.
19658 (riscv_expand_prologue): Add early return for naked function.
19659 (riscv_expand_epilogue): Likewise.
19660 (riscv_function_ok_for_sibcall): Return false for naked function.
19661 (riscv_set_current_function): New.
19662 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19663 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19664 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19665 * doc/extend.texi (RISC-V Function Attributes): New.
19666
19667 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19668
19669 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19670 check for 128-bit long double before checking TCmode.
19671 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19672 128-bit long doubles before checking TFmode or TCmode.
19673 (FLOAT128_IBM_P): Likewise.
19674
19675 2018-01-10 Martin Sebor <msebor@redhat.com>
19676
19677 PR tree-optimization/83671
19678 * builtins.c (c_strlen): Unconditionally return zero for the empty
19679 string.
19680 Use -Warray-bounds for warnings.
19681 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19682 for non-constant array indices with COMPONENT_REF, arrays of
19683 arrays, and pointers to arrays.
19684 (gimple_fold_builtin_strlen): Determine and set length range for
19685 non-constant character arrays.
19686
19687 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19688
19689 PR middle-end/81897
19690 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19691 empty blocks.
19692
19693 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19694
19695 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19696
19697 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19698
19699 PR target/83399
19700 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19701 VECTOR_MEM_ALTIVEC_OR_VSX_P.
19702 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19703 indexed_or_indirect_operand predicate.
19704 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19705 (*vsx_le_perm_load_v8hi): Likewise.
19706 (*vsx_le_perm_load_v16qi): Likewise.
19707 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19708 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19709 (*vsx_le_perm_store_v8hi): Likewise.
19710 (*vsx_le_perm_store_v16qi): Likewise.
19711 (eight unnamed splitters): Likewise.
19712
19713 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19714
19715 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19716 * config/rs6000/emmintrin.h: Likewise.
19717 * config/rs6000/mmintrin.h: Likewise.
19718 * config/rs6000/xmmintrin.h: Likewise.
19719
19720 2018-01-10 David Malcolm <dmalcolm@redhat.com>
19721
19722 PR c++/43486
19723 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19724 "public_flag".
19725 * tree.c (tree_nop_conversion): Return true for location wrapper
19726 nodes.
19727 (maybe_wrap_with_location): New function.
19728 (selftest::check_strip_nops): New function.
19729 (selftest::test_location_wrappers): New function.
19730 (selftest::tree_c_tests): Call it.
19731 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19732 (maybe_wrap_with_location): New decl.
19733 (EXPR_LOCATION_WRAPPER_P): New macro.
19734 (location_wrapper_p): New inline function.
19735 (tree_strip_any_location_wrapper): New inline function.
19736
19737 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
19738
19739 PR target/83735
19740 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19741 stack_realign_offset for the largest alignment of stack slot
19742 actually used.
19743 (ix86_find_max_used_stack_alignment): New function.
19744 (ix86_finalize_stack_frame_flags): Use it. Set
19745 max_used_stack_alignment if we don't realign stack.
19746 * config/i386/i386.h (machine_function): Add
19747 max_used_stack_alignment.
19748
19749 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
19750
19751 * config/arm/arm.opt (-mbranch-cost): New option.
19752 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19753 account.
19754
19755 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
19756
19757 PR target/83629
19758 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19759 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19760
19761 2018-01-10 Richard Biener <rguenther@suse.de>
19762
19763 PR debug/83765
19764 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19765 early out so it also covers the case where we have a non-NULL
19766 origin.
19767
19768 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19769
19770 PR tree-optimization/83753
19771 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19772 for non-strided grouped accesses if the number of elements is 1.
19773
19774 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19775
19776 PR target/81616
19777 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19778 * i386.h (TARGET_USE_GATHER): Define.
19779 * x86-tune.def (X86_TUNE_USE_GATHER): New.
19780
19781 2018-01-10 Martin Liska <mliska@suse.cz>
19782
19783 PR bootstrap/82831
19784 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19785 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19786 partitioning.
19787 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19788 CLEANUP_NO_PARTITIONING is not set.
19789
19790 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19791
19792 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19793 for vectors, as a partial revert of r254296.
19794 * rtl.h (const_vec_p): Delete.
19795 (const_vec_duplicate_p): Don't test for vector CONSTs.
19796 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19797 * expmed.c (make_tree): Likewise.
19798
19799 Revert:
19800 * common.md (E, F): Use CONSTANT_P instead of checking for
19801 CONST_VECTOR.
19802 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19803 checking for CONST_VECTOR.
19804
19805 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19806
19807 PR middle-end/83575
19808 * predict.c (force_edge_cold): Handle in more sane way edges
19809 with no prediction.
19810
19811 2018-01-09 Carl Love <cel@us.ibm.com>
19812
19813 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19814 V4SI, V4SF types.
19815 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19816 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19817 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19818 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19819 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19820 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19821 * config/rs6000/rs6000-protos.h: Add extern defition for
19822 rs6000_generate_float2_double_code.
19823 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19824 function.
19825 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19826 (float2_v2df): Add define_expand.
19827
19828 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19829
19830 PR target/83628
19831 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19832 op_mode in the force_to_mode call.
19833
19834 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19835
19836 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19837 instead of checking each element individually.
19838 (aarch64_evpc_uzp): Likewise.
19839 (aarch64_evpc_zip): Likewise.
19840 (aarch64_evpc_ext): Likewise.
19841 (aarch64_evpc_rev): Likewise.
19842 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19843 instead of checking each element individually. Return true without
19844 generating rtl if
19845 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19846 whether all selected elements come from the same input, instead of
19847 checking each element individually. Remove calls to gen_rtx_REG,
19848 start_sequence and end_sequence and instead assert that no rtl is
19849 generated.
19850
19851 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19852
19853 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19854 order of HIGH and CONST checks.
19855
19856 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19857
19858 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19859 if the destination isn't an SSA_NAME.
19860
19861 2018-01-09 Richard Biener <rguenther@suse.de>
19862
19863 PR tree-optimization/83668
19864 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19865 move prologue...
19866 (canonicalize_loop_form): ... here, renamed from ...
19867 (canonicalize_loop_closed_ssa_form): ... this and amended to
19868 swap successor edges for loop exit blocks to make us use
19869 the RPO order we need for initial schedule generation.
19870
19871 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19872
19873 PR tree-optimization/64811
19874 * match.pd: When optimizing comparisons with Inf, avoid
19875 introducing or losing exceptions from comparisons with NaN.
19876
19877 2018-01-09 Martin Liska <mliska@suse.cz>
19878
19879 PR sanitizer/82517
19880 * asan.c (shadow_mem_size): Add gcc_assert.
19881
19882 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19883
19884 Don't save registers in main().
19885
19886 PR target/83738
19887 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19888 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19889 * config/avr/avr.c (avr_set_current_function): Don't error if
19890 naked, OS_task or OS_main are specified at the same time.
19891 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19892 OS_main.
19893 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19894 attribute.
19895 * common/config/avr/avr-common.c (avr_option_optimization_table):
19896 Switch on -mmain-is-OS_task for optimizing compilations.
19897
19898 2018-01-09 Richard Biener <rguenther@suse.de>
19899
19900 PR tree-optimization/83572
19901 * graphite.c: Include cfganal.h.
19902 (graphite_transform_loops): Connect infinite loops to exit
19903 and remove fake edges at the end.
19904
19905 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19906
19907 * ipa-inline.c (edge_badness): Revert accidental checkin.
19908
19909 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19910
19911 PR ipa/80763
19912 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19913 symbols; not inline clones.
19914
19915 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19916
19917 PR target/83507
19918 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19919 hard registers. Formatting fixes.
19920
19921 PR preprocessor/83722
19922 * gcc.c (try_generate_repro): Pass
19923 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19924 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19925 do_report_bug.
19926
19927 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
19928 Kito Cheng <kito.cheng@gmail.com>
19929
19930 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19931 (riscv_leaf_function_p): Delete.
19932 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19933
19934 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19935
19936 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19937 function.
19938 (do_ifelse): New function.
19939 (do_isel): New function.
19940 (do_sub3): New function.
19941 (do_add3): New function.
19942 (do_load_mask_compare): New function.
19943 (do_overlap_load_compare): New function.
19944 (expand_compare_loop): New function.
19945 (expand_block_compare): Call expand_compare_loop() when appropriate.
19946 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19947 option description.
19948 (-mblock-compare-inline-loop-limit): New option.
19949
19950 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19951
19952 PR target/83677
19953 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19954 Reverse order of second and third operands in first alternative.
19955 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19956 of first and second elements in UNSPEC_VPERMR vector.
19957 (altivec_expand_vec_perm_le): Likewise.
19958
19959 2018-01-08 Jeff Law <law@redhat.com>
19960
19961 PR rtl-optimizatin/81308
19962 * tree-switch-conversion.c (cfg_altered): New file scoped static.
19963 (process_switch): If group_case_labels makes a change, then set
19964 cfg_altered.
19965 (pass_convert_switch::execute): If a switch is converted, then
19966 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
19967
19968 PR rtl-optimization/81308
19969 * recog.c (split_all_insns): Conditionally cleanup the CFG after
19970 splitting insns.
19971
19972 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
19973
19974 PR target/83663 - Revert r255946
19975 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19976 generation for cases where splatting a value is not useful.
19977 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19978 across a vec_duplicate and a paradoxical subreg forming a vector
19979 mode to a vec_concat.
19980
19981 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19982
19983 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19984 -march=armv8.3-a variants.
19985 * config/arm/t-multilib: Likewise.
19986 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
19987
19988 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19989
19990 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19991 to generate rtl.
19992 (cceq_ior_compare_complement): Give it a name so I can use it, and
19993 change boolean_or_operator predicate to boolean_operator so it can
19994 be used to generate a crand.
19995 (eqne): New code iterator.
19996 (bd/bd_neg): New code_attrs.
19997 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19998 a single define_insn.
19999 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20000 decrement (bdnzt/bdnzf/bdzt/bdzf).
20001 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20002 with the new names of the branch decrement patterns, and added the
20003 names of the branch decrement conditional patterns.
20004
20005 2018-01-08 Richard Biener <rguenther@suse.de>
20006
20007 PR tree-optimization/83563
20008 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20009 cache.
20010
20011 2018-01-08 Richard Biener <rguenther@suse.de>
20012
20013 PR middle-end/83713
20014 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20015
20016 2018-01-08 Richard Biener <rguenther@suse.de>
20017
20018 PR tree-optimization/83685
20019 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20020 references to abnormals.
20021
20022 2018-01-08 Richard Biener <rguenther@suse.de>
20023
20024 PR lto/83719
20025 * dwarf2out.c (output_indirect_strings): Handle empty
20026 skeleton_debug_str_hash.
20027 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20028
20029 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20030
20031 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20032 (emit_store_direct): Likewise.
20033 (arc_trampoline_adjust_address): Likewise.
20034 (arc_asm_trampoline_template): New function.
20035 (arc_initialize_trampoline): Use asm_trampoline_template.
20036 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20037 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20038 * config/arc/arc.md (flush_icache): Delete pattern.
20039
20040 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20041
20042 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20043 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20044 munaligned-access.
20045
20046 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20047
20048 PR target/83681
20049 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20050 by not USED_FOR_TARGET.
20051 (make_pass_resolve_sw_modes): Likewise.
20052
20053 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20054
20055 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20056 USED_FOR_TARGET.
20057
20058 2018-01-08 Richard Biener <rguenther@suse.de>
20059
20060 PR middle-end/83580
20061 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20062
20063 2018-01-08 Richard Biener <rguenther@suse.de>
20064
20065 PR middle-end/83517
20066 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20067
20068 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20069
20070 PR middle-end/81897
20071 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20072 basic blocks with a small number of successors.
20073 (convert_control_dep_chain_into_preds): Improve handling of
20074 forwarder blocks.
20075 (dump_predicates): Split apart into...
20076 (dump_pred_chain): ...here...
20077 (dump_pred_info): ...and here.
20078 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20079 (can_chain_union_be_invalidated_p): Improve check for invalidation
20080 of paths.
20081 (uninit_uses_cannot_happen): Avoid unnecessary if
20082 convert_control_dep_chain_into_preds yielded nothing.
20083
20084 2018-01-06 Martin Sebor <msebor@redhat.com>
20085
20086 PR tree-optimization/83640
20087 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20088 subtracting negative offset from size.
20089 (builtin_access::overlap): Adjust offset bounds of the access to fall
20090 within the size of the object if possible.
20091
20092 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20093
20094 PR rtl-optimization/83699
20095 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20096 extract_bit_field_as_subreg to cases in which the extracted
20097 value is also a vector.
20098
20099 * lra-constraints.c (process_alt_operands): Test for the equivalence
20100 substitutions when detecting a possible reload cycle.
20101
20102 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20103
20104 PR debug/83480
20105 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20106 by default if flag_selective_schedling{,2}. Formatting fixes.
20107
20108 PR rtl-optimization/83682
20109 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20110 if it has non-VECTOR_MODE element mode.
20111 (vec_duplicate_p): Likewise.
20112
20113 PR middle-end/83694
20114 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20115 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20116
20117 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20118
20119 PR target/83604
20120 * config/i386/i386-builtin.def
20121 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20122 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20123 Require also OPTION_MASK_ISA_AVX512F in addition to
20124 OPTION_MASK_ISA_GFNI.
20125 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20126 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20127 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20128 to OPTION_MASK_ISA_GFNI.
20129 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20130 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20131 OPTION_MASK_ISA_AVX512BW.
20132 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20133 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20134 addition to OPTION_MASK_ISA_GFNI.
20135 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20136 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20137 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20138 to OPTION_MASK_ISA_GFNI.
20139 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20140 a requirement for all ISAs rather than any of them with a few
20141 exceptions.
20142 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20143 processing.
20144 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20145 bitmasks to be enabled with 3 exceptions, instead of requiring any
20146 enabled ISA with lots of exceptions.
20147 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20148 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20149 Change avx512bw in isa attribute to avx512f.
20150 * config/i386/sgxintrin.h: Add license boilerplate.
20151 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
20152 to __AVX512F__ and __AVX512VL to __AVX512VL__.
20153 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20154 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20155 defined.
20156 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20157 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20158 temporarily sse2 rather than sse if not enabled already.
20159
20160 PR target/83604
20161 * config/i386/sse.md (VI248_VLBW): Rename to ...
20162 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
20163 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20164 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20165 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20166 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20167 mode iterator instead of VI248_VLBW.
20168
20169 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
20170
20171 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20172 (record_modified): Skip clobbers; add debug output.
20173 (param_change_prob): Use sreal frequencies.
20174
20175 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20176
20177 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20178 punt for user-aligned variables.
20179
20180 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20181
20182 * tree-chrec.c (chrec_contains_symbols): Return true for
20183 POLY_INT_CST.
20184
20185 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20186
20187 PR target/82439
20188 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20189 of (x|y) == x for BICS pattern.
20190
20191 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20192
20193 PR tree-optimization/83605
20194 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20195 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20196 can throw.
20197
20198 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20199
20200 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20201 * config/epiphany/rtems.h: New file.
20202
20203 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20204 Uros Bizjak <ubizjak@gmail.com>
20205
20206 PR target/83554
20207 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20208 QIreg_operand instead of register_operand predicate.
20209 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20210 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20211 comments instead of -fmitigate[-_]rop.
20212
20213 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20214
20215 PR bootstrap/81926
20216 * cgraphunit.c (symbol_table::compile): Switch to text_section
20217 before calling assembly_start debug hook.
20218 * run-rtl-passes.c (run_rtl_passes): Likewise.
20219 Include output.h.
20220
20221 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20222
20223 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20224 range_int_cst_p rather than !symbolic_range_p before calling
20225 extract_range_from_multiplicative_op_1.
20226
20227 2018-01-04 Jeff Law <law@redhat.com>
20228
20229 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20230 redundant test in assertion.
20231
20232 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20233
20234 * doc/rtl.texi: Document machine_mode wrapper classes.
20235
20236 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20237
20238 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20239 using tree_to_uhwi.
20240
20241 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20242
20243 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20244 the VEC_PERM_EXPR fold to fail.
20245
20246 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20247
20248 PR debug/83585
20249 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20250 to switched_sections.
20251
20252 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20253
20254 PR target/83680
20255 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20256 test for d.testing.
20257
20258 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20259
20260 PR target/83387
20261 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20262 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20263
20264 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20265
20266 PR debug/83666
20267 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20268 is BLKmode and bitpos not zero or mode change is needed.
20269
20270 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20271
20272 PR target/83675
20273 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20274 TARGET_VIS2.
20275
20276 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20277
20278 PR target/83628
20279 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20280 instead of MULT rtx. Update all corresponding splitters.
20281 (*saddl_se): Ditto.
20282 (*ssub<modesuffix>): Ditto.
20283 (*ssubl_se): Ditto.
20284 (*cmp_sadd_di): Update split patterns.
20285 (*cmp_sadd_si): Ditto.
20286 (*cmp_sadd_sidi): Ditto.
20287 (*cmp_ssub_di): Ditto.
20288 (*cmp_ssub_si): Ditto.
20289 (*cmp_ssub_sidi): Ditto.
20290 * config/alpha/predicates.md (const23_operand): New predicate.
20291 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20292 Look for ASHIFT, not MULT inner operand.
20293 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20294
20295 2018-01-04 Martin Liska <mliska@suse.cz>
20296
20297 PR gcov-profile/83669
20298 * gcov.c (output_intermediate_file): Add version to intermediate
20299 gcov file.
20300 * doc/gcov.texi: Document new field 'version' in intermediate
20301 file format. Fix location of '-k' option of gcov command.
20302
20303 2018-01-04 Martin Liska <mliska@suse.cz>
20304
20305 PR ipa/82352
20306 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20307
20308 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20309
20310 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20311
20312 2018-01-03 Martin Sebor <msebor@redhat.com>
20313
20314 PR tree-optimization/83655
20315 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20316 checking calls with invalid arguments.
20317
20318 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20319
20320 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20321 (vectorizable_mask_load_store): Delete.
20322 (vectorizable_call): Return false for masked loads and stores.
20323 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20324 instead of gimple_assign_rhs1.
20325 (vectorizable_load): Handle IFN_MASK_LOAD.
20326 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20327
20328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20329
20330 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20331 split out from..,
20332 (vectorizable_mask_load_store): ...here.
20333 (vectorizable_load): ...and here.
20334
20335 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20336
20337 * tree-vect-stmts.c (vect_build_all_ones_mask)
20338 (vect_build_zero_merge_argument): New functions, split out from...
20339 (vectorizable_load): ...here.
20340
20341 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20342
20343 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20344 split out from...
20345 (vectorizable_mask_load_store): ...here.
20346 (vectorizable_store): ...and here.
20347
20348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20349
20350 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20351 split out from...
20352 (vectorizable_mask_load_store): ...here.
20353
20354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20355
20356 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20357 (vect_model_store_cost): Take a vec_load_store_type instead of a
20358 vect_def_type.
20359 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20360 (vect_model_store_cost): Take a vec_load_store_type instead of a
20361 vect_def_type.
20362 (vectorizable_mask_load_store): Update accordingly.
20363 (vectorizable_store): Likewise.
20364 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20365
20366 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20367
20368 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20369 IFN_MASK_LOAD calls here rather than...
20370 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20371
20372 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20373 Alan Hayward <alan.hayward@arm.com>
20374 David Sherwood <david.sherwood@arm.com>
20375
20376 * expmed.c (extract_bit_field_1): For vector extracts,
20377 fall back to extract_bit_field_as_subreg if vec_extract
20378 isn't available.
20379
20380 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20381 Alan Hayward <alan.hayward@arm.com>
20382 David Sherwood <david.sherwood@arm.com>
20383
20384 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20385 they are variable or constant sized.
20386 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20387 slots for constant-sized data.
20388
20389 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20390 Alan Hayward <alan.hayward@arm.com>
20391 David Sherwood <david.sherwood@arm.com>
20392
20393 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20394 handling COND_EXPRs with boolean comparisons, try to find a better
20395 basis for the mask type than the boolean itself.
20396
20397 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20398
20399 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20400 is calculated and how it can be overridden.
20401 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20402 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20403 if defined.
20404 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20405 if nonzero.
20406
20407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20408 Alan Hayward <alan.hayward@arm.com>
20409 David Sherwood <david.sherwood@arm.com>
20410
20411 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20412 Remove the mode argument.
20413 (aarch64_simd_valid_immediate): Remove the mode and inverse
20414 arguments.
20415 * config/aarch64/iterators.md (bitsize): New iterator.
20416 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20417 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20418 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20419 aarch64_simd_valid_immediate.
20420 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20421 (aarch64_reg_or_bic_imm): Likewise.
20422 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20423 with an insn_type enum and msl with a modifier_type enum.
20424 Replace element_width with a scalar_mode. Change the shift
20425 to unsigned int. Add constructors for scalar_float_mode and
20426 scalar_int_mode elements.
20427 (aarch64_vect_float_const_representable_p): Delete.
20428 (aarch64_can_const_movi_rtx_p)
20429 (aarch64_simd_scalar_immediate_valid_for_move)
20430 (aarch64_simd_make_constant): Update call to
20431 aarch64_simd_valid_immediate.
20432 (aarch64_advsimd_valid_immediate_hs): New function.
20433 (aarch64_advsimd_valid_immediate): Likewise.
20434 (aarch64_simd_valid_immediate): Remove mode and inverse
20435 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20436 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20437 and aarch64_float_const_representable_p on the result.
20438 (aarch64_output_simd_mov_immediate): Remove mode argument.
20439 Update call to aarch64_simd_valid_immediate and use of
20440 simd_immediate_info.
20441 (aarch64_output_scalar_simd_mov_immediate): Update call
20442 accordingly.
20443
20444 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20445 Alan Hayward <alan.hayward@arm.com>
20446 David Sherwood <david.sherwood@arm.com>
20447
20448 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20449 (mode_nunits): Likewise CONST_MODE_NUNITS.
20450 * machmode.def (ADJUST_NUNITS): Document.
20451 * genmodes.c (mode_data::need_nunits_adj): New field.
20452 (blank_mode): Update accordingly.
20453 (adj_nunits): New variable.
20454 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20455 parameter.
20456 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20457 listed in adj_nunits.
20458 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20459 listed in adj_nunits. Don't emit case statements for such modes.
20460 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20461 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20462 nothing if adj_nunits is nonnull.
20463 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20464 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20465 (emit_mode_fbit): Update use of print_maybe_const_decl.
20466 (emit_move_size): Likewise. Treat the array as non-const
20467 if adj_nunits.
20468 (emit_mode_adjustments): Handle adj_nunits.
20469
20470 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20471
20472 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20473 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20474 (VECTOR_MODES): Use it.
20475 (make_vector_modes): Take the prefix as an argument.
20476
20477 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20478 Alan Hayward <alan.hayward@arm.com>
20479 David Sherwood <david.sherwood@arm.com>
20480
20481 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20482 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20483 for MODE_VECTOR_BOOL.
20484 * machmode.def (VECTOR_BOOL_MODE): Document.
20485 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20486 (make_vector_bool_mode): New function.
20487 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20488 MODE_VECTOR_BOOL.
20489 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20490 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20491 Likewise.
20492 * stor-layout.c (int_mode_for_mode): Likewise.
20493 * tree.c (build_vector_type_for_mode): Likewise.
20494 * varasm.c (output_constant_pool_2): Likewise.
20495 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20496 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20497 for MODE_VECTOR_BOOL.
20498 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20499 of mode class checks.
20500 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20501 instead of a list of mode class checks.
20502 (expand_vector_scalar_condition): Likewise.
20503 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20504
20505 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20506 Alan Hayward <alan.hayward@arm.com>
20507 David Sherwood <david.sherwood@arm.com>
20508
20509 * machmode.h (mode_size): Change from unsigned short to
20510 poly_uint16_pod.
20511 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20512 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20513 or if measurement_type is not polynomial.
20514 (fixed_size_mode::includes_p): Check for constant-sized modes.
20515 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20516 return a poly_uint16 rather than an unsigned short.
20517 (emit_mode_size): Change the type of mode_size from unsigned short
20518 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20519 (emit_mode_adjustments): Cope with polynomial vector sizes.
20520 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20521 for GET_MODE_SIZE.
20522 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20523 for GET_MODE_SIZE.
20524 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20525 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20526 * caller-save.c (setup_save_areas): Likewise.
20527 (replace_reg_with_saved_mem): Likewise.
20528 * calls.c (emit_library_call_value_1): Likewise.
20529 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20530 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20531 (gen_lowpart_for_combine): Likewise.
20532 * convert.c (convert_to_integer_1): Likewise.
20533 * cse.c (equiv_constant, cse_insn): Likewise.
20534 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20535 (cselib_subst_to_values): Likewise.
20536 * dce.c (word_dce_process_block): Likewise.
20537 * df-problems.c (df_word_lr_mark_ref): Likewise.
20538 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20539 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20540 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20541 (rtl_for_decl_location): Likewise.
20542 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20543 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20544 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20545 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20546 (expand_expr_real_1): Likewise.
20547 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20548 (pad_below): Likewise.
20549 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20550 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20551 * ira.c (get_subreg_tracking_sizes): Likewise.
20552 * ira-build.c (ira_create_allocno_objects): Likewise.
20553 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20554 (ira_sort_regnos_for_alter_reg): Likewise.
20555 * ira-costs.c (record_operand_costs): Likewise.
20556 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20557 (resolve_simple_move): Likewise.
20558 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20559 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20560 (lra_constraints): Likewise.
20561 (CONST_POOL_OK_P): Reject variable-sized modes.
20562 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20563 (add_pseudo_to_slot, lra_spill): Likewise.
20564 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20565 * optabs-query.c (get_best_extraction_insn): Likewise.
20566 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20567 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20568 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20569 * recog.c (offsettable_address_addr_space_p): Likewise.
20570 * regcprop.c (maybe_mode_change): Likewise.
20571 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20572 * regrename.c (build_def_use): Likewise.
20573 * regstat.c (dump_reg_info): Likewise.
20574 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20575 (find_reloads, find_reloads_subreg_address): Likewise.
20576 * reload1.c (eliminate_regs_1): Likewise.
20577 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20578 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20579 (simplify_binary_operation_1, simplify_subreg): Likewise.
20580 * targhooks.c (default_function_arg_padding): Likewise.
20581 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20582 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20583 (verify_gimple_assign_ternary): Likewise.
20584 * tree-inline.c (estimate_move_cost): Likewise.
20585 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20586 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20587 (get_address_cost_ainc): Likewise.
20588 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20589 (vect_supportable_dr_alignment): Likewise.
20590 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20591 (vectorizable_reduction): Likewise.
20592 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20593 (vectorizable_operation, vectorizable_load): Likewise.
20594 * tree.c (build_same_sized_truth_vector_type): Likewise.
20595 * valtrack.c (cleanup_auto_inc_dec): Likewise.
20596 * var-tracking.c (emit_note_insn_var_location): Likewise.
20597 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20598 (ADDR_VEC_ALIGN): Likewise.
20599
20600 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20601 Alan Hayward <alan.hayward@arm.com>
20602 David Sherwood <david.sherwood@arm.com>
20603
20604 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20605 unsigned short.
20606 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20607 or if measurement_type is polynomial.
20608 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20609 * combine.c (make_extraction): Likewise.
20610 * dse.c (find_shift_sequence): Likewise.
20611 * dwarf2out.c (mem_loc_descriptor): Likewise.
20612 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20613 (extract_bit_field, extract_low_bits): Likewise.
20614 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20615 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20616 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20617 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20618 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20619 * reload.c (find_reloads): Likewise.
20620 * reload1.c (alter_reg): Likewise.
20621 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20622 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20623 * tree-if-conv.c (predicate_mem_writes): Likewise.
20624 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20625 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20626 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20627 * valtrack.c (dead_debug_insert_temp): Likewise.
20628 * varasm.c (mergeable_constant_section): Likewise.
20629 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20630
20631 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20632 Alan Hayward <alan.hayward@arm.com>
20633 David Sherwood <david.sherwood@arm.com>
20634
20635 * expr.c (expand_assignment): Cope with polynomial mode sizes
20636 when assigning to a CONCAT.
20637
20638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20639 Alan Hayward <alan.hayward@arm.com>
20640 David Sherwood <david.sherwood@arm.com>
20641
20642 * machmode.h (mode_precision): Change from unsigned short to
20643 poly_uint16_pod.
20644 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20645 short.
20646 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20647 or if measurement_type is not polynomial.
20648 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20649 in which the mode is already known to be a scalar_int_mode.
20650 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20651 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20652 initializer.
20653 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20654 for GET_MODE_PRECISION.
20655 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20656 for GET_MODE_PRECISION.
20657 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20658 as polynomial.
20659 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20660 (expand_field_assignment, make_extraction): Likewise.
20661 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20662 (get_last_value): Likewise.
20663 * convert.c (convert_to_integer_1): Likewise.
20664 * cse.c (cse_insn): Likewise.
20665 * expr.c (expand_expr_real_1): Likewise.
20666 * lra-constraints.c (simplify_operand_subreg): Likewise.
20667 * optabs-query.c (can_atomic_load_p): Likewise.
20668 * optabs.c (expand_atomic_load): Likewise.
20669 (expand_atomic_store): Likewise.
20670 * ree.c (combine_reaching_defs): Likewise.
20671 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20672 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20673 * tree.h (type_has_mode_precision_p): Likewise.
20674 * ubsan.c (instrument_si_overflow): Likewise.
20675
20676 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20677 Alan Hayward <alan.hayward@arm.com>
20678 David Sherwood <david.sherwood@arm.com>
20679
20680 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20681 polynomial numbers of units.
20682 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20683 (valid_vector_subparts_p): New function.
20684 (build_vector_type): Remove temporary shim and take the number
20685 of units as a poly_uint64 rather than an int.
20686 (build_opaque_vector_type): Take the number of units as a
20687 poly_uint64 rather than an int.
20688 * tree.c (build_vector_from_ctor): Handle polynomial
20689 TYPE_VECTOR_SUBPARTS.
20690 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20691 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20692 (build_vector_from_val): If the number of units is variable,
20693 use build_vec_duplicate_cst for constant operands and
20694 VEC_DUPLICATE_EXPR otherwise.
20695 (make_vector_type): Remove temporary is_constant ().
20696 (build_vector_type, build_opaque_vector_type): Take the number of
20697 units as a poly_uint64 rather than an int.
20698 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20699 VECTOR_CST_NELTS.
20700 * cfgexpand.c (expand_debug_expr): Likewise.
20701 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20702 (store_constructor, expand_expr_real_1): Likewise.
20703 (const_scalar_mask_from_tree): Likewise.
20704 * fold-const-call.c (fold_const_reduction): Likewise.
20705 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20706 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20707 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20708 (fold_relational_const): Likewise.
20709 (native_interpret_vector): Likewise. Change the size from an
20710 int to an unsigned int.
20711 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20712 TYPE_VECTOR_SUBPARTS.
20713 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20714 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20715 duplicating a non-constant operand into a variable-length vector.
20716 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20717 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20718 * ipa-icf.c (sem_variable::equals): Likewise.
20719 * match.pd: Likewise.
20720 * omp-simd-clone.c (simd_clone_subparts): Likewise.
20721 * print-tree.c (print_node): Likewise.
20722 * stor-layout.c (layout_type): Likewise.
20723 * targhooks.c (default_builtin_vectorization_cost): Likewise.
20724 * tree-cfg.c (verify_gimple_comparison): Likewise.
20725 (verify_gimple_assign_binary): Likewise.
20726 (verify_gimple_assign_ternary): Likewise.
20727 (verify_gimple_assign_single): Likewise.
20728 * tree-pretty-print.c (dump_generic_node): Likewise.
20729 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20730 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20731 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20732 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20733 (vect_shift_permute_load_chain): Likewise.
20734 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20735 (expand_vector_condition, optimize_vector_constructor): Likewise.
20736 (lower_vec_perm, get_compute_type): Likewise.
20737 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20738 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20739 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20740 (vect_recog_mask_conversion_pattern): Likewise.
20741 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20742 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20743 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20744 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20745 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20746 (vectorizable_shift, vectorizable_operation, vectorizable_store)
20747 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20748 (supportable_widening_operation): Likewise.
20749 (supportable_narrowing_operation): Likewise.
20750 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20751 Likewise.
20752 * varasm.c (output_constant): Likewise.
20753
20754 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20755 Alan Hayward <alan.hayward@arm.com>
20756 David Sherwood <david.sherwood@arm.com>
20757
20758 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20759 so that both the length == 3 and length != 3 cases set up their
20760 own permute vectors. Add comments explaining why we know the
20761 number of elements is constant.
20762 (vect_permute_load_chain): Likewise.
20763
20764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20765 Alan Hayward <alan.hayward@arm.com>
20766 David Sherwood <david.sherwood@arm.com>
20767
20768 * machmode.h (mode_nunits): Change from unsigned char to
20769 poly_uint16_pod.
20770 (ONLY_FIXED_SIZE_MODES): New macro.
20771 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20772 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20773 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20774 New typedefs.
20775 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20776 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20777 or if measurement_type is not polynomial.
20778 * genmodes.c (ZERO_COEFFS): New macro.
20779 (emit_mode_nunits_inline): Make mode_nunits_inline return a
20780 poly_uint16.
20781 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20782 Use ZERO_COEFFS when emitting initializers.
20783 * data-streamer.h (bp_pack_poly_value): New function.
20784 (bp_unpack_poly_value): Likewise.
20785 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20786 for GET_MODE_NUNITS.
20787 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20788 for GET_MODE_NUNITS.
20789 * tree.c (make_vector_type): Remove temporary shim and make
20790 the real function take the number of units as a poly_uint64
20791 rather than an int.
20792 (build_vector_type_for_mode): Handle polynomial nunits.
20793 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20794 * emit-rtl.c (const_vec_series_p_1): Likewise.
20795 (gen_rtx_CONST_VECTOR): Likewise.
20796 * fold-const.c (test_vec_duplicate_folding): Likewise.
20797 * genrecog.c (validate_pattern): Likewise.
20798 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20799 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20800 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20801 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20802 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20803 * rtlanal.c (subreg_get_info): Likewise.
20804 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20805 (vect_grouped_load_supported): Likewise.
20806 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20807 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20808 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20809 (simplify_const_unary_operation, simplify_binary_operation_1)
20810 (simplify_const_binary_operation, simplify_ternary_operation)
20811 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20812 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20813 instead of CONST_VECTOR_NUNITS.
20814 * varasm.c (output_constant_pool_2): Likewise.
20815 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20816 explicit-encoded elements in the XVEC for variable-length vectors.
20817
20818 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20819
20820 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20821
20822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20823 Alan Hayward <alan.hayward@arm.com>
20824 David Sherwood <david.sherwood@arm.com>
20825
20826 * coretypes.h (fixed_size_mode): Declare.
20827 (fixed_size_mode_pod): New typedef.
20828 * builtins.h (target_builtins::x_apply_args_mode)
20829 (target_builtins::x_apply_result_mode): Change type to
20830 fixed_size_mode_pod.
20831 * builtins.c (apply_args_size, apply_result_size, result_vector)
20832 (expand_builtin_apply_args_1, expand_builtin_apply)
20833 (expand_builtin_return): Update accordingly.
20834
20835 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20836
20837 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20838 * cselib.c (cselib_hash_rtx): Likewise.
20839 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20840 CONST_VECTOR encoding.
20841
20842 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20843 Jeff Law <law@redhat.com>
20844
20845 PR target/83641
20846 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20847 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20848 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20849 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20850
20851 PR target/83641
20852 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20853 explicitly probe *sp in a noreturn function if there were any callee
20854 register saves or frame pointer is needed.
20855
20856 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20857
20858 PR debug/83621
20859 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20860 BLKmode for ternary, binary or unary expressions.
20861
20862 PR debug/83645
20863 * var-tracking.c (delete_vta_debug_insn): New inline function.
20864 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20865 insns from get_insns () to NULL instead of each bb separately.
20866 Use delete_vta_debug_insn. No longer static.
20867 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20868 delete_vta_debug_insns callers.
20869 * rtl.h (delete_vta_debug_insns): Declare.
20870 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20871 instead of variable_tracking_main.
20872
20873 2018-01-03 Martin Sebor <msebor@redhat.com>
20874
20875 PR tree-optimization/83603
20876 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20877 arguments past the endof the argument list in functions declared
20878 without a prototype.
20879 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20880 Avoid checking when arguments are null.
20881
20882 2018-01-03 Martin Sebor <msebor@redhat.com>
20883
20884 PR c/83559
20885 * doc/extend.texi (attribute const): Fix a typo.
20886 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20887 issuing -Wsuggest-attribute for void functions.
20888
20889 2018-01-03 Martin Sebor <msebor@redhat.com>
20890
20891 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20892 offset_int::from instead of wide_int::to_shwi.
20893 (maybe_diag_overlap): Remove assertion.
20894 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20895 * gimple-ssa-sprintf.c (format_directive): Same.
20896 (parse_directive): Same.
20897 (sprintf_dom_walker::compute_format_length): Same.
20898 (try_substitute_return_value): Same.
20899
20900 2018-01-03 Jeff Law <law@redhat.com>
20901
20902 PR middle-end/83654
20903 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20904 non-constant residual for zero at runtime and avoid probing in
20905 that case. Reorganize code for trailing problem to mirror handling
20906 of the residual.
20907
20908 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20909
20910 PR tree-optimization/83501
20911 * tree-ssa-strlen.c (get_string_cst): New.
20912 (handle_char_store): Call get_string_cst.
20913
20914 2018-01-03 Martin Liska <mliska@suse.cz>
20915
20916 PR tree-optimization/83593
20917 * tree-ssa-strlen.c: Include tree-cfg.h.
20918 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20919 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20920 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20921 to false.
20922 (strlen_dom_walker::before_dom_children): Call
20923 gimple_purge_dead_eh_edges. Dump tranformation with details
20924 dump flags.
20925 (strlen_dom_walker::before_dom_children): Update call by adding
20926 new argument cleanup_eh.
20927 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20928
20929 2018-01-03 Martin Liska <mliska@suse.cz>
20930
20931 PR ipa/83549
20932 * cif-code.def (VARIADIC_THUNK): New enum value.
20933 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20934 thunks.
20935
20936 2018-01-03 Jan Beulich <jbeulich@suse.com>
20937
20938 * sse.md (mov<mode>_internal): Tighten condition for when to use
20939 vmovdqu<ssescalarsize> for TI and OI modes.
20940
20941 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20942
20943 Update copyright years.
20944
20945 2018-01-03 Martin Liska <mliska@suse.cz>
20946
20947 PR ipa/83594
20948 * ipa-visibility.c (function_and_variable_visibility): Skip
20949 functions with noipa attribure.
20950
20951 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20952
20953 * gcc.c (process_command): Update copyright notice dates.
20954 * gcov-dump.c (print_version): Ditto.
20955 * gcov.c (print_version): Ditto.
20956 * gcov-tool.c (print_version): Ditto.
20957 * gengtype.c (create_file): Ditto.
20958 * doc/cpp.texi: Bump @copying's copyright year.
20959 * doc/cppinternals.texi: Ditto.
20960 * doc/gcc.texi: Ditto.
20961 * doc/gccint.texi: Ditto.
20962 * doc/gcov.texi: Ditto.
20963 * doc/install.texi: Ditto.
20964 * doc/invoke.texi: Ditto.
20965
20966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20967
20968 * vector-builder.h (vector_builder::m_full_nelts): Change from
20969 unsigned int to poly_uint64.
20970 (vector_builder::full_nelts): Update prototype accordingly.
20971 (vector_builder::new_vector): Likewise.
20972 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20973 (vector_builder::operator ==): Likewise.
20974 (vector_builder::finalize): Likewise.
20975 * int-vector-builder.h (int_vector_builder::int_vector_builder):
20976 Take the number of elements as a poly_uint64 rather than an
20977 unsigned int.
20978 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20979 from unsigned int to poly_uint64.
20980 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20981 (vec_perm_indices::new_vector): Likewise.
20982 (vec_perm_indices::length): Likewise.
20983 (vec_perm_indices::nelts_per_input): Likewise.
20984 (vec_perm_indices::input_nelts): Likewise.
20985 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20986 number of elements per input as a poly_uint64 rather than an
20987 unsigned int. Use the original encoding for variable-length
20988 vectors, rather than clamping each individual element.
20989 For the second and subsequent elements in each pattern,
20990 clamp the step and base before clamping their sum.
20991 (vec_perm_indices::series_p): Handle polynomial element counts.
20992 (vec_perm_indices::all_in_range_p): Likewise.
20993 (vec_perm_indices_to_tree): Likewise.
20994 (vec_perm_indices_to_rtx): Likewise.
20995 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20996 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20997 (tree_vector_builder::new_binary_operation): Handle polynomial
20998 element counts. Return false if we need to know the number
20999 of elements at compile time.
21000 * fold-const.c (fold_vec_perm): Punt if the number of elements
21001 isn't known at compile time.
21002
21003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21004
21005 * vec-perm-indices.h (vec_perm_builder): Change element type
21006 from HOST_WIDE_INT to poly_int64.
21007 (vec_perm_indices::element_type): Update accordingly.
21008 (vec_perm_indices::clamp): Handle polynomial element_types.
21009 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21010 (vec_perm_indices::all_in_range_p): Likewise.
21011 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21012 than shwi trees.
21013 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21014 polynomial vec_perm_indices element types.
21015 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21016 * fold-const.c (fold_vec_perm): Likewise.
21017 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21018 * tree-vect-generic.c (lower_vec_perm): Likewise.
21019 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21020 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21021 element type to HOST_WIDE_INT.
21022
21023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21024 Alan Hayward <alan.hayward@arm.com>
21025 David Sherwood <david.sherwood@arm.com>
21026
21027 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21028 rather than an int. Use plus_constant.
21029 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21030 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21031
21032 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21033 Alan Hayward <alan.hayward@arm.com>
21034 David Sherwood <david.sherwood@arm.com>
21035
21036 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21037 a HOST_WIDE_INT to a poly_int64.
21038
21039 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21040 Alan Hayward <alan.hayward@arm.com>
21041 David Sherwood <david.sherwood@arm.com>
21042
21043 * calls.c (load_register_parameters): Cope with polynomial
21044 mode sizes. Require a constant size for BLKmode parameters
21045 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21046 forces a parameter to be padded at the lsb end in order to
21047 fill a complete number of words, require the parameter size
21048 to be ordered wrt UNITS_PER_WORD.
21049
21050 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21051 Alan Hayward <alan.hayward@arm.com>
21052 David Sherwood <david.sherwood@arm.com>
21053
21054 * reload1.c (spill_stack_slot_width): Change element type
21055 from unsigned int to poly_uint64_pod.
21056 (alter_reg): Treat mode sizes as polynomial.
21057
21058 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21059 Alan Hayward <alan.hayward@arm.com>
21060 David Sherwood <david.sherwood@arm.com>
21061
21062 * reload.c (complex_word_subreg_p): New function.
21063 (reload_inner_reg_of_subreg, push_reload): Use it.
21064
21065 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21066 Alan Hayward <alan.hayward@arm.com>
21067 David Sherwood <david.sherwood@arm.com>
21068
21069 * lra-constraints.c (process_alt_operands): Reject matched
21070 operands whose sizes aren't ordered.
21071 (match_reload): Refer to this check here.
21072
21073 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21074 Alan Hayward <alan.hayward@arm.com>
21075 David Sherwood <david.sherwood@arm.com>
21076
21077 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21078 that the mode size is in the set {1, 2, 4, 8, 16}.
21079
21080 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21081 Alan Hayward <alan.hayward@arm.com>
21082 David Sherwood <david.sherwood@arm.com>
21083
21084 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21085 Use plus_constant instead of gen_rtx_PLUS.
21086
21087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21088 Alan Hayward <alan.hayward@arm.com>
21089 David Sherwood <david.sherwood@arm.com>
21090
21091 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21092 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21093 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21094 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21095 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21096 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21097 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21098 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21099 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21100 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21101 a poly_int64.
21102 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21103 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21104 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21105 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21106 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21107 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21108 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21109 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21110 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21111 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21112 function.
21113 * expr.c (emit_move_resolve_push): Treat the input and result
21114 of PUSH_ROUNDING as a poly_int64.
21115 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21116 (emit_push_insn): Likewise.
21117 * lra-eliminations.c (mark_not_eliminable): Likewise.
21118 * recog.c (push_operand): Likewise.
21119 * reload1.c (elimination_effects): Likewise.
21120 * rtlanal.c (nonzero_bits1): Likewise.
21121 * calls.c (store_one_arg): Likewise. Require the padding to be
21122 known at compile time.
21123
21124 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21125 Alan Hayward <alan.hayward@arm.com>
21126 David Sherwood <david.sherwood@arm.com>
21127
21128 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21129 Use plus_constant instead of gen_rtx_PLUS.
21130
21131 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21132 Alan Hayward <alan.hayward@arm.com>
21133 David Sherwood <david.sherwood@arm.com>
21134
21135 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21136 rather than an int.
21137
21138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21139 Alan Hayward <alan.hayward@arm.com>
21140 David Sherwood <david.sherwood@arm.com>
21141
21142 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21143 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21144 via stack temporaries. Treat the mode size as polynomial too.
21145
21146 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21147 Alan Hayward <alan.hayward@arm.com>
21148 David Sherwood <david.sherwood@arm.com>
21149
21150 * expr.c (expand_expr_real_2): When handling conversions involving
21151 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21152 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
21153 as a poly_uint64 too.
21154
21155 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21156 Alan Hayward <alan.hayward@arm.com>
21157 David Sherwood <david.sherwood@arm.com>
21158
21159 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21160
21161 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21162 Alan Hayward <alan.hayward@arm.com>
21163 David Sherwood <david.sherwood@arm.com>
21164
21165 * combine.c (can_change_dest_mode): Handle polynomial
21166 REGMODE_NATURAL_SIZE.
21167 * expmed.c (store_bit_field_1): Likewise.
21168 * expr.c (store_constructor): Likewise.
21169 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21170 and polynomial REGMODE_NATURAL_SIZE.
21171 (gen_lowpart_common): Likewise.
21172 * reginfo.c (record_subregs_of_mode): Likewise.
21173 * rtlanal.c (read_modify_subreg_p): Likewise.
21174
21175 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21176 Alan Hayward <alan.hayward@arm.com>
21177 David Sherwood <david.sherwood@arm.com>
21178
21179 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21180 numbers of elements.
21181
21182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21183 Alan Hayward <alan.hayward@arm.com>
21184 David Sherwood <david.sherwood@arm.com>
21185
21186 * match.pd: Cope with polynomial numbers of vector elements.
21187
21188 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21189 Alan Hayward <alan.hayward@arm.com>
21190 David Sherwood <david.sherwood@arm.com>
21191
21192 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21193 in a POINTER_PLUS_EXPR.
21194
21195 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21196 Alan Hayward <alan.hayward@arm.com>
21197 David Sherwood <david.sherwood@arm.com>
21198
21199 * omp-simd-clone.c (simd_clone_subparts): New function.
21200 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21201 (ipa_simd_modify_function_body): Likewise.
21202
21203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21204 Alan Hayward <alan.hayward@arm.com>
21205 David Sherwood <david.sherwood@arm.com>
21206
21207 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21208 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21209 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21210 (expand_vector_condition, vector_element): Likewise.
21211 (subparts_gt): New function.
21212 (get_compute_type): Use subparts_gt.
21213 (count_type_subparts): Delete.
21214 (expand_vector_operations_1): Use subparts_gt instead of
21215 count_type_subparts.
21216
21217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21218 Alan Hayward <alan.hayward@arm.com>
21219 David Sherwood <david.sherwood@arm.com>
21220
21221 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21222 (vect_compile_time_alias): ...this new function. Do the calculation
21223 on poly_ints rather than trees.
21224 (vect_prune_runtime_alias_test_list): Update call accordingly.
21225
21226 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21227 Alan Hayward <alan.hayward@arm.com>
21228 David Sherwood <david.sherwood@arm.com>
21229
21230 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21231 numbers of units.
21232 (vect_schedule_slp_instance): Likewise.
21233
21234 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21235 Alan Hayward <alan.hayward@arm.com>
21236 David Sherwood <david.sherwood@arm.com>
21237
21238 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21239 constant and extern definitions for variable-length vectors.
21240 (vect_get_constant_vectors): Note that the number of units
21241 is known to be constant.
21242
21243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21244 Alan Hayward <alan.hayward@arm.com>
21245 David Sherwood <david.sherwood@arm.com>
21246
21247 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21248 of units as polynomial. Choose between WIDE and NARROW based
21249 on multiple_p.
21250
21251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21252 Alan Hayward <alan.hayward@arm.com>
21253 David Sherwood <david.sherwood@arm.com>
21254
21255 * tree-vect-stmts.c (simd_clone_subparts): New function.
21256 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21257
21258 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21259 Alan Hayward <alan.hayward@arm.com>
21260 David Sherwood <david.sherwood@arm.com>
21261
21262 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21263 vectors as polynomial. Use build_index_vector for
21264 IFN_GOMP_SIMD_LANE.
21265
21266 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21267 Alan Hayward <alan.hayward@arm.com>
21268 David Sherwood <david.sherwood@arm.com>
21269
21270 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21271 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21272 for variable-length vectors.
21273 (vectorizable_mask_load_store): Treat the number of units as
21274 polynomial, asserting that it is constant if the condition has
21275 already been enforced.
21276 (vectorizable_store, vectorizable_load): Likewise.
21277
21278 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21279 Alan Hayward <alan.hayward@arm.com>
21280 David Sherwood <david.sherwood@arm.com>
21281
21282 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21283 of units as polynomial. Punt if we can't tell at compile time
21284 which vector contains the final result.
21285
21286 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21287 Alan Hayward <alan.hayward@arm.com>
21288 David Sherwood <david.sherwood@arm.com>
21289
21290 * tree-vect-loop.c (vectorizable_induction): Treat the number
21291 of units as polynomial. Punt on SLP inductions. Use an integer
21292 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21293 cast of such a series for variable-length floating-point
21294 reductions.
21295
21296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21297 Alan Hayward <alan.hayward@arm.com>
21298 David Sherwood <david.sherwood@arm.com>
21299
21300 * tree.h (build_index_vector): Declare.
21301 * tree.c (build_index_vector): New function.
21302 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21303 of units as polynomial, forcibly converting it to a constant if
21304 vectorizable_reduction has already enforced the condition.
21305 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21306 to create a {1,2,3,...} vector.
21307 (vectorizable_reduction): Treat the number of units as polynomial.
21308 Choose vectype_in based on the largest scalar element size rather
21309 than the smallest number of units. Enforce the restrictions
21310 relied on above.
21311
21312 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21313 Alan Hayward <alan.hayward@arm.com>
21314 David Sherwood <david.sherwood@arm.com>
21315
21316 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21317 number of units as polynomial.
21318
21319 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21320 Alan Hayward <alan.hayward@arm.com>
21321 David Sherwood <david.sherwood@arm.com>
21322
21323 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21324 * target.def (autovectorize_vector_sizes): Return the vector sizes
21325 by pointer, using vector_sizes rather than a bitmask.
21326 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21327 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21328 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21329 Likewise.
21330 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21331 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21332 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21333 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21334 * omp-general.c (omp_max_vf): Likewise.
21335 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21336 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21337 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21338 * tree-vect-slp.c (vect_slp_bb): Likewise.
21339 * doc/tm.texi: Regenerate.
21340 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21341 to a poly_uint64.
21342 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21343 the vector size as a poly_uint64 rather than an unsigned int.
21344 (current_vector_size): Change from an unsigned int to a poly_uint64.
21345 (get_vectype_for_scalar_type): Update accordingly.
21346 * tree.h (build_truth_vector_type): Take the size and number of
21347 units as a poly_uint64 rather than an unsigned int.
21348 (build_vector_type): Add a temporary overload that takes
21349 the number of units as a poly_uint64 rather than an unsigned int.
21350 * tree.c (make_vector_type): Likewise.
21351 (build_truth_vector_type): Take the number of units as a poly_uint64
21352 rather than an unsigned int.
21353
21354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21355 Alan Hayward <alan.hayward@arm.com>
21356 David Sherwood <david.sherwood@arm.com>
21357
21358 * target.def (get_mask_mode): Take the number of units and length
21359 as poly_uint64s rather than unsigned ints.
21360 * targhooks.h (default_get_mask_mode): Update accordingly.
21361 * targhooks.c (default_get_mask_mode): Likewise.
21362 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21363 * doc/tm.texi: Regenerate.
21364
21365 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21366 Alan Hayward <alan.hayward@arm.com>
21367 David Sherwood <david.sherwood@arm.com>
21368
21369 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21370 * omp-general.c (omp_max_vf): Likewise.
21371 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21372 (expand_omp_simd): Handle polynomial safelen.
21373 * omp-low.c (omplow_simd_context): Add a default constructor.
21374 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21375 (lower_rec_simd_input_clauses): Update accordingly.
21376 (lower_rec_input_clauses): Likewise.
21377
21378 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21379 Alan Hayward <alan.hayward@arm.com>
21380 David Sherwood <david.sherwood@arm.com>
21381
21382 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21383 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21384 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21385 (vect_analyze_slp_cost): Likewise.
21386 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21387 (vect_model_load_cost): Likewise.
21388
21389 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21390 Alan Hayward <alan.hayward@arm.com>
21391 David Sherwood <david.sherwood@arm.com>
21392
21393 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21394 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21395 from an unsigned int * to a poly_uint64_pod *.
21396 (calculate_unrolling_factor): New function.
21397 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21398
21399 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21400 Alan Hayward <alan.hayward@arm.com>
21401 David Sherwood <david.sherwood@arm.com>
21402
21403 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21404 from an unsigned int to a poly_uint64.
21405 (_loop_vec_info::slp_unrolling_factor): Likewise.
21406 (_loop_vec_info::vectorization_factor): Change from an int
21407 to a poly_uint64.
21408 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21409 (vect_get_num_vectors): New function.
21410 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21411 (vect_get_num_copies): Use vect_get_num_vectors.
21412 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21413 to an unsigned int *.
21414 (vect_analyze_data_refs): Change min_vf from an int * to a
21415 poly_uint64 *.
21416 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21417 than an unsigned HOST_WIDE_INT.
21418 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21419 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21420 to an unsigned int *.
21421 (vect_analyze_data_ref_dependences): Likewise.
21422 (vect_compute_data_ref_alignment): Handle polynomial vf.
21423 (vect_enhance_data_refs_alignment): Likewise.
21424 (vect_prune_runtime_alias_test_list): Likewise.
21425 (vect_shift_permute_load_chain): Likewise.
21426 (vect_supportable_dr_alignment): Likewise.
21427 (dependence_distance_ge_vf): Take the vectorization factor as a
21428 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21429 (vect_analyze_data_refs): Change min_vf from an int * to a
21430 poly_uint64 *.
21431 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21432 vfm1 as a poly_uint64 rather than an int. Make the same change
21433 for the returned bound_scalar.
21434 (vect_gen_vector_loop_niters): Handle polynomial vf.
21435 (vect_do_peeling): Likewise. Update call to
21436 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21437 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21438 be constant.
21439 * tree-vect-loop.c (vect_determine_vectorization_factor)
21440 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21441 (vect_get_known_peeling_cost): Likewise.
21442 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21443 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21444 (vect_transform_loop): Likewise. Use the lowest possible VF when
21445 updating the upper bounds of the loop.
21446 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21447 rather than an int.
21448 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21449 polynomial unroll factors.
21450 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21451 (vect_make_slp_decision): Likewise.
21452 (vect_supported_load_permutation_p): Likewise, and polynomial
21453 vf too.
21454 (vect_analyze_slp_cost): Handle polynomial vf.
21455 (vect_slp_analyze_node_operations): Likewise.
21456 (vect_slp_analyze_bb_1): Likewise.
21457 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21458 than an unsigned HOST_WIDE_INT.
21459 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21460 (vectorizable_load): Handle polynomial vf.
21461 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21462 a poly_uint64.
21463 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21464
21465 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21466 Alan Hayward <alan.hayward@arm.com>
21467 David Sherwood <david.sherwood@arm.com>
21468
21469 * match.pd: Handle bit operations involving three constants
21470 and try to fold one pair.
21471
21472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21473
21474 * tree-vect-loop-manip.c: Include gimple-fold.h.
21475 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21476 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21477 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21478 Add a path that uses a step of VF instead of 1, but disable it
21479 for now.
21480 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21481 and niters_no_overflow parameters. Update calls to
21482 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21483 Create a new SSA name if the latter choses to use a ste other
21484 than zero, and return it via niters_vector_mult_vf_var.
21485 * tree-vect-loop.c (vect_transform_loop): Update calls to
21486 vect_do_peeling, vect_gen_vector_loop_niters and
21487 slpeel_make_loop_iterate_ntimes.
21488 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21489 (vect_gen_vector_loop_niters): Update declarations after above changes.
21490
21491 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21492
21493 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21494 128-bit round to integer instructions.
21495 (ceil<mode>2): Likewise.
21496 (btrunc<mode>2): Likewise.
21497 (round<mode>2): Likewise.
21498
21499 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21500
21501 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21502 unaligned VSX load/store on P8/P9.
21503 (expand_block_clear): Allow the use of unaligned VSX
21504 load/store on P8/P9.
21505
21506 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21507
21508 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21509 New function.
21510 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21511 swap associated with both a load and a store.
21512
21513 2018-01-02 Andrew Waterman <andrew@sifive.com>
21514
21515 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21516 * config/riscv/riscv.md (clear_cache): Use it.
21517
21518 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21519
21520 * web.c: Remove out-of-date comment.
21521
21522 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21523
21524 * expr.c (fixup_args_size_notes): Check that any existing
21525 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21526 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21527 (emit_single_push_insn): ...here.
21528
21529 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21530
21531 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21532 (const_vector_encoded_nelts): New function.
21533 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21534 (const_vector_int_elt, const_vector_elt): Declare.
21535 * emit-rtl.c (const_vector_int_elt_1): New function.
21536 (const_vector_elt): Likewise.
21537 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21538 of CONST_VECTOR_ELT.
21539
21540 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21541
21542 * expr.c: Include rtx-vector-builder.h.
21543 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21544 directly on the tree encoding.
21545 (const_vector_from_tree): Likewise.
21546 * optabs.c: Include rtx-vector-builder.h.
21547 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21548 sequence of "u" values.
21549 * vec-perm-indices.c: Include rtx-vector-builder.h.
21550 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21551 directly on the vec_perm_indices encoding.
21552
21553 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21554
21555 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21556 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21557 * rtx-vector-builder.h: New file.
21558 * rtx-vector-builder.c: Likewise.
21559 * rtl.h (rtx_def::u2): Add a const_vector field.
21560 (CONST_VECTOR_NPATTERNS): New macro.
21561 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21562 (CONST_VECTOR_DUPLICATE_P): Likewise.
21563 (CONST_VECTOR_STEPPED_P): Likewise.
21564 (CONST_VECTOR_ENCODED_ELT): Likewise.
21565 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21566 (unwrap_const_vec_duplicate): Likewise.
21567 (const_vec_series_p): Check for a non-duplicated vector encoding.
21568 Say that the function only returns true for integer vectors.
21569 * emit-rtl.c: Include rtx-vector-builder.h.
21570 (gen_const_vec_duplicate_1): Delete.
21571 (gen_const_vector): Call gen_const_vec_duplicate instead of
21572 gen_const_vec_duplicate_1.
21573 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21574 (gen_const_vec_duplicate): Use rtx_vector_builder.
21575 (gen_const_vec_series): Likewise.
21576 (gen_rtx_CONST_VECTOR): Likewise.
21577 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21578 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21579 Build a new vector rather than modifying a CONST_VECTOR in-place.
21580 (handle_special_swappables): Update call accordingly.
21581 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21582 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21583 Build a new vector rather than modifying a CONST_VECTOR in-place.
21584 (handle_special_swappables): Update call accordingly.
21585
21586 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21587
21588 * simplify-rtx.c (simplify_const_binary_operation): Use
21589 CONST_VECTOR_ELT instead of XVECEXP.
21590
21591 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21592
21593 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21594 the selector elements to be different from the data elements
21595 if the selector is a VECTOR_CST.
21596 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21597 ssizetype for the selector.
21598
21599 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21600
21601 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21602 before testing each element individually.
21603 * tree-vect-generic.c (lower_vec_perm): Likewise.
21604
21605 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21606
21607 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21608 * selftest-run-tests.c (selftest::run_tests): Call it.
21609 * vector-builder.h (vector_builder::operator ==): New function.
21610 (vector_builder::operator !=): Likewise.
21611 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21612 (vec_perm_indices::all_from_input_p): New function.
21613 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21614 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21615 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21616 instead of reading the VECTOR_CST directly. Detect whether both
21617 vector inputs are the same before constructing the vec_perm_indices,
21618 and update the number of inputs argument accordingly. Use the
21619 utility functions added above. Only construct sel2 if we need to.
21620
21621 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21622
21623 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21624 the broadcast of the low byte.
21625 (expand_mult_highpart): Use an explicit encoding for the permutes.
21626 * optabs-query.c (can_mult_highpart_p): Likewise.
21627 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21628 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21629 (vectorizable_bswap): Likewise.
21630 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21631 explicit encoding for the power-of-2 permutes.
21632 (vect_permute_store_chain): Likewise.
21633 (vect_grouped_load_supported): Likewise.
21634 (vect_permute_load_chain): Likewise.
21635
21636 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21637
21638 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21639 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21640 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21641 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21642 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21643 (vect_gen_perm_mask_any): Likewise.
21644
21645 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21646
21647 * int-vector-builder.h: New file.
21648 * vec-perm-indices.h: Include int-vector-builder.h.
21649 (vec_perm_indices): Redefine as an int_vector_builder.
21650 (auto_vec_perm_indices): Delete.
21651 (vec_perm_builder): Redefine as a stand-alone class.
21652 (vec_perm_indices::vec_perm_indices): New function.
21653 (vec_perm_indices::clamp): Likewise.
21654 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21655 (vec_perm_indices::new_vector): New function.
21656 (vec_perm_indices::new_expanded_vector): Update for new
21657 vec_perm_indices class.
21658 (vec_perm_indices::rotate_inputs): New function.
21659 (vec_perm_indices::all_in_range_p): Operate directly on the
21660 encoded form, without computing elided elements.
21661 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21662 encoding. Update for new vec_perm_indices class.
21663 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21664 the given vec_perm_builder.
21665 (expand_vec_perm_var): Update vec_perm_builder constructor.
21666 (expand_mult_highpart): Use vec_perm_builder instead of
21667 auto_vec_perm_indices.
21668 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21669 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21670 or double series encoding as appropriate.
21671 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21672 vec_perm_indices instead of auto_vec_perm_indices.
21673 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21674 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21675 (vect_permute_store_chain): Likewise.
21676 (vect_grouped_load_supported): Likewise.
21677 (vect_permute_load_chain): Likewise.
21678 (vect_shift_permute_load_chain): Likewise.
21679 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21680 (vect_transform_slp_perm_load): Likewise.
21681 (vect_schedule_slp_instance): Likewise.
21682 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21683 (vectorizable_mask_load_store): Likewise.
21684 (vectorizable_bswap): Likewise.
21685 (vectorizable_store): Likewise.
21686 (vectorizable_load): Likewise.
21687 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21688 vec_perm_indices instead of auto_vec_perm_indices. Use
21689 tree_to_vec_perm_builder to read the vector from a tree.
21690 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21691 vec_perm_builder instead of a vec_perm_indices.
21692 (have_whole_vector_shift): Use vec_perm_builder and
21693 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21694 truncation to calc_vec_perm_mask_for_shift.
21695 (vect_create_epilog_for_reduction): Likewise.
21696 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21697 from auto_vec_perm_indices to vec_perm_indices.
21698 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21699 instead of changing individual elements.
21700 (aarch64_vectorize_vec_perm_const): Use new_vector to install
21701 the vector in d.perm.
21702 * config/arm/arm.c (expand_vec_perm_d::perm): Change
21703 from auto_vec_perm_indices to vec_perm_indices.
21704 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21705 instead of changing individual elements.
21706 (arm_vectorize_vec_perm_const): Use new_vector to install
21707 the vector in d.perm.
21708 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21709 Update vec_perm_builder constructor.
21710 (rs6000_expand_interleave): Likewise.
21711 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21712 (rs6000_expand_interleave): Likewise.
21713
21714 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21715
21716 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21717 to qimode could truncate the indices.
21718 * optabs.c (expand_vec_perm_var): Likewise.
21719
21720 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21721
21722 * Makefile.in (OBJS): Add vec-perm-indices.o.
21723 * vec-perm-indices.h: New file.
21724 * vec-perm-indices.c: Likewise.
21725 * target.h (vec_perm_indices): Replace with a forward class
21726 declaration.
21727 (auto_vec_perm_indices): Move to vec-perm-indices.h.
21728 * optabs.h: Include vec-perm-indices.h.
21729 (expand_vec_perm): Delete.
21730 (selector_fits_mode_p, expand_vec_perm_var): Declare.
21731 (expand_vec_perm_const): Declare.
21732 * target.def (vec_perm_const_ok): Replace with...
21733 (vec_perm_const): ...this new hook.
21734 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21735 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21736 * doc/tm.texi: Regenerate.
21737 * optabs.def (vec_perm_const): Delete.
21738 * doc/md.texi (vec_perm_const): Likewise.
21739 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21740 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21741 expand_vec_perm for constant permutation vectors. Assert that
21742 the mode of variable permutation vectors is the integer equivalent
21743 of the mode that is being permuted.
21744 * optabs-query.h (selector_fits_mode_p): Declare.
21745 * optabs-query.c: Include vec-perm-indices.h.
21746 (selector_fits_mode_p): New function.
21747 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21748 is defined, instead of checking whether the vec_perm_const_optab
21749 exists. Use targetm.vectorize.vec_perm_const instead of
21750 targetm.vectorize.vec_perm_const_ok. Check whether the indices
21751 fit in the vector mode before using a variable permute.
21752 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21753 vec_perm_indices instead of an rtx.
21754 (expand_vec_perm): Replace with...
21755 (expand_vec_perm_const): ...this new function. Take the selector
21756 as a vec_perm_indices rather than an rtx. Also take the mode of
21757 the selector. Update call to shift_amt_for_vec_perm_mask.
21758 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21759 Use vec_perm_indices::new_expanded_vector to expand the original
21760 selector into bytes. Check whether the indices fit in the vector
21761 mode before using a variable permute.
21762 (expand_vec_perm_var): Make global.
21763 (expand_mult_highpart): Use expand_vec_perm_const.
21764 * fold-const.c: Includes vec-perm-indices.h.
21765 * tree-ssa-forwprop.c: Likewise.
21766 * tree-vect-data-refs.c: Likewise.
21767 * tree-vect-generic.c: Likewise.
21768 * tree-vect-loop.c: Likewise.
21769 * tree-vect-slp.c: Likewise.
21770 * tree-vect-stmts.c: Likewise.
21771 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21772 Delete.
21773 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21774 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21775 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21776 (aarch64_vectorize_vec_perm_const): ...this new function.
21777 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21778 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21779 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21780 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21781 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21782 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21783 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21784 into...
21785 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
21786 check for NEON modes.
21787 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21788 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21789 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21790 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21791 into...
21792 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21793 the old VEC_PERM_CONST conditions.
21794 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21795 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21796 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21797 (ia64_vectorize_vec_perm_const_ok): Merge into...
21798 (ia64_vectorize_vec_perm_const): ...this new function.
21799 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21800 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21801 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21802 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21803 * config/mips/mips.c (mips_expand_vec_perm_const)
21804 (mips_vectorize_vec_perm_const_ok): Merge into...
21805 (mips_vectorize_vec_perm_const): ...this new function.
21806 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21807 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21808 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21809 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21810 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21811 (rs6000_expand_vec_perm_const): Delete.
21812 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21813 Delete.
21814 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21815 (altivec_expand_vec_perm_const_le): Take each operand individually.
21816 Operate on constant selectors rather than rtxes.
21817 (altivec_expand_vec_perm_const): Likewise. Update call to
21818 altivec_expand_vec_perm_const_le.
21819 (rs6000_expand_vec_perm_const): Delete.
21820 (rs6000_vectorize_vec_perm_const_ok): Delete.
21821 (rs6000_vectorize_vec_perm_const): New function.
21822 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21823 an element count and rtx array.
21824 (rs6000_expand_extract_even): Update call accordingly.
21825 (rs6000_expand_interleave): Likewise.
21826 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21827 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21828 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21829 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21830 (rs6000_expand_vec_perm_const): Delete.
21831 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21832 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21833 (altivec_expand_vec_perm_const_le): Take each operand individually.
21834 Operate on constant selectors rather than rtxes.
21835 (altivec_expand_vec_perm_const): Likewise. Update call to
21836 altivec_expand_vec_perm_const_le.
21837 (rs6000_expand_vec_perm_const): Delete.
21838 (rs6000_vectorize_vec_perm_const_ok): Delete.
21839 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21840 reference to the SPE evmerge intructions.
21841 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21842 an element count and rtx array.
21843 (rs6000_expand_extract_even): Update call accordingly.
21844 (rs6000_expand_interleave): Likewise.
21845 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21846 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21847 new function.
21848 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21849
21850 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21851
21852 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21853 vector mode and that that mode matches the mode of the data
21854 being permuted.
21855 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21856 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21857 directly using expand_vec_perm_1 when forcing selectors into
21858 registers.
21859 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21860
21861 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21862
21863 * optabs-query.h (can_vec_perm_p): Delete.
21864 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21865 * optabs-query.c (can_vec_perm_p): Split into...
21866 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21867 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21868 particular selector is valid.
21869 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21870 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21871 (vect_grouped_load_supported): Likewise.
21872 (vect_shift_permute_load_chain): Likewise.
21873 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21874 (vect_transform_slp_perm_load): Likewise.
21875 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21876 (vectorizable_bswap): Likewise.
21877 (vect_gen_perm_mask_checked): Likewise.
21878 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21879 implementations of variable permutation vectors into account
21880 when deciding which selector to use.
21881 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21882 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21883 with a false third argument.
21884 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21885 to test whether the constant selector is valid and can_vec_perm_var_p
21886 to test whether a variable selector is valid.
21887
21888 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21889
21890 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21891 * optabs-query.c (can_vec_perm_p): Likewise.
21892 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21893 instead of vec_perm_indices.
21894 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21895 (vect_gen_perm_mask_checked): Likewise,
21896 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21897 (vect_gen_perm_mask_checked): Likewise,
21898
21899 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21900
21901 * optabs-query.h (qimode_for_vec_perm): Declare.
21902 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21903 (qimode_for_vec_perm): ...this new function.
21904 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21905
21906 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21907
21908 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21909 does not have a conditional at the top.
21910
21911 2018-01-02 Richard Biener <rguenther@suse.de>
21912
21913 * ipa-inline.c (big_speedup_p): Fix expression.
21914
21915 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21916
21917 PR target/81616
21918 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21919 for generic 4->6.
21920
21921 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21922
21923 PR target/81616
21924 Generic tuning.
21925 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21926 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21927 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21928 cond_taken_branch_cost 3->4.
21929
21930 2018-01-01 Jakub Jelinek <jakub@redhat.com>
21931
21932 PR tree-optimization/83581
21933 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21934 TODO_cleanup_cfg if any changes have been made.
21935
21936 PR middle-end/83608
21937 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21938 convert_modes if target mode has the right side, but different mode
21939 class.
21940
21941 PR middle-end/83609
21942 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21943 last argument when extracting from CONCAT. If either from_real or
21944 from_imag is NULL, use expansion through memory. If result is not
21945 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21946 the parts directly to inner mode, if even that fails, use expansion
21947 through memory.
21948
21949 PR middle-end/83623
21950 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21951 check for bswap in mode rather than HImode and use that in expand_unop
21952 too.
21953 \f
21954 Copyright (C) 2018 Free Software Foundation, Inc.
21955
21956 Copying and distribution of this file, with or without modification,
21957 are permitted in any medium without royalty provided the copyright
21958 notice and this notice are preserved.