Introduce instance discriminators
[gcc.git] / gcc / ChangeLog
1 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2 Olivier Hainque <hainque@adacore.com>
3
4 * debug.h (decl_to_instance_map_t): New type.
5 (decl_to_instance_map): Declare.
6 (maybe_create_decl_to_instance_map): New inline function.
7 * final.c (bb_discriminator, last_bb_discriminator): New statics,
8 to track basic block discriminators.
9 (final_start_function_1): Initialize them.
10 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
11 bb_discriminator.
12 (decl_to_instance_map): New variable.
13 (map_decl_to_instance, maybe_set_discriminator): New functions.
14 (notice_source_line): Set discriminator.
15
16 2018-07-31 Ian Lance Taylor <iant@golang.org>
17
18 * targhooks.c (default_have_speculation_safe_value): Add
19 ATTRIBUTE_UNUSED.
20
21 2018-07-31 David Malcolm <dmalcolm@redhat.com>
22
23 * dump-context.h: Include "pretty-print.h".
24 (dump_context::refresh_dumps_are_enabled): New decl.
25 (dump_context::emit_item): New decl.
26 (class dump_context): Add fields "m_test_pp" and
27 "m_test_pp_flags".
28 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
29 (temp_dump_context::get_dumped_text): New decl.
30 (class temp_dump_context): Add field "m_pp".
31 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
32 (dump_context::refresh_dumps_are_enabled): ...and add a test for
33 m_test_pp.
34 (set_dump_file): Update for above change.
35 (set_alt_dump_file): Likewise.
36 (dump_loc): New overload, taking a pretty_printer *.
37 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
38 to any test pretty-printer.
39 (make_item_for_dump_gimple_stmt): New function, adapted from
40 optinfo::add_gimple_stmt.
41 (dump_context::dump_gimple_stmt): 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_gimple_expr): New function, adapted from
45 optinfo::add_gimple_expr.
46 (dump_context::dump_gimple_expr): 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 (make_item_for_dump_generic_expr): New function, adapted from
50 optinfo::add_tree.
51 (dump_context::dump_generic_expr): Call it, and use the result,
52 eliminating the direct usage of dump_file and alt_dump_file in
53 favor of indirectly using them via emit_item.
54 (make_item_for_dump_printf_va): New function, adapted from
55 optinfo::add_printf_va.
56 (make_item_for_dump_printf): New function.
57 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
58 and use the result, eliminating the direct usage of dump_file and
59 alt_dump_file in favor of indirectly using them via emit_item.
60 (make_item_for_dump_dec): New function.
61 (dump_context::dump_dec): Call it, and use the result,
62 eliminating the direct usage of dump_file and alt_dump_file in
63 favor of indirectly using them via emit_item.
64 (make_item_for_dump_symtab_node): New function, adapted from
65 optinfo::add_symtab_node.
66 (dump_context::dump_symtab_node): Call it, and use the result,
67 eliminating the direct usage of dump_file and alt_dump_file in
68 favor of indirectly using them via emit_item.
69 (dump_context::begin_scope): Reimplement, avoiding direct usage
70 of dump_file and alt_dump_file in favor of indirectly using them
71 via emit_item.
72 (dump_context::emit_item): New member function.
73 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
74 Set up test pretty-printer on the underlying context. Call
75 refresh_dumps_are_enabled.
76 (temp_dump_context::~temp_dump_context): Call
77 refresh_dumps_are_enabled.
78 (temp_dump_context::get_dumped_text): New member function.
79 (selftest::verify_dumped_text): New function.
80 (ASSERT_DUMPED_TEXT_EQ): New macro.
81 (selftest::test_capture_of_dump_calls): Run all tests twice, with
82 and then without optinfo enabled. Add uses of
83 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
84 * dumpfile.h: Update comment for the dump_* API.
85 * optinfo-emit-json.cc
86 (selftest::test_building_json_from_dump_calls): Update for new
87 param for temp_dump_context ctor.
88 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
89 and "m_owned" field.
90 (optinfo_item::~optinfo_item): Likewise.
91 (optinfo::add_item): New member function.
92 (optinfo::emit): Update comment.
93 (optinfo::add_string): Delete.
94 (optinfo::add_printf): Delete.
95 (optinfo::add_printf_va): Delete.
96 (optinfo::add_gimple_stmt): Delete.
97 (optinfo::add_gimple_expr): Delete.
98 (optinfo::add_tree): Delete.
99 (optinfo::add_symtab_node): Delete.
100 (optinfo::add_dec): Delete.
101 * optinfo.h (class dump_context): New forward decl.
102 (optinfo::add_item): New decl.
103 (optinfo::add_string): Delete.
104 (optinfo::add_printf): Delete.
105 (optinfo::add_printf_va): Delete.
106 (optinfo::add_gimple_stmt): Delete.
107 (optinfo::add_gimple_expr): Delete.
108 (optinfo::add_tree): Delete.
109 (optinfo::add_symtab_node): Delete.
110 (optinfo::add_dec): Delete.
111 (optinfo::add_poly_int): Delete.
112 (optinfo_item::optinfo_item): Remove "owned" param.
113 (class optinfo_item): Remove field "m_owned".
114
115 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
116
117 PR middle-end/86705
118 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
119 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
120 requested variable alignment.
121 (expand_one_ssa_partition): Likewise.
122 (expand_one_var): Likewise.
123
124 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
125
126 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
127 to speculation_safe_value_not_needed.
128
129 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
130
131 * targhooks.h (speculation_safe_value_not_needed): New prototype.
132 * targhooks.c (speculation_safe_value_not_needed): New function.
133 * target.def (have_speculation_safe_value): Update documentation.
134 * doc/tm.texi: Regenerated.
135
136 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
137
138 * config/aarch64/iterators.md (ALLI_TI): New iterator.
139 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
140 expand.
141 (despeculate_copy<ALLI:mode>_insn): New insn.
142 (despeculate_copyti_insn): New insn.
143 (despeculate_simple<ALLI:mode>): New insn
144 (despeculate_simpleti): New insn.
145 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
146 function.
147 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
148 aarch64_speculation_safe_value.
149 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
150
151 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
152
153 * config/aarch64/aarch64-speculation.cc: New file.
154 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
155 before pass_reorder_blocks.
156 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
157 prototype.
158 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
159 X14 and X15 when tracking speculation.
160 * config/aarch64/aarch64.md (register name constants): Add
161 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
162 (unspec): Add UNSPEC_SPECULATION_TRACKER.
163 (speculation_barrier): New insn attribute.
164 (cmp<mode>): Allow SP in comparisons.
165 (speculation_tracker): New insn.
166 (speculation_barrier): Add speculation_barrier attribute.
167 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
168 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
169 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
170
171 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
172
173 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
174 aarch64_track_speculation is true.
175 (tb<optab><mode>1): Likewise.
176 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
177 generate CB[N]Z when tracking speculation.
178 (aarch64_split_compare_and_swap): Likewise.
179 (aarch64_split_atomic_op): Likewise.
180
181 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
182
183 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
184
185 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
186
187 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
188 (speculation_barrier): New insn.
189
190 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
191
192 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
193 * config/arm/arm.md (speculation_barrier): New expand.
194 (speculation_barrier_insn): New pattern.
195
196 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
197
198 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
199 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
200 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
201 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
202 list.
203 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
204 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
205 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
206 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
207 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
208 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
209 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
210 * builtins.c (expand_speculation_safe_value): New function.
211 (expand_builtin): Call it.
212 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
213 * doc/extend.texi: Document __builtin_speculation_safe_value.
214 * doc/md.texi: Document "speculation_barrier" pattern.
215 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
216 TARGET_HAVE_SPECULATION_SAFE_VALUE.
217 * doc/tm.texi: Regenerated.
218 * target.def (have_speculation_safe_value, speculation_safe_value): New
219 hooks.
220 * targhooks.c (default_have_speculation_safe_value): New function.
221 (default_speculation_safe_value): New function.
222 * targhooks.h (default_have_speculation_safe_value): Add prototype.
223 (default_speculation_safe_value): Add prototype.
224
225 2018-07-31 David Malcolm <dmalcolm@redhat.com>
226
227 * dump-context.h (dump_context::dump_loc): New decl.
228 * dumpfile.c (dump_context::dump_loc): New member function.
229 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
230 and dump_gimple_stmt.
231 (dump_context::dump_gimple_expr_loc): Likewise, using
232 dump_gimple_expr.
233 (dump_context::dump_generic_expr_loc): Likewise, using
234 dump_generic_expr.
235 (dump_context::dump_printf_loc_va): Likewise, using
236 dump_printf_va.
237 (dump_context::begin_scope): Explicitly using the global function
238 "dump_loc", rather than the member function.
239
240 2018-07-31 Martin Sebor <msebor@redhat.com>
241
242 PR tree-optimization/86741
243 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
244
245 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
246
247 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
248 depend on whether prefetch instructions will be emitted or not.
249 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
250 will be emitted or not.
251 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
252 (TARGET_SETMEM_PFD): New macros.
253
254 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
255
256 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
257 (NULL_STMT_VEC_INFO): Delete.
258 (stmt_vec_info::operator*): Likewise.
259 (stmt_vec_info::operator gimple *): Likewise.
260 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
261 of NULL_STMT_VEC_INFO.
262 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
263 (vect_reassociating_reduction_p): Likewise.
264 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
265 (vectorizable_store): Likewise.
266 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
267 (vec_info::free_stmt_vec_infos): Likewise.
268
269 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
270
271 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
272 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
273
274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
275
276 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
277 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
278 (vec_info::free_stmt_vec_info): New private member functions.
279 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
280 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
281 * tree-parloops.c (gather_scalar_reductions): Remove calls to
282 set_stmt_vec_info_vec and free_stmt_vec_infos.
283 * tree-vect-loop.c (_loop_vec_info): Remove call to
284 set_stmt_vec_info_vec.
285 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
286 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
287 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
288 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
289 (vec_info::free_stmt_vec_info): ...these new functions. Remove
290 assignments in {vec_info::,}new_stmt_vec_info that are redundant
291 with the clearing in the xcalloc.
292 (stmt_vec_info_vec): Delete.
293 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
294 (vectorize_loops): Likewise.
295 (vec_info::~vec_info): Remove argument from call to
296 free_stmt_vec_infos.
297 (vec_info::add_stmt): Remove vinfo argument from call to
298 new_stmt_vec_info.
299
300 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
301
302 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
303 rather than a gimple stmt.
304 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
305 information for pattern statements when passed the original
306 statement; instead wait to be passed the pattern statement itself.
307 Don't call set_vinfo_for_stmt here.
308 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
309 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
310 stmt_vec_infos here.
311 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
312 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
313 stmt_vec_infos entry.
314
315 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
316
317 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
318 * tree-vectorizer.c (vec_info::replace_stmt): New function.
319 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
320 * tree-vect-stmts.c (vectorizable_call): Likewise.
321 (vectorizable_simd_clone_call): Likewise.
322
323 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
324
325 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
326 * tree-vectorizer.c (vec_info::remove_stmt): New function.
327 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
328 * tree-vect-loop.c (vect_transform_loop): Likewise.
329 * tree-vect-slp.c (vect_schedule_slp): Likewise.
330 * tree-vect-stmts.c (vect_remove_stores): Likewise.
331
332 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
333
334 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
335 (vect_dr_stmt): Delete.
336 * tree-vectorizer.c (vec_info::lookup_dr): New function.
337 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
338 of DR_VECT_AUX.
339 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
340 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
341 (vect_verify_datarefs_alignment, vect_peeling_supportable)
342 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
343 (vect_analyze_data_refs): Likewise.
344 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
345 argument.
346 (vect_find_same_alignment_drs): Likewise.
347 (vect_slp_analyze_node_dependences): Update calls accordingly.
348 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
349 instead of DR_VECT_AUX.
350 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
351 of a vector data references. Use vec_info::lookup_dr instead of
352 DR_VECT_AUX.
353 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
354 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
355 instead of DR_VECT_AUX.
356
357 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
358
359 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
360 dr_vec_info.
361 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
362 accordingly.
363 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
364 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
365 (vect_gen_prolog_loop_niters): Likewise.
366
367 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
368
369 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
370 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
371 (vect_known_alignment_in_bytes, vect_dr_behavior)
372 (vect_get_scalar_dr_size): Take references as dr_vec_infos
373 instead of data_references. Update calls to other routines for
374 which the same change has been made.
375 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
376 dr_vec_infos instead of stmt_vec_infos.
377 (vect_analyze_data_ref_dependence): Update call accordingly.
378 (vect_slp_analyze_data_ref_dependence)
379 (vect_record_base_alignments): Use DR_VECT_AUX.
380 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
381 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
382 (vector_alignment_reachable_p, vect_get_data_access_cost)
383 (vect_peeling_supportable, vect_analyze_group_access_1)
384 (vect_analyze_group_access, vect_analyze_data_ref_access)
385 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
386 (vect_compile_time_alias, vect_small_gap_p)
387 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
388 (vect_supportable_dr_alignment): Take references as dr_vec_infos
389 instead of data_references. Update calls to other routines for
390 which the same change has been made.
391 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
392 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
393 (vect_slp_analyze_and_verify_node_alignment)
394 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
395 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
396 (vect_setup_realignment): Use dr_vec_infos. Update calls after
397 above changes.
398 (_vect_peel_info::dr): Replace with...
399 (_vect_peel_info::dr_info): ...this new field.
400 (vect_peeling_hash_get_most_frequent)
401 (vect_peeling_hash_choose_best_peeling): Update accordingly.
402 (vect_peeling_hash_get_lowest_cost):
403 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
404 routines for which the same change has been made.
405 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
406 data_reference.
407 * tree-vect-loop-manip.c (get_misalign_in_elems)
408 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
409 above changes.
410 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
411 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
412 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
413 (get_group_load_store_type, get_negative_load_store_type)
414 (vect_get_data_ptr_increment, vectorizable_store)
415 (vectorizable_load): Likewise.
416 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
417 Update calls to other routines for which the same change has been made.
418
419 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
420
421 * tree-vectorizer.h (vec_info::move_dr): New member function.
422 (dataref_aux): Rename to...
423 (dr_vec_info): ...this and add "dr" and "stmt" fields.
424 (_stmt_vec_info::dr_aux): Update accordingly.
425 (_stmt_vec_info::data_ref_info): Delete.
426 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
427 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
428 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
429 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
430 of data_ref.
431 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
432 (STMT_VINFO_DR_INFO): New macro.
433 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
434 (set_dr_misalignment): Update after rename of dataref_aux.
435 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
436 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
437 initialization of STMT_VINFO_DATA_REF.
438 * tree-vectorizer.c (vec_info::move_dr): New function.
439 * tree-vect-patterns.c (vect_recog_bool_pattern)
440 (vect_recog_mask_conversion_pattern)
441 (vect_recog_gather_scatter_pattern): Use it.
442 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
443 the "dr" and "stmt" fields of dr_vec_info instead of
444 STMT_VINFO_DATA_REF.
445
446 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
447
448 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
449 (is_pattern_stmt_p): Use it.
450 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
451 on pattern statements.
452
453 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
454
455 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
456 original stmt as a stmt_vec_info rather than a gimple stmt.
457 (vect_pattern_recog_1): Take the statement directly as a
458 stmt_vec_info, rather than via a gimple_stmt_iterator.
459 Update call to vect_mark_pattern_stmts.
460 (vect_pattern_recog): Update calls accordingly.
461
462 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
463
464 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
465 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
466 a vect_def_type for the first argument.
467 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
468 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
469 operand if it isn't defined by a vectorized statement.
470 (vect_build_gather_load_calls): Remove the mask_dt argument and
471 update calls to vect_get_vec_def_for_stmt_copy.
472 (vectorizable_bswap): Likewise the dt argument.
473 (vectorizable_call): Update calls to vectorizable_bswap and
474 vect_get_vec_def_for_stmt_copy.
475 (vectorizable_simd_clone_call, vectorizable_assignment)
476 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
477 (vectorizable_comparison): Update calls to
478 vect_get_vec_def_for_stmt_copy.
479 (vectorizable_store): Likewise. Remove now-unnecessary calls to
480 vect_is_simple_use.
481 (vect_get_loop_based_defs): Remove dt argument and update call
482 to vect_get_vec_def_for_stmt_copy.
483 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
484 and vect_get_vec_def_for_stmt_copy.
485 (vectorizable_load): Update calls to vect_build_gather_load_calls
486 and vect_get_vec_def_for_stmt_copy.
487 * tree-vect-loop.c (vect_create_epilog_for_reduction)
488 (vectorizable_reduction, vectorizable_live_operation): Update calls
489 to vect_get_vec_def_for_stmt_copy.
490
491 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
492
493 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
494 and gimple stmt arguments with a stmt_vec_info.
495 (vect_record_base_alignments): Update calls accordingly.
496 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
497 and gimple stmt arguments with a stmt_vec_info.
498 (vect_build_slp_tree_1): Remove vinfo argument and update call
499 to vect_record_max_nunits.
500 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
501 and vect_record_max_nunits.
502
503 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
504
505 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
506 file and take a stmt_vec_info instead of a gimple stmt.
507 (supportable_widening_operation, vect_finish_replace_stmt)
508 (vect_finish_stmt_generation, vect_get_store_rhs)
509 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
510 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
511 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
512 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
513 (vect_create_data_ref_ptr, bump_vector_ptr)
514 (vect_permute_store_chain, vect_setup_realignment)
515 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
516 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
517 (vectorizable_reduction, vectorizable_induction)
518 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
519 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
520 than gimple stmts as arguments.
521 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
522 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
523 (can_group_stmts_p, vect_check_gather_scatter)
524 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
525 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
526 (vect_permute_load_chain, vect_shift_permute_load_chain)
527 (vect_transform_grouped_load)
528 (vect_record_grouped_load_vectors): Likewise.
529 * tree-vect-loop.c (vect_fixup_reduc_chain)
530 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
531 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
532 (vectorizable_reduction, vectorizable_induction)
533 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
534 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
535 (vect_get_load_store_mask): Likewise.
536 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
537 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
538 * tree-vect-stmts.c (vect_mark_relevant)
539 (is_simple_and_all_uses_invariant)
540 (exist_non_indexing_operands_for_use_p, process_use)
541 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
542 (vect_get_vec_def_for_operand, vect_get_vec_defs)
543 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
544 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
545 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
546 (get_negative_load_store_type, get_load_store_type)
547 (vect_check_load_store_mask, vect_check_store_rhs)
548 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
549 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
550 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
551 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
552 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
553 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
554 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
555 (supportable_widening_operation): Likewise.
556
557 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
558
559 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
560 a stmt_vec_info instead of a gcall.
561 (vect_check_gather_scatter): Update call accordingly.
562 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
563 of a gphi.
564 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
565 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
566 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
567 instead of a gimple stmt.
568 (vect_transform_loop): Update calls accordingly.
569 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
570 stmt_vec_infos instead of gimple stmts.
571 (vect_analyze_slp_instance): Update use accordingly.
572 * tree-vect-stmts.c (read_vector_array, write_vector_array)
573 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
574 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
575 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
576 (vect_gen_widened_results_half, vect_get_loop_based_defs)
577 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
578 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
579 down to subroutines.
580
581 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
582
583 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
584 of the worklist from a vector of gimple stmts to a vector of
585 stmt_vec_infos.
586 * tree-vect-stmts.c (vect_mark_relevant, process_use)
587 (vect_mark_stmts_to_be_vectorized): Likewise
588
589 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
590
591 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
592 statement before passing it to vect_analyze_stmt.
593 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
594 the chain of phi vector definitions. Track the exit phi via its
595 stmt_vec_info.
596 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
597 STMT_VINFO_REDUC_DEF.
598 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
599 stmt_vec_infos to handle the statement chains.
600 (vect_get_slp_defs): Record the first statement in the node
601 using a stmt_vec_info.
602 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
603 statements here and pass their stmt_vec_info down to subroutines.
604 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
605 down to vect_finish_stmt_generation.
606 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
607 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
608 stmt_vec_infos to subroutines.
609 (vect_remove_stores): Use stmt_vec_infos to handle the statement
610 chains.
611
612 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
613
614 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
615 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
616 (vect_permute_store_chain, vect_setup_realignment)
617 (vect_permute_load_chain, vect_shift_permute_load_chain)
618 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
619 stmts internally, and when passing values to other vectorizer routines.
620 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
621 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
622 (vect_analyze_loop_operations, get_initial_def_for_reduction)
623 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
624 (vectorizable_reduction, vectorizable_induction)
625 (vectorizable_live_operation, vect_transform_loop_stmt)
626 (vect_transform_loop): Likewise.
627 * tree-vect-patterns.c (vect_reassociating_reduction_p)
628 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
629 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
630 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
631 (vect_slp_analyze_node_operations_1): Likewise.
632 * tree-vect-stmts.c (vect_mark_relevant, process_use)
633 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
634 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
635 (vect_finish_stmt_generation_1, get_group_load_store_type)
636 (get_load_store_type, vect_build_gather_load_calls)
637 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
638 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
639 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
640 (vectorizable_store, vectorizable_load, vectorizable_condition)
641 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
642 (supportable_widening_operation): Likewise.
643 (vect_get_vector_types_for_stmt): Likewise.
644 * tree-vectorizer.h (vect_dr_behavior): Likewise.
645
646 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
647
648 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
649 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
650 (vect_permute_store_chain, vect_permute_load_chain)
651 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
652 repeated stmt_vec_info lookups.
653 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
654 (vect_update_ivs_after_vectorizer): Likewise.
655 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
656 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
657 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
658 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
659 (vect_bb_slp_scalar_cost): Likewise.
660 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
661
662 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
663
664 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
665 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
666 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
667 to get gassigns and gcalls, rather than operating on generc gimple
668 stmts.
669 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
670 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
671 (vectorizable_load, vect_analyze_stmt): Likewise.
672 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
673
674 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
675
676 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
677 return stmt_vec_infos rather than gimple stmts. Do not accept
678 null arguments.
679 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
680 of a gimple stmt.
681 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
682 Update use of get_later_stmt.
683 (vect_get_constant_vectors): Update call accordingly.
684 (vect_schedule_slp_instance): Likewise
685 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
686 (vect_slp_analyze_instance_dependence): Likewise.
687 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
688
689 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
690
691 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
692 (stmt_info_for_cost::stmt_info): ...this new field.
693 (add_stmt_costs): Update accordingly.
694 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
695 (vect_get_known_peeling_cost): Likewise.
696 (vect_estimate_min_profitable_iters): Likewise.
697 * tree-vect-stmts.c (record_stmt_cost): Likewise.
698
699 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
700
701 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
702 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
703 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
704 accordingly.
705 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
706
707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
708
709 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
710 a gimple stmt to a stmt_vec_info.
711 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
712
713 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
714
715 * tree-vectorizer.h (vec_info::grouped_stores): Change from
716 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
717 (_loop_vec_info::reduction_chains): Likewise.
718 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
719 accordingly.
720 * tree-vect-slp.c (vect_analyze_slp): Likewise.
721
722 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
723
724 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
725 a gimple stmt to a stmt_vec_info.
726 (_stmt_vec_info::next_element): Likewise.
727 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
728 (vect_slp_analyze_and_verify_node_alignment)
729 (vect_analyze_group_access_1, vect_analyze_group_access)
730 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
731 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
732 (vect_supportable_dr_alignment): Update accordingly.
733 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
734 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
735 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
736 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
737 * tree-vect-slp.c (vect_build_slp_tree_1)
738 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
739 (vect_split_slp_store_group, vect_analyze_slp_instance)
740 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
741 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
742 (get_group_load_store_type, get_load_store_type)
743 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
744 (vect_transform_stmt, vect_remove_stores): Likewise.
745
746 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
747
748 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
749 than a gimple stmt.
750 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
751 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
752 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
753 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
754 (vector_alignment_reachable_p, vect_get_data_access_cost)
755 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
756 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
757 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
758 (vect_analyze_group_access_1, vect_analyze_group_access)
759 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
760 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
761 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
762 result of vect_dr_stmt and use the stmt_vec_info instead of
763 the associated gimple stmt.
764 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
765 (vect_gen_prolog_loop_niters): Likewise.
766 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
767
768 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
769
770 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
771 to a vec<stmt_vec_info>.
772 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
773 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
774 vec<stmt_vec_info>.
775 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
776 to a vec<stmt_vec_info>.
777 (bst_traits::value_type, bst_traits::value_type): Likewise.
778 (bst_traits::hash): Update accordingly.
779 (vect_get_and_check_slp_defs): Change the stmts parameter from
780 a vec<gimple *> to a vec<stmt_vec_info>.
781 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
782 (vect_build_slp_tree): Likewise.
783 (vect_build_slp_tree_2): Likewise. Update uses of
784 SLP_TREE_SCALAR_STMTS.
785 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
786 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
787 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
788 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
789 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
790 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
791 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
792 (vect_get_constant_vectors, vect_get_slp_defs)
793 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
794 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
795 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
796 instead of gimple stmts.
797 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
798 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
799 (vect_slp_analyze_instance_dependence): Update uses of
800 SLP_TREE_SCALAR_STMTS.
801 (vect_slp_analyze_and_verify_node_alignment): Likewise.
802 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
803 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
804 (get_initial_defs_for_reduction): Likewise.
805 (vect_create_epilog_for_reduction): Likewise.
806 (vectorize_fold_left_reduction): Likewise.
807 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
808 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
809 (can_vectorize_live_stmts): Likewise.
810
811 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
812
813 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
814 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
815 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
816 than gimple stmts.
817 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
818 of a gimple stmt.
819 (gather_scalar_reductions): Update after above interface changes.
820 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
821 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
822 than gimple stmts.
823 (vect_force_simple_reduction): Likewise.
824 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
825 LOOP_VINFO_REDUCTIONS.
826 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
827
828 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
829
830 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
831 a gimple stmt to a stmt_vec_info.
832 * tree-vect-loop.c (vect_active_double_reduction_p)
833 (vect_force_simple_reduction, vectorizable_reduction): Update
834 accordingly.
835
836 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
837
838 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
839 vec<gimple *> to a vec<stmt_vec_info>.
840 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
841 the reduction_phis argument from a vec<gimple *> to a
842 vec<stmt_vec_info>.
843 (vectorizable_reduction): Likewise the phis local variable that
844 is passed to vect_create_epilog_for_reduction. Update for new type
845 of SLP_TREE_VEC_STMTS.
846 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
847 (vectorizable_live_operation): Likewise.
848 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
849 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
850
851 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
852
853 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
854 a gimple stmt to a stmt_vec_info.
855 (vectorizable_condition, vectorizable_live_operation)
856 (vectorizable_reduction, vectorizable_induction): Pass back the
857 vectorized statement as a stmt_vec_info.
858 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
859 use of STMT_VINFO_VEC_STMT.
860 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
861 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
862 as stmt_vec_infos rather than gimple stmts.
863 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
864 to a stmt_vec_info.
865 (vectorizable_live_operation): Likewise.
866 (vectorizable_reduction, vectorizable_induction): Likewise,
867 updating use of STMT_VINFO_VEC_STMT.
868 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
869 of STMT_VINFO_VEC_STMT.
870 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
871 (vectorizable_simd_clone_call, vectorizable_conversion)
872 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
873 (vectorizable_store, vectorizable_load, vectorizable_condition)
874 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
875 from a gimple stmt to a stmt_vec_info.
876 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
877 pointer to a stmt_vec_info to the vectorizable_* routines.
878
879 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
880
881 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
882 a gimple stmt to a stmt_vec_info.
883 (is_pattern_stmt_p): Update accordingly.
884 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
885 (vect_record_grouped_load_vectors): Likewise.
886 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
887 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
888 (vect_model_reduction_cost): Likewise.
889 (vect_create_epilog_for_reduction): Likewise.
890 (vectorizable_reduction, vectorizable_induction): Likewise.
891 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
892 Return the stmt_vec_info for the pattern statement.
893 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
894 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
895 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
896 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
897 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
898 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
899 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
900 (free_stmt_vec_info, vect_is_simple_use): Likewise.
901
902 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
903
904 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
905 (vect_finish_stmt_generation): Likewise.
906 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
907 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
908 (vect_build_gather_load_calls): Use the return value of the above
909 functions instead of a separate call to vinfo_for_stmt. Use narrow
910 scopes for the input gimple stmt and wider scopes for the associated
911 stmt_vec_info. Use vec_info::lookup_def when setting these
912 stmt_vec_infos from an SSA_NAME definition.
913 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
914 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
915 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
916 (vectorizable_store, vectorizable_load, vectorizable_condition)
917 (vectorizable_comparison): Likewise.
918 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
919 (vectorizable_reduction): Likewise.
920
921 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
922
923 * tree-vectorizer.h (vect_is_simple_use): Add an optional
924 stmt_vec_info * parameter before the optional gimple **.
925 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
926 (process_use, vect_get_vec_def_for_operand_1): Update callers.
927 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
928 * tree-vect-loop.c (vectorizable_reduction): Likewise.
929 (vectorizable_live_operation): Likewise.
930 * tree-vect-patterns.c (type_conversion_p): Likewise.
931 (vect_look_through_possible_promotion): Likewise.
932 (vect_recog_rotate_pattern): Likewise.
933 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
934
935 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
936
937 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
938 a typedef to a wrapper class.
939 (NULL_STMT_VEC_INFO): New macro.
940 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
941 (stmt_vec_info::operator*): New function.
942 (stmt_vec_info::operator gimple *): Likewise.
943 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
944 (add_stmt_costs): Likewise.
945 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
946 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
947 (vect_get_known_peeling_cost): Likewise.
948 (vect_estimate_min_profitable_iters): Likewise.
949 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
950 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
951 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
952 (vectorizable_store, free_stmt_vec_infos): Likewise.
953 (new_stmt_vec_info): Change return type of xcalloc to
954 _stmt_vec_info *.
955
956 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
957
958 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
959 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
960 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
961 a single_imm_use-based sequence.
962 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
963
964 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
965
966 * tree-vectorizer.h (vec_info::lookup_def): Declare.
967 * tree-vectorizer.c (vec_info::lookup_def): New function.
968 * tree-vect-patterns.c (vect_get_internal_def): Use it.
969 (vect_widened_op_tree): Likewise.
970 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
971 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
972 (vectorizable_reduction): Likewise.
973 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
974 of a gimple *.
975 (vect_is_slp_reduction): Update calls accordingly. Use
976 vec_info::lookup_def.
977 (vect_is_simple_reduction): Likewise
978 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
979
980 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
981
982 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
983 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
984 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
985 of vinfo_for_stmt.
986 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
987 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
988 (vect_update_vf_for_slp, vect_analyze_loop_operations)
989 (vect_is_slp_reduction, vectorizable_induction)
990 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
991 * tree-vect-patterns.c (vect_init_pattern_stmt):
992 (vect_determine_min_output_precision_1, vect_determine_precisions)
993 (vect_pattern_recog): Likewise.
994 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
995 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
996 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
997 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
998 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
999 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
1000 info field from a loop to a loop_vec_info.
1001
1002 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1003
1004 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1005 (vec_info::add_stmt): Declare.
1006 * tree-vectorizer.c (vec_info::add_stmt): New function.
1007 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1008 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1009 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1010 (vectorizable_induction): Likewise.
1011 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1012 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1013 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1014 (vectorizable_load): Likewise.
1015 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1016 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1017 (vect_recog_gather_scatter_pattern): Likewise.
1018 (append_pattern_def_seq): Likewise. Remove a check that is
1019 performed by add_stmt itself.
1020
1021 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1022
1023 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1024 which make_ssa_name was called with new_stmt before new_stmt
1025 had been created.
1026
1027 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1028
1029 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1030 split out from...
1031 (vect_is_slp_reduction): ...here...
1032 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1033 that are already known to be false.
1034
1035 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1036
1037 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1038 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1039 STMT_VINFO_NUM_SLP_USES when it's true.
1040 (vect_free_slp_instance): Add a final_p parameter and pass it to
1041 vect_free_slp_tree.
1042 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1043 (vect_analyze_slp_instance): Likewise.
1044 (vect_slp_analyze_operations): Likewise.
1045 (vect_slp_analyze_bb_1): Likewise.
1046 * tree-vectorizer.c (vec_info): Likewise.
1047 * tree-vect-loop.c (vect_transform_loop): Likewise.
1048
1049 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1050
1051 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1052 function is not called for second and subsequent members of
1053 a reduction group.
1054
1055 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1056
1057 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1058 cases for nested loops from here to ...
1059 (vect_create_epilog_for_reduction): ...here. Only call
1060 vect_is_simple_use for inner-loop reductions.
1061
1062 2018-07-31 Martin Liska <mliska@suse.cz>
1063
1064 PR gcov-profile/85338
1065 PR gcov-profile/85350
1066 PR gcov-profile/85372
1067 * profile.c (struct location_triplet): New.
1068 (struct location_triplet_hash): Likewise.
1069 (output_location): Do not output a BB that
1070 is already recorded for a line.
1071 (branch_prob): Use streamed_locations.
1072
1073 2018-07-31 Martin Liska <mliska@suse.cz>
1074
1075 PR gcov-profile/85370
1076 * coverage.c (coverage_begin_function): Do not mark target
1077 clones as artificial functions.
1078
1079 2018-07-31 Martin Liska <mliska@suse.cz>
1080
1081 PR gcov-profile/83813
1082 PR gcov-profile/84758
1083 PR gcov-profile/85217
1084 PR gcov-profile/85332
1085 * profile.c (branch_prob): Do not record GOTO expressions
1086 for GIMPLE statements which locations are already streamed.
1087
1088 2018-07-31 Olivier Hainque <hainque@adacore.com>
1089
1090 * gcc.c (handle_spec_function): Accept a soft_matched_part
1091 argument, as do_spec_1. Pass it down to ...
1092 (eval_spec_function): Accept a soft_matched_part argument,
1093 and pass it down to ...
1094 (do_spec_2): Accept a soft_matched_part argument, and pass
1095 it down to do_spec_1.
1096 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1097 (handle_braces): Update call to handle_spec_function.
1098 (driver::set_up_specs): Update calls to do_spec_2.
1099 (compare_debug_dump_opt_spec_function): Likewise.
1100 (compare_debug_self_opt_spec_function): Likewise.
1101
1102 2018-07-31 Olivier Hainque <hainque@adacore.com>
1103
1104 * common.opt (nolibc): New option.
1105 * doc/invoke.texi (Link Options): Document it.
1106 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1107 * config/alpha/linux.h: Likewise.
1108 * config/arc/elf.h: Likewise.
1109 * config/arm/uclinux-elf.h: Likewise.
1110 * config/arm/unknown-elf.h: Likewise.
1111 * config/avr/avrlibc.h: Likewise.
1112 * config/bfin/bfin.h: Likewise.
1113 * config/bfin/linux.h: Likewise.
1114 * config/bfin/uclinux.h: Likewise.
1115 * config/darwin.h: Likewise.
1116 * config/darwin10.h: Likewise.
1117 * config/darwin12.h: Likewise.
1118 * config/gnu-user.h: Likewise.
1119 * config/lm32/uclinux-elf.h: Likewise.
1120 * config/pa/pa-hpux11.h: Likewise.
1121 * config/pa/pa64-hpux.h: Likewise.
1122 * config/sparc/sparc.h: Likewise.
1123
1124 2018-07-31 Olivier Hainque <hainque@adacore.com>
1125
1126 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1127 undefined variables.
1128
1129 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1130
1131 PR target/86640
1132 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1133 instead of GEN_INT.
1134
1135 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1136
1137 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1138 terminated string literal.
1139
1140 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1141
1142 PR rtl-optimization/85160
1143 * combine.c (is_just_move): New function.
1144 (try_combine): Allow combining two instructions into two if neither of
1145 the original instructions was a move.
1146
1147 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
1148
1149 PR target/86673
1150 * doc/extend.texi (Global Register Variables): Discourage use of type
1151 qualifiers.
1152 (Local Register Variables): Likewise.
1153
1154 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
1155
1156 PR tree-optimization/86506
1157 * hwint.h (ceil_log2): Resync with hwint.c implementation.
1158
1159 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
1160
1161 PR target/86547
1162 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1163 hard_regno, make sure no insn between `from` and `to` clobbers it.
1164
1165 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
1166 Tom de Vries <tdevries@suse.de>
1167
1168 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1169 (PTX_DEFAULT_RUNTIME_DIM): ... this.
1170 (nvptx_goacc_validate_dims): Set default worker and gang dims to
1171 PTX_DEFAULT_RUNTIME_DIM.
1172 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1173
1174 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
1175
1176 * config/pa/pa.c (pa_output_addr_vec): Align address table.
1177 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1178 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1179
1180 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
1181
1182 * config/rs6000/constraints.md (wG constraint): Delete, no longer
1183 used.
1184 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1185 predicate to reflect toc fusion has been deleted.
1186 (toc_fusion_mem_raw): Delete, no longer used.
1187 (toc_fusion_mem_wrapped): Likewise.
1188 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1189 fusion mask bit.
1190 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1191 Delete, no longer used.
1192 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1193 meant to be used for toc fusion.
1194 (rs6000_debug_print_mode): Delete toc fusion debugging.
1195 (rs6000_debug_reg_global): Likewise.
1196 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1197 fusion and secondary reload support that were never used.
1198 (rs6000_option_override_internal): Delete TOC fusion, that was only
1199 partially defined, and it did not work unless you also used the
1200 -mcmodel= switch.
1201 (rs6000_legitimate_address_p): Delete TOC fusion support.
1202 (rs6000_opt_masks): Likewise.
1203 (fusion_wrap_memory_address): Delete function, no longer used.
1204 (fusion_split_address); Delete TOC fusion support.
1205 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1206 longer used with toc fusion being deleted.
1207 (TARGET_TOC_FUSION_FP): Likewise.
1208 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1209 UNSPEC.
1210 (toc fusion spliter): Delete TOC fusion support.
1211 (toc_fusionload_<mode>): Likewise.
1212 (toc_fusionload_di): Likewise.
1213 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1214 longer needs to be named. Rename predicate to delete TOC fusion.
1215 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1216 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1217 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1218 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1219 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1220
1221 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1222
1223 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1224 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1225 __int128 in built-in function prototypes.
1226 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1227 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1228
1229 2018-07-27 Martin Sebor <msebor@redhat.com>
1230
1231 PR tree-optimization/86696
1232 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1233 types, including enums.
1234 (handle_char_store): Be prepared for the above function to fail.
1235
1236 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1237
1238 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1239 when optimization level is lower than 2 or optimize for size.
1240
1241 2018-07-26 Martin Sebor <msebor@redhat.com>
1242
1243 PR tree-optimization/86043
1244 PR tree-optimization/86042
1245 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1246 (get_string_cst_length): Rename...
1247 (get_min_string_length): ...to this. Add argument.
1248 (handle_char_store): Extend to handle multi-character stores by
1249 MEM_REF.
1250 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1251 * tree.h (initializer_zerop): Add argument.
1252
1253 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1254
1255 PR middle-end/86660
1256 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1257 declare target to variables if they have always,{to,from,tofrom} map
1258 kinds.
1259
1260 2018-07-26 Martin Liska <mliska@suse.cz>
1261
1262 PR lto/86548
1263 * lto-wrapper.c: Add linker_output as prefix
1264 for ltrans_output_file.
1265
1266 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1267
1268 PR rtl-optimization/85805
1269 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1270 value for hard registers if that was written in the same mode.
1271
1272 2018-07-26 Martin Liska <mliska@suse.cz>
1273
1274 PR gcov-profile/86536
1275 * gcov.c (format_gcov): Use printf format %.*f directly
1276 and do not handle special values.
1277
1278 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1279
1280 * common/config/arc/arc-common.c (arc_option_optimization_table):
1281 Update default optimizations for size.
1282
1283 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1284
1285 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1286 * config/arc/constraints.md (CfZ): New constraint.
1287 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1288 (subsf3_fpu): Likewise.
1289 (cmpsf_fpu): Likewise.
1290 (cmpsf_fpu_uneq): Likewise.
1291
1292 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1293
1294 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1295 accesses as well.
1296 (arc_is_uncached_mem_p): uncached applies to both the variable and
1297 the pointer.
1298
1299 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1300
1301 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1302 register names.
1303
1304 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1305
1306 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1307 field "m_scopes" from vec to auto_vec.
1308
1309 2018-07-25 Martin Liska <mliska@suse.cz>
1310
1311 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1312 return type.
1313
1314 2018-07-25 Richard Biener <rguenther@suse.de>
1315
1316 PR debug/86654
1317 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1318 special wrt context_die late.
1319 (gen_subprogram_die): Re-use DIEs in local scope.
1320
1321 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1322
1323 PR tree-optimization/86644
1324 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1325
1326 2018-07-25 Martin Liska <mliska@suse.cz>
1327
1328 PR middle-end/86645
1329 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1330 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1331
1332 2018-07-25 Martin Liska <mliska@suse.cz>
1333
1334 PR sanitizer/79635
1335 * params.def: Explain ASan abbreviation and provide
1336 a documentation link.
1337
1338 2018-07-24 Martin Sebor <msebor@redhat.com>
1339
1340 PR tree-optimization/86622
1341 PR tree-optimization/86532
1342 * builtins.h (string_length): Declare.
1343 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1344 (check_access): Be prepared for non-constant length ranges.
1345 (string_length): Make extern.
1346 * expr.c (string_constant): Only handle the minor non-constant
1347 array index. Use string_constant to compute the length of
1348 a generic string constant.
1349
1350 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1351
1352 PR tree-optimization/86618
1353 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1354 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1355
1356 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1357
1358 PR tree-optimization/86636
1359 * json.cc (json::object::set): Fix comment. Add assertions.
1360 (json::array::append): Move here from json.h. Add comment and an
1361 assertion.
1362 (json::string::string): Likewise.
1363 * json.h (json::array::append): Move to json.cc.
1364 (json::string::string): Likewise.
1365 * optinfo-emit-json.cc
1366 (optrecord_json_writer::impl_location_to_json): Assert that we
1367 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1368 wrapper around it. Expand the location once, rather than three
1369 times.
1370 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1371 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1372 wrappers.
1373 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1374 places. Fix some overlong lines.
1375
1376 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1377
1378 * config/aarch64/aarch64-simd.md
1379 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1380 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1381 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1382 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1383 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1384 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1385 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1386 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1387 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1388
1389 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1390
1391 PR middle-end/86627
1392 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1393 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1394 and abs_d == d, do the power of two handling if profitable.
1395
1396 2018-07-24 Richard Biener <rguenther@suse.de>
1397
1398 * match.pd: Add BIT_FIELD_REF canonicalizations.
1399
1400 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1401
1402 PR c/86617
1403 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1404
1405 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1406
1407 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1408 terminated STRING_CST object.
1409
1410 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1411
1412 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1413
1414 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1415
1416 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1417 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1418 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1419 the elements into a register.
1420 (rs6000_split_v4si_init_di_reg): Delete.
1421 (rs6000_split_v4si_init): Delete.
1422 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1423 (vsx_init_v4si): Rewrite as a define_expand.
1424
1425 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1426
1427 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1428 zero_extend argument from memory): New.
1429
1430 2018-07-22 Martin Sebor <msebor@redhat.com>
1431
1432 PR bootstrap/86621
1433 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1434 diagnosing calls with unknown arguments unless -Walloca-larger-than
1435 is restricted to less than PTRDIFF_MAX bytes.
1436
1437 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1438
1439 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1440
1441 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1442
1443 * pretty-print.c (text_info::set_location): Remove redundant
1444 "line_table" parameter from call to rich_location::set_range.
1445
1446 2018-07-20 Martin Sebor <msebor@redhat.com>
1447
1448 PR middle-end/82063
1449 * builtins.c (expand_builtin_alloca): Adjust.
1450 * calls.c (alloc_max_size): Simplify.
1451 * cgraphunit.c (cgraph_node::expand): Adjust.
1452 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1453 variables.
1454 (frame_larger_than_size): Same.
1455 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1456 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1457 Initialize.
1458 * doc/invoke.texi (GCC Command Options): Document option arguments.
1459 Explain byte-size arguments and suffixes.
1460 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1461 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1462 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1463 * doc/options.texi (UInteger): Expand.
1464 (Host_Wide_Int, ByteSize): Document new properties.
1465 * final.c (final_start_function_1): Include sizes in an error message.
1466 * function.c (frame_offset_overflow): Same.
1467 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1468 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1469 Diagnose unbounded alloca calls only for limits of less than
1470 PTRDIFF_MAX.
1471 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1472 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1473 for alloca(0).
1474 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1475 only for limits of less than PTRDIFF_MAX.
1476 * langhooks-def.h (lhd_handle_option): Change function argument
1477 to HOST_WIDE_INT.
1478 * langhooks.c (lhd_handle_option): Same.
1479 * langhooks.h (handle_option): Same.
1480 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1481 ByteSize flags.
1482 (var_type, var_type_struct): Same.
1483 (var_set): Handle ByteSize flag.
1484 * optc-gen.awk: Add comments to output to ease debugging. Make
1485 use of HOST_WIDE_INT where appropriate.
1486 * opts-gen-save.awk: Use %lx to format unsigned long.
1487 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1488 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1489 arguments. Parse bytes-size suffixes.
1490 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1491 (enum_value_to_arg): Same.
1492 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1493 (handle_option): Adjust.
1494 (generate_option): Change function argument to HOST_WIDE_INT.
1495 (cmdline_handle_error): Adjust.
1496 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1497 (set_option): Change function argument to HOST_WIDE_INT.
1498 (option_enabled): Handle cl_host_wide_int.
1499 (get_option_state): Handle CLVC_SIZE.
1500 (control_warning_option): Same.
1501 * opts.c (common_handle_option): Change function argument to
1502 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1503 OPT_Wvla_larger_than_.
1504 * opts.h (enum cl_var_type): Add an enumerator.
1505 * stor-layout.c (layout_decl): Print a more meaningful warning.
1506 * toplev.c (output_stack_usage): Adjust.
1507
1508 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1509
1510 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1511 call to inline_expand_builtin_string_cmp.
1512 (expand_builtin_strcmp): Likewise.
1513 (expand_builtin_strncmp): Likewise.
1514 (inline_string_cmp): Delete the last parameter, change char_type_node
1515 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1516 two operands.
1517 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1518 the inlining expansion on target where the type of the call has same or
1519 narrower precision than unsigned char.
1520
1521 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1522
1523 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1524 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1525 * common.opt (fsave-optimization-record): New option.
1526 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1527 * doc/invoke.texi (-fsave-optimization-record): New option.
1528 * dumpfile.c: Include "optinfo-emit-json.h".
1529 (struct kv_pair): Move to coretypes.h.
1530 (optgroup_options): Make non-static.
1531 (dump_context::end_scope): Call
1532 optimization_records_maybe_pop_dump_scope.
1533 * dumpfile.h (optgroup_options): New decl.
1534 * json.cc: New file.
1535 * json.h: New file.
1536 * optinfo-emit-json.cc: New file.
1537 * optinfo-emit-json.h: New file.
1538 * optinfo.cc: Include "optinfo-emit-json.h".
1539 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1540 (optinfo_enabled_p): Check optimization_records_enabled_p.
1541 (optinfo_wants_inlining_info_p): Likewise.
1542 * optinfo.h: Update comment.
1543 * profile-count.c (profile_quality_as_string): New function.
1544 * profile-count.h (profile_quality_as_string): New decl.
1545 (profile_count::quality): New accessor.
1546 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1547 and optinfo_emit_json_cc_tests.
1548 * selftest.h (selftest::json_cc_tests): New decl.
1549 (selftest::optinfo_emit_json_cc_tests): New decl.
1550 * toplev.c: Include "optinfo-emit-json.h".
1551 (compile_file): Call optimization_records_finish.
1552 (do_compile): Call optimization_records_start.
1553 * tree-ssa-live.c: Include optinfo.h.
1554 (remove_unused_scope_block_p): Retain inlining information if
1555 optinfo_wants_inlining_info_p returns true.
1556
1557 2018-07-20 Richard Biener <rguenther@suse.de>
1558
1559 PR debug/86585
1560 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1561 to cover -flto-partition=none.
1562
1563 2018-07-20 Martin Liska <mliska@suse.cz>
1564
1565 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1566 (get_decl_source_range): Remove unused function.
1567
1568 2018-07-20 Richard Biener <rguenther@suse.de>
1569
1570 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1571 (struct vn_phi_s): Likewise.
1572 (struct vn_reference_s): Likewise.
1573 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1574 for searching the slot of an entry known to be in the hash itself.
1575 (vn_phi_hasher::equal): Likewise.
1576 (vn_reference_hasher::equal): Likewise.
1577 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1578 globals.
1579 (optimistic_info, current_info): Remove, keeping only valid_info.
1580 (vn_reference_lookup_1): Remove fallback lookup.
1581 (vn_reference_lookup_2): Likewise.
1582 (vn_nary_op_lookup_1): Likewise.
1583 (vn_phi_lookup): Likewise.
1584 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1585 hash element.
1586 (vn_reference_insert): Adjust, chain the inserted hash element
1587 at last_inserted_ref.
1588 (vn_reference_insert_pieces): Likewise.
1589 (visit_reference_op_call): Likewise.
1590 (vn_nary_op_insert_into): Chain the inserted hash element at
1591 last_inserted_nary.
1592 (vn_nary_op_insert_pieces): Adjust.
1593 (vn_nary_op_insert): Likewise.
1594 (vn_nary_op_insert_stmt): Likewise.
1595 (vn_phi_insert): Adjust, chain the inserted hash element at
1596 last_inserted_phi.
1597 (process_scc): Remove clearing and copying the optimistic
1598 table. Instead remove elements inserted during an optimistic
1599 iteration from the single table we maintain.
1600 (init_scc_vn): Adjust.
1601 (free_scc_vn): Likewise.
1602 (sccvn_dom_walker::record_cond): Likewise.
1603 (sccvn_dom_walker::after_dom_children): Likewise.
1604
1605 2018-07-19 Martin Sebor <msebor@redhat.com>
1606
1607 PR tree-optimization/84047
1608 PR tree-optimization/83776
1609 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1610 (check_array_bounds): Call it.
1611
1612 2018-07-19 Martin Sebor <msebor@redhat.com>
1613
1614 * align.h (align_flags): Use member initialization.
1615
1616 2018-07-19 David Malcolm <dmalcolm@redhat.com>
1617
1618 * Makefile.in (OBJS): Add optinfo.o.
1619 * coretypes.h (class symtab_node): New forward decl.
1620 (struct cgraph_node): New forward decl.
1621 (class varpool_node): New forward decl.
1622 * dump-context.h: New file.
1623 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1624 "tree-pass.h".
1625 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1626 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1627 (set_alt_dump_file): Likewise.
1628 (dump_context::~dump_context): New dtor.
1629 (dump_gimple_stmt): Move implementation to...
1630 (dump_context::dump_gimple_stmt): ...this new member function.
1631 Add the stmt to any pending optinfo, creating one if need be.
1632 (dump_gimple_stmt_loc): Move implementation to...
1633 (dump_context::dump_gimple_stmt_loc): ...this new member function.
1634 Start a new optinfo and add the stmt to it.
1635 (dump_gimple_expr): Move implementation to...
1636 (dump_context::dump_gimple_expr): ...this new member function.
1637 Add the stmt to any pending optinfo, creating one if need be.
1638 (dump_gimple_expr_loc): Move implementation to...
1639 (dump_context::dump_gimple_expr_loc): ...this new member function.
1640 Start a new optinfo and add the stmt to it.
1641 (dump_generic_expr): Move implementation to...
1642 (dump_context::dump_generic_expr): ...this new member function.
1643 Add the tree to any pending optinfo, creating one if need be.
1644 (dump_generic_expr_loc): Move implementation to...
1645 (dump_context::dump_generic_expr_loc): ...this new member
1646 function. Add the tree to any pending optinfo, creating one if
1647 need be.
1648 (dump_printf): Move implementation to...
1649 (dump_context::dump_printf_va): ...this new member function. Add
1650 the text to any pending optinfo, creating one if need be.
1651 (dump_printf_loc): Move implementation to...
1652 (dump_context::dump_printf_loc_va): ...this new member function.
1653 Start a new optinfo and add the stmt to it.
1654 (dump_dec): Move implementation to...
1655 (dump_context::dump_dec): ...this new member function. Add the
1656 value to any pending optinfo, creating one if need be.
1657 (dump_context::dump_symtab_node): New member function.
1658 (dump_context::get_scope_depth): New member function.
1659 (dump_context::begin_scope): New member function.
1660 (dump_context::end_scope): New member function.
1661 (dump_context::ensure_pending_optinfo): New member function.
1662 (dump_context::begin_next_optinfo): New member function.
1663 (dump_context::end_any_optinfo): New member function.
1664 (dump_context::s_current): New global.
1665 (dump_context::s_default): New global.
1666 (dump_scope_depth): Delete global.
1667 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1668 (dump_symtab_node): New function.
1669 (get_dump_scope_depth): Reimplement in terms of dump_context.
1670 (dump_begin_scope): Likewise.
1671 (dump_end_scope): Likewise.
1672 (selftest::temp_dump_context::temp_dump_context): New ctor.
1673 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1674 (selftest::verify_item): New function.
1675 (ASSERT_IS_TEXT): New macro.
1676 (ASSERT_IS_TREE): New macro.
1677 (ASSERT_IS_GIMPLE): New macro.
1678 (selftest::test_capture_of_dump_calls): New test.
1679 (selftest::dumpfile_c_tests): Call it.
1680 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1681 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1682 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1683 descriptive comment.
1684 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1685 (dump_node, dump_bb): Move these unrelated decls.
1686 (class dump_manager): Add leading comment.
1687 * optinfo.cc: New file.
1688 * optinfo.h: New file.
1689
1690 2018-07-19 Michael Collison <michael.collison@arm.com>
1691 Richard Henderson <rth@redhat.com>
1692
1693 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1694 (subti): Handle op1 zero.
1695 (subvti4, usub4ti4): New.
1696 (*sub<GPI>3_compare1_imm): New.
1697 (sub<GPI>3_carryinCV): New.
1698 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1699 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1700
1701 2018-07-19 Michael Collison <michael.collison@arm.com>
1702 Richard Henderson <rth@redhat.com>
1703
1704 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1705 (addti3): Create simpler code if low part is already known to be 0.
1706 (addvti4, uaddvti4): New.
1707 (*add<GPI>3_compareC_cconly_imm): New.
1708 (*add<GPI>3_compareC_cconly): New.
1709 (*add<GPI>3_compareC_imm): New.
1710 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1711 handle constants within this pattern..
1712 (*add<GPI>3_compareV_cconly_imm): New.
1713 (*add<GPI>3_compareV_cconly): New.
1714 (*add<GPI>3_compareV_imm): New.
1715 (add<GPI>3_compareV): New.
1716 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1717 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1718 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1719 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1720 with 'comparison' operator.
1721 (*add<GPI>3_compareV_cconly_imm): Ditto.
1722 (*add<GPI>3_compareV_cconly): Ditto.
1723 (*add<GPI>3_compareV_imm): Ditto.
1724 (add<GPI>3_compareV): Ditto.
1725 (add<mode>3_carryinC): Ditto.
1726 (*add<mode>3_carryinC_zero): Ditto.
1727 (*add<mode>3_carryinC): Ditto.
1728 (add<mode>3_carryinV): Ditto.
1729 (*add<mode>3_carryinV_zero): Ditto.
1730 (*add<mode>3_carryinV): Ditto.
1731
1732 2018-07-19 Michael Collison <michael.collison@arm.com>
1733 Richard Henderson <rth@redhat.com>
1734
1735 * config/aarch64/aarch64-modes.def (CC_V): New.
1736 * config/aarch64/aarch64-protos.h
1737 (aarch64_addti_scratch_regs): Declare
1738 (aarch64_subvti_scratch_regs): Declare.
1739 (aarch64_expand_subvti): Declare.
1740 (aarch64_gen_unlikely_cbranch): Declare
1741 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1742 for signed overflow using CC_Vmode.
1743 (aarch64_get_condition_code_1): Handle CC_Vmode.
1744 (aarch64_gen_unlikely_cbranch): New function.
1745 (aarch64_addti_scratch_regs): New function.
1746 (aarch64_subvti_scratch_regs): New function.
1747 (aarch64_expand_subvti): New function.
1748
1749 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1750
1751 * config/aarch64/aarch64-option-extensions.def: New entry for profile
1752 extension.
1753 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1754 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1755 extension.
1756
1757 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1758
1759 PR target/83009
1760 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1761 address check not strict.
1762
1763 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1764
1765 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1766 Umq with Umn.
1767 (store_pair_lanes<mode>): Likewise.
1768 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1769 enum value 'ADDR_QUERY_LDP_STP_N'.
1770 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1771 (aarch64_print_address_internal): Add declaration.
1772 (aarch64_print_ldpstp_address): Remove.
1773 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1774 (aarch64_print_operand): Change printing of 'y'.
1775 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1776 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1777 'true' rather than '1'.
1778 * config/aarch64/constraints.md (Uml): Likewise.
1779 (Uml): Rename to Umn.
1780 (Umq): Remove.
1781
1782 2018-07-19 Richard Biener <rguenther@suse.de>
1783
1784 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1785 a trailing array.
1786 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1787 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1788 (vn_reference_hasher): Likewise.
1789 (struct vn_tables_s): Remove obstack and alloc-pool members.
1790 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1791 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1792 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1793 (vn_reference_insert_pieces): Likewise.
1794 (alloc_vn_nary_op_noinit): Adjust.
1795 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1796 (vn_phi_eq): Adjust.
1797 (shared_lookup_phiargs): Remove.
1798 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1799 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1800 (visit_reference_op_call): Likewise.
1801 (copy_nary, copy_phi, copy_reference): Remove.
1802 (process_scc): Rewind the obstack when iterating. Do not
1803 copy the elements to valid_info but just move them from one
1804 hashtable to the other.
1805 (allocate_vn_table): Adjust.
1806 (free_vn_table): Likewise.
1807 (init_scc_vn): Likewise.
1808 (free_scc_vn): Likewise.
1809
1810 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1811
1812 PR target/86560
1813 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1814 indirect_return as function type attribute.
1815 (ix86_attribute_table): Change indirect_return to function
1816 type attribute.
1817 * doc/extend.texi: Update indirect_return attribute.
1818
1819 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1820
1821 * wide-int.h (widest2_int): New.
1822 * gimple-fold.c (arith_overflowed_p): Use it.
1823 * tree.h (widest2_int_cst): New.
1824 * tree-vrp.c (wide_int_binop_overflow): Rename from
1825 vrp_int_const_binop.
1826 Rewrite to work on trees.
1827 (extract_range_from_multiplicative_op_1): Abstract code to...
1828 (wide_int_range_min_max): ...here.
1829 (wide_int_range_cross_product): ...and here.
1830 (extract_range_from_binary_expr_1): Abstract overflow code to...
1831 (wide_int_range_mult_wrapping): ...here.
1832 * tree-vrp.h (wide_int_range_cross_product): New.
1833 (wide_int_range_mult_wrapping): New.
1834
1835 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1836 Julia Koval <julia.koval@intel.com>
1837
1838 * config/i386/x86-tune-costs.h (skylake_memcpy,
1839 skylake_memset): Replace rep_prefix with unrolling for size 512.
1840
1841 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1842
1843 PR middle-end/86544
1844 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1845 in last stmt.
1846
1847 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1848
1849 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1850 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1851 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1852 previously known as "PowerPC AltiVec Built-in Functions". Move
1853 some material to new subsubsections "PowerPC AltiVec Built-in
1854 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1855 ISA 2.07".
1856 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1857 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1858 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1859 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1860
1861 2018-07-18 Richard Biener <rguenther@suse.de>
1862
1863 PR tree-optimization/86557
1864 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1865 EXACT_DIV_EXPR.
1866
1867 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1868
1869 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1870
1871 2018-07-17 Jeff Law <law@redhat.com>
1872
1873 * config/arm/arm.c (get_label_padding): Update for recent
1874 changes to label_to_alignment.
1875
1876 PR tree-optimization/86010
1877 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1878
1879 * config/mips/mips.c (vr4130_align_insns): Update for recent
1880 changes to label_to_alignment.
1881
1882 * config/frv/frv.c (frv_label_align): Update for recent changes
1883 to label_to_alignment.
1884
1885 * config/nios2/nios2.c (nios2_label_align): Update for recent
1886 changes which dropped ALIGN_LABELS_LOG.
1887
1888 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1889
1890 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1891 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1892
1893 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1894
1895 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1896 deprecated align_labels_log.
1897
1898 2018-07-17 Richard Biener <rguenther@suse.de>
1899
1900 PR lto/86456
1901 * dwarf2out.c (init_sections_and_labels): Always generate
1902 a debug_line_str_section for early LTO debug.
1903 (dwarf2out_finish): Reset debug_line_str_hash output early.
1904 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1905 with fat LTO part.
1906 (dwarf2out_early_finish): Output debug_line_str.
1907
1908 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1909
1910 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1911 index register on z196 or later.
1912
1913 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1914
1915 * config/s390/s390.c (s390_default_align): Set default function
1916 alignment to 16.
1917 (s390_override_options_after_change): Call s390_default align.
1918 (s390_option_override_internal): Call s390_default_align.
1919 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1920
1921 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1922
1923 PR middle-end/86542
1924 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1925 to _looptemp_ clauses, other than the first two.
1926
1927 2018-07-17 Martin Liska <mliska@suse.cz>
1928
1929 * opts.c: Do not enable OPT_falign_* for -Os.
1930
1931 2018-07-17 Martin Liska <mliska@suse.cz>
1932
1933 * align.h (MAX_CODE_ALIGN): New.
1934 (MAX_CODE_ALIGN_VALUE): New.
1935 * common/config/i386/i386-common.c (ix86_handle_option):
1936 (MAX_CODE_ALIGN): Moved to align.h.
1937 * final.c (MAX_CODE_ALIGN): Likewise.
1938 * opts.c (parse_and_check_align_values):
1939 (MAX_CODE_ALIGN): Likewise.
1940 (MAX_CODE_ALIGN_VALUE): Likewise.
1941
1942 2018-07-17 Martin Liska <mliska@suse.cz>
1943
1944 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1945 in order to fulfil coding style.
1946 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1947 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1948 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1949 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1950 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1951 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1952 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1953 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1954 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1955
1956 2018-07-17 Martin Liska <mliska@suse.cz>
1957
1958 * align.h: New file.
1959 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1960 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1961 align_flags of label_to_alignment.
1962 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1963 class.
1964 * config/m68k/m68k.c: Do not use removed align_labels_value and
1965 align_loops_value.
1966 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1967 (LOOP_ALIGN): Likewise.
1968 (LABEL_ALIGN): Likewise.
1969 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1970 Remove not used macro.
1971 (rs6000_loop_align): Change return type to align_flags.
1972 (rs6000_loop_align_max_skip): Remove.
1973 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1974 Change return type to align_flags.
1975 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1976 Remove not used macro.
1977 (rs6000_loop_align): Change return type to align_flags.
1978 (rs6000_loop_align_max_skip): Remove.
1979 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1980 * config/rx/rx-protos.h (rx_align_for_label): Make it
1981 static function.
1982 * config/rx/rx.c (rx_align_for_label): Change return type
1983 to align_flags.
1984 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1985 macro definitions.
1986 into align_flags class.
1987 (LABEL_ALIGN): Likewise.
1988 (LOOP_ALIGN): Likewise.
1989 * config/s390/s390.c (s390_label_align): Use align_flags
1990 class member.
1991 (s390_asm_output_function_label): Likewise.
1992 * config/sh/sh.c (sh_override_options_after_change):
1993 Use align_flags class directly without macros.
1994 (find_barrier): Likewise.
1995 (barrier_align): Likewise.
1996 (sh_loop_align): Likewise.
1997 * config/spu/spu.c (spu_option_override):
1998 Use align_flags_tuple::get_value instead of removed macros.
1999 (spu_sched_init): Likewise.
2000 * config/spu/spu.h (GTY): Likewise.
2001 * config/visium/visium.c (visium_option_override):
2002 Set "8" as default secondary alignment.
2003 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2004 in order to guarantee secondary alignment of 8.
2005 * coretypes.h: Include align.h header file.
2006 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2007 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2008 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2009 * doc/tm.texi.in: Likewise.
2010 * final.c (struct label_alignment): Remove not used structure.
2011 (LABEL_ALIGN): Change type to align_flags.
2012 (LOOP_ALIGN): Likewise.
2013 (JUMP_ALIGN): Likewise.
2014 (default_loop_align_max_skip): Remove.
2015 (default_label_align_max_skip): Likewise.
2016 (default_jump_align_max_skip): Likewise.
2017 (default_label_align_after_barrier_max_skip):
2018 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2019 (LABEL_TO_MAX_SKIP): Remove.
2020 (label_to_alignment): Return align_flags type instead of integer.
2021 (label_to_max_skip): Remove.
2022 (align_fuzz): Use align_flags type.
2023 (compute_alignments): Use align_flags type and use align_flags::max
2024 to combine multiple alignments.
2025 (grow_label_align): Grow vec instead of C array.
2026 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2027 (shorten_branches): Use align_flags type and use align_flags::max
2028 to combine multiple alignments.
2029 (final_scan_insn_1): Remove usage of secondary alignment that comes
2030 from label alignment, but instead use proper secondary alignment
2031 which is computed in grow_label_align.
2032 * flags.h (struct align_flags_tuple): Move to align.h.
2033 (struct align_flags): Likewise.
2034 (state_align_loops): Rename to align_loops.
2035 (state_align_jumps): Rename to align_jumps.
2036 (state_align_labels): Rename to align_labels.
2037 (state_align_functions): Rename to align_functions.
2038 (align_loops_log): Remove.
2039 (align_jumps_log): Remove.
2040 (align_labels_log): Remove.
2041 (align_functions_log): Remove.
2042 (align_loops_max_skip): Remove.
2043 (align_jumps_max_skip): Remove.
2044 (align_labels_max_skip): Remove.
2045 (align_functions_max_skip): Remove.
2046 (align_loops_value): Remove.
2047 (align_jumps_value): Remove.
2048 (align_labels_value): Remove.
2049 (align_functions_value): Remove.
2050 * output.h (label_to_alignment): Change return type to align_flags.
2051 (label_to_max_skip): Remove.
2052 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2053 jump_align_max_skip macros.
2054 * targhooks.h (default_loop_align_max_skip): Remove.
2055 (default_label_align_max_skip): Likewise.
2056 (default_jump_align_max_skip): Likewise.
2057 (default_label_align_after_barrier_max_skip): Remove.
2058 * toplev.c (read_log_maxskip): Use ::normalize function.
2059 (parse_N_M): Remove not used argument and also call ::normalize.
2060 (parse_alignment_opts): Do not pass unused arguments.
2061 * varasm.c (assemble_start_function): Use directly align_functions
2062 instead of removed macros.
2063 * system.h: Do not poison removed macros.
2064
2065 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2066
2067 PR middle-end/86539
2068 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2069 and cond temporaries don't have reference type if iterator has
2070 pointer type. For init use &for_pre_body instead of pre_p if
2071 for_pre_body is non-empty.
2072
2073 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2074
2075 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2076 double-double modes to SFmode directly directly.
2077 (trunc<mode>sf2_fprs): Delete.
2078
2079 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2080
2081 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2082 for conversions between IFmode and the decimal floating point modes.
2083 (init_float128_ieee): Use the correct names for conversions between
2084 KFmode and the decimal floating point modes.
2085
2086 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2087
2088 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2089 for the conversions between TDmode and IFmode.
2090 (init_float128_ieee): Use more correct names for the conversions
2091 between TDmode and KFmode.
2092
2093 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2094
2095 PR tree-optimization/86526
2096 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2097 (inline_expand_builtin_string_cmp): Likewise.
2098 (inline_string_cmp): Likewise. Use c_readstr instead of
2099 builtin_memcpy_read_str. Add unit_mode temporary.
2100
2101 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2102
2103 PR middle-end/86528
2104 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2105 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2106
2107 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2108
2109 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2110 Alphabetize prototypes of built-in functions, separating out
2111 built-in functions that are listed in this section but should be
2112 described elsewhere.
2113
2114 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2115
2116 PR target/86511
2117 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2118 conditional move when trapping comparison was split to a
2119 non-trapping one (and vice versa).
2120
2121 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2122
2123 * config/s390/s390.c (s390_function_profiler): Generate nops
2124 instead of profiler call sequences.
2125 * config/s390/s390.opt: Add the new option.
2126
2127 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2128
2129 * config/s390/s390.c (s390_function_profiler): Generate
2130 __mcount_loc section.
2131 * config/s390/s390.opt: Add the new option.
2132
2133 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2134
2135 * common.opt: Add the new warning.
2136 * config/s390/s390.c (s390_function_profiler): Emit "brasl
2137 %r0,__fentry__" when -mfentry is specified.
2138 (s390_option_override_internal): Disallow -mfentry for 31-bit
2139 CPUs.
2140 * config/s390/s390.opt: Add the new option.
2141
2142 2018-07-16 Richard Biener <rguenther@suse.de>
2143
2144 PR lto/86523
2145 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2146 for function-local FUNCTION_DECL and RESULT_DECL immediately.
2147
2148 2018-07-16 Martin Liska <mliska@suse.cz>
2149
2150 PR ipa/86529
2151 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2152 to ::get_create.
2153
2154 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2155
2156 * config/arc/arcHS.md: Update ARCHS scheduling rules.
2157
2158 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2159
2160 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2161 for ARCHS4x.
2162 * config/arc/arc-cpus.def (hs4x): New cpu.
2163 (hs4xd): Likewise.
2164 * config/arc/arc-tables.opt: Regenerate.
2165 * config/arc/arc.c (arc_sched_issue_rate): New function.
2166 (TARGET_SCHED_ISSUE_RATE): Define.
2167 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2168 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2169 fpu_cvt.
2170 (attr tune): Add ARCHS4x tune values.
2171 (attr tune_dspmpy): Define.
2172 (*tst): Correct instruction type.
2173 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2174 * config/arc/arcHS4x.md: New file.
2175 * config/arc/fpu.md: Update instruction type attributes.
2176 * config/arc/t-multilib: Regenerate.
2177
2178 2018-07-16 Tom de Vries <tdevries@suse.de>
2179
2180 PR debug/86455
2181 * var-tracking.c (vt_initialize): Fix pre_dec handling.
2182
2183 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2184
2185 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2186 early clobber.
2187
2188 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
2189
2190 PR tree-optimization/86514
2191 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2192 conversion to a boolean type from a type with greater precision.
2193
2194 2018-07-16 Tom de Vries <tdevries@suse.de>
2195
2196 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2197 dump_flags request TDF_SLIM.
2198
2199 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2200
2201 * fold-const.c (int_const_binop_1): Abstract...
2202 (wide_int_binop): ...wide int code here.
2203 (poly_int_binop): ...poly int code here.
2204 Abstract the rest of int_const_binop_1 into int_const_binop.
2205 * fold-const.h (wide_int_binop): New.
2206 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2207 Remove useless PLUS/MINUS_EXPR case.
2208 (zero_nonzero_bits_from_vr): Move wide int code...
2209 (zero_nonzero_bits_from_bounds): ...here.
2210 (extract_range_from_binary_expr_1): Move mask optimization code...
2211 (range_easy_mask_min_max): ...here.
2212 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2213 (range_easy_mask_min_max): New.
2214
2215 2018-07-15 Jeff Law <law@redhat.com>
2216
2217 PR target/85993
2218 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2219 block.
2220
2221 2018-07-14 Jim Wilson <jimw@sifive.com>
2222
2223 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2224
2225 2018-07-14 Paul Koning <ni1d@arrl.net>
2226
2227 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2228
2229 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2230
2231 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2232 copying section.
2233
2234 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2235 Steve Munroe <munroesj52@gmail.com>
2236
2237 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2238 (_mm_andnot_si128): Likewise.
2239 (_mm_or_si128): Likewise.
2240 (_mm_xor_si128): Likewise.
2241
2242 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2243
2244 PR middle-end/78809
2245 * builtins.c (expand_builtin_memcmp): Inline the calls first
2246 when result_eq is false.
2247 (expand_builtin_strcmp): Inline the calls first.
2248 (expand_builtin_strncmp): Likewise.
2249 (inline_string_cmp): New routine. Expand a string compare
2250 call by using a sequence of char comparison.
2251 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2252 a call to str(n)cmp/memcmp.
2253 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2254 New option.
2255 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2256
2257 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2258
2259 * config/arm/driver-arm.c: Include arm-native.h.
2260 (host_detect_local_cpu): Use auto-generated data tables.
2261 (vendors, arm_cpu_table): Delete. Move part information to ...
2262 * config/arm/arm-cpus.in: ... here.
2263 * config/arm/parsecpu.awk (gen_native): New function.
2264 (vendor, part): New CPU fields.
2265 (END): Add support for building the native CPU detection tables.
2266 * config/arm/t-arm (arm-native.h): Add build rule.
2267 (driver-arm.o): Add dependency on arm-native.h.
2268
2269 2018-07-13 Richard Biener <rguenther@suse.de>
2270
2271 PR middle-end/85974
2272 * match.pd (addr1 - addr2): Allow either of the operand to
2273 have a conversion.
2274
2275 2018-07-13 Tom de Vries <tdevries@suse.de>
2276
2277 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2278 in remap_ssa_name.
2279
2280 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2281
2282 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2283 arrays instead of numbered variables.
2284
2285 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2286
2287 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2288 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2289
2290 2018-07-13 Richard Biener <rguenther@suse.de>
2291
2292 PR debug/86452
2293 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2294 instead of get_context_die.
2295
2296 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2297 Richard Biener <rguenther@suse.de>
2298
2299 PR middle-end/86489
2300 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2301 that the loop latch destination where phi is defined.
2302
2303 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2304
2305 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2306 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2307 (riscv_set_current_function): Extract getting interrupt type to new
2308 function.
2309 (riscv_get_interrupt_type): New function.
2310 (riscv_merge_decl_attributes): New function, checking interrupt type is
2311 same.
2312 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2313
2314 2018-07-12 Paul Koning <ni1d@arrl.net>
2315
2316 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2317 directive.
2318
2319 2018-07-12 Paul Koning <ni1d@arrl.net>
2320
2321 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2322 zero reference, add doloop_end instead.
2323 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2324 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2325 detail for doloop_end.
2326
2327 2018-07-12 Martin Sebor <msebor@redhat.com>
2328
2329 PR c/86453
2330 * attribs.c (decl_attributes): Reject conflicting attributes before
2331 calling attribute handlers.
2332
2333 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2334
2335 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2336 parameter.
2337 (gcc::dump_manager::get_dump_file_name): likewise.
2338 (dump_begin): Likewise.
2339 * dumpfile.h (dump_begin): Update prototype.
2340 (gcc::dump_manager::get_dump_file_name,
2341 gcc::dump_manager::get_dump_file_name): Update prototype.
2342
2343 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2344
2345 * internal-fn.h (vectorizable_internal_fn_p): New function.
2346 * tree-vect-slp.c (compatible_calls_p): Likewise.
2347 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2348 to internal functions.
2349 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2350
2351 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2352
2353 * fold-const.h (inverse_conditions_p): Declare.
2354 * fold-const.c (inverse_conditions_p): New function.
2355 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2356 that test the inverse condition of a conditional internal function.
2357 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2358 * internal-fn.c (internal_fn_mask_index): Handle conditional
2359 internal functions.
2360 (vectorized_internal_fn_supported_p): New function.
2361 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2362 (any_pred_load_store): Replace with...
2363 (need_to_predicate): ...this new variable.
2364 (redundant_ssa_names): New variable.
2365 (ifcvt_can_use_mask_load_store): Move initial checks to...
2366 (ifcvt_can_predicate): ...this new function. Handle tree codes
2367 for which a conditional internal function exists.
2368 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2369 instead of ifcvt_can_use_mask_load_store. Update after variable
2370 name change.
2371 (predicate_load_or_store): New function, split out from
2372 predicate_mem_writes.
2373 (check_redundant_cond_expr): New function.
2374 (value_available_p): Likewise.
2375 (predicate_rhs_code): Likewise.
2376 (predicate_mem_writes): Rename to...
2377 (predicate_statements): ...this. Use predicate_load_or_store
2378 and predicate_rhs_code.
2379 (combine_blocks, tree_if_conversion): Update after above name changes.
2380 (ifcvt_local_dce): Handle redundant_ssa_names.
2381 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2382 general conditional functions.
2383 * tree-vect-stmts.c (vectorizable_call): Likewise.
2384
2385 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2386 Alan Hayward <alan.hayward@arm.com>
2387 David Sherwood <david.sherwood@arm.com>
2388
2389 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2390 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2391 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2392 plus and minus and convert them into IFN_COND_FMA-based sequences.
2393 (convert_mult_to_fma): Handle conditional plus and minus.
2394
2395 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2396
2397 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2398 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2399 (cond_fnms_optab): New optabs.
2400 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2401 internal functions.
2402 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2403 * internal-fn.h (get_conditional_internal_fn): Declare.
2404 (get_unconditional_internal_fn): Likewise.
2405 * internal-fn.c (cond_ternary_direct): New macro.
2406 (expand_cond_ternary_optab_fn): Likewise.
2407 (direct_cond_ternary_optab_supported_p): Likewise.
2408 (FOR_EACH_COND_FN_PAIR): Likewise.
2409 (get_conditional_internal_fn): New function.
2410 (get_unconditional_internal_fn): Likewise.
2411 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2412 (gimple_match_op::gimple_match_op): Add a new overload for 5
2413 operands.
2414 (gimple_match_op::set_op): Likewise.
2415 (gimple_resimplify5): Declare.
2416 * genmatch.c (decision_tree::gen): Generate simplifications for
2417 5 operands.
2418 * gimple-match-head.c (gimple_simplify): Define an overload for
2419 5 operands. Handle calls with 5 arguments in the top-level overload.
2420 (convert_conditional_op): Handle conversions from unconditional
2421 internal functions to conditional ones.
2422 (gimple_resimplify5): New function.
2423 (build_call_internal): Pass a fifth operand.
2424 (maybe_push_res_to_seq): Likewise.
2425 (try_conditional_simplification): Try converting conditional
2426 internal functions to unconditional internal functions.
2427 Handle 3-operand unconditional forms.
2428 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2429 Define ternary equivalents of the current rules for binary conditional
2430 internal functions.
2431 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2432 ternary operations.
2433 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2434 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2435 (optab): Handle them.
2436 (SVE_COND_FP_TERNARY): New int iterator.
2437 (sve_fmla_op, sve_fmad_op): New int attributes.
2438 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2439 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2440 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2441
2442 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2443
2444 * target.def (preferred_else_value): New target hook.
2445 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2446 * doc/tm.texi: Regenerate.
2447 * targhooks.h (default_preferred_else_value): Declare.
2448 * targhooks.c (default_preferred_else_value): New function.
2449 * internal-fn.h (conditional_internal_fn_code): Declare.
2450 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2451 (get_conditional_internal_fn): Use it.
2452 (conditional_internal_fn_code): New function.
2453 * gimple-match.h (gimple_match_cond): New struct.
2454 (gimple_match_op): Add a cond member function.
2455 (gimple_match_op::gimple_match_op): Update all forms to take a
2456 gimple_match_cond.
2457 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2458 for the suboperation, but don't specify a particular else_value.
2459 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2460 (visit_nary_op, visit_reference_op_load): Pass
2461 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2462 * gimple-match-head.c: Include tree-eh.h
2463 (convert_conditional_op): New function.
2464 (maybe_resimplify_conditional_op): Likewise.
2465 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2466 (gimple_resimplify2): Likewise.
2467 (gimple_resimplify3): Likewise.
2468 (gimple_resimplify4): Likewise.
2469 (maybe_push_res_to_seq): Return null for conditional operations.
2470 (try_conditional_simplification): New function.
2471 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2472 constructor.
2473 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2474 IFN_COND_* call.
2475 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2476 function.
2477 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2478
2479 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2480
2481 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2482 DECL_FCONTEXT
2483 (hash_tree): Do not hash DECL_FCONTEXT
2484 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2485 Do not stream DECL_FCONTEXT.
2486 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2487 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2488
2489 2018-07-12 Richard Biener <rguenther@suse.de>
2490
2491 PR debug/86462
2492 * dwarf2out.c (gen_block_die): Only output blocks when they have
2493 at least one !DECL_IGNORED_P variable.
2494
2495 2018-07-12 Richard Biener <rguenther@suse.de>
2496
2497 PR target/84829
2498 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2499 Remove -mieee-fp handling.
2500
2501 2018-07-12 Richard Biener <rguenther@suse.de>
2502
2503 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2504 left-over from last patch.
2505
2506 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2507
2508 PR tree-optimization/86492
2509 * gimple-ssa-store-merging.c
2510 (imm_store_chain_info::coalesce_immediate_stores): Call
2511 check_no_overlap even for the merge_overlapping case. Formatting fix.
2512
2513 2018-07-12 Richard Biener <rguenther@suse.de>
2514
2515 PR middle-end/86479
2516 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2517 move possibly trapping operations into the conditional.
2518
2519 2018-07-12 Richard Biener <rguenther@suse.de>
2520
2521 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2522 (vn_lookup_simplify_result): Remove recursion limit applied
2523 here.
2524 (vn_nary_build_or_lookup_1): Adjust.
2525 (try_to_simplify): Likewise.
2526 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2527 here.
2528 (gimple_resimplify2): Likewise.
2529 (gimple_resimplify3): Likewise.
2530 (gimple_resimplify4): Likewise.
2531
2532 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2533
2534 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2535 Use __mmask64 type instead of __mmask8 for __M argument.
2536 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2537 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2538 __U argument.
2539 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2540 __mmask16 for __M argument.
2541 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2542 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2543 to __mmask16 instead of __mmask8.
2544 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2545 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2546 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2547 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2548 instead of __mmask16 for __U argument.
2549 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2550 __mmask16 instead of __mmask8 for __U argument.
2551 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2552 __U argument.
2553 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2554 __mmask16.
2555 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2556 argument.
2557 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2558 __U argument.
2559 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2560 __mmask16.
2561 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2562 of __mmask16.
2563 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2564 __U argument.
2565 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2566 __U argument.
2567 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2568 __U argument.
2569 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2570 __U argument.
2571 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2572 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2573 return type as well as __M argument type and all casts from __mmask8
2574 to __mmask32.
2575 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2576 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2577 return type as well as __M argument type and all casts from __mmask8
2578 to __mmask16.
2579 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2580 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2581 return type as well as __M argument type and all casts from __mmask8
2582 to __mmask32.
2583 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2584 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2585 return type as well as __M argument type and all casts from __mmask8
2586 to __mmask16.
2587 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2588 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2589 __mmask16.
2590
2591 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2592
2593 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2594 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2595 for __U argument.
2596
2597 2018-07-11 Paul Koning <ni1d@arrl.net>
2598
2599 * doc/md.texi (define_subst): Document how multiple occurrences of
2600 the same argument in the replacement pattern are handled.
2601
2602 2018-07-11 Paul Koning <ni1d@arrl.net>
2603
2604 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2605 alphabetical order.
2606 (Common Type Attributes): Add "mode" attribute.
2607
2608 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2609
2610 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2611 stream DECL_ORIGINAL_TYPE.
2612 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2613 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2614 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2615 Do not walk original type.
2616 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2617 external decls.
2618 (write_ts_decl_non_common_tree_pointers): Do not stream
2619 DECL_ORIGINAL_TYPE
2620 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2621 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2622
2623 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2624
2625 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2626 thread twice from the same starting edge.
2627
2628 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2629
2630 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2631 * gimple.c (gimple_call_nonnull_result_p): ...here...
2632 (gimple_call_nonnull_arg): ...and here.
2633 * gimple.h (gimple_call_nonnull_result_p): New.
2634 (gimple_call_nonnull_arg): New.
2635
2636 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
2637
2638 * config/arm/arm-cpus.in: Move information from fpu field of each
2639 cpu definition to the isa field.
2640 * config/arm/parsecpu.awk (fpu): Delete match rule.
2641 (gen_comm_data): Don't add bits from the CPU's FPU entry.
2642
2643 2018-07-11 Richard Biener <rguenther@suse.de>
2644
2645 PR debug/86457
2646 * dwarf2out.c (init_sections_and_labels): Use
2647 output_asm_line_debug_info consistently.
2648 (dwarf2out_early_finish): Likewise.
2649 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2650 type units.
2651
2652 2018-07-11 Richard Biener <rguenther@suse.de>
2653
2654 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2655 Rework father_bb setting in a way to avoid propagating constants
2656 multiple times on a loop body.
2657
2658 2018-07-10 Mark Wielaard <mark@klomp.org>
2659
2660 PR debug/86459
2661 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2662
2663 2018-07-10 Richard Biener <rguenther@suse.de>
2664
2665 * hash-map.h (hash_map::iterator::operator*): Return
2666 references to key and value.
2667
2668 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2669
2670 PR c++/86443
2671 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2672 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2673 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2674 (gimplify_omp_for): For composite loops, move outer
2675 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2676 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2677 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2678 TREE_LIST for both the original class iterator and the "last" helper
2679 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2680 loop, remember has_decl_expr from outer composite loops for the
2681 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2682
2683 2018-07-09 Martin Sebor <msebor@redhat.com>
2684
2685 PR middle-end/77357
2686 PR middle-end/86428
2687 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2688 accessing implicitly initialized array elements.
2689 * expr.c (string_constant): Handle string initializers of
2690 character arrays within aggregates.
2691 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2692 Store element offset. As a special case, handle zero size.
2693 (fold_nonarray_ctor_reference): Same.
2694 (fold_ctor_reference): Add argument. Store subobject offset.
2695 * gimple-fold.h (fold_ctor_reference): Add argument.
2696
2697 2018-07-09 Paul Koning <ni1d@arrl.net>
2698
2699 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2700 (pdp11_insn_cost): New function.
2701 (pdp11_md_asm_adjust): New function.
2702 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2703 (pdp11_rtx_costs): Update to match machine better.
2704 (output_addr_const_pdp11): Correct format mismatch warnings.
2705 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2706 * config/pdp11/pdp11.md: General change to add base_cost and/or
2707 length attributes for use by new pdp11_insn_cost function.
2708 (MIN_BRANCH): Correct definition.
2709 (MIN_SOB): Ditto.
2710 (doloop_end): Use standard pattern name for looping pattern.
2711 (doloop_end_nocc): New.
2712 (movsf): Add another constraint alternative.
2713 (zero_extendqihi2): Add constraint alternatives for not in place
2714 extend.
2715 (zero_extendhisi2): Remove.
2716 (shift patterns): Add CC handling variants.
2717 (bswaphi2): New.
2718 (bswapsi2): New.
2719 (rothi3): New.
2720 (define_peephole2): New peephole to recognize mov that sets CC for
2721 subsequent test.
2722
2723 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2724
2725 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2726 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2727 wi::add.
2728
2729 2018-07-09 Jakub Jelinek <jakub@redhat.com>
2730
2731 PR c/86420
2732 * real.c (real_nextafter): Return true if result is denormal.
2733
2734 2018-07-09 Martin Liska <mliska@suse.cz>
2735
2736 * common.opt: Add back wrongly removed attribute.
2737
2738 2018-07-09 Richard Biener <rguenther@suse.de>
2739
2740 PR debug/86413
2741 * dwarf2out.c (gen_block_die): For an early generated DIE
2742 always output high/low PC attributes.
2743
2744 2018-07-09 Tom de Vries <tdevries@suse.de>
2745
2746 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2747 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2748 onto VAR_DECL with abstract origin.
2749
2750 2018-07-07 Jim Wilson <jimw@sifive.com>
2751
2752 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2753
2754 2018-07-07 Tom de Vries <tdevries@suse.de>
2755
2756 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2757
2758 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
2759
2760 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2761 overflow_type.
2762 (combine_bound): Use wide-int overflow calculation instead of
2763 rolling our own.
2764 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2765 overflow_type.
2766 * fold-const.c (int_const_binop_2): Same.
2767 (extract_muldiv_1): Same.
2768 (fold_div_compare): Same.
2769 (fold_abs_const): Same.
2770 * match.pd: Same.
2771 * poly-int.h (add): Same.
2772 (sub): Same.
2773 (neg): Same.
2774 (mul): Same.
2775 * predict.c (predict_iv_comparison): Same.
2776 * profile-count.c (slow_safe_scale_64bit): Same.
2777 * simplify-rtx.c (simplify_const_binary_operation): Same.
2778 * tree-chrec.c (tree_fold_binomial): Same.
2779 * tree-data-ref.c (split_constant_offset_1): Same.
2780 * tree-if-conv.c (idx_within_array_bound): Same.
2781 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2782 * tree-ssa-phiopt.c (minmax_replacement): Same.
2783 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2784 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2785 * vr-values.c (vr_values::adjust_range_with_scev): Same.
2786 * wide-int.cc (wi::add_large): Same.
2787 (wi::mul_internal): Same.
2788 (wi::sub_large): Same.
2789 (wi::divmod_internal): Same.
2790 * wide-int.h: Change overflow type to overflow_type for neg, add,
2791 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2792 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2793 mul_internal, divmod_internal.
2794 (overflow_type): New enum.
2795 (accumulate_overflow): New.
2796
2797 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2798
2799 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2800 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2801
2802 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2803
2804 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2805 argument is checked for zero before entering loop, avoid checking again.
2806
2807 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2808
2809 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2810 * gimplify.h (generic_expr_could_trap_p): Likwise.
2811 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2812
2813 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2814
2815 PR tree-optimization/86401
2816 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2817 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2818 (fold_bit_and_mask): ... here. New helper function for match.pd.
2819 * fold-const.h (fold_bit_and_mask): Declare.
2820 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2821
2822 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2823
2824 PR target/86324
2825 * target.def (translate_mode_attribute): New hook.
2826 * targhooks.h (default_translate_mode_attribute): Declare.
2827 * targhooks.c (default_translate_mode_attribute): New function.
2828 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2829 * doc/tm.texi: Regenerate.
2830 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2831 (rs6000_translate_mode_attribute): New function.
2832
2833 2018-07-06 Paul Koning <ni1d@arrl.net>
2834
2835 * doc/md.texi (define_split): Document DONE and FAIL.
2836 (define_peephole2): Ditto.
2837
2838 2018-07-05 Jeff Law <law@redhat.com>
2839
2840 PR tree-optimization/86010
2841 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2842 both the head and tail of mem* and str* calls.
2843
2844 2018-07-05 Jim Wilson <jimw@sifive.com>
2845
2846 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2847
2848 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2849
2850 * config/aarch64/aarch64-simd.md: correct flags text for
2851 MIN_EXPR replacement.
2852
2853 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2854
2855 * configure: Regenerated.
2856
2857 2018-07-05 Carl Love <cel@us.ibm.com>
2858
2859 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2860 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2861 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2862 VSX_BUILTIN_DOUBLEL_V4SF.
2863
2864 2018-07-05 Martin Sebor <msebor@redhat.com>
2865
2866 PR c++/86400
2867 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2868 than its domain to compute its the upper bound of a char array.
2869
2870 2018-07-05 Nathan Sidwell <nathan@acm.org>
2871
2872 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2873 * doc/cpp.texi: Update comment.
2874 * doc/tm.texi: Rebuilt.
2875 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2876 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2877 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2878 headers affected by extern "C".
2879 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2880 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2881 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2882 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2883 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2884 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2885 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2886 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2887 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2888 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2889 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2890 config/sparc/sp64-elf.h, config/spu/spu.h,
2891 config/stormy16/stormy16.h, config/v850/v850.h,
2892 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2893 define NO_IMPLICIT_EXTERN_C.
2894 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2895
2896 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2897
2898 PR target/84711
2899 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2900 instead of GET_MODE_SIZE when comparing Units.
2901
2902 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2903
2904 PR target/84711
2905 * rtlanal.c (set_noop_p): Constrain on mode change,
2906 include hard-reg-set.h
2907
2908 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2909
2910 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2911
2912 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2913
2914 Revert
2915 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2916
2917 PR sanitizer/84250
2918 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2919 libasan.
2920 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2921
2922 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2923
2924 PR sanitizer/84250
2925 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2926 libasan.
2927 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2928
2929 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2930
2931 PR middle-end/86380
2932 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2933
2934 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2935
2936 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2937 neg_*_op* variables.
2938
2939 2018-07-04 Martin Liska <mliska@suse.cz>
2940
2941 * tree-switch-conversion.c: Define
2942 max_ratio_for_speed and max_ratio_for_size constants.
2943
2944 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2945 Martin Liska <mliska@suse.cz>
2946
2947 PR middle-end/66240
2948 PR target/45996
2949 PR c/84100
2950 * common.opt: Rename align options with 'str_' prefix.
2951 * common/config/i386/i386-common.c (set_malign_value): New
2952 function.
2953 (ix86_handle_option): Use it to set -falign-* options/
2954 * config/aarch64/aarch64-protos.h (struct tune_params): Change
2955 type from int to string.
2956 * config/aarch64/aarch64.c: Update default values from int
2957 to string.
2958 * config/alpha/alpha.c (alpha_override_options_after_change):
2959 Likewise.
2960 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2961 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2962 max skip conditionally.
2963 * config/i386/freebsd.h (SUBALIGN_LOG): New.
2964 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2965 max skip conditionally.
2966 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2967 max skip conditionally.
2968 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2969 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2970 max skip conditionally.
2971 * config/i386/i386.c (struct ptt): Change type from int to
2972 string.
2973 (ix86_default_align): Set default values.
2974 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2975 max skip conditionally.
2976 * config/i386/iamcu.h (SUBALIGN_LOG): New.
2977 (ASM_OUTPUT_MAX_SKIP_ALIGN):
2978 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2979 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2980 max skip conditionally.
2981 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2982 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2983 * config/i386/x86-64.h (SUBALIGN_LOG): New.
2984 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2985 max skip conditionally.
2986 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2987 * config/ia64/ia64.c (ia64_option_override): Set default values
2988 for alignment options.
2989 * config/m68k/m68k.c: Handle new str_align_* options.
2990 * config/mips/mips.c (mips_set_compression_mode): Change
2991 type of constants.
2992 (mips_option_override): Set default values for options.
2993 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2994 Likewise.
2995 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2996 Likewise.
2997 * config/rx/rx.c (rx_option_override): Likewise.
2998 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2999 (LABEL_ALIGN): Use align_labels_log.
3000 (LOOP_ALIGN): Use align_loops_align.
3001 * config/s390/s390.c (s390_asm_output_function_label): Use new
3002 macros.
3003 * config/sh/sh.c (sh_override_options_after_change):
3004 Change type of constants.
3005 * config/spu/spu.c (spu_sched_init): Likewise.
3006 * config/sparc/sparc.c (sparc_option_override): Set default
3007 values for options.
3008 * config/visium/visium.c (visium_option_override): Likewise.
3009 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3010 emit p2align format with last argument if it's not needed.
3011 * doc/invoke.texi: Document extended format of -falign-*.
3012 * final.c: Use align_labels alignment.
3013 * flags.h (struct target_flag_state): Change type to use
3014 align_flags.
3015 (struct align_flags_tuple): New.
3016 (struct align_flags): Likewise.
3017 (align_loops_log): Redefine macro to use new types.
3018 (align_loops_max_skip): Redefine macro to use new types.
3019 (align_jumps_log): Redefine macro to use new types.
3020 (align_jumps_max_skip): Redefine macro to use new types.
3021 (align_labels_log): Redefine macro to use new types.
3022 (align_labels_max_skip): Redefine macro to use new types.
3023 (align_functions_log): Redefine macro to use new types.
3024 (align_loops): Redefine macro to use new types.
3025 (align_jumps): Redefine macro to use new types.
3026 (align_labels): Redefine macro to use new types.
3027 (align_functions): Redefine macro to use new types.
3028 (align_functions_max_skip): Redefine macro to use new types.
3029 (align_loops_value): New macro.
3030 (align_jumps_value): New macro.
3031 (align_labels_value): New macro.
3032 (align_functions_value): New macro.
3033 * function.c (invoke_set_current_function_hook): Propagate
3034 alignment values from flags to global variables default in
3035 topleev.h.
3036 * ipa-icf.c (sem_function::equals_wpa): Use
3037 cl_optimization_option_eq instead of memcmp.
3038 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3039 of string types.
3040 (cl_optimization_stream_in): Likewise.
3041 * optc-save-gen.awk: Support strings in cl_optimization.
3042 * opth-gen.awk: Likewise.
3043 * opts.c (finish_options): Remove error checking of invalid
3044 value ranges.
3045 (MAX_CODE_ALIGN): Remove.
3046 (MAX_CODE_ALIGN_VALUE): Likewise.
3047 (parse_and_check_align_values): New function.
3048 (check_alignment_argument): Likewise.
3049 (common_handle_option): Use check_alignment_argument.
3050 * opts.h (parse_and_check_align_values): Declare.
3051 * toplev.c (init_alignments): Remove.
3052 (read_log_maxskip): New.
3053 (parse_N_M): Likewise.
3054 (parse_alignment_opts): Likewise.
3055 (backend_init_target): Remove usage of init_alignments.
3056 * toplev.h (parse_alignment_opts): Declare.
3057 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3058 argument.
3059 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3060 * tree.c (cl_option_hasher::equal): New.
3061 * varasm.c: Use new global macros.
3062
3063 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3064
3065 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3066 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3067 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3068 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3069 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3070 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3071 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3072 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3073 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3074 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3075 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3076 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3077 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3078
3079 2018-07-04 Martin Liska <mliska@suse.cz>
3080 Jonathan Wakely <jwakely@redhat.com>
3081
3082 * coverage.c: Use correct type.
3083 * doc/invoke.texi: Language correction.
3084
3085 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3086
3087 PR target/85620
3088 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3089 ENDBRANCH for non-tail call which may return via indirect branch.
3090 * doc/extend.texi: Document indirect_return attribute.
3091
3092 2018-07-03 Martin Sebor <msebor@redhat.com>
3093
3094 PR tree-optimization/86274
3095 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3096 precondition.
3097 (format_floating): Correct handling of infinities and NaNs.
3098
3099 2018-07-03 Martin Sebor <msebor@redhat.com>
3100
3101 * print-tree.c (print_real_cst): New function.
3102 (print_node_brief): Call it.
3103 (print_node): Ditto.
3104
3105 2018-07-03 Jeff Law <law@redhat.com>
3106
3107 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3108 into a single pattern.
3109
3110 * config/h8300/h8300.md (ors code_iterator): New.
3111 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3112 a single pattern and single splitter.
3113 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3114 (iorqi3_1, xorqi3_1): Likewise.
3115 (iorqi3, xorqi3 expanders): Similarly.
3116
3117 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3118 (movmd_internal) into a single pattern using the P mode iterator.
3119 (movmd splitters): Similarly.
3120 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3121 (movsd splitters): Similarly.
3122
3123 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3124 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3125 right table based on the size of the operand.
3126 * config/h8300/h8300.md (length_table): Corresponding changes. All
3127 references to "addb", "addw" and "addl" changed to "add".
3128 (btst patterns): Merge two variants into a single pattern.
3129 (tstqi, tsthi): Likewise.
3130 (addhi3_incdec, addsi3_incdec): Likewise.
3131 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3132 (mulhi3, mulsi3): Likewise.
3133 (udivhi3, udivsi3): Likewise.
3134 (divhi3, divsi3): Likewise.
3135 (andorqi3, andorhi3, andorsi3): Likewise.
3136
3137 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
3138
3139 PR target/85694
3140 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3141 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3142
3143 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3144
3145 PR tree-optimization/85694
3146 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3147 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3148 UNSPEC_URHADD.
3149 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3150 (<u>avg<mode>3_ceil): New patterns.
3151
3152 2018-07-03 David Malcolm <dmalcolm@redhat.com>
3153
3154 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3155 scan-tree-dump directive.
3156 * gcc.dg/vect/slp-perm-2.c: Likewise.
3157 * gcc.dg/vect/slp-perm-3.c: Likewise.
3158 * gcc.dg/vect/slp-perm-5.c: Likewise.
3159 * gcc.dg/vect/slp-perm-6.c: Likewise.
3160 * gcc.dg/vect/slp-perm-7.c: Likewise.
3161 * gcc.dg/vect/slp-perm-8.c: Likewise.
3162
3163 2018-07-03 Marek Polacek <polacek@redhat.com>
3164
3165 PR middle-end/86202
3166 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3167
3168 2018-07-03 Richard Biener <rguenther@suse.de>
3169
3170 PR ipa/86389
3171 * tree-ssa-structalias.c (find_func_clobbers): Properly
3172 handle indirect calls.
3173
3174 2018-07-03 Jeff Law <law@redhat.com>
3175
3176 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3177 (shifts): New code iterator.
3178 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3179 expander. Fix HImode handling on H8/SX.
3180 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3181 (subqi3, subhi3, subsi3 expanders): Likewise.
3182 (andqi3, andhi3, andsi3 expanders): Likewise.
3183 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3184 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3185 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3186 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3187 (zero_extendqihi2, zero_extendqisi2): Likewise.
3188 (extendqihi2, extendqisi2): Likewise.
3189 (rotlqi3, rotlhi3, rotlsi3): Likewise.
3190 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3191 (rotlqi3_1, rotlhi3_1): Likewise.
3192 (logicalhi3_sn, logicalsi3_sn): Likewise.
3193 (logicalhi3, logicalsi3): Likewise.
3194
3195 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3196
3197 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3198 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3199 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3200 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3201 type to append_pattern_def_seq instead of creating a stmt_vec_info
3202 directly.
3203 (build_mask_conversion): Likewise. Remove vinfo argument.
3204 (vect_add_conversion_to_patterm): Likewise, renaming to...
3205 (vect_add_conversion_to_pattern): ...this.
3206 (vect_recog_mask_conversion_pattern): Update call to
3207 build_mask_conversion. Pass the vector type to
3208 append_pattern_def_seq here too.
3209 (vect_recog_gather_scatter_pattern): Update call to
3210 vect_add_conversion_to_pattern.
3211
3212 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3213
3214 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3215 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3216 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3217 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3218 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3219 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3220 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3221 append_pattern_def_seq instead of new_pattern_def_seq.
3222 (vect_recog_divmod_pattern): Do both of the above.
3223 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3224 is null.
3225
3226 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3227
3228 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3229 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3230 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3231 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3232 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3233 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3234 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3235 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3236 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3237 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3238 parameter with a single stmt_vec_info.
3239 (vect_recog_func_ptr): Likewise.
3240 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3241 (vect_try_gather_scatter_pattern): ...this.
3242 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3243 the stmt_vec_info of the statement to be matched. Don't clear
3244 STMT_VINFO_RELATED_STMT.
3245 (vect_pattern_recog): Update call accordingly.
3246
3247 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3248
3249 PR tree-optimization/85694
3250 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3251 (uavgM3_ceil): Document new optabs.
3252 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3253 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3254 functions.
3255 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3256 (savg_ceil_optab): New optabs.
3257 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3258 (vect_vect_recog_func_ptrs): Add it.
3259 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3260 constant directly from the associated lhs.
3261
3262 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3263
3264 * tree-vect-patterns.c (vect_split_statement): New function.
3265 (vect_convert_input): Use it to try to split an existing cast.
3266
3267 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3268
3269 * poly-int.h (print_hex): New function.
3270 * dumpfile.h (dump_dec, dump_hex): Declare.
3271 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3272 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3273 min_input_precision, operation_precision and operation_sign.
3274 * tree-vect-patterns.c (vect_get_range_info): New function.
3275 (vect_same_loop_or_bb_p, vect_single_imm_use)
3276 (vect_operation_fits_smaller_type): Delete.
3277 (vect_look_through_possible_promotion): Add an optional
3278 single_use_p parameter.
3279 (vect_recog_over_widening_pattern): Rewrite to use new
3280 stmt_vec_info infomration. Handle one operation at a time.
3281 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3282 (vect_truncatable_operation_p, vect_set_operation_type)
3283 (vect_set_min_input_precision): New functions.
3284 (vect_determine_min_output_precision_1): Likewise.
3285 (vect_determine_min_output_precision): Likewise.
3286 (vect_determine_precisions_from_range): Likewise.
3287 (vect_determine_precisions_from_users): Likewise.
3288 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3289 (vect_vect_recog_func_ptrs): Put over_widening first.
3290 Add cast_forwprop.
3291 (vect_pattern_recog): Call vect_determine_precisions.
3292
3293 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3294
3295 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3296 statements that have been replaced by further pattern statements.
3297 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3298
3299 2018-07-03 Richard Biener <rguenther@suse.de>
3300
3301 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3302 always set *dt. Dump vectype in vectype overload.
3303 * dumpfile.h (dump_gimple_expr): New function.
3304 (dump_gimple_expr_loc): Likewise.
3305 * dumpfile.c (dump_gimple_expr): New function.
3306 (dump_gimple_expr_loc): Likewise.
3307
3308 2018-07-02 Jeff Law <law@redhat.com>
3309
3310 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3311 the H8/300, H8/300H and H8/S variants into a single pattern.
3312 (movhi_h8300, movqi_h8300hs): Similarly.
3313 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3314 (QHI mode iterator): New.
3315
3316 * config/h8300/h8300.md: Remove trailing whitespace.
3317
3318 2018-07-02 Jim Wilson <jimw@sifive.com>
3319
3320 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3321 instead of emit_insn for interrupt returns.
3322 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3323 (riscv_sret, riscv_uret): Likewise.
3324
3325 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3326
3327 * pretty-print.c (selftest::test_pp_format): Move save and restore
3328 of quotes to class auto_fix_quotes, and add an instance.
3329 * selftest.c: Include "intl.h".
3330 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3331 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3332 * selftest.h (selftest::auto_fix_quotes): New class.
3333
3334 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3335
3336 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3337 (aarch64_sve_prepare_conditional_op): Remove.
3338 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3339 Allow aarch64_simd_reg_or_zero as select operand; remove
3340 the aarch64_sve_prepare_conditional_op call.
3341 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3342 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3343 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3344 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3345 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3346 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3347 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3348 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3349 and a splitters to match all of the *_any patterns.
3350 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3351
3352 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3353 (SVE_COND_FP_BINARY_REV): Remove.
3354 (sve_int_op_rev, sve_fp_op_rev): New.
3355 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3356 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3357 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3358 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3359 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3360 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3361 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3362 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3363 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3364
3365 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3366 Remove match_dup 1 from the inner unspec.
3367 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3368
3369 * config/aarch64/aarch64.md (movprfx): New attr.
3370 (length): Default movprfx to 8.
3371 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3372 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3373 (*<su>mul<SVE_I>3_highpart): Likewise.
3374 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3375 (*v<ASHIFT><SVE_I>3): Likewise.
3376 (*<su><MAXMIN><SVE_I>3): Likewise.
3377 (*<su><MAXMIN><SVE_F>3): Likewise.
3378 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3379 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3380 (*div<SVE_F>4): Likewise.
3381
3382 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3383
3384 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3385 in dump string.
3386
3387 2018-07-02 Richard Biener <rguenther@suse.de>
3388
3389 PR tree-optimization/86363
3390 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3391 memset argument refers to a non-variable address.
3392
3393 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3394
3395 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3396 {PLUS,MINUS}_EXPR code to...
3397 (adjust_symbolic_bound): ...here,
3398 (combine_bound): ...here,
3399 (set_value_range_with_overflow): ...and here.
3400
3401 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3402
3403 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3404 code...
3405 (extract_range_from_abs_expr): ...here.
3406
3407 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3408
3409 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3410 -fno-omit-frame-pointer when not optimizing.
3411
3412 2018-07-02 Martin Liska <mliska@suse.cz>
3413
3414 PR ipa/86279
3415 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3416 (propagate_nothrow): Likewise.
3417
3418 2018-07-02 Martin Liska <mliska@suse.cz>
3419
3420 PR ipa/86323
3421 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3422
3423 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3424
3425 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3426 function in r262149, changing "loc" param from source_location to
3427 const dump_location_t &.
3428 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3429 declaration, as above.
3430
3431 2018-07-01 Paul Koning <ni1d@arrl.net>
3432
3433 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3434 -munit-asm, -mgnu-asm, -mdec-asm.
3435 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3436 (pdp11_output_labelref): New.
3437 (pdp11_output_def): New.
3438 (pdp11_output_addr_vec_elt): New.
3439 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3440 %# and %@ format codes.
3441 (pdp11_option_override): New.
3442 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3443 (pdp11_output_ident): New.
3444 (pdp11_asm_named_section): New.
3445 (pdp11_asm_init_sections): New.
3446 (pdp11_file_start): New.
3447 (pdp11_file_end): New.
3448 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3449 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3450 %o, like %c but octal.
3451 (pdp11_option_override): New.
3452 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3453 -mdec-asm.
3454 (DATA_SECTION_ASM_OP): Ditto.
3455 (READONLY_DATA_SECTION_ASM_OP): New.
3456 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3457 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3458 (ASM_OUTPUT_LABELREF): Ditto.
3459 (ASM_OUTPUT_DEF): Ditto.
3460 (ASM_OUTPUT_EXTERNAL): New.
3461 (ASM_OUTPUT_SOURCE_FILENAME): New.
3462 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3463 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3464 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3465 %# and %@ format codes.
3466 * config/pdp11/pdp11.opt (mgnu-asm): New.
3467 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3468 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3469 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3470
3471 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3472
3473 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3474 dereferencing path[] beyond its length.
3475 (debug_path): New.
3476 (debug_all_paths): New.
3477 (rewire_first_differing_edge): New.
3478 (adjust_paths_after_duplication): New.
3479 (duplicate_thread_path): Call adjust_paths_after_duplication.
3480 Add new argument.
3481 (thread_through_all_blocks): Add new argument to
3482 duplicate_thread_path.
3483
3484 2018-06-30 Jim Wilson <jimw@sifive.com>
3485
3486 * config/riscv/predicates.md (p2m1_shift_operand): New.
3487 (high_mask_shift_operand): New.
3488 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3489 pattern using p2m1_shift_operand.
3490 (lshsi3_zero_extend_3+2): New combiner pattern using
3491 high_mask_shift_operand.
3492
3493 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3494
3495 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3496 split out from...
3497 (vect_recog_rotate_pattern): ...here.
3498 (vect_convert_input): Try to insert casts of invariants in the
3499 preheader.
3500 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3501 preheader to be empty.
3502
3503 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3504
3505 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3506 vector type. If given, install it in the new statement's
3507 STMT_VINFO_VECTYPE.
3508 (vect_element_precision): New function.
3509 (vect_unpromoted_value): New struct.
3510 (vect_unpromoted_value::vect_unpromoted_value): New function.
3511 (vect_unpromoted_value::set_op): Likewise.
3512 (vect_look_through_possible_promotion): Likewise.
3513 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3514 (vect_widened_op_tree, vect_convert_input): Likewise.
3515 (vect_convert_inputs, vect_convert_output): Likewise.
3516 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3517 to handle the optional cast of the multiplication result and
3518 vect_widened_op_tree to detect the widened multiplication itself.
3519 Do not require the input and output of promotion casts to have
3520 the same sign, but base the signedness of the operation on the
3521 input rather than the result. If the pattern includes two
3522 promotions, check that those promotions have the same sign.
3523 Do not restrict the MULT_EXPR handling to a double-width result;
3524 handle quadruple-width results and wider. Use vect_convert_inputs
3525 to convert the inputs to the common type.
3526 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3527 to handle the optional cast of the ABS result. Also allow a sign
3528 change or a sign extension between the ABS and MINUS.
3529 Use vect_widened_op_tree to detect the widened subtraction and use
3530 vect_convert_inputs to convert the inputs to the common type.
3531 (vect_handle_widen_op_by_const): Delete.
3532 (vect_recog_widen_op_pattern): New function.
3533 (vect_recog_widen_mult_pattern): Use it.
3534 (vect_recog_widen_shift_pattern): Likewise.
3535 (vect_recog_widen_sum_pattern): Use
3536 vect_look_through_possible_promotion to handle the promoted
3537 PLUS_EXPR operand.
3538
3539 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3540
3541 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3542 the containing gimple_seq *.
3543 * gimple-iterator.h (gsi_for_stmt): Declare it.
3544 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3545 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3546 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3547 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3548 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3549 checks.
3550 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3551 split out from...
3552 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3553 statement being replaced is part of an existing pattern
3554 definition sequence, inserting the new pattern statements before
3555 the original one.
3556 (vect_pattern_recog_1): Don't return a bool. If the statement
3557 is already part of a pattern, instead apply pattern matching
3558 to the pattern definition statements. Don't clear the
3559 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3560 (vect_pattern_recog): Don't break after the first match;
3561 continue processing the pattern definition statements instead.
3562 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3563
3564 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3565
3566 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3567 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3568 (vect_recog_widen_sum_pattern): Use it.
3569
3570 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3571
3572 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3573 phi is not a pattern statement and has not been replaced by
3574 a pattern statement.
3575 * tree-vect-patterns.c (type_conversion_p): Don't check
3576 STMT_VINFO_IN_PATTERN_P.
3577 (vect_recog_vector_vector_shift_pattern): Likewise.
3578 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3579 the pattern statement rather than the original statement; check
3580 directly for a WIDEN_MULT_EXPR here.
3581 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3582 vect_is_simple_use to return the pattern statement rather
3583 than the original statement; use is_pattern_stmt_p to check
3584 for such a pattern statement.
3585 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3586 to return the pattern statement rather than the original statement;
3587 don't do the same transformation here.
3588 (vect_is_simple_use): If the defining statement has been replaced
3589 by a pattern statement, return the pattern statement instead.
3590 Remove the corresponding (local) transformation from the vectype
3591 overload.
3592
3593 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3594
3595 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3596 end and default to null.
3597 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3598 (vectorizable_reduction): Update calls accordingly, dropping the
3599 gimple ** argument if the passed-back statement isn't needed.
3600 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3601 (vect_recog_rotate_pattern): Likewise.
3602 (vect_recog_mask_conversion_pattern): Likewise.
3603 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3604 (vect_mask_constant_operand_p): Likewise.
3605 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3606 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3607 (get_group_load_store_type, get_load_store_type): Likewise.
3608 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3609 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3610 (vectorizable_conversion, vectorizable_assignment): Likewise.
3611 (vectorizable_shift, vectorizable_operation): Likewise.
3612 (vectorizable_store, vect_is_simple_cond): Likewise.
3613 (vectorizable_condition, vectorizable_comparison): Likewise.
3614 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3615 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3616 and move it to the end. Cope with null def_stmt_outs.
3617
3618 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3619
3620 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3621
3622 2018-06-29 Jeff Law <law@redhat.com>
3623
3624 * config/v850/v850.c (v850_legitimate_address_p): Handle large
3625 displacements for TARGET_V850E2V3 and newer.
3626 (TARGET_LRA_P): Remove. Defaults to LRA now.
3627 * config/v850/v850.md (sign23byte_load): Remove.
3628 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3629 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3630
3631 2018-06-29 Martin Liska <mliska@suse.cz>
3632
3633 PR lto/85759
3634 * coverage.c (coverage_init): Mangle full path name.
3635 * doc/invoke.texi: Document the change.
3636 * gcov-io.c (mangle_path): New.
3637 * gcov-io.h (mangle_path): Likewise.
3638 * gcov.c (mangle_name): Use mangle_path for path mangling.
3639
3640 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3641
3642 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3643 if starting source register is not even.
3644
3645 2018-06-29 Martin Liska <mliska@suse.cz>
3646
3647 PR tree-optimization/86263
3648 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3649 Make edge redirection.
3650
3651 2018-06-29 David Malcolm <dmalcolm@redhat.com>
3652
3653 * dumpfile.c (dump_loc): Add indentation based on scope depth.
3654 (dump_scope_depth): New variable.
3655 (get_dump_scope_depth): New function.
3656 (dump_begin_scope): New function.
3657 (dump_end_scope): New function.
3658 * dumpfile.h (get_dump_scope_depth): New declaration.
3659 (dump_begin_scope): New declaration.
3660 (dump_end_scope): New declaration.
3661 (class auto_dump_scope): New class.
3662 (AUTO_DUMP_SCOPE): New macro.
3663 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3664 AUTO_DUMP_SCOPE.
3665
3666 2018-06-29 Richard Biener <rguenther@suse.de>
3667
3668 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3669 compute_all_dependences succeeds.
3670 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3671 exceed --param loop-max-datarefs-for-datadeps.
3672
3673 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3674
3675 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3676
3677 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3678
3679 PR target/86348
3680 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3681 alternative 0 in preferred_for_speed attribute.
3682
3683 2018-06-28 Paul Koning <ni1d@arrl.net>
3684
3685 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3686 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3687 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3688 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3689 for shift insn patterns.
3690
3691 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3692
3693 * cgraph.c (cgraph_node::get_body): Replace assignments to
3694 "dump_file" with calls to set_dump_file.
3695 * dumpfile.c (alt_dump_file): Make static, and group with...
3696 (alt_flags): ...this definition.
3697 (dumps_are_enabled): New variable.
3698 (refresh_dumps_are_enabled): New function.
3699 (set_dump_file): New function.
3700 (set_alt_dump_file): New function.
3701 (gcc::dump_manager::dump_start): Replace assignments to
3702 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3703 set_alt_dump_file.
3704 (gcc::dump_manager::dump_finish): Likewise.
3705 * dumpfile.h (alt_dump_file): Delete decl.
3706 (dumps_are_enabled): New variable decl.
3707 (set_dump_file): New function decl.
3708 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3709 global.
3710 * tree-nested.c (lower_nested_functions): Replace assignments to
3711 "dump_file" with calls to set_dump_file.
3712
3713 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3714
3715 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3716 goto_locus of each outgoing edge of each basic block.
3717
3718 2018-06-28 Richard Biener <rguenther@suse.de>
3719
3720 * dwarf2out.c (decl_scope_table): Remove.
3721 (push_decl_scope): Likewise.
3722 (pop_decl_scope): Likewise.
3723 (gen_type_die_for_member): Do not call push/pop_decl_scope.
3724 (gen_struct_or_union_type_die): Likewise.
3725 (gen_tagged_type_die): Likewise.
3726 (dwarf2out_init): Do not initialize decl_scope_table.
3727 (dwarf2out_c_finalize): Do not free it.
3728
3729 2018-06-28 Richard Biener <rguenther@suse.de>
3730
3731 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3732 deciding whether to not re-use a DIE.
3733
3734 2018-06-28 Richard Biener <rguenther@suse.de>
3735
3736 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3737 DW_AT_abstract_origin attribute.
3738
3739 2018-06-28 Martin Liska <mliska@suse.cz>
3740
3741 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3742 Use newly introduced constants.
3743 * tree-switch-conversion.h (struct jump_table_cluster):
3744 Define max_ratio_for_size and max_ratio_for_speed.
3745
3746 2018-06-28 Martin Liska <mliska@suse.cz>
3747
3748 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3749 Add new checking assert to catch invalid state.
3750 (jump_table_cluster::can_be_handled): Handle single case
3751 clusters.
3752 (jump_table_cluster::is_beneficial): Bail out for such case.
3753 (bit_test_cluster::find_bit_tests):
3754 Add new checking assert to catch invalid state.
3755 (bit_test_cluster::can_be_handled): Handle single case
3756 clusters.
3757 (bit_test_cluster::is_beneficial): Bail out for such case.
3758 (switch_decision_tree::analyze_switch_statement):
3759 Fix comment.
3760
3761 2018-06-28 Martin Liska <mliska@suse.cz>
3762
3763 * common.opt: Introduce -completion option.
3764 * gcc.c (driver_handle_option): Handle it.
3765 (driver::main): Print completions if completion
3766 is set.
3767 * opt-suggestions.c (option_proposer::get_completions):
3768 New function.
3769 (option_proposer::suggest_completion): Likewise.
3770 (option_proposer::find_param_completions): Likewise.
3771 (verify_autocompletions): Likewise.
3772 (test_completion_valid_options): Likewise.
3773 (test_completion_valid_params): Likewise.
3774 (in_completion_p): Likewise.
3775 (empty_completion_p): Likewise.
3776 (test_completion_partial_match): Likewise.
3777 (test_completion_garbage): Likewise.
3778 (opt_proposer_c_tests): Likewise.
3779 * opt-suggestions.h: Declare new functions.
3780 * opts.c (common_handle_option): Handle OPT__completion_.
3781 * selftest-run-tests.c (selftest::run_tests): Add
3782 opt_proposer_c_tests.
3783 * selftest.c (assert_str_startswith): New.
3784 * selftest.h (assert_str_startswith): Likewise.
3785 (opt_proposer_c_tests): New.
3786 (ASSERT_STR_STARTSWITH): Likewise.
3787
3788 2018-06-28 Martin Liska <mliska@suse.cz>
3789
3790 * Makefile.in: Add opt-suggestions.o.
3791 * gcc-main.c: Include opt-suggestions.h.
3792 * gcc.c (driver::driver): Likewise.
3793 (driver::~driver): Remove m_option_suggestions.
3794 (driver::build_option_suggestions): Moved to option_proposer.
3795 (driver::suggest_option): Likewise.
3796 (driver::handle_unrecognized_options): Use option_proposer.
3797 * gcc.h (class driver): Add new memver m_option_proposer.
3798 * opt-suggestions.c: New file.
3799 * opt-suggestions.h: New file.
3800
3801 2018-06-28 Martin Liska <mliska@suse.cz>
3802
3803 * vec.h (class auto_string_vec): New (moved from auto_argvec).
3804 (auto_string_vec::~auto_string_vec): Likewise.
3805
3806 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3807
3808 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3809 prevent_decl_creation_for_types fields up and add reset_location field.
3810 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3811 statement if id->reset_location is true.
3812 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3813 id->reset_location is true.
3814 (copy_phis_for_bb): Force input_location on the arguments if
3815 id->reset_location is true.
3816 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3817 is set on the function to be inlined.
3818
3819 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3820
3821 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3822
3823 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3824
3825 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3826 registers for Pmode.
3827 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3828 hard registers for the clobbered pseudo.
3829
3830 2018-06-27 Paul Koning <ni1d@arrl.net>
3831
3832 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3833 mutually exclusive options.
3834 * config/pdp11/constraints.md (h): New constraint.
3835 (O): Update definition to match shift code generation.
3836 (D): New constraint.
3837 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3838 (CCFP): Remove.
3839 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3840 function.
3841 (output_jump): Change arguments.
3842 (pdp11_fixed_cc_regs): New function.
3843 (pdp11_cc_mode): Ditto.
3844 (pdp11_expand_shift): Ditto.
3845 (pdp11_assemble_shift): Ditto.
3846 (pdp11_small_shift): Ditto.
3847 (pdp11_branch_cost): Remove.
3848 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3849 from output.
3850 (pdp11_register_move_cost): Update for CC registers.
3851 (pdp11_rtx_costs): Add case for LSHIFTRT.
3852 (pdp11_output_jump): Add CCNZ mode conditional branches.
3853 (notice_update_cc_on_set): Remove.
3854 (pdp11_cc_mode): New function.
3855 (simple_memory_operand): Correct pre/post decrement case.
3856 (no_side_effect_operand): New function.
3857 (pdp11_regno_reg_class): Add CC_REGS class.
3858 (pdp11_fixed_cc_regs): New function.
3859 (pdp11_small_shift): New function.
3860 (pdp11_expand_shift): New function to expand shift insns.
3861 (pdp11_assemble_shift): New function to output shifts.
3862 (pdp11_branch_cost): Remove.
3863 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3864 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3865 (WCHAR_TYPE): Ditto.
3866 (PTRDIFF_TYPE): Ditto.
3867 (ADJUST_INSN_LENGTH): New macro.
3868 (FIXED_REGISTERS): Add CC registers.
3869 (CALL_USED_REGISTERS): Ditto.
3870 (reg_class): Ditto.
3871 (REG_CLASS_NAMES): Ditto.
3872 (REG_CLASS_CONTENTS): Ditto.
3873 (SELECT_CC_MODE): Use new function.
3874 (TARGET_FLAGS_REGNUM): New macro.
3875 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3876 (cc0_reg_rtx): Remove.
3877 (CC_STATUS_MDEP): Remove.
3878 (CC_STATUS_MDEFP_INIT): Remove.
3879 (CC_IN_FPU): Remove.
3880 (NOTICE_UPDATE_CC): Remove.
3881 (REGISTER_NAMES): Add CC registers.
3882 (BRANCH_COST): Change to constant 1.
3883 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3884 handling.
3885 * config/pdp11/pdp11.opt (mbcopy): Remove.
3886 (mbcopy-builtin): Remove.
3887 (mbranch-cheap): Remove.
3888 (mbranch-expensive): Remove.
3889 * config/pdp11/predicates.md (expand_shift_operand): Update to
3890 match shift code generation.
3891 (ccnz_operator): New predicate.
3892 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3893 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3894 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3895 exclusive options.
3896 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3897 description of O constraint.
3898
3899 2018-06-27 Jeff Law <law@redhat.com>
3900 Austin Law <austinklaw@gmail.com>
3901
3902 * config/v850/v850.md (addsi3_set_flags): New pattern.
3903 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3904 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3905 (zero_extendhisi2_v850_set_flags): Likewise.
3906 (zero_extendqisi2_v850_set_flags): Likewise.
3907 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3908 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3909 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3910
3911 * config/v850/v850-protos.h (notice_update_cc): Remove.
3912 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3913 (v850_print_operand): Handle 'D' and "d".
3914 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3915 Add handling of arithmetic/logical operations compared against zero.
3916 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3917 Do not look at v850_compare_op, instead get mode from last argument.
3918 (v850_gen_compare): Remove
3919 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3920 after reload for prologue insns.
3921 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3922 patterns.
3923 (construct_save_jarl): Likewise.
3924 (TARGET_FLAGS_REGNUM): Define.
3925 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3926 (NOTICE_UPDATE_CC): Remove.
3927 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3928 than cc0. Conditionalize on reload_completed.
3929 (cmpsi_insn, setfcc_insn): Likewise.
3930 (tst1 splitter): Turn into define_and_split which sets the flags
3931 after reload.
3932 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3933 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3934 (cstoresf4, cstoredf4): Clobber the flags.
3935 (cmpsi, cmpsf, cmpdf): Remove expanders.
3936 (setf_insn): Remove pattern.
3937 (addsi3): Turn into define_and_split which clobbers the flags after
3938 reload and a suitable pattern (addsi3_clobber_flags) for use after
3939 reload.
3940 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3941 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3942 (ashrsi3, ashrsi3_v850e2): Likewise.
3943 (bins): Clobber the flags.
3944 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3945 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3946 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3947 (call_value_internal_short, call_value_internal_long): Likewise.
3948 (callt_save_interrupt, callt_return_interrupt): Likewise.
3949 (save_interrupt, return_interrupt): Likewise.
3950 (callt_save_all_interrupt, save_all_interrupt): Likewise.
3951 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3952 (restore_all_interrupt, _restore_all_interrupt): Likewise.
3953 (All FP comparisons): Only allow after reload has completed.
3954 (trfsr): Likewise.
3955 (divh, divhu): Tweak output template.
3956 (branch_z_normal, branch_z_invert): Remove
3957 (branch_nz_normal, branch_nz_invert): Likewise.
3958 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3959
3960 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3961 * config/v850/v850.c (notice_update_cc): Remove.
3962 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
3963 (CC_NO_CARRY): Likewise.
3964 (NOTICE_UPDATE_CC): Define to nothing.
3965 * config/v850/v850.md: Remove block comment on cc0 handling
3966 Remove "cc" attribute from all patterns. Remove cc_status handling
3967 from all patterns. Minor formatting fixes.
3968
3969 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3970
3971 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3972 (cortex-a76.cortex-a55): Likewise.
3973 * config/aarch64/aarch64-tune.md: Regenerate.
3974 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3975 cortex-a76.cortex-a55.
3976
3977 2018-06-27 Jeff Law <law@redhat.com>
3978
3979 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3980 (MULTILIB_DIRNAMES): Similarly.
3981
3982 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
3983
3984 * gimple.h (gimple_return_retbnd): Delete.
3985 (gimple_return_set_retbnd): Likewise.
3986 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3987 gimple_return_set_retbnd.
3988 * gimple-pretty-print.c (dump_gimple_return): Remove call to
3989 gimple_return_retbnd and adjust.
3990 * tree-inline.h (struct copy_body_data): Remove retbnd field.
3991 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3992 Explicitly return NULL in a couple more cases. Move assertion
3993 on debug statements and remove unreachable code.
3994 (reset_debug_binding): Do not test id->retbnd.
3995 (expand_call_inline): Do not set it.
3996
3997 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3998
3999 * configure.ac: Add --disable-gcov option.
4000 * configure: Regenerate.
4001 * Makefile.in: Honour @enable_gcov@.
4002 * doc/install.texi: Document --disable-gcov.
4003
4004 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4005
4006 * config/arm/arm-cpus.in (cortex-a76): New entry.
4007 (cortex-a76.cortex-a55): Likewise.
4008 * config/arm/arm-tables.opt: Regenerate.
4009 * config/arm/arm-tune.md: Likewise.
4010 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4011 * doc/invoke.texi (ARM Options): Document cortex-a76 and
4012 cortex-a76.cortex-a55.
4013
4014 2018-06-27 Tamar Christina <tamar.christina@arm.com>
4015
4016 PR target/85769
4017 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4018
4019 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4020
4021 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4022 comment.
4023 (EPILOGUE_USES): Likewise.
4024
4025 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4026
4027 * tree-inline.c (remap_location): New function extracted from...
4028 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4029 (copy_phis_for_bb): ...here. Call remap_location.
4030 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4031
4032 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4033
4034 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4035 unaligned vsx for 16B memset.
4036
4037 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4038
4039 PR target/86285
4040 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4041 ieee128_float_type_node to long_double_type_node unless
4042 TARGET_LONG_DOUBLE_128 is set.
4043
4044 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4045
4046 * cfgloop.c (get_loop_location): Convert return type from
4047 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4048 by implicit construction from rtx_insn *, and using
4049 dump_user_location_t::from_function_decl for the fallback case.
4050 * cfgloop.h (get_loop_location): Convert return type from
4051 location_t to dump_user_location_t.
4052 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4053 dump_printf_loc to pass in a dump_location_t rather than a
4054 location_t, via the gimple stmt.
4055 * coverage.c (get_coverage_counts): Update calls to
4056 dump_printf_loc to pass in dump_location_t rather than a
4057 location_t.
4058 * doc/optinfo.texi (Dump types): Convert example of
4059 dump_printf_loc from taking "locus" to taking "insn". Update
4060 description of the "_loc" calls to cover dump_location_t.
4061 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4062 "selftest.h".
4063 (dump_user_location_t::dump_user_location_t): New constructors,
4064 from gimple *stmt and rtx_insn *.
4065 (dump_user_location_t::from_function_decl): New function.
4066 (dump_loc): Make static.
4067 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4068 const dump_location_t &.
4069 (dump_generic_expr_loc): Delete.
4070 (dump_printf_loc): Convert param "loc" from location_t to
4071 const dump_location_t &.
4072 (selftest::test_impl_location): New function.
4073 (selftest::dumpfile_c_tests): New function.
4074 * dumpfile.h: Include "profile-count.h".
4075 (class dump_user_location_t): New class.
4076 (struct dump_impl_location_t): New struct.
4077 (class dump_location_t): New class.
4078 (dump_printf_loc): Convert 2nd param from source_location to
4079 const dump_location_t &.
4080 (dump_generic_expr_loc): Delete.
4081 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4082 const dump_location_t &.
4083 * gimple-fold.c (fold_gimple_assign): Update call to
4084 dump_printf_loc to pass in a dump_location_t rather than a
4085 location_t, via the gimple stmt.
4086 (gimple_fold_call): Likewise.
4087 * gimple-loop-interchange.cc
4088 (loop_cand::analyze_iloop_reduction_var): Update for change to
4089 check_reduction_path.
4090 (tree_loop_interchange::interchange): Update for change to
4091 find_loop_location.
4092 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4093 change in return-type of find_loop_location.
4094 (graphite_regenerate_ast_isl): Likewise.
4095 * graphite-optimize-isl.c (optimize_isl): Likewise.
4096 * graphite.c (graphite_transform_loops): Likewise.
4097 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4098 pass in a dump_location_t rather than a location_t, via the
4099 gimple stmt.
4100 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4101 * ipa.c (walk_polymorphic_call_targets): Likewise.
4102 * loop-unroll.c (report_unroll): Convert "locus" param from
4103 location_t to dump_location_t.
4104 (decide_unrolling): Update for change to get_loop_location's
4105 return type.
4106 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4107 location_t to dump_user_location_t.
4108 (grid_find_single_omp_among_assignments_1): Updates calls to
4109 dump_printf_loc to pass in a dump_location_t rather than a
4110 location_t, via the gimple stmt.
4111 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4112 location_t to dump_location_t. Updates calls to dump_printf_loc
4113 to pass in a dump_location_t rather than a location_t, via the
4114 gimple stmt.
4115 (grid_inner_loop_gridifiable_p): Likewise.
4116 (grid_dist_follows_simple_pattern): Likewise.
4117 (grid_gfor_follows_tiling_pattern): Likewise.
4118 (grid_target_follows_gridifiable_pattern): Likewise.
4119 (grid_attempt_target_gridification): Convert initialization
4120 of local "grid" from memset to zero-initialization; FIXME: does
4121 this require C++11? Update call to dump_printf_loc to pass in a
4122 optinfo_location rather than a location_t, via the gimple stmt.
4123 * profile.c (read_profile_edge_counts): Updates call to
4124 dump_printf_loc to pass in a dump_location_t rather than a
4125 location_t
4126 (compute_branch_probabilities): Likewise.
4127 * selftest-run-tests.c (selftest::run_tests): Call
4128 dumpfile_c_tests.
4129 * selftest.h (dumpfile_c_tests): New decl.
4130 * tree-loop-distribution.c (pass_loop_distribution::execute):
4131 Update for change in return type of find_loop_location.
4132 * tree-parloops.c (parallelize_loops): Likewise.
4133 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4134 "locus" from location_t to dump_user_location_t.
4135 (canonicalize_loop_induction_variables): Likewise.
4136 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4137 for change in return type of find_loop_location.
4138 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4139 to dump_printf_loc to pass in a dump_location_t rather than a
4140 location_t, via the stmt.
4141 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4142 Likewise.
4143 * tree-vect-loop-manip.c (find_loop_location): Convert return
4144 type from source_location to dump_user_location_t.
4145 (vect_do_peeling): Update for above change.
4146 (vect_loop_versioning): Update for change in type of
4147 vect_location.
4148 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4149 from location_t to dump_user_location_t.
4150 (vect_estimate_min_profitable_iters): Update for change in type
4151 of vect_location.
4152 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4153 location_t to dump_location_t.
4154 (vect_slp_bb): Update for change in type of vect_location.
4155 * tree-vectorizer.c (vect_location): Convert from source_location
4156 to dump_user_location_t.
4157 (try_vectorize_loop_1): Update for change in vect_location's type.
4158 (vectorize_loops): Likewise.
4159 (increase_alignment): Likewise.
4160 * tree-vectorizer.h (vect_location): Convert from source_location
4161 to dump_user_location_t.
4162 (find_loop_location): Convert return type from source_location to
4163 dump_user_location_t.
4164 (check_reduction_path): Convert 1st param from location_t to
4165 dump_user_location_t.
4166 * value-prof.c (check_counter): Update call to dump_printf_loc to
4167 pass in a dump_user_location_t rather than a location_t; update
4168 call to error_at for change in type of "locus".
4169 (check_ic_target): Update call to dump_printf_loc to
4170 pass in a dump_user_location_t rather than a location_t, via the
4171 call_stmt.
4172
4173 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
4174
4175 * config/s390/s390.h (enum processor_flags): Do not use
4176 default tune parameter when -march was specified.
4177
4178 2018-06-26 Jakub Jelinek <jakub@redhat.com>
4179
4180 PR target/86314
4181 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4182 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4183 operands.
4184
4185 2018-06-26 Richard Biener <rguenther@suse.de>
4186
4187 PR tree-optimization/86287
4188 PR bootstrap/86316
4189 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4190 (vect_analyze_loop): Initialize n_stmts.
4191
4192 2018-06-26 Richard Biener <rguenther@suse.de>
4193
4194 PR middle-end/86271
4195 * fold-const.c (fold_convertible_p): Pointer extension
4196 isn't valid.
4197
4198 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4199
4200 PR debug/86064
4201 * dwarf2out.c (loc_list_has_views): Adjust comments.
4202 (dw_loc_list): Split single cross-partition range with
4203 nonzero locview.
4204
4205 2018-06-25 Jeff Law <law@redhat.com>
4206
4207 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4208 on -mbig-switch by default.
4209
4210 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4211 test.
4212 (const_float_0_operand): Remove unused predicate.
4213 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4214 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4215 (recipsf2): New expander. Original pattern now called
4216 (recipsf2_insn).
4217 (recipdf2, recipdf2_insn): Similarly.
4218 (rsqrtsf2, rsqrtsf2_insn): Similarly
4219 (rsqrtdf2, rsqrtdf2_insn): Similarly
4220
4221 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4222
4223 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4224 Simplify logic for FreeBSD (twice).
4225
4226 2018-06-25 Martin Sebor <msebor@redhat.com>
4227
4228 PR tree-optimization/86204
4229 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4230 a strnlen result if it's less than the length of the string.
4231
4232 2018-06-25 Martin Sebor <msebor@redhat.com>
4233
4234 PR tree-optimization/85700
4235 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4236 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4237 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4238
4239 2018-06-25 Martin Sebor <msebor@redhat.com>
4240
4241 * doc/extend.texi (Zero-length arrays): Update and clarify.
4242
4243 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4244
4245 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4246 added IEEE/IBM long double multilib support on PowerPC little
4247 endian Linux systems.
4248 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4249 (MULTILIB_DEFAULTS): Likewise.
4250 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4251 Likewise.
4252 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4253 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4254 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4255
4256 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4257
4258 PR middle-end/86311
4259 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4260 (REORDER_45): Likewise.
4261
4262 2018-06-25 Jeff Law <law@redhat.com>
4263
4264 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4265 dividend to 32 bits. Adjust length.
4266 (udivmodhi4): Cleanup output template. Fix length.
4267
4268 2018-06-25 Carl Love <cel@us.ibm.com>
4269
4270 * config/rs6000/vsx.md: Change word selector to prefered location.
4271
4272 2018-06-25 Richard Biener <rguenther@suse.de>
4273
4274 PR tree-optimization/86304
4275 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4276 epilogue-if-converted loops as well.
4277
4278 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4279
4280 * lto-section-out.c (lto_begin_section): Do not print section
4281 name for noaddr and unnumbered dumps.
4282
4283 2018-06-25 Richard Biener <rguenther@suse.de>
4284
4285 * tree-vectorizer.h (struct vec_info_shared): New structure
4286 with parts split out from struct vec_info and loop_nest from
4287 struct _loop_vec_info.
4288 (struct vec_info): Adjust accordingly.
4289 (struct _loop_vec_info): Likewise.
4290 (LOOP_VINFO_LOOP_NEST): Adjust.
4291 (LOOP_VINFO_DATAREFS): Likewise.
4292 (LOOP_VINFO_DDRS): Likewise.
4293 (struct _bb_vec_info): Likewise.
4294 (BB_VINFO_DATAREFS): Likewise.
4295 (BB_VINFO_DDRS): Likewise.
4296 (struct _stmt_vec_info): Add dr_aux member.
4297 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4298 (DR_MISALIGNMENT_UNINITIALIZED): New.
4299 (set_dr_misalignment): Adjust.
4300 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4301 (vect_analyze_loop): Adjust prototype.
4302 (vect_analyze_loop_form): Likewise.
4303 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4304 Compute dependences lazily.
4305 (vect_record_base_alignments): Use shared datarefs/ddrs.
4306 (vect_verify_datarefs_alignment): Likewise.
4307 (vect_analyze_data_refs_alignment): Likewise.
4308 (vect_analyze_data_ref_accesses): Likewise.
4309 (vect_analyze_data_refs): Likewise.
4310 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4311 constructor parameter for shared part.
4312 (vect_analyze_loop_form): Pass in shared part and adjust.
4313 (vect_analyze_loop_2): Pass in storage for the number of
4314 stmts. Move loop nest finding to the caller. Compute
4315 datarefs lazily.
4316 (vect_analyze_loop): Pass in shared part.
4317 (vect_transform_loop): Verify shared datarefs are unchanged.
4318 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4319 constructor parameter for shared part.
4320 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4321 (vect_slp_bb): Verify shared datarefs are unchanged before
4322 transform.
4323 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4324 change.
4325 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4326 DR_MISALIGNMENT_UNINITIALIZED.
4327 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4328 parameter for shared part.
4329 (vec_info::~vec_info): Adjust.
4330 (vec_info_shared::vec_info_shared): New.
4331 (vec_info_shared::~vec_info_shared): Likewise.
4332 (vec_info_shared::save_datarefs): Likewise.
4333 (vec_info_shared::check_datarefs): Likewise.
4334 (try_vectorize_loop_1): Construct shared part live for analyses
4335 of a single loop for multiple vector sizes.
4336 * tree-parloops.c (gather_scalar_reductions): Adjust.
4337
4338 2018-06-25 Richard Biener <rguenther@suse.de>
4339
4340 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4341 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4342 (vect_analyze_data_refs): Remove similar code from here and
4343 simplify accordingly.
4344
4345 2018-06-25 Richard Biener <rguenther@suse.de>
4346
4347 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4348 for reverse storage order accesses rather than asserting
4349 they cannot happen here.
4350
4351 2018-06-25 Tom de Vries <tdevries@suse.de>
4352
4353 PR debug/86257
4354 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4355 Use data16 instead of .byte for insn prefix.
4356
4357 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4358
4359 PR C++/86082
4360 * parser.c (make_char_string_pack): Pass this literal chars
4361 through cpp_interpret_string.
4362 (cp_parser_userdef_numeric_literal): Check the result of
4363 make_char_string_pack.
4364
4365 2018-06-24 Maya Rashish <coypu@sdf.org>
4366
4367 * ginclude/stddef.h: Simplify conditions around avoiding
4368 re-definition of __size_t.
4369
4370 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4371
4372 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4373 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4374
4375 2018-06-22 Maya Rashish <coypu@sdf.org>
4376
4377 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4378 made to OpenBSD and NetBSD through the years.
4379
4380 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4381
4382 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4383 behavior of vec_pack (vector double, vector double) to match
4384 behavior of vec_float2 (vector double, vector double).
4385
4386 2018-06-22 Olivier Hainque <hainque@adacore.com>
4387
4388 * gimplify.c (gimplify_function_tree): Prevent creation
4389 of a trampoline for the address of the current function
4390 passed to entry/exit instrumentation hooks.
4391
4392 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4393
4394 PR target/86222
4395 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4396 correctly.
4397
4398 2018-06-22 Martin Liska <mliska@suse.cz>
4399
4400 PR tree-optimization/86263
4401 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4402 Bail out if is_enabled is false.
4403 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4404 New declaration.
4405 (jump_table_cluster::is_enabled): New function.
4406
4407 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4408
4409 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4410 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4411 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4412 (lto_input_ts_binfo_tree_pointers): Likewise.
4413 * tree-streamer-out.c (streamer_write_tree_bitfields,
4414 write_ts_binfo_tree_pointers): Likewise.
4415 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4416
4417 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4418
4419 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4420
4421 2018-06-22 Martin Liska <mliska@suse.cz>
4422
4423 * symbol-summary.h (get): Make it pure and inline move
4424 functionality from ::get function.
4425 (get): Remove and inline into ::get and ::get_create.
4426 (get_create): Move code from ::get function.
4427
4428 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4429
4430 PR target/85994
4431 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4432 -x assembler-with-cpp.
4433
4434 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4435
4436 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4437 _FILE_OFFSET_BITS=64 for C++.
4438
4439 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4440
4441 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4442 conversion insn that shows up when pr85657-3.c is compiled using
4443 IEEE 128-bit long double.
4444 (neg<mode>2_internal): Use the correct mode to check whether the
4445 mode is IBM extended.
4446 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4447 multiply and divide external functions from being created more
4448 than once.
4449
4450 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4451
4452 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4453 functions.
4454 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4455 the edge can be forwarded.
4456 (cfg_layout_merge_blocks): Likewise.
4457
4458 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4459
4460 * except.c (finish_eh_generation): Commit edge insertions only after
4461 the EH edges have been redirected from post-landing to landing pads.
4462
4463 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4464
4465 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4466 create_tmp_var_for to create the FRAME decl.
4467 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4468
4469 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4470
4471 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4472 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4473 debug statement when resetting its value.
4474 (expand_call_inline): Copy the locus of the call onto the assignment
4475 of the return value, if any. Use local variable in more cases.
4476
4477 2018-06-21 Martin Liska <mliska@suse.cz>
4478
4479 * ipa-pure-const.c (propagate_nothrow): Use
4480 funct_state_summaries->get.
4481 (dump_malloc_lattice): Likewise.
4482 (propagate_malloc): Likewise.
4483
4484 2018-06-21 Richard Biener <rguenther@suse.de>
4485
4486 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4487 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4488 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4489 comment.
4490 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4491 BLOCK_ABSTRACT_ORIGIN unconditionally.
4492
4493 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4494
4495 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4496 deleting it.
4497 * ipa-reference.c (ipa_reference_c_finalize): Delete
4498 ipa_ref_opt_sum_summaries and set it to NULL.
4499
4500 2018-06-21 Tom de Vries <tdevries@suse.de>
4501
4502 PR tree-optimization/85859
4503 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4504 test with comment from bb_no_side_effects_p.
4505
4506 2018-06-21 Richard Biener <rguenther@suse.de>
4507
4508 PR tree-optimization/86232
4509 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4510 max for constant niter.
4511
4512 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4513
4514 * config/aarch64/aarch64-simd.md
4515 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4516
4517 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4518
4519 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4520 Make opernads of the unspec commutative.
4521
4522 2018-06-21 Richard Biener <rguenther@suse.de>
4523
4524 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4525 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4526 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4527 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4528 NULL DR_STEP.
4529 (vect_record_base_alignments): Do not record base alignment
4530 for gathers or scatters.
4531 (vect_compute_data_ref_alignment): Drop return value that is always
4532 true. Bail out early for gathers or scatters.
4533 (vect_enhance_data_refs_alignment): Bail out early for gathers
4534 or scatters.
4535 (vect_find_same_alignment_drs): Likewise.
4536 (vect_analyze_data_refs_alignment): Remove dead code.
4537 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4538 (vect_analyze_data_refs): For possible gathers or scatters do
4539 not create an alternate DR, just check their possible validity
4540 and mark them. Adjust DECL_NONALIASED handling to not rely
4541 on DR_BASE_ADDRESS.
4542 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4543 update inits of gathers or scatters.
4544 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4545 Also copy gather/scatter flag to pattern vinfo.
4546
4547 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4548
4549 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4550 behavior of vec_packsu (vector unsigned long long, vector unsigned
4551 long long) to match behavior of vec_packs with same signature.
4552
4553 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4554 Thomas Schwinge <thomas@codesourcery.com>
4555 Cesar Philippidis <cesar@codesourcery.com>
4556
4557 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4558 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4559 (gimplify_adjust_omp_clauses): Likewise.
4560 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4561 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4562 (gimplify_omp_target_update): Update handling of acc update and
4563 enter/exit data.
4564 * omp-low.c (install_var_field): Remove unused parameter
4565 base_pointers_restrict.
4566 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4567 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4568 FINALIZE}
4569 (omp_target_base_pointers_restrict_p): Delete.
4570 (scan_omp_target): Update call to scan_sharing_clauses.
4571 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4572 FINALIZE}.
4573 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4574 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4575 (convert_local_omp_clauses): Likewise.
4576 * tree-pretty-print.c (dump_omp_clause): Likewise.
4577 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4578 FINALIZE}.
4579 (omp_clause_code_name): Likewise.
4580
4581 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4582
4583 PR debug/86194
4584 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4585 be narrowed.
4586
4587 PR tree-optimization/86231
4588 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4589 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4590
4591 2018-06-20 Tom de Vries <tdevries@suse.de>
4592
4593 PR tree-optimization/86097
4594 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4595 iv type if signedness of iv type is not the same as that of *nit.
4596
4597 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4598
4599 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4600 EDGE_EH edges, verify they are all EDGE_EH.
4601
4602 2018-06-20 Maya Rashish <coypu@sdf.org>
4603
4604 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4605
4606 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4607
4608 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4609 * config/aarch64/aarch64.c (xgene1_tunings): Add
4610 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4611 (aarch64_mode_valid_for_sched_fusion_p):
4612 Allow 16-byte modes.
4613 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4614 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4615 128-bit modes.
4616 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4617 New pattern.
4618 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4619 * config/aarch64/iterators.md (VQ2): New mode iterator.
4620
4621 2018-06-20 Martin Liska <mliska@suse.cz>
4622
4623 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4624 Change default ratio from 10 to 8.
4625
4626 2018-06-20 Martin Liska <mliska@suse.cz>
4627
4628 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4629 New.
4630 (bit_test_cluster::find_bit_tests): Likewise.
4631 (switch_decision_tree::analyze_switch_statement): Find clusters.
4632 * tree-switch-conversion.h (struct jump_table_cluster): Document
4633 hierarchy.
4634
4635 2018-06-20 Martin Liska <mliska@suse.cz>
4636
4637 * tree-switch-conversion.c (switch_conversion::collect):
4638 Record m_uniq property.
4639 (switch_conversion::expand): Bail out for special conditions.
4640 (group_cluster::~group_cluster): New.
4641 (group_cluster::group_cluster): Likewise.
4642 (group_cluster::dump): Likewise.
4643 (jump_table_cluster::emit): New.
4644 (switch_decision_tree::fix_phi_operands_for_edges): New.
4645 (struct case_node): Remove struct.
4646 (jump_table_cluster::can_be_handled): New.
4647 (case_values_threshold): Moved to header.
4648 (reset_out_edges_aux): Likewise.
4649 (jump_table_cluster::is_beneficial): New.
4650 (bit_test_cluster::can_be_handled): Likewise.
4651 (add_case_node): Remove.
4652 (bit_test_cluster::is_beneficial): New.
4653 (case_bit_test::cmp): New.
4654 (bit_test_cluster::emit): New.
4655 (expand_switch_as_decision_tree_p): Remove.
4656 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4657 (fix_phi_operands_for_edge): Likewise.
4658 (switch_decision_tree::analyze_switch_statement): New.
4659 (compute_cases_per_edge): Move ...
4660 (switch_decision_tree::compute_cases_per_edge): ... here.
4661 (try_switch_expansion): Likewise.
4662 (switch_decision_tree::try_switch_expansion): Likewise.
4663 (record_phi_operand_mapping): Likewise.
4664 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4665 (emit_case_decision_tree): Likewise.
4666 (switch_decision_tree::emit): Likewise.
4667 (balance_case_nodes): Likewise.
4668 (switch_decision_tree::balance_case_nodes): Likewise.
4669 (dump_case_nodes): Likewise.
4670 (switch_decision_tree::dump_case_nodes): Likewise.
4671 (emit_jump): Likewise.
4672 (switch_decision_tree::emit_jump): Likewise.
4673 (emit_cmp_and_jump_insns): Likewise.
4674 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4675 (emit_case_nodes): Likewise.
4676 (switch_decision_tree::emit_case_nodes): Likewise.
4677 (conditional_probability): Remove.
4678 * tree-switch-conversion.h (enum cluster_type): New.
4679 (PRINT_CASE): New.
4680 (struct cluster): Likewise.
4681 (cluster::cluster): Likewise.
4682 (struct simple_cluster): Likewise.
4683 (simple_cluster::simple_cluster): Likewise.
4684 (struct group_cluster): Likewise.
4685 (struct jump_table_cluster): Likewise.
4686 (struct bit_test_cluster): Likewise.
4687 (struct min_cluster_item): Likewise.
4688 (struct case_tree_node): Likewise.
4689 (case_tree_node::case_tree_node): Likewise.
4690 (jump_table_cluster::case_values_threshold): Likewise.
4691 (struct case_bit_test): Likewise.
4692 (struct switch_decision_tree): Likewise.
4693 (struct switch_conversion): Likewise.
4694 (switch_decision_tree::reset_out_edges_aux): Likewise.
4695
4696 2018-06-20 Martin Liska <mliska@suse.cz>
4697
4698 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4699 (hoist_edge_and_branch_if_true): Likewise.
4700 (expand_switch_using_bit_tests_p): Likewise.
4701 (struct case_bit_test): Likewise.
4702 (case_bit_test_cmp): Likewise.
4703 (emit_case_bit_tests): Likewise.
4704 (switch_conversion::switch_conversion): New class.
4705 (struct switch_conv_info): Remove old struct.
4706 (collect_switch_conv_info): More to ...
4707 (switch_conversion::collect): ... this.
4708 (check_range): Likewise.
4709 (switch_conversion::check_range): Likewise.
4710 (check_all_empty_except_final): Likewise.
4711 (switch_conversion::check_all_empty_except_final): Likewise.
4712 (check_final_bb): Likewise.
4713 (switch_conversion::check_final_bb): Likewise.
4714 (create_temp_arrays): Likewise.
4715 (switch_conversion::create_temp_arrays): Likewise.
4716 (free_temp_arrays): Likewise.
4717 (gather_default_values): Likewise.
4718 (switch_conversion::gather_default_values): Likewise.
4719 (build_constructors): Likewise.
4720 (switch_conversion::build_constructors): Likewise.
4721 (constructor_contains_same_values_p): Likewise.
4722 (switch_conversion::contains_same_values_p): Likewise.
4723 (array_value_type): Likewise.
4724 (switch_conversion::array_value_type): Likewise.
4725 (build_one_array): Likewise.
4726 (switch_conversion::build_one_array): Likewise.
4727 (build_arrays): Likewise.
4728 (switch_conversion::build_arrays): Likewise.
4729 (gen_def_assigns): Likewise.
4730 (switch_conversion::gen_def_assigns): Likewise.
4731 (prune_bbs): Likewise.
4732 (switch_conversion::prune_bbs): Likewise.
4733 (fix_phi_nodes): Likewise.
4734 (switch_conversion::fix_phi_nodes): Likewise.
4735 (gen_inbound_check): Likewise.
4736 (switch_conversion::gen_inbound_check): Likewise.
4737 (process_switch): Use the newly created class.
4738 (switch_conversion::expand): New.
4739 (switch_conversion::~switch_conversion): New.
4740 * tree-switch-conversion.h: New file.
4741
4742 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4743
4744 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4745 tree-vect-patterns.c.
4746 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4747 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
4748 (vect_recog_sad_pattern): Likewise.
4749 (vect_recog_widen_sum_pattern): Likewise.
4750 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
4751 (vect_recog_widen_shift_pattern): Remove the type_in argument.
4752 (vect_recog_rotate_pattern): Likewise.
4753 (vect_recog_mult_pattern): Likewise.
4754 (vect_recog_vector_vector_shift_pattern): Likewise.
4755 (vect_recog_divmod_pattern): Likewise.
4756 (vect_recog_mixed_size_cond_pattern): Likewise.
4757 (vect_recog_bool_pattern): Likewise.
4758 (vect_recog_mask_conversion_pattern): Likewise.
4759 (vect_try_gather_scatter_pattern): Likewise.
4760 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
4761 (vect_recog_over_widening_pattern): Likewise.
4762 (vect_recog_gather_scatter_pattern): Likewise.
4763 (vect_recog_func_ptr): Move from tree-vectorizer.h
4764 (vect_vect_recog_func_ptrs): Move further down the file.
4765 (vect_recog_func): Likewise. Remove the third argument.
4766 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4767 (vect_pattern_recog_1): Expect the pattern function to do any
4768 necessary target tests. Also expect it to provide a vector type.
4769 Remove the type_in handling.
4770
4771 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4772
4773 * tree-vect-patterns.c (vect_pattern_detected): New function.
4774 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4775 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4776 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4777 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4778 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4779 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4780 (vect_recog_mask_conversion_pattern)
4781 (vect_try_gather_scatter_pattern): Likewise.
4782
4783 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4784
4785 * tree-vect-patterns.c (vect_get_internal_def): New function.
4786 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4787 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4788 (search_type_for_mask_1): Use it.
4789
4790 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4791
4792 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4793 redundant WIDEN_SUM_EXPR handling.
4794 (vect_recog_sad_pattern): Likewise.
4795
4796 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4797
4798 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4799 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4800 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4801 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4802 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4803
4804 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4805
4806 * tree-vect-stmts.c (vectorizable_call): Make sure that we
4807 use the stmt_vec_info of the original bb statement for the
4808 new zero assignment, even if the call is part of a pattern.
4809
4810 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4811
4812 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4813 that the sequence is attached to the original statement rather
4814 than the pattern statement.
4815 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4816 PATTERN_DEF_SEQ from the original statement rather than
4817 the main pattern statement.
4818 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4819 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4820 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4821
4822 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4823
4824 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4825 definition statements before the early exit for statements that aren't
4826 live or relevant.
4827 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4828 split out from...
4829 (vect_transform_loop): ...here. Process pattern definition
4830 statements without first checking whether the main pattern
4831 statement is live or relevant.
4832
4833 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4834
4835 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4836 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4837
4838 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4839
4840 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4841 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4842 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4843 (expand_block_compare): Change select_block_compare_mode call.
4844 (expand_strncmp_align_check): Use new functions, fix comment.
4845 (emit_final_str_compare_gpr): New function.
4846 (expand_strn_compare): Refactor and clean up code.
4847 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4848
4849 2018-06-19 Tony Reix <tony.reix@atos.com>
4850 Damien Bergamini <damien.bergamini@atos.com>
4851 David Edelsohn <dje.gcc@gmail.com>
4852
4853 * collect2.c (static_obj): New variable.
4854 (static_libs): New variable.
4855 (is_in_list): Uncomment declaration.
4856 (main): Track AIX libraries linked statically.
4857 (is_in_list): Uncomment definition.
4858 (scan_prog_file): Don't add AIX shared libraries initializer
4859 to constructor list if linking statically.
4860
4861 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4862
4863 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4864 constant.
4865 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4866
4867 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4868
4869 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4870 blocks.
4871
4872 2018-06-19 Martin Liska <mliska@suse.cz>
4873
4874 * config/i386/i386.c (ix86_can_inline_p): Do not use
4875 ipa_fn_summaries::get_create.
4876 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4877 get.
4878 (devirtualization_time_bonus): Likewise.
4879 (ipcp_propagate_stage): Likewise.
4880 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4881 (edge_set_predicate): Likewise.
4882 (evaluate_conditions_for_known_args): Likewise.
4883 (evaluate_properties_for_edge): Likewise.
4884 (ipa_call_summary::reset): Tranform to ...
4885 (ipa_call_summary::~ipa_call_summary): ... this.
4886 (ipa_fn_summary::reset): Transform to ...
4887 (ipa_fn_summary::~ipa_fn_summary): ... this.
4888 (ipa_fn_summary_t::remove): Rename to ...
4889 (ipa_fn_summary_t::remove_callees): ... this.
4890 (ipa_fn_summary_t::duplicate): Use placement new
4891 instead of memory copy.
4892 (ipa_call_summary_t::duplicate): Likewise.
4893 (ipa_call_summary_t::remove): Remove.
4894 (dump_ipa_call_summary): Change get_create to get.
4895 (ipa_dump_fn_summary): Dump only when summary exists.
4896 (analyze_function_body): Use symbol_summary::get instead
4897 of get_create.
4898 (compute_fn_summary): Likewise.
4899 (estimate_edge_devirt_benefit): Likewise.
4900 (estimate_edge_size_and_time): Likewise.
4901 (inline_update_callee_summaries): Likewise.
4902 (remap_edge_change_prob): Likewise.
4903 (remap_edge_summaries): Likewise.
4904 (ipa_merge_fn_summary_after_inlining): Likewise.
4905 (write_ipa_call_summary): Likewise.
4906 (ipa_fn_summary_write): Likewise.
4907 (ipa_free_fn_summary): Likewise.
4908 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4909 (struct ipa_call_summary): Likewise.
4910 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4911 of get_create.
4912 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4913 (estimate_size_after_inlining): Likewise.
4914 (estimate_growth): Likewise.
4915 (growth_likely_positive): Likewise.
4916 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4917 (inline_call): Likewise.
4918 * ipa-inline.c (caller_growth_limits): Likewise.
4919 (can_inline_edge_p): Likewise.
4920 (can_inline_edge_by_limits_p): Likewise.
4921 (compute_uninlined_call_time): Likewise.
4922 (compute_inlined_call_time): Likewise.
4923 (want_inline_small_function_p): Likewise.
4924 (edge_badness): Likewise.
4925 (update_caller_keys): Likewise.
4926 (update_callee_keys): Likewise.
4927 (inline_small_functions): Likewise.
4928 (inline_to_all_callers_1): Likewise.
4929 (dump_overall_stats): Likewise.
4930 (early_inline_small_functions): Likewise.
4931 (early_inliner): Likewise.
4932 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4933 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4934 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4935 * ipa-split.c (execute_split_functions): Likewise.
4936 * symbol-summary.h: Likewise.
4937 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4938
4939 2018-06-19 Richard Biener <rguenther@suse.de>
4940
4941 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4942 (vectorize_loops): ... here. Fix dbgcnt handling.
4943 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4944
4945 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
4946
4947 PR target/86197
4948 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4949 ieee128 argument takes up only one (vector) register, not two (floating
4950 point) registers.
4951
4952 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4953
4954 * gimplify.c (gimplify_init_constructor): Really never clear for an
4955 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4956
4957 2018-06-19 Richard Biener <rguenther@suse.de>
4958
4959 PR tree-optimization/86179
4960 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4961 after failed recognition.
4962
4963 2018-06-18 Martin Sebor <msebor@redhat.com>
4964
4965 PR middle-end/85602
4966 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4967 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4968 Handle integer subtraction.
4969 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4970 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4971
4972 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4973
4974 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4975 param from rtx to rtx_insn *.
4976 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4977 param.
4978 (frv_ifcvt_modify_insn): Likwise.
4979 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4980 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
4981 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4982 as_a <rtx_insn *> cast to local "unprotected_region" once
4983 it's been established that it's not NULL or pc_rtx.
4984 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4985 param "sethi" from rtx to rtx_insn *.
4986 (nds32_group_float_insns): Likewise for param "insn".
4987 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4988 param.
4989 (vax_output_int_subtract): Likewise.
4990 * config/vax/vax.c (vax_output_int_add): Likewise for param
4991 "insn".
4992 (vax_output_int_subtract): Likewise.
4993 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4994 (emit_pattern_after): Likewise for param "after".
4995 (emit_insn_after): Likewise.
4996 (emit_jump_insn_after): Likewise.
4997 (emit_call_insn_after): Likewise.
4998 (emit_debug_insn_after): Likewise.
4999 (emit_pattern_before): Likewise for param "before".
5000 (emit_insn_before): Likewise.
5001 (emit_jump_insn_before): Likewise.
5002 * final.c (get_insn_template): Likewise for param "insn", removing
5003 a cast.
5004 * output.h (get_insn_template): Likewise for 2nd param.
5005 * rtl.h (emit_insn_before): Likewise.
5006 (emit_jump_insn_before): Likewise.
5007 (emit_debug_insn_before_noloc): Likewise.
5008 (emit_insn_after): Likewise.
5009 (emit_jump_insn_after): Likewise.
5010 (emit_call_insn_after): Likewise.
5011 (emit_debug_insn_after): Likewise.
5012 (set_insn_deleted): Likewise for param.
5013
5014 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
5015
5016 PR target/85358
5017 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5018 floating point modes, so that IFmode is numerically greater than
5019 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5020 to declare the ordering. This prevents IFmode from being
5021 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5022 machine. Include rs6000-modes.h to share the fractional values
5023 between genmodes* and the rest of the compiler.
5024 (IFmode): Likewise.
5025 (KFmode): Likewise.
5026 (TFmode): Likewise.
5027 * config/rs6000/rs6000-modes.h: New file.
5028 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5029 meaning of rs6000_long_double_size so that 126..128 selects an
5030 appropriate 128-bit floating point type.
5031 (rs6000_option_override_internal): Likewise.
5032 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5033 (TARGET_LONG_DOUBLE_128): Change the meaning of
5034 rs6000_long_double_size so that 126..128 selects an appropriate
5035 128-bit floating point type.
5036 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5037 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5038 source and destination to match the standard usage.
5039 (truncifkf2): Likewise.
5040 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5041 ISA 2.07 to use an explicit clobber, instead of passing in a
5042 temporary.
5043 (copysign<mode>3_soft): Likewise.
5044
5045 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5046
5047 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5048 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5049 (vect_slp_analyze_instance_dependence): Likewise.
5050 (vect_enhance_data_refs_alignment): Likewise.
5051 (vect_analyze_data_refs_alignment): Likewise.
5052 (vect_slp_analyze_and_verify_instance_alignment
5053 (vect_analyze_data_ref_accesses): Likewise.
5054 (vect_prune_runtime_alias_test_list): Likewise.
5055 (vect_analyze_data_refs): Likewise.
5056 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5057 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5058 (vect_analyze_scalar_cycles_1): Likewise.
5059 (vect_get_loop_niters): Likewise.
5060 (vect_analyze_loop_form_1): Likewise.
5061 (vect_update_vf_for_slp): Likewise.
5062 (vect_analyze_loop_operations): Likewise.
5063 (vect_analyze_loop): Likewise.
5064 (vectorizable_induction): Likewise.
5065 (vect_transform_loop): Likewise.
5066 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5067 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5068 (vect_make_slp_decision): Likewise.
5069 (vect_detect_hybrid_slp): Likewise.
5070 (vect_slp_analyze_operations): Likewise.
5071 (vect_slp_bb): Likewise.
5072 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5073 (vectorizable_bswap): Likewise.
5074 (vectorizable_call): Likewise.
5075 (vectorizable_simd_clone_call): Likewise.
5076 (vectorizable_conversion): Likewise.
5077 (vectorizable_assignment): Likewise.
5078 (vectorizable_shift): Likewise.
5079 (vectorizable_operation): Likewise.
5080 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5081
5082 2018-06-18 Martin Sebor <msebor@redhat.com>
5083
5084 PR tree-optimization/81384
5085 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5086 * builtins.c (expand_builtin_strnlen): New function.
5087 (expand_builtin): Call it.
5088 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5089 * builtins.def (BUILT_IN_STRNLEN): New.
5090 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5091 Warn for bounds in excess of maximum object size.
5092 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5093 single-value ranges. Handle strnlen.
5094 (handle_builtin_strlen): Handle strnlen.
5095 (strlen_check_and_optimize_stmt): Same.
5096 * doc/extend.texi (Other Builtins): Document strnlen.
5097
5098 2018-06-18 Maya Rashish <coypu@sdf.org>
5099
5100 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5101 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5102 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5103
5104 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5105 here to ...
5106 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5107
5108 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5109
5110 * tree.c (escaped_string::escape): Replace cast to char * by
5111 const_cast<char *> (unescaped).
5112
5113 2018-06-18 Nick Clifton <nickc@redhat.com>
5114
5115 PR 84195
5116 * tree.c (escaped_string): New class. Converts an unescaped
5117 string into its escaped equivalent.
5118 (warn_deprecated_use): Use the new class to convert the
5119 deprecation message, if present.
5120 (test_escaped_strings): New self test.
5121 (test_c_tests): Add test_escaped_strings.
5122 * doc/extend.texi (deprecated): Add a note that the
5123 deprecation message is affected by the -fmessage-length
5124 option, and that control characters will be escaped.
5125 (#pragma GCC error): Document this pragma.
5126 (#pragma GCC warning): Likewise.
5127 * doc/invoke.texi (-fmessage-length): Document this option's
5128 effect on the #warning and #error preprocessor directives and
5129 the deprecated attribute.
5130
5131 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5132
5133 * tree.c (decl_value_expr_lookup): Revert latest change.
5134 (decl_value_expr_insert): Likewise.
5135
5136 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
5137
5138 * gimplify.c (nonlocal_vlas): Delete.
5139 (nonlocal_vla_vars): Likewise.
5140 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5141 referenced VLAs.
5142 (gimplify_body): Do not create and destroy nonlocal_vlas.
5143 * tree-nested.c: Include diagnostic.h.
5144 (use_pointer_in_frame): Tweak.
5145 (lookup_field_for_decl): Add assertion and declare the transformation.
5146 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5147 internal error when the reference is in a wrong context. Do not
5148 create a debug decl by default.
5149 (note_nonlocal_block_vlas): Delete.
5150 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5151 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
5152 create a debug decl by default.
5153 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5154 call is in a wrong context.
5155 (fixup_vla_decls): New function.
5156 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
5157 debug variables were created.
5158 * tree.c (decl_value_expr_lookup): Add checking assertion.
5159 (decl_value_expr_insert): Likewise.
5160
5161 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5162
5163 PR middle-end/82479
5164 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5165 * tree-scalar-evolution.c (interpret_expr): Likewise.
5166 (expression_expensive_p): Likewise.
5167 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5168 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5169 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5170 (ssa_defined_by_minus_one_stmt_p): New.
5171
5172 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5173
5174 PR middle-end/64946
5175 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5176 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5177 * dojump.c (do_jump): Likewise.
5178 * expr.c (expand_expr_real_2): Check operand type's sign.
5179 * fold-const.c (const_unop): Handle ABSU_EXPR.
5180 (fold_abs_const): Likewise.
5181 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5182 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5183 (strip_sign_op_1): Likesise.
5184 * match.pd: Add new pattern to generate ABSU_EXPR.
5185 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5186 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5187 * tree-eh.c (operation_could_trap_helper_p): Likewise.
5188 * tree-inline.c (estimate_operator_cost): Likewise.
5189 * tree-pretty-print.c (dump_generic_node): Likewise.
5190 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5191 * tree.def (ABSU_EXPR): New.
5192
5193 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5194
5195 PR middle-end/86095
5196 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5197 documented as preserved for backward compatibility only.
5198 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5199
5200 PR rtl-optimization/86108
5201 * bb-reorder.c (create_forwarder_block): Renamed to ...
5202 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5203 jump from new landing pad to the second part.
5204 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5205 Adjust callers.
5206
5207 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5208
5209 PR middle-end/85878
5210 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5211 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5212 Only call store_expr for halves if the mode is the same.
5213
5214 PR middle-end/86123
5215 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5216 Fix up comment formatting.
5217
5218 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5219
5220 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5221 (typed_splay_tree::closure,
5222 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5223 (typed_splay_tree::typed_splay_tree,
5224 typed_splay_tree::operator =): Declared private.
5225 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5226 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5227 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5228 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5229 typed_splay_tree::splay_tree_splay,
5230 typed_splay_tree::splay_tree_foreach_helper,
5231 typed_splay_tree::splay_tree_insert,
5232 typed_splay_tree::splay_tree_remove,
5233 typed_splay_tree::splay_tree_lookup,
5234 typed_splay_tree::splay_tree_predecessor,
5235 typed_splay_tree::splay_tree_successor,
5236 typed_splay_tree::splay_tree_min,
5237 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5238 (typed_splay_tree::root, typed_splay_tree::comp,
5239 typed_splay_tree::delete_key,
5240 typed_splay_tree::delete_value): New data members.
5241 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5242 typed_splay_tree::remove.
5243
5244 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5245
5246 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5247 -mginv and -mno-ginv to the assembler.
5248 * config/mips/mips.opt (-mcrc): New option.
5249 (-mginv): Likewise.
5250 * doc/invoke.text (-mcrc): Document.
5251 (-mginv): Likewise.
5252
5253 2018-06-15 Nick Clifton <nickc@redhat.com>
5254
5255 PR 84195
5256 * tree.c (escaped_string): New class. Converts an unescaped
5257 string into its escaped equivalent.
5258 (warn_deprecated_use): Use the new class to convert the
5259 deprecation message, if present.
5260 (test_escaped_strings): New self test.
5261 (test_c_tests): Add test_escaped_strings.
5262 * doc/extend.texi (deprecated): Add a note that the
5263 deprecation message is affected by the -fmessage-length
5264 option, and that control characters will be escaped.
5265 (#pragma GCC error): Document this pragma.
5266 (#pragma GCC warning): Likewise.
5267 * doc/invoke.texi (-fmessage-length): Document this option's
5268 effect on the #warning and #error preprocessor directives and
5269 the deprecated attribute.
5270
5271 2018-06-15 Richard Biener <rguenther@suse.de>
5272
5273 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5274 here, also noting vector size used.
5275 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5276 size used in MSG_OPTIMIZED_LOCATIONS dump.
5277 (pass_slp_vectorize::execute): Adjust.
5278
5279 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5280
5281 PR target/85968
5282 * config/arc/arc.c (arc_return_address_register): Fix
5283 if-condition.
5284
5285 2018-06-15 Richard Biener <rguenther@suse.de>
5286
5287 PR middle-end/86159
5288 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5289 leave useless conversion stripping to force_gimple_operand_gsi.
5290 (gimplify_build2): Likewise.
5291 (gimplify_build1): Likewise.
5292
5293 2018-06-15 Richard Biener <rguenther@suse.de>
5294
5295 PR middle-end/86076
5296 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5297 before adjusting their block.
5298
5299 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5300
5301 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5302 multilibs for *-*-rtems*.
5303 * config/riscv/t-rtems: New file.
5304
5305 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5306
5307 PR middle-end/86122
5308 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5309 unsigned_type_for returns NULL.
5310
5311 PR target/85945
5312 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5313 subregs of multi-word pseudos unless the float mode has word size.
5314
5315 2018-06-14 Richard Biener <rguenther@suse.de>
5316
5317 PR middle-end/86139
5318 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5319 duplicate and harmful type_hash_canon.
5320 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5321
5322 2018-06-14 Richard Biener <rguenther@suse.de>
5323
5324 PR ipa/86124
5325 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5326 NULL cgraph_node.
5327
5328 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5329
5330 * config/rtems.h (STDINT_LONG32): Define.
5331
5332 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5333 Prachi Godbole <prachi.godbole@imgtec.com>
5334
5335 * config/mips/mips-cpus.def: Define P6600.
5336 * config/mips/mips-tables.opt: Regenerate.
5337 * config/mips/mips.c (mips_ucbranch_type): New enum.
5338 (mips_rtx_cost_data): Add support for P6600.
5339 (mips_issue_rate): Likewise.
5340 (mips_multipass_dfa_lookahead): Likewise.
5341 (mips_avoid_hazard): Likewise.
5342 (mips_reorg_process_insns): Likewise.
5343 (mips_classify_branch_p6600): New function.
5344 * config/mips/mips.h (TUNE_P6600): New define.
5345 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5346 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5347 * config/mips/mips.md: Include p6600.md.
5348 (processor): Add p6600.
5349 * config/mips/p6600.md: New file.
5350 * doc/invoke.texi: Add p6600 to supported architectures.
5351
5352 2018-06-13 Martin Sebor <msebor@redhat.com>
5353
5354 PR tree-optimization/86114
5355 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5356 of integer types.
5357 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5358
5359 2018-06-13 Richard Biener <rguenther@suse.de>
5360
5361 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5362 Properly set vector type of the intermediate stmt.
5363 * tree-vect-stmts.c (vectorizable_operation): The destination
5364 var always has vectype_out type.
5365
5366 2018-06-13 Jeff Law <law@redhat.com>
5367
5368 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5369 integer 0 for argument to print_rtl_with_bb.
5370 (rl78_reorg): Likewise.
5371
5372 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5373
5374 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5375 from rtx to rtx_insn *.
5376 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5377 "label".
5378 (add_sched_insns_for_speculation): Likewise for local "target",
5379 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5380 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5381 from rtx_insn ** to rtx_code_label **.
5382 (reorg_emit_nops): Likewise.
5383 (c6x_reorg): Likewise for local "call_labels".
5384 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5385 rtx to rtx_insn *.
5386 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5387 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5388 the loops over LABEL_REFS.
5389 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5390 braf_label.
5391 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5392 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5393 (split_branches): Strengthen local "olabel" from rtx to
5394 rtx_insn *, adding a safe_as_a cast.
5395 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5396 to "rtx_insn *".
5397 (add_insn_after): Likewise for first two params.
5398 (add_insn_before): Likewise.
5399 (remove_insn): Likewise for param.
5400 (emit_pattern_before_noloc): Likewise for second and third params.
5401 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5402 (emit_call_insn_before_noloc): Likewise.
5403 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5404 to "rtx_insn *".
5405 (emit_barrier_before): Likewise.
5406 (emit_label_before): Strengthen "label" param from "rtx" to
5407 "rtx_code_label *". Strengthen "before" param from "rtx" to
5408 "rtx_insn *".
5409 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5410 "rtx_insn *".
5411 (emit_pattern_after_noloc): Likewise.
5412 (emit_insn_after_noloc): Likewise.
5413 (emit_jump_insn_after_noloc): Likewise.
5414 (emit_call_insn_after_noloc): Likewise.
5415 (emit_debug_insn_after_noloc): Likewise.
5416 (emit_barrier_after): Likewise.
5417 (emit_label_after): Likewise for both params.
5418 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5419 "loc" param from "int" to "location_t".
5420 (emit_insn_after_setloc): Likewise.
5421 (emit_jump_insn_after_setloc): Likewise.
5422 (emit_call_insn_after_setloc): Likewise.
5423 (emit_debug_insn_after_setloc): Likewise.
5424 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5425 "loc" param from "int" to "location_t".
5426 (emit_pattern_before): Convert NULL_RTX to NULL.
5427 (emit_insn_before_setloc): Convert "loc" param from "int" to
5428 "location_t".
5429 (emit_jump_insn_before_setloc): Likewise.
5430 (emit_call_insn_before_setloc): Likewise.
5431 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5432 rtx_insn *. Convert "loc" param from "int" to "location_t".
5433 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5434 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5435 Convert 3rd param from "int" to "location_t".
5436 (emit_barrier_before, emit_barrier_after, next_real_insn):
5437 Strengthen param from rtx to rtx_insn *.
5438 (emit_label_before): Strengthen 1st param from "rtx" to
5439 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5440 "rtx_insn *".
5441 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5442 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5443 Strengthen 2nd param from "rtx" to "rtx_insn *".
5444 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5445 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5446 Likewise. Convert 3rd param from "int" to "location_t".
5447 (emit_label_after): Strengthen 1st param from "rtx" to
5448 "rtx_code_label *".
5449 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5450 "rtx_insn *".
5451 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5452 from "rtx" to "rtx_insn *".
5453
5454 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5455
5456 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5457 bodies streamed in with -Q.
5458 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5459 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5460 * gimple-streamer-out.c: Include gimple-pretty-print.h
5461 (output_bb): Dump stmts streamed.
5462 * lto-section-out.c: Include print-tree.h
5463 (lto_begin_section): Dump sections created.
5464 (lto_output_decl_index): Dump decl encoded.
5465 * lto-streamer-out.c: Include print-tree.h
5466 (create_output_block): Dump output block created.
5467 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5468 (output_function): Dump function output.
5469 (output_constructor): Dump constructor streamed.
5470 (write_global_stream): Output indexes encoded.
5471 (produce_asm_for_decls): Dump streams encoded.
5472 * lto-streamer.c (streamer_dump_file): New global var.
5473 * lto-streamer.h (streamer_dump_file): Declare.
5474 * passes.c (ipa_write_summaries): Initialize streamer dump.
5475 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5476 in.
5477
5478 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5479
5480 PR target/86048
5481 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5482 offsets for register save directives. Emit a second batch of save
5483 directives, if need be, when the function accesses prior frames.
5484
5485 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5486
5487 * config/arc/fpu.md (fmasf4): Force operand to register.
5488 (fnmasf4): Likewise.
5489
5490 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5491
5492 * config/arc/arc-protos.h (arc_pad_return): Remove.
5493 * config/arc/arc.c (machine_function): Remove force_short_suffix
5494 and size_reason.
5495 (arc_print_operand): Adjust printing of '&'.
5496 (arc_verify_short): Remove conditional printing of short suffix.
5497 (arc_final_prescan_insn): Remove reference to size_reason.
5498 (pad_return): New function.
5499 (arc_reorg): Call pad_return.
5500 (arc_pad_return): Remove.
5501 (arc_init_machine_status): Remove reference to force_short_suffix.
5502 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5503 (attr length): When attribute iscompact is true force to 2
5504 regardless; in the case of maybe check if we want to force the
5505 instruction to have 4 bytes length.
5506 (nopv): Change it to generate 4 byte long nop as well.
5507 (blockage): New pattern.
5508 (simple_return): Remove call to arc_pad_return.
5509 (p_return_i): Likewise.
5510
5511 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5512
5513 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5514
5515 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5516
5517 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5518 ARC cores.
5519
5520 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5521
5522 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5523 for ARC700 and ARCv2.
5524
5525 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5526
5527 PR target/86076
5528 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5529 operands[2] instead of operands[1].
5530
5531
5532 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5533
5534 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5535 case, check whether the outer register overlaps an unallocatable
5536 register, not just whether it fits the required class.
5537
5538 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5539
5540 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5541 are poly_ints.
5542 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5543 (memrefs_conflict_p): Likewise.
5544 (init_alias_analysis): Likewise.
5545 * cfgexpand.c (expand_debug_expr): Likewise.
5546 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5547 * cse.c (fold_rtx): Likewise.
5548 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5549 * expr.c (emit_block_move_hints): Likewise.
5550 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5551 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5552 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5553 (emit_group_store): Likewise.
5554 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5555 to read the PRE/POST_MODIFY increment.
5556 * calls.c (store_one_arg): Use strip_offset.
5557 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5558 poly_int_rtx_p.
5559 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5560 by a VEC_SELECT.
5561 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5562 (simplify_binary_operation_1): Extend CONST_INT handling to
5563 poly_int_rtx_p.
5564 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5565 than a HOST_WIDE_INT.
5566 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5567 poly_int64.
5568 (adjust_mems, add_stores): Update accodingly.
5569 (vt_canonicalize_addr): Track polynomial offsets.
5570 (emit_note_insn_var_location): Likewise.
5571 (vt_add_function_parameter): Likewise.
5572 (vt_initialize): Likewise.
5573
5574 2018-06-12 Jeff Law <law@redhat.com>
5575
5576 * config.gcc (alpha*-*-freebsd*): Remove.
5577 * config/alpha/freebsd.h: Remove.
5578
5579 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5580
5581 PR other/69968
5582 * spellcheck-tree.c (levenshtein_distance): Rename to...
5583 (get_edit_distance): ...this, and update for underlying renaming.
5584 * spellcheck-tree.h (levenshtein_distance): Rename to...
5585 (get_edit_distance): ...this.
5586 * spellcheck.c (levenshtein_distance): Rename to...
5587 (get_edit_distance): ...this. Convert from Levenshtein distance
5588 to Damerau-Levenshtein distance by supporting transpositions of
5589 adjacent characters. Rename "v1" to "v_next" and "v0" to
5590 "v_one_ago".
5591 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5592 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5593 update for underlying renaming.
5594 (selftest::levenshtein_distance_unit_test): Rename to...
5595 (selftest::test_get_edit_distance_unit): ...this, and update for
5596 underlying renaming.
5597 (selftest::test_find_closest_string): Add example from PR 69968
5598 where transposition helps
5599 (selftest::test_metric_conditions): Update for renaming.
5600 (selftest::test_metric_conditions): Likewise.
5601 (selftest::spellcheck_c_tests): Likewise.
5602 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5603 (get_edit_distance): ...this.
5604 (best_match::consider): Update for renaming.
5605
5606 2018-06-12 Martin Sebor <msebor@redhat.com>
5607
5608 PR tree-optimization/85259
5609 * builtins.c (compute_objsize): Handle constant offsets.
5610 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5611 true iff a warning has been issued.
5612 * gimple.h (gimple_nonartificial_location): New function.
5613 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5614 gimple_nonartificial_location and handle -Wno-system-headers.
5615 (handle_builtin_stxncpy): Same.
5616
5617 2018-06-12 Martin Sebor <msebor@redhat.com>
5618
5619 PR c/85931
5620 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5621
5622 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
5623
5624 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5625 BUILTIN_VEC_XST entries for pointer to double and long long.
5626
5627 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
5628
5629 PR target/85990
5630 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5631 Update comments.
5632 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5633 Likewise.
5634
5635 2018-06-12 Martin Liska <mliska@suse.cz>
5636
5637 * doc/options.texi: Document IntegerRange.
5638
5639 2018-06-12 Martin Liska <mliska@suse.cz>
5640
5641 * config/i386/i386.opt: Make MPX-related options as Deprecated.
5642 * opt-functions.awk: Handle Deprecated flag.
5643 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5644 and report error.
5645 (read_cmdline_option): Report warning for a deprecated option.
5646 * opts.h (struct cl_option): Add new field cl_deprecated.
5647 (CL_ERR_DEPRECATED): New.
5648
5649 2018-06-12 Martin Liska <mliska@suse.cz>
5650
5651 * doc/options.texi: Document Deprecated option flag.
5652
5653 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5654
5655 * config/arc/arc-arch.h (arc_extras): New enum.
5656 (arc_cpu_t):Add field extra.
5657 (arc_cpu_types): Consider the extras.
5658 * config/arc/arc-cpus.def: Add extras info.
5659 * config/arc/arc-opts.h (processor_type): Consider extra field.
5660 * config/arc/arc.c (arc_override_options): Handle extra field.
5661
5662 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5663
5664 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5665 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5666 field.
5667 * config/arc/arc.c (arc_init): Update pic warning.
5668 (irq_range): Update irq range parsing warnings.
5669 (arc_override_options): Update various warning messages.
5670 (arc_handle_aux_attribute): Likewise.
5671
5672 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5673
5674 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5675
5676 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5677
5678 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5679 compiler messages directives.
5680
5681 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5682
5683 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5684 * config/mips/mips-tables.opt: Regenerate.
5685 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5686 mips64r6.
5687 * doc/invoke.texi: Document -march=i6500.
5688
5689 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5690
5691 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5692 (i6400_gpmul): Add cpu_unit.
5693 (i6400_gpdiv): Likewise.
5694 (i6400_msa_add_d): Update reservations.
5695 (i6400_msa_int_add) Likewise.
5696 (i6400_msa_short_logic3) Likewise.
5697 (i6400_msa_short_logic2) Likewise.
5698 (i6400_msa_short_logic) Likewise.
5699 (i6400_msa_move) Likewise.
5700 (i6400_msa_cmp) Likewise.
5701 (i6400_msa_short_float2) Likewise.
5702 (i6400_msa_div_d) Likewise.
5703 (i6400_msa_long_logic1) Likewise.
5704 (i6400_msa_long_logic2) Likewise.
5705 (i6400_msa_mult) Likewise.
5706 (i6400_msa_long_float2) Likewise.
5707 (i6400_msa_long_float4) Likewise.
5708 (i6400_msa_long_float5) Likewise.
5709 (i6400_msa_long_float8) Likewise.
5710 (i6400_fpu_fadd): Include frint type.
5711 (i6400_fpu_store): New define_insn_reservation.
5712 (i6400_fpu_load): Likewise.
5713 (i6400_fpu_move): Likewise.
5714 (i6400_fpu_fcmp): Likewise.
5715 (i6400_fpu_fmadd): Likewise.
5716 (i6400_int_mult): Include imul3nc type and update reservation.
5717 (i6400_int_div): Include idiv3 type and update reservation.
5718 (i6400_int_load): Update to check type not move_type.
5719 (i6400_int_store): Likewise.
5720 (i6400_int_prefetch): Set zero latency.
5721
5722 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
5723
5724 * gcc.c: Document new %@{...} sequence.
5725 (LINK_COMMAND_SPEC): Use it for the -L switches.
5726 (cpp_unique_options): Use it for the -I switches.
5727 (at_file_argbuf): New global variable.
5728 (in_at_file): Likewise.
5729 (alloc_args): Create at_file_argbuf.
5730 (clear_args): Truncate at_file_argbuf.
5731 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5732 (open_at_file): New function.
5733 (close_at_file): Likewise.
5734 (create_at_file): Delete.
5735 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5736 <'o'>: Likewise.
5737 <'@'>: New case.
5738 (validate_switches_from_spec): Deal with %@{...} sequence.
5739 (validate_switches): Likewise.
5740 (driver::finalize): Call clear_args.
5741
5742 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5743
5744 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5745
5746 2018-06-11 Martin Sebor <msebor@redhat.com>
5747
5748 * doc/invoke.texi (-Wall): List -Wc++17-compat.
5749 (Wno-class-memaccess): Add @opindex.
5750 (Wno-templates, Wno-multiple-inheritance): Same.
5751 (Wno-virtual-inheritance, Wno-namespaces): Same.
5752 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5753 (Wno-format-overflow, Wno-format-truncation): Same.
5754 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5755 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5756 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5757 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5758 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5759 (Wno-misspelled-isr): Same.
5760
5761 2018-06-11 Martin Sebor <msebor@redhat.com>
5762
5763 * PR tree-optimization/86083
5764 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5765
5766 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5767
5768 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5769
5770 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
5771
5772 PR target/85755
5773 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5774 on the correct operand.
5775 (*movdi_internal64): Ditto.
5776
5777 2018-06-11 Martin Liska <mliska@suse.cz>
5778
5779 PR tree-optimization/86089
5780 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5781
5782 2018-06-11 Julia Koval <julia.koval@intel.com>
5783
5784 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5785 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5786 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5787
5788 2018-06-11 Olivier Hainque <hainque@adacore.com>
5789
5790 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5791 for Ada with strict dwarf2.
5792
5793 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
5794
5795 PR target/85755
5796 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5797 addresses.
5798
5799 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
5800
5801 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5802
5803 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
5804
5805 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5806 TARGET_ELF.
5807
5808 2018-06-08 Martin Liska <mliska@suse.cz>
5809
5810 * tree-cfg.h (debug_function): Fix argument type to match
5811 implementation.
5812
5813 2018-06-08 Martin Liska <mliska@suse.cz>
5814
5815 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5816 Remove usage of MPX-related (and removed) fields.
5817 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5818
5819 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5820
5821 * cfg.c (debug): Use TDF_NONE rather than 0.
5822 * cfghooks.c (debug): Likewise.
5823 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5824 (struct dump_option_value_info): Convert to...
5825 (struct kv_pair): ...this template type.
5826 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5827 rather than 0.
5828 (optinfo_verbosity_options): Likewise.
5829 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5830 OPTGROUP_NONE.
5831 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5832 than int for "optgroup_flags" param.
5833 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5834 "dump_kind" param.
5835 (dump_dec): Likewise.
5836 (dump_finish): Use TDF_NONE rather than 0.
5837 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5838 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5839 than 0. Update for change to option_ptr.
5840 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5841 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5842 0. Update for changes to optinfo_verbosity_options and
5843 optgroup_options.
5844 (opt_info_switch_p): Convert optgroup_flags from int to
5845 optgroup_flags_t.
5846 (dump_basic_block): Use dump_flags_t rather than int
5847 for "dump_kind" param.
5848 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5849 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5850 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5851 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5852 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5853 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5854 TDF_NONE): Convert from macros to...
5855 (enum dump_flag): ...this new enum.
5856 (dump_flags_t): Update to use enum.
5857 (operator|, operator&, operator~, operator|=, operator&=):
5858 Implement for dump_flags_t.
5859 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5860 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5861 Convert from macros to...
5862 (enum optgroup_flag): ...this new enum.
5863 (optgroup_flags_t): New typedef.
5864 (operator|, operator|=): Implement for optgroup_flags_t.
5865 (struct dump_file_info): Convert field "alt_flags" to
5866 dump_flags_t. Convert field "optgroup_flags" to
5867 optgroup_flags_t.
5868 (dump_basic_block): Use dump_flags_t rather than int for param.
5869 (dump_generic_expr_loc): Likewise.
5870 (dump_dec): Likewise.
5871 (dump_register): Convert param "optgroup_flags" to
5872 optgroup_flags_t.
5873 (opt_info_enable_passes): Likewise.
5874 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5875 than 0.
5876 * gimple-pretty-print.c (debug): Likewise.
5877 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5878 (merged_store_group::apply_stores): Likewise.
5879 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5880 * gimple.c (verify_gimple_pp): Likewise.
5881 * graphite-poly.c (print_pbb_body): Likewise.
5882 * passes.c (pass_manager::register_one_dump_file): Convert
5883 local "optgroup_flags" to optgroup_flags_t.
5884 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5885 (debug): Likewise.
5886 (debug_body): Likewise.
5887 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5888 to optgroup_flags_t.
5889 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5890 than 0.
5891 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5892 (convert_mult_to_fma): Likewise.
5893 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5894 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5895 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5896 "dump_kind" to dump_flags_t.
5897
5898 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5899
5900 * config/rs6000/rs6000.c (min, max): Delete.
5901
5902 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5903
5904 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5905 -mabi=spe and -mabi=no-spe.
5906
5907 2018-06-08 Martin Liska <mliska@suse.cz>
5908
5909 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5910 where we expect an existing summary.
5911
5912 2018-06-08 Martin Liska <mliska@suse.cz>
5913
5914 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5915 * ipa-inline.h (estimate_edge_growth): Likewise.
5916
5917 2018-06-08 Martin Liska <mliska@suse.cz>
5918
5919 * cgraph.c (function_version_hasher::hash): Use
5920 cgraph_node::get_uid ().
5921 (function_version_hasher::equal):
5922 * cgraph.h (cgraph_node::get_uid): New method.
5923 * ipa-inline.c (update_caller_keys): Use
5924 cgraph_node::get_uid ().
5925 (update_callee_keys): Likewise.
5926 * ipa-utils.c (searchc): Likewise.
5927 (ipa_reduced_postorder): Likewise.
5928 * lto-cgraph.c (input_node): Likewise.
5929 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5930 * symbol-summary.h (symtab_insertion): Likewise.
5931 (symtab_removal): Likewise.
5932 (symtab_duplication): Likewise.
5933 * tree-pretty-print.c (dump_function_header): Likewise.
5934 * tree-sra.c (convert_callers_for_node): Likewise.
5935
5936 2018-06-08 Martin Liska <mliska@suse.cz>
5937
5938 * cgraph.c (symbol_table::create_edge): Always assign a new
5939 unique number.
5940 (symbol_table::free_edge): Do not recycle numbers.
5941 * cgraph.h (cgraph_edge::get): New method.
5942 * symbol-summary.h (symtab_removal): Use it.
5943 (symtab_duplication): Likewise.
5944 (call_summary::hashable_uid): Remove.
5945
5946 2018-06-08 Martin Liska <mliska@suse.cz>
5947
5948 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5949 (initialize_growth_caches): Remove.
5950 (free_growth_caches): Likewise.
5951 (do_estimate_edge_time): Use edge_growth_cache.
5952 (do_estimate_edge_size): Likewise.
5953 (do_estimate_edge_hints): Likewise.
5954 * ipa-inline.c (reset_edge_caches): Likewise.
5955 (recursive_inlining): Likewise.
5956 (inline_small_functions): Likewise.
5957 * ipa-inline.h (initialize_growth_caches): Remove.
5958 (estimate_edge_size): Likewise.
5959 (estimate_edge_time): Likewise.
5960 (estimate_edge_hints): Likewise.
5961 (reset_edge_growth_cache): Likewise.
5962 * symbol-summary.h (call_summary::remove): New method.
5963
5964 2018-06-08 Martin Liska <mliska@suse.cz>
5965
5966 * ipa-cp.c (class edge_clone_summary): New summary.
5967 (grow_edge_clone_vectors): Remove.
5968 (ipcp_edge_duplication_hook): Remove.
5969 (class edge_clone_summary_t): New call_summary class.
5970 (ipcp_edge_removal_hook): Remove.
5971 (edge_clone_summary_t::duplicate): New function.
5972 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5973 (create_specialized_node): Likewise.
5974 (ipcp_driver): Initialize edge_clone_summaries and do not
5975 register hooks.
5976
5977 2018-06-08 Martin Liska <mliska@suse.cz>
5978
5979 * symbol-summary.h (get): New function.
5980 (call_summary::m_initialize_when_cloning): New class member.
5981
5982 2018-06-08 Martin Liska <mliska@suse.cz>
5983
5984 * cgraph.c (cgraph_node::remove): Do not recycle uid.
5985 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5986 (symbol_table::allocate_cgraph_symbol): Do not set uid.
5987 * passes.c (uid_hash_t): Record removed_nodes by their uids.
5988 (remove_cgraph_node_from_order): Use the removed_nodes set.
5989 (do_per_function_toporder): Likwise.
5990 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5991 instead of summary_uid.
5992 (symtab_removal): Likewise.
5993 (symtab_duplication): Likewise.
5994
5995 2018-06-08 Martin Liska <mliska@suse.cz>
5996
5997 * ipa-cp.c (ipcp_store_bits_results): Use
5998 ipcp_transformation_sum.
5999 (ipcp_store_vr_results): Likewise.
6000 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6001 to ...
6002 (ipcp_transformation_initialize): ... this.
6003 (ipa_set_node_agg_value_chain):
6004 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6005 (write_ipcp_transformation_info): Likewise.
6006 (read_ipcp_transformation_info): Likewise.
6007 (ipcp_update_bits): Likewise.
6008 (ipcp_update_vr): Likewise.
6009 (ipcp_transform_function): Likewise.
6010 * ipa-prop.h: Rename ipcp_transformation_summary to
6011 ipcp_transformation.
6012 (class ipcp_transformation_t): New function summary.
6013 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6014 (ipa_get_agg_replacements_for_node): Likewise.
6015
6016 2018-06-08 Martin Liska <mliska@suse.cz>
6017
6018 * ipa-pure-const.c (struct funct_state_d): Do it class instead
6019 of struct.
6020 (class funct_state_summary_t): New function_summary class.
6021 (has_function_state): Remove.
6022 (get_function_state): Likewise.
6023 (set_function_state): Likewise.
6024 (add_new_function): Likewise.
6025 (funct_state_summary_t::insert): New function.
6026 (duplicate_node_data): Remove.
6027 (remove_node_data): Remove.
6028 (funct_state_summary_t::duplicate): New function.
6029 (register_hooks): Create new funct_state_summaries.
6030 (pure_const_generate_summary): Use it.
6031 (pure_const_write_summary): Likewise.
6032 (pure_const_read_summary): Likewise.
6033 (propagate_pure_const): Likewise.
6034 (propagate_nothrow): Likewise.
6035 (dump_malloc_lattice): Likewise.
6036 (propagate_malloc): Likewise.
6037 (execute): Do not register hooks, just remove summary
6038 instead.
6039 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6040 constructor.
6041
6042 2018-06-08 Martin Liska <mliska@suse.cz>
6043
6044 * ipa-reference.c (remove_node_data): Remove.
6045 (duplicate_node_data): Likewise.
6046 (class ipa_ref_var_info_summary_t): New class.
6047 (class ipa_ref_opt_summary_t): Likewise.
6048 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6049 (get_reference_optimization_summary): Use
6050 ipa_ref_opt_sum_summaries.
6051 (set_reference_vars_info): Remove.
6052 (set_reference_optimization_summary): Likewise.
6053 (ipa_init): Create summaries.
6054 (init_function_info): Use function summary.
6055 (ipa_ref_opt_summary_t::duplicate): New function.
6056 (ipa_ref_opt_summary_t::remove): New function.
6057 (get_read_write_all_from_node): Fix GNU coding style.
6058 (propagate): Use function summary.
6059 (write_node_summary_p): Fix GNU coding style.
6060 (stream_out_bitmap): Likewise.
6061 (ipa_reference_read_optimization_summary): Use function summary.
6062 (ipa_reference_c_finalize): Do not release hooks.
6063
6064 2018-06-08 Martin Liska <mliska@suse.cz>
6065
6066 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6067 (analyze_function_body): Extract multiple calls of get_create.
6068 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6069 * ipa-inline.c (recursive_inlining): Use ::get method.
6070 * ipa-inline.h (estimate_edge_growth): Likewise.
6071
6072 2018-06-08 Martin Liska <mliska@suse.cz>
6073
6074 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6075 HSA_INVALID.
6076 (hsa_function_summary::hsa_function_summary): Use the new enum
6077 value.
6078 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6079 * hsa-gen.c (hsa_get_host_function): Likewise.
6080 (get_brig_function_name): Likewise.
6081 * ipa-hsa.c (process_hsa_functions): Likewise.
6082 (ipa_hsa_write_summary): Likewise.
6083 * symbol-summary.h (symtab_duplication): Use ::get function/
6084 (get): New function.
6085
6086 2018-06-08 Martin Liska <mliska@suse.cz>
6087
6088 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6089 of get.
6090 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6091 (hsa_register_kernel): Likewise.
6092 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6093 * hsa-gen.c (hsa_get_host_function): Likewise.
6094 (get_brig_function_name): Likewise.
6095 (generate_hsa): Likewise.
6096 (pass_gen_hsail::execute): Likewise.
6097 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6098 (devirtualization_time_bonus): Likewise.
6099 (ipcp_propagate_stage): Likewise.
6100 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6101 (edge_set_predicate): Likewise.
6102 (evaluate_conditions_for_known_args): Likewise.
6103 (evaluate_properties_for_edge): Likewise.
6104 (ipa_fn_summary::reset): Likewise.
6105 (ipa_fn_summary_t::duplicate): Likewise.
6106 (dump_ipa_call_summary): Likewise.
6107 (ipa_dump_fn_summary): Likewise.
6108 (analyze_function_body): Likewise.
6109 (compute_fn_summary): Likewise.
6110 (estimate_edge_devirt_benefit): Likewise.
6111 (estimate_edge_size_and_time): Likewise.
6112 (estimate_calls_size_and_time): Likewise.
6113 (estimate_node_size_and_time): Likewise.
6114 (inline_update_callee_summaries): Likewise.
6115 (remap_edge_change_prob): Likewise.
6116 (remap_edge_summaries): Likewise.
6117 (ipa_merge_fn_summary_after_inlining): Likewise.
6118 (ipa_update_overall_fn_summary): Likewise.
6119 (read_ipa_call_summary): Likewise.
6120 (inline_read_section): Likewise.
6121 (write_ipa_call_summary): Likewise.
6122 (ipa_fn_summary_write): Likewise.
6123 (ipa_free_fn_summary): Likewise.
6124 * ipa-hsa.c (process_hsa_functions): Likewise.
6125 (ipa_hsa_write_summary): Likewise.
6126 (ipa_hsa_read_section): Likewise.
6127 * ipa-icf.c (sem_function::merge): Likewise.
6128 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6129 (do_estimate_edge_time): Likewise.
6130 (estimate_size_after_inlining): Likewise.
6131 (estimate_growth): Likewise.
6132 (growth_likely_positive): Likewise.
6133 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6134 (inline_call): Likewise.
6135 * ipa-inline.c (caller_growth_limits): Likewise.
6136 (can_inline_edge_p): Likewise.
6137 (can_inline_edge_by_limits_p): Likewise.
6138 (compute_uninlined_call_time): Likewise.
6139 (compute_inlined_call_time): Likewise.
6140 (want_inline_small_function_p): Likewise.
6141 (edge_badness): Likewise.
6142 (update_caller_keys): Likewise.
6143 (update_callee_keys): Likewise.
6144 (recursive_inlining): Likewise.
6145 (inline_small_functions): Likewise.
6146 (inline_to_all_callers_1): Likewise.
6147 (dump_overall_stats): Likewise.
6148 (early_inline_small_functions): Likewise.
6149 (early_inliner): Likewise.
6150 * ipa-inline.h (estimate_edge_growth): Likewise.
6151 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6152 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6153 * ipa-prop.h (IPA_NODE_REF): Likewise.
6154 (IPA_EDGE_REF): Likewise.
6155 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6156 (propagate_malloc): Likewise.
6157 * ipa-split.c (execute_split_functions): Likewise.
6158 * symbol-summary.h: Rename get to get_create.
6159 (get): Likewise.
6160 (get_create): Likewise.
6161 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6162
6163 2018-06-08 Martin Liska <mliska@suse.cz>
6164
6165 * symbol-summary.h (release): Move definition out of class
6166 declaration.
6167 (symtab_removal): Likewise.
6168 (symtab_duplication): Likewise.
6169
6170 2018-06-08 Martin Liska <mliska@suse.cz>
6171
6172 * symbol-summary.h (function_summary): Move constructor
6173 implementation out of class declaration.
6174 (release): Likewise.
6175 (symtab_insertion): Likewise.
6176 (symtab_removal): Likewise.
6177 (symtab_duplication): Likewise.
6178 (get): Likewise.
6179
6180 2018-06-08 Martin Liska <mliska@suse.cz>
6181
6182 * Makefile.in: Remove support for MPX (macros, related functions,
6183 fields in cgraph_node, ...).
6184 * builtin-types.def (BT_BND): Likewise.
6185 (BT_FN_BND_CONST_PTR): Likewise.
6186 (BT_FN_CONST_PTR_BND): Likewise.
6187 (BT_FN_VOID_PTR_BND): Likewise.
6188 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6189 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6190 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6191 (expand_builtin_mempcpy_with_bounds): Likewise.
6192 (expand_builtin_memset_with_bounds): Likewise.
6193 (expand_builtin_memset_args): Likewise.
6194 (std_expand_builtin_va_start): Likewise.
6195 (expand_builtin): Likewise.
6196 (expand_builtin_with_bounds): Likewise.
6197 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6198 (DEF_LIB_BUILTIN_CHKP): Likewise.
6199 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6200 (DEF_CHKP_BUILTIN): Likewise.
6201 (BUILT_IN_MEMCPY): Likewise.
6202 (BUILT_IN_MEMMOVE): Likewise.
6203 (BUILT_IN_MEMPCPY): Likewise.
6204 (BUILT_IN_MEMSET): Likewise.
6205 (BUILT_IN_STPCPY): Likewise.
6206 (BUILT_IN_STRCAT): Likewise.
6207 (BUILT_IN_STRCHR): Likewise.
6208 (BUILT_IN_STRCPY): Likewise.
6209 (BUILT_IN_STRLEN): Likewise.
6210 (BUILT_IN_MEMCPY_CHK): Likewise.
6211 (BUILT_IN_MEMMOVE_CHK): Likewise.
6212 (BUILT_IN_MEMPCPY_CHK): Likewise.
6213 (BUILT_IN_MEMSET_CHK): Likewise.
6214 (BUILT_IN_STPCPY_CHK): Likewise.
6215 (BUILT_IN_STRCAT_CHK): Likewise.
6216 (BUILT_IN_STRCPY_CHK): Likewise.
6217 * calls.c (store_bounds): Likewise.
6218 (emit_call_1): Likewise.
6219 (special_function_p): Likewise.
6220 (maybe_warn_nonstring_arg): Likewise.
6221 (initialize_argument_information): Likewise.
6222 (finalize_must_preallocate): Likewise.
6223 (compute_argument_addresses): Likewise.
6224 (expand_call): Likewise.
6225 * cfgexpand.c (expand_call_stmt): Likewise.
6226 (expand_return): Likewise.
6227 (expand_gimple_stmt_1): Likewise.
6228 (pass_expand::execute): Likewise.
6229 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6230 (cgraph_node::remove): Likewise.
6231 (cgraph_node::dump): Likewise.
6232 (cgraph_node::verify_node): Likewise.
6233 * cgraph.h (chkp_function_instrumented_p): Likewise.
6234 (symtab_node::get_alias_target): Likewise.
6235 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6236 (cgraph_local_p): Likewise.
6237 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6238 (cgraph_edge::rebuild_references): Likewise.
6239 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6240 (walk_polymorphic_call_targets): Likewise.
6241 (cgraph_node::expand_thunk): Likewise.
6242 (symbol_table::output_weakrefs): Likewise.
6243 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6244 (ix86_handle_option): Likewise.
6245 * config/i386/constraints.md: Likewise.
6246 * config/i386/i386-builtin-types.def (BND): Likewise.
6247 (VOID): Likewise.
6248 (PVOID): Likewise.
6249 (ULONG): Likewise.
6250 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6251 (BDESC_FIRST): Likewise.
6252 (BDESC): Likewise.
6253 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6254 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6255 * config/i386/i386.c (enum reg_class): Likewise.
6256 (ix86_target_string): Likewise.
6257 (ix86_option_override_internal): Likewise.
6258 (ix86_conditional_register_usage): Likewise.
6259 (ix86_valid_target_attribute_inner_p): Likewise.
6260 (ix86_set_indirect_branch_type): Likewise.
6261 (ix86_set_current_function): Likewise.
6262 (ix86_function_arg_regno_p): Likewise.
6263 (init_cumulative_args): Likewise.
6264 (ix86_function_arg_advance): Likewise.
6265 (ix86_function_arg): Likewise.
6266 (ix86_pass_by_reference): Likewise.
6267 (ix86_function_value_regno_p): Likewise.
6268 (ix86_function_value_1): Likewise.
6269 (ix86_function_value_bounds): Likewise.
6270 (ix86_return_in_memory): Likewise.
6271 (ix86_setup_incoming_vararg_bounds): Likewise.
6272 (ix86_va_start): Likewise.
6273 (indirect_thunk_need_prefix): Likewise.
6274 (print_reg): Likewise.
6275 (ix86_print_operand): Likewise.
6276 (ix86_expand_call): Likewise.
6277 (ix86_output_function_return): Likewise.
6278 (reg_encoded_number): Likewise.
6279 (BDESC_VERIFYS): Likewise.
6280 (ix86_init_mpx_builtins): Likewise.
6281 (ix86_init_builtins): Likewise.
6282 (ix86_emit_cmove): Likewise.
6283 (ix86_emit_move_max): Likewise.
6284 (ix86_expand_builtin): Likewise.
6285 (ix86_builtin_mpx_function): Likewise.
6286 (ix86_get_arg_address_for_bt): Likewise.
6287 (ix86_load_bounds): Likewise.
6288 (ix86_store_bounds): Likewise.
6289 (ix86_load_returned_bounds): Likewise.
6290 (ix86_store_returned_bounds): Likewise.
6291 (ix86_class_likely_spilled_p): Likewise.
6292 (ix86_hard_regno_mode_ok): Likewise.
6293 (x86_order_regs_for_local_alloc): Likewise.
6294 (ix86_mitigate_rop): Likewise.
6295 (ix86_bnd_prefixed_insn_p): Likewise.
6296 (ix86_mpx_bound_mode): Likewise.
6297 (ix86_make_bounds_constant): Likewise.
6298 (ix86_initialize_bounds): Likewise.
6299 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6300 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6301 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6302 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6303 (TARGET_CHKP_BOUND_MODE): Likewise.
6304 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6305 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6306 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6307 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6308 * config/i386/i386.h (TARGET_MPX): Likewise.
6309 (TARGET_MPX_P): Likewise.
6310 (VALID_BND_REG_MODE): Likewise.
6311 (FIRST_BND_REG): Likewise.
6312 (LAST_BND_REG): Likewise.
6313 (enum reg_class): Likewise.
6314 (BND_REG_P): Likewise.
6315 (BND_REGNO_P): Likewise.
6316 (BNDmode): Likewise.
6317 (ADJUST_INSN_LENGTH): Likewise.
6318 * config/i386/i386.md: Likewise.
6319 * config/i386/i386.opt: Likewise.
6320 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6321 (defined): Likewise.
6322 (LINK_MPX): Likewise.
6323 (MPX_SPEC): Likewise.
6324 (LIBMPX_SPEC): Likewise.
6325 (LIBMPXWRAPPERS_SPEC): Likewise.
6326 (CHKP_SPEC): Likewise.
6327 * config/i386/predicates.md: Likewise.
6328 * dbxout.c (dbxout_type): Likewise.
6329 * doc/extend.texi: Likewise.
6330 * doc/invoke.texi: Likewise.
6331 * doc/md.texi: Likewise.
6332 * doc/tm.texi: Likewise.
6333 * doc/tm.texi.in: Likewise.
6334 * dwarf2out.c (is_base_type): Likewise.
6335 (gen_formal_types_die): Likewise.
6336 (gen_subprogram_die): Likewise.
6337 (gen_type_die_with_usage): Likewise.
6338 (gen_decl_die): Likewise.
6339 (dwarf2out_late_global_decl): Likewise.
6340 * expr.c (expand_assignment): Likewise.
6341 (emit_storent_insn): Likewise.
6342 (store_expr_with_bounds): Likewise.
6343 (store_expr): Likewise.
6344 (expand_expr_real_1): Likewise.
6345 * expr.h (store_expr_with_bounds): Likewise.
6346 * function.c (use_register_for_decl): Likewise.
6347 (struct bounds_parm_data): Likewise.
6348 (assign_parms_augmented_arg_list): Likewise.
6349 (assign_parm_find_entry_rtl): Likewise.
6350 (assign_parm_is_stack_parm): Likewise.
6351 (assign_parm_load_bounds): Likewise.
6352 (assign_bounds): Likewise.
6353 (assign_parms): Likewise.
6354 (expand_function_start): Likewise.
6355 * gcc.c (CHKP_SPEC): Likewise.
6356 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6357 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6358 (wrestrict_dom_walker::check_call): Likewise.
6359 * gimple.c (gimple_build_call_from_tree): Likewise.
6360 * gimple.h (enum gf_mask): Likewise.
6361 (gimple_call_with_bounds_p): Likewise.
6362 (gimple_call_set_with_bounds): Likewise.
6363 * gimplify.c (gimplify_init_constructor): Likewise.
6364 * ipa-cp.c (initialize_node_lattices): Likewise.
6365 (propagate_constants_across_call): Likewise.
6366 (find_more_scalar_values_for_callers_subset): Likewise.
6367 * ipa-hsa.c (process_hsa_functions): Likewise.
6368 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6369 * ipa-icf.c (sem_function::merge): Likewise.
6370 * ipa-inline.c (early_inliner): Likewise.
6371 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6372 (warn_function_cold): Likewise.
6373 (propagate_pure_const): Likewise.
6374 * ipa-ref.h (enum GTY): Likewise.
6375 * ipa-split.c (find_retbnd): Likewise.
6376 (consider_split): Likewise.
6377 (split_function): Likewise.
6378 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6379 * ipa.c (walk_polymorphic_call_targets): Likewise.
6380 (symbol_table::remove_unreachable_nodes): Likewise.
6381 (process_references): Likewise.
6382 (cgraph_build_static_cdtor_1): Likewise.
6383 * lto-cgraph.c (lto_output_node): Likewise.
6384 (output_refs): Likewise.
6385 (compute_ltrans_boundary): Likewise.
6386 (input_overwrite_node): Likewise.
6387 (input_node): Likewise.
6388 (input_cgraph_1): Likewise.
6389 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6390 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6391 (class pass_chkp_instrumentation_passes): Likewise.
6392 (make_pass_chkp_instrumentation_passes): Likewise.
6393 * passes.def: Likewise.
6394 * rtl.h (struct GTY): Likewise.
6395 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6396 * stor-layout.c (layout_type): Likewise.
6397 * symtab.c: Likewise.
6398 * target.def: Likewise.
6399 * targhooks.c (default_chkp_bound_type): Likewise.
6400 (default_chkp_bound_mode): Likewise.
6401 (default_builtin_chkp_function): Likewise.
6402 (default_chkp_function_value_bounds): Likewise.
6403 (default_chkp_make_bounds_constant): Likewise.
6404 (default_chkp_initialize_bounds): Likewise.
6405 * targhooks.h (default_chkp_bound_type): Likewise.
6406 (default_chkp_bound_mode): Likewise.
6407 (default_builtin_chkp_function): Likewise.
6408 (default_chkp_function_value_bounds): Likewise.
6409 (default_chkp_make_bounds_constant): Likewise.
6410 (default_chkp_initialize_bounds): Likewise.
6411 * toplev.c (compile_file): Likewise.
6412 (process_options): Likewise.
6413 * tree-core.h (DEF_BUILTIN): Likewise.
6414 (DEF_BUILTIN_CHKP): Likewise.
6415 * tree-inline.c (declare_return_variable): Likewise.
6416 (remap_gimple_stmt): Likewise.
6417 (copy_bb): Likewise.
6418 (initialize_inlined_parameters): Likewise.
6419 (expand_call_inline): Likewise.
6420 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6421 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6422 (make_pass_ipa_chkp_produce_thunks): Likewise.
6423 (make_pass_chkp): Likewise.
6424 (make_pass_chkp_opt): Likewise.
6425 (make_pass_chkp_instrumentation_passes): Likewise.
6426 * tree-pretty-print.c (dump_generic_node): Likewise.
6427 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6428 * tree-ssa-dce.c (propagate_necessity): Likewise.
6429 (eliminate_unnecessary_stmts): Likewise.
6430 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6431 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6432 * tree-ssa-sccvn.h: Likewise.
6433 * tree-ssa-strlen.c (get_string_length): Likewise.
6434 (valid_builtin_call): Likewise.
6435 (adjust_last_stmt): Likewise.
6436 (handle_builtin_strchr): Likewise.
6437 (handle_builtin_strcpy): Likewise.
6438 (handle_builtin_stxncpy): Likewise.
6439 (handle_builtin_memcpy): Likewise.
6440 (handle_builtin_strcat): Likewise.
6441 (strlen_check_and_optimize_stmt): Likewise.
6442 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6443 * tree-streamer-in.c: Likewise.
6444 * tree-streamer.c (record_common_node): Likewise.
6445 * tree.c (tree_code_size): Likewise.
6446 (wide_int_to_tree_1): Likewise.
6447 (type_contains_placeholder_1): Likewise.
6448 (build_common_tree_nodes): Likewise.
6449 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6450 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6451 (POINTER_BOUNDS_P): Likewise.
6452 (BOUNDED_TYPE_P): Likewise.
6453 (BOUNDED_P): Likewise.
6454 (CALL_WITH_BOUNDS_P): Likewise.
6455 (pointer_bounds_type_node): Likewise.
6456 * value-prof.c (gimple_ic): Likewise.
6457 * var-tracking.c (vt_add_function_parameters): Likewise.
6458 * varasm.c (make_decl_rtl): Likewise.
6459 (assemble_start_function): Likewise.
6460 (output_constant): Likewise.
6461 (maybe_assemble_visibility): Likewise.
6462 * varpool.c (ctor_for_folding): Likewise.
6463 * chkp-builtins.def: Remove.
6464 * ipa-chkp.c: Remove.
6465 * ipa-chkp.h: Remove.
6466 * rtl-chkp.c: Remove.
6467 * rtl-chkp.h: Remove.
6468 * tree-chkp-opt.c: Remove.
6469 * tree-chkp.c: Remove.
6470 * tree-chkp.h: Remove.
6471
6472 2018-06-07 Carl Love <cel@us.ibm.com>
6473
6474 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6475 vextract_fp_from_shortl): Add BE support.
6476
6477 2018-06-07 Paul Koning <ni1d@arrl.net>
6478
6479 * compare-elim.c (try_merge_compare): Don't merge compare if
6480 address contains a side effect.
6481 (try_eliminate_compare): Likewise.
6482
6483 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6484
6485 * config.gcc: Support "tremont".
6486 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6487 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6488 PROCESSOR_TREMONT.
6489 * config/i386/i386.c (m_TREMONT): Define.
6490 (processor_target_table): Add "tremont".
6491 (PTA_TREMONT): Define.
6492 (ix86_lea_outperforms): Add TARGET_TREMONT.
6493 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6494 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6495 and M_INTEL_GOLDMONT_PLUS.
6496 (fold_builtin_cpu): Add "tremont".
6497 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6498 (ix86_option_override_internal): Add "tremont".
6499 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6500 (processor_type): Add PROCESSOR_TREMONT.
6501 * config/i386/x86-tune.def: Add m_TREMONT.
6502 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6503
6504 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6505
6506 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6507 symbol defined for msp430i* devices to be lower case.
6508
6509 2018-06-07 Richard Biener <rguenther@suse.de>
6510
6511 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6512 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6513 Properly wrap signed arithmetic if overflow wraps.
6514
6515 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6516
6517 PR tree-optimization/69615
6518 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6519 of a cast from a same precision integral SSA_NAME in a bb dominated
6520 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6521 cast to utype if rhs2 has already a compatible type.
6522
6523 2018-06-07 Richard Biener <rguenther@suse.de>
6524
6525 PR tree-optimization/85935
6526 * graphite-scop-detection.c (find_params_in_bb): Analyze
6527 condition operands with respect to the correct loop. Assert
6528 the analysis doesn't fail.
6529
6530 2018-06-04 Carl Love <cel@us.ibm.com>
6531
6532 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6533 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6534 as it is slightly cheaper.
6535 (first_match_or_eos_index_<mode>):
6536 Calculate index using natural element order.
6537 (first_match_index_<mode>):
6538 Calculate index using natural element order.
6539 (first_match_or_eos_index_<mode>):
6540 Calculate index using natural order.
6541 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6542 for BE and LE modes.
6543 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6544 P9V_BUILTIN_VCLZLSBB_V16QI.
6545 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6546 specific.
6547
6548 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6549
6550 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6551 indentation and line wrap for many prototypes. Add missing
6552 @smallexample directives around block of prototypes for vec_xl and
6553 vec_xst.
6554
6555 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6556
6557 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6558 track if we pass or return IEEE 128-bit floating point.
6559 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6560 C++ mangling that is compatible with GCC 8.1.
6561 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6562 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6563 floating point types.
6564 (rs6000_function_arg_advance_1): Likewise.
6565 (rs6000_mangle_type): Optionally generate mangled names that match
6566 what GCC 8.1 generated for IEEE 128-bit floating point types.
6567 (rs6000_globalize_decl_name): If we have an external function that
6568 passes or returns IEEE 128-bit types, generate a weak reference
6569 from the mangled name used in GCC 8.1 to the current mangled
6570 name.
6571 (rs6000_init_builtins): Make __ibm128 use the long double type if
6572 long double is IBM extended double. Make __float128 use the long
6573 double type if long double is IEEE 128-bit.
6574
6575 PR target/85657
6576 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6577 macro for __ibm128 built-in functions.
6578 (PACK_IF): Add __ibm128 pack/unpack functions.
6579 (UNPACK_IF): Likewise.
6580 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6581 enable long double built-in functions if long double is IEEE
6582 128-bit floating point.
6583 (rs6000_invalid_builtin): Update long double built-in function
6584 error message.
6585 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6586 functions, adjust the built-in function to use the long double
6587 built-in function if __ibm128 and long double are the same type.
6588 * doc/extend.texi (PowerPC builtins): Update documention for
6589 __builtin_{,un}pack_longdouble. Add documentation for
6590 __builtin_{,un}pack_ibm128.
6591
6592 2018-06-06 Jim Wilson <jimw@sifive.com>
6593
6594 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6595 (struct machine_function): New field interrupt_mode.
6596 (riscv_handle_type_attribute): New function. Add forward declaration.
6597 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6598 (riscv_expand_epilogue): Check interrupt_mode field.
6599 (riscv_set_current_function): Check interrupt attribute args and
6600 set interrupt_mode field.
6601 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6602 (riscv_sret, riscv_uret): New.
6603 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6604 new arguments to interrupt attribute.
6605
6606 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6607
6608 PR target/63177
6609 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6610 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6611
6612 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6613
6614 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6615 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6616 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6617 several redundant entries.
6618
6619 2018-06-06 David Malcolm <dmalcolm@redhat.com>
6620
6621 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6622 type from "rtx" to "rtx_insn *".
6623 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6624 for local "call_insn", removing cast.
6625 (ix86_expand_call): Likewise, introducing a "call_insn" local.
6626
6627 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
6628
6629 PR tree-optimization/86066
6630 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6631 for BIT_INSERT_EXPR stores.
6632
6633 2018-06-06 Richard Biener <rguenther@suse.de>
6634
6635 PR tree-optimization/86062
6636 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6637 component refs ontop
6638 of to be offsetted base.
6639
6640 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6641
6642 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6643 to be static and remove check on interrupt attribute name.
6644
6645 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
6646
6647 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6648 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6649
6650 2018-06-05 Steve Ellcey <sellcey@cavium.com>
6651
6652 PR target/79924
6653 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6654 second argument.
6655 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6656 Remove second argument, change how error is called.
6657 (aarch64_layout_arg): Remove second argument from
6658 aarch64_err_no_fpadvsimd call.
6659 (aarch64_init_cumulative_args): Ditto.
6660 (aarch64_gimplify_va_arg_expr): Ditto.
6661 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6662
6663 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6664
6665 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6666 (*simple_return_indirect_internal<mode>): Rename from
6667 simple_return_indirect_internal. Use W mode iterator.
6668 (rstorssp): New expander.
6669 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6670 (clrssbsy): New expander.
6671 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6672
6673 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6674
6675 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6676 __typeof__.
6677 (cmse_check_pointed_object): Likewise.
6678
6679 2018-06-05 Martin Liska <mliska@suse.cz>
6680
6681 PR gcov-profile/47618
6682 * doc/invoke.texi: Document how -fprofile-dir format
6683 is extended.
6684
6685 2018-06-05 Richard Biener <rguenther@suse.de>
6686
6687 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6688 removal pretend DOM info isn't available so we do not update
6689 it and only remove edges, not dominated blocks. Actually free
6690 DOM info in case we removed something. Remove unreachable blocks.
6691 (mfb_keep_latches): Work with either DOM info or marked backedges.
6692 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6693 first. Mark backedges if DOM info isn't available.
6694 (Re-)compute DOM info after cleanup_control_flow_pre.
6695
6696 2018-06-05 Richard Biener <rguenther@suse.de>
6697
6698 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6699 (locus_discrim_hasher::hash): Adjust.
6700 (locus_discrim_hasher::equal): Likewise.
6701 (next_discriminator_for_locus): Work on line directly.
6702 (same_line_p): Pass in expanded locus1 as well.
6703 (assign_discriminators): Avoid redundant location expansions.
6704
6705 2018-06-05 Richard Biener <rguenther@suse.de>
6706
6707 PR tree-optimization/86046
6708 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6709 if required after clearing TREE_ADDRESSABLE.
6710
6711 2018-06-05 Richard Biener <rguenther@suse.de>
6712
6713 PR tree-optimization/86047
6714 * tree-ssa-loop.c (for_each_index): Glob handling of all
6715 decls and constants and really handle all of them.
6716
6717 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6718
6719 PR target/81497
6720 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6721 qualifier_void_pointer and qualifier_const_void_pointer.
6722 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6723 (arm_init_builtins): Handle the above.
6724 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6725 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6726 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6727 void intrinsics.
6728
6729 2018-06-05 Martin Liska <mliska@suse.cz>
6730
6731 * auto-profile.c (read_autofdo_file): Do not use
6732 gcov_ctr_summary struct.
6733 (afdo_callsite_hot_enough_for_early_inline): Likewise.
6734 * coverage.c (struct counts_entry): Likewise.
6735 (read_counts_file): Read just single summary entry.
6736 (get_coverage_counts): Use gcov_summary struct.
6737 * coverage.h (get_coverage_counts): Likewise.
6738 * gcov-dump.c (dump_working_sets): Likewise.
6739 (tag_summary): Dump just single summary.
6740 * gcov-io.c (gcov_write_summary): Write just histogram
6741 summary.
6742 (gcov_read_summary): Read just single summary.
6743 (compute_working_sets): Use gcov_summary struct.
6744 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6745 of GCOV_COUNTERS_SUMMABLE.
6746 (GCOV_COUNTERS_SUMMABLE): Remove.
6747 (GCOV_FIRST_VALUE_COUNTER): Replace with
6748 GCOV_COUNTER_V_INTERVAL.
6749 (struct gcov_ctr_summary): Remove.
6750 (struct gcov_summary): Directly use fields of former
6751 gcov_ctr_summary.
6752 (compute_working_sets): Use gcov_summary struct.
6753 * gcov.c (read_count_file): Do not use ctrs fields.
6754 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6755 struct.
6756 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6757 struct.
6758 * profile.c: Likewise.
6759 * profile.h: Likewise.
6760
6761 2018-06-05 Martin Liska <mliska@suse.cz>
6762
6763 PR gcov-profile/84846
6764 * gcov.c (output_lines): Print working directory only
6765 in intermediate format.
6766
6767 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
6768
6769 * config/s390/s390-builtin-types.def: Add void function type.
6770 * config/s390/s390-builtins.def: Use the function type for the
6771 tbeginc builtin.
6772
6773 2018-06-04 Jim Wilson <jimw@sifive.com>
6774
6775 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6776 to int.
6777 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6778 and maybe_eh_return. Change regno to unsigned int. Use new args to
6779 handle EH_RETURN_DATA_REGNO registers properly.
6780 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6781 (riscv_expand_epilogue): Update comment. Change argument name and
6782 type. Update code to use new name and type. Pass new args to
6783 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
6784 EXCEPTION_RETURN.
6785 * config/riscv/riscv.md (NORMAL_RETURN): New.
6786 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6787 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6788 (eh_return): Call gen_eh_return_internal and emit barrier.
6789 (eh_return_internal): Call riscv_expand_epilogue.
6790
6791 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
6792
6793 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6794 bit_insertion field and declare can_be_merged_into method.
6795 (merged_store_group::can_be_merged_into): New method.
6796 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6797 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
6798 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6799
6800 2018-06-04 Richard Biener <rguenther@suse.de>
6801
6802 PR tree-optimization/85955
6803 * builtins.c (fold_builtin_sincos): Convert pointers to
6804 destination to appropriate type before dereferencing.
6805
6806 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
6807
6808 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6809
6810 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6811
6812 * expr.c (expand_expr_real_1): Force the operand into memory if
6813 its TYPE_MODE is BLKmode and if there is no integer mode for
6814 the number of bits being extracted.
6815
6816 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6817
6818 PR target/85832
6819 PR target/86036
6820 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6821 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6822
6823 2018-06-04 Richard Biener <rguenther@suse.de>
6824
6825 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6826 (cleanup_tree_cfg_noloop): ... single caller. Do
6827 start_recording_case_labels later.
6828
6829 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6830
6831 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6832 to _IMMINTRIN_H_INCLUDED.
6833 * config/i386/pconfigintrin.h: Ditto.
6834 * config/i386/waitpkgintrin.h: Ditto.
6835 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6836 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6837 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6838 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6839 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6840 waitpkgintrin.h and cldemoteintrin.h.
6841
6842 2018-06-04 Richard Biener <rguenther@suse.de>
6843
6844 PR tree-optimization/86038
6845 * tracer.c (find_best_successor): Check probability for
6846 being initialized, bail out if not.
6847
6848 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6849
6850 PR target/86003
6851 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6852 of bits to ignore when comparing architectures.
6853
6854 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6855
6856 PR tree-optimization/69615
6857 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6858 maximum or minimum of the type, try to merge it also as if
6859 range1 is + [-, x - 1] or + [x + 1, -].
6860
6861 PR c++/86025
6862 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6863
6864 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6865
6866 PR tree-optimization/86034
6867 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6868 the unsigned bitfield type in a bit insertion sequence if it does not
6869 have a larger precision than the bitfield size.
6870 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6871
6872 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6873
6874 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6875
6876 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6877
6878 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6879 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6880 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6881 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6882
6883 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6884
6885 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6886 Disable -fdelete-null-pointer-checks for ELF toolchain.
6887
6888 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6889 Kito Cheng <kito.cheng@gmail.com>
6890
6891 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6892 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6893 (nds32*-*-*): Add glibc and uclibc conditions.
6894 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6895 (TARGET_EXCEPT_UNWIND_INFO): Define.
6896 * config/nds32/elf.h: New file.
6897 * config/nds32/linux.h: New file.
6898 * config/nds32/nds32-elf.opt: New file.
6899 * config/nds32/nds32-linux.opt: New file.
6900 * config/nds32/nds32-fp-as-gp.c
6901 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6902 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6903 TARGET_LINUX_ABI.
6904 (nds32_asm_file_end): Ditto.
6905 (nds32_print_operand): Ditto.
6906 (nds32_insert_attributes): Ditto.
6907 (nds32_init_libfuncs): New function.
6908 (TARGET_HAVE_TLS): Define.
6909 (TARGET_INIT_LIBFUNCS): Define.
6910 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6911 spec content.
6912 (TARGET_ELF): Apply different mcmodel setting.
6913 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6914 been migrated into elf.h and linux.h files.
6915 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6916 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6917 (mcmodel): The content has been migrated into nds32-elf.opt and
6918 nds32-linux.opt files.
6919 * config/nds32/t-elf: New file.
6920 * config/nds32/t-linux: New file.
6921
6922 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6923 Shiva Chen <shiva0217@gmail.com>
6924
6925 * config/nds32/constants.md (unspec_volatile_element): Add
6926 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6927 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6928 optimization.
6929 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6930 (make_pass_nds32_fp_as_gp): Declare.
6931 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6932 optmization pass.
6933 (nds32_asm_function_end_prologue): Remove unused asm output.
6934 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6935 (nds32_asm_file_start): Output necessary fp_as_gp information.
6936 (nds32_option_override): Adjust register usage.
6937 (nds32_expand_prologue): Consider fp_as_gp situation.
6938 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6939 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6940 (epilogue): Ditto.
6941 (return): Ditto.
6942 (simple_return): Ditto.
6943 (omit_fp_begin): Output special directive for fp_as_gp.
6944 (omit_fp_end): Output special directive for fp_as_gp.
6945 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6946 mforbid-fp-as-gp): New options.
6947
6948 2018-06-01 Mark Wielaard <mark@klomp.org>
6949
6950 * dwarf2out.c (dwarf2out_finish): Remove generation of
6951 DW_AT_loclists_base.
6952
6953 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6954
6955 * gimple-ssa-store-merging.c: Include gimple-fold.h.
6956 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6957 (struct merged_store_group): Add bit_insertion field.
6958 (dump_char_array): Use standard hexadecimal format.
6959 (merged_store_group::merged_store_group): Set bit_insertion to false.
6960 (merged_store_group::apply_stores): Use optimal buffer size. Deal
6961 with BIT_INSERT_EXPR stores. Move up code updating the mask and
6962 also print the mask in the dump file.
6963 (pass_store_merging::gate): Minor tweak.
6964 (imm_store_chain_info::coalesce_immediate): Fix wrong association
6965 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
6966 stores with INTEGER_CST stores.
6967 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6968 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6969 and use it throughout. Generate bit insertion sequences if need be.
6970 (pass_store_merging::process_store): Remove redundant condition.
6971 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6972
6973 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
6974
6975 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6976 the 128-bit floating point types. Fix function comment.
6977
6978 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6979
6980 * config/aarch64/aarch64-simd.md
6981 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6982 mnemonics.
6983 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6984 mnemonics.
6985
6986 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6987
6988 PR tree-optimization/85989
6989 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6990 variable.
6991 (backprop::intersect_uses): Check it when deciding whether this
6992 is a backedge reference.
6993 (backprop::process_block): Add each phi to m_visited_phis
6994 after visiting it, then clear it at the end.
6995
6996 2018-06-01 Richard Biener <rguenther@suse.de>
6997
6998 * tree-vectorizer.h (vect_dr_stmt): New function.
6999 (vect_get_load_cost): Adjust.
7000 (vect_get_store_cost): Likewise.
7001 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7002 Use vect_dr_stmt instead of DR_SMTT.
7003 (vect_record_base_alignments): Likewise.
7004 (vect_calculate_target_alignment): Likewise.
7005 (vect_compute_data_ref_alignment): Likewise and make static.
7006 (vect_update_misalignment_for_peel): Likewise.
7007 (vect_verify_datarefs_alignment): Likewise.
7008 (vector_alignment_reachable_p): Likewise.
7009 (vect_get_data_access_cost): Likewise. Pass down
7010 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7011 (vect_get_peeling_costs_all_drs): Likewise.
7012 (vect_peeling_hash_get_lowest_cost): Likewise.
7013 (vect_enhance_data_refs_alignment): Likewise.
7014 (vect_find_same_alignment_drs): Likewise.
7015 (vect_analyze_data_refs_alignment): Likewise.
7016 (vect_analyze_group_access_1): Likewise.
7017 (vect_analyze_group_access): Likewise.
7018 (vect_analyze_data_ref_access): Likewise.
7019 (vect_analyze_data_ref_accesses): Likewise.
7020 (vect_vfa_segment_size): Likewise.
7021 (vect_small_gap_p): Likewise.
7022 (vectorizable_with_step_bound_p): Likewise.
7023 (vect_prune_runtime_alias_test_list): Likewise.
7024 (vect_analyze_data_refs): Likewise.
7025 (vect_supportable_dr_alignment): Likewise.
7026 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7027 (vect_gen_prolog_loop_niters): Likewise.
7028 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7029 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7030 modify DR_STMT.
7031 (vect_recog_mask_conversion_pattern): Likewise.
7032 (vect_try_gather_scatter_pattern): Likewise.
7033 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7034 to vect_get_store_cost.
7035 (vect_get_store_cost): Get stmt_info instead of DR.
7036 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7037 (vect_get_load_cost): Get stmt_info instead of DR.
7038
7039 2018-06-01 Richard Biener <rguenther@suse.de>
7040
7041 PR middle-end/86017
7042 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7043 vars wrapped in MEM_REFs.
7044
7045 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7046
7047 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7048 Fix subreg tests so that we only return a choice between
7049 GENERAL_REGS and FP_REGS if the original classes included both.
7050
7051 2018-06-01 Richard Biener <rguenther@suse.de>
7052
7053 PR ipa/85960
7054 * tree-ssa-structalias.c (get_function_part_constraint):
7055 Handle NULL fi->decl.
7056 (find_func_aliases_for_call): Properly handle indirect
7057 fi from direct call.
7058 (find_func_clobbers): Likewise.
7059 (ipa_pta_execute): Likewise.
7060 (create_variable_info_for): For functions that are ifunc_resolver
7061 resolve to a varinfo that contains the result of the resolver call.
7062 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7063 aliases.
7064
7065 2018-05-31 Michael Collison <michael.collison@arm.com>
7066
7067 * config/aarch64/aarch64.md:
7068 (*fix_to_zero_extenddfdi2): New pattern.
7069 * gcc.target/aarch64/fix_extend1.c: New testcase.
7070
7071 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7072
7073 PR middle-end/78809
7074 PR middle-end/83026
7075 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7076 and BUILT_IN_STRNCMP_EQ.
7077 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7078 BUILT_IN_STRNCMP_EQ.
7079 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7080 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7081 (gimple_fold_builtin): Likewise.
7082 * tree-ssa-strlen.c (compute_string_length): New function.
7083 (determine_min_obsize): New function.
7084 (handle_builtin_string_cmp): New function to handle calls to
7085 string compare functions.
7086 (strlen_optimize_stmt): Add handling to builtin string compare
7087 calls.
7088 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7089 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7090 * tree.c (build_common_builtin_nodes): Add new defines of
7091 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7092
7093 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7094
7095 PR target/85984
7096 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7097 functions with naked attribute.
7098
7099 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7100
7101 * config/i386/sse.md (avx_vec_concat<mode>):
7102 Substitute concat_tg_mode mode attribute with xtg_mode.
7103 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7104 (concat_tg_mode): Remove mode attribute.
7105
7106 2018-05-31 Martin Sebor <msebor@redhat.com>
7107
7108 PR c/82063
7109 * calls.c (alloc_max_size): Correct a logic error/typo.
7110 Treat excessive arguments as infinite. Warn for invalid arguments.
7111 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7112
7113 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7114
7115 PR target/85829
7116 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7117 and movx for Haswell.
7118
7119 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7120 Cesar Philippidis <cesar@codesourcery.com>
7121
7122 PR middle-end/85879
7123 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7124 when emitting error on private/firstprivate reductions.
7125 * omp-low.c (lower_omp_target): Avoid reference-type processing
7126 on pointers for firstprivate clause.
7127
7128 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7129
7130 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7131 (st1x2): Likewise.
7132 (st1x3): Likewise.
7133 * config/aarch64/aarch64-simd.md
7134 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7135 (aarch64_ld1_x3_<mode>): Likewise
7136 (aarch64_st1x2<VALLDIF:mode>): Likewise
7137 (aarch64_st1_x2_<mode>): Likewise
7138 (aarch64_st1x3<VALLDIF:mode>): Likewise
7139 (aarch64_st1_x3_<mode>): Likewise
7140 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7141 (vld1_s8_x3): Likewise.
7142 (vld1_u16_x3): Likewise.
7143 (vld1_s16_x3): Likewise.
7144 (vld1_u32_x3): Likewise.
7145 (vld1_s32_x3): Likewise.
7146 (vld1_u64_x3): Likewise.
7147 (vld1_s64_x3): Likewise.
7148 (vld1_f16_x3): Likewise.
7149 (vld1_f32_x3): Likewise.
7150 (vld1_f64_x3): Likewise.
7151 (vld1_p8_x3): Likewise.
7152 (vld1_p16_x3): Likewise.
7153 (vld1_p64_x3): Likewise.
7154 (vld1q_u8_x3): Likewise.
7155 (vld1q_s8_x3): Likewise.
7156 (vld1q_u16_x3): Likewise.
7157 (vld1q_s16_x3): Likewise.
7158 (vld1q_u32_x3): Likewise.
7159 (vld1q_s32_x3): Likewise.
7160 (vld1q_u64_x3): Likewise.
7161 (vld1q_s64_x3): Likewise.
7162 (vld1q_f16_x3): Likewise.
7163 (vld1q_f32_x3): Likewise.
7164 (vld1q_f64_x3): Likewise.
7165 (vld1q_p8_x3): Likewise.
7166 (vld1q_p16_x3): Likewise.
7167 (vld1q_p64_x3): Likewise.
7168 (vst1_s64_x2): Likewise.
7169 (vst1_u64_x2): Likewise.
7170 (vst1_f64_x2): Likewise.
7171 (vst1_s8_x2): Likewise.
7172 (vst1_p8_x2): Likewise.
7173 (vst1_s16_x2): Likewise.
7174 (vst1_p16_x2): Likewise.
7175 (vst1_s32_x2): Likewise.
7176 (vst1_u8_x2): Likewise.
7177 (vst1_u16_x2): Likewise.
7178 (vst1_u32_x2): Likewise.
7179 (vst1_f16_x2): Likewise.
7180 (vst1_f32_x2): Likewise.
7181 (vst1_p64_x2): Likewise.
7182 (vst1q_s8_x2): Likewise.
7183 (vst1q_p8_x2): Likewise.
7184 (vst1q_s16_x2): Likewise.
7185 (vst1q_p16_x2): Likewise.
7186 (vst1q_s32_x2): Likewise.
7187 (vst1q_s64_x2): Likewise.
7188 (vst1q_u8_x2): Likewise.
7189 (vst1q_u16_x2): Likewise.
7190 (vst1q_u32_x2): Likewise.
7191 (vst1q_u64_x2): Likewise.
7192 (vst1q_f16_x2): Likewise.
7193 (vst1q_f32_x2): Likewise.
7194 (vst1q_f64_x2): Likewise.
7195 (vst1q_p64_x2): Likewise.
7196 (vst1_s64_x3): Likewise.
7197 (vst1_u64_x3): Likewise.
7198 (vst1_f64_x3): Likewise.
7199 (vst1_s8_x3): Likewise.
7200 (vst1_p8_x3): Likewise.
7201 (vst1_s16_x3): Likewise.
7202 (vst1_p16_x3): Likewise.
7203 (vst1_s32_x3): Likewise.
7204 (vst1_u8_x3): Likewise.
7205 (vst1_u16_x3): Likewise.
7206 (vst1_u32_x3): Likewise.
7207 (vst1_f16_x3): Likewise.
7208 (vst1_f32_x3): Likewise.
7209 (vst1_p64_x3): Likewise.
7210 (vst1q_s8_x3): Likewise.
7211 (vst1q_p8_x3): Likewise.
7212 (vst1q_s16_x3): Likewise.
7213 (vst1q_p16_x3): Likewise.
7214 (vst1q_s32_x3): Likewise.
7215 (vst1q_s64_x3): Likewise.
7216 (vst1q_u8_x3): Likewise.
7217 (vst1q_u16_x3): Likewise.
7218 (vst1q_u32_x3): Likewise.
7219 (vst1q_u64_x3): Likewise.
7220 (vst1q_f16_x3): Likewise.
7221 (vst1q_f32_x3): Likewise.
7222 (vst1q_f64_x3): Likewise.
7223 (vst1q_p64_x3): Likewise.
7224
7225 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7226
7227 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7228 user_label_prefix to name.
7229
7230 * tree-core.h: Update comment about the format of NAME string
7231 passed to handler in attribute_spec.
7232
7233 * config/msp430/msp430.md: Remove erroneous subreg expression from
7234 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7235 zero_extend{q,h}isi2.
7236
7237 2018-05-30 Borislav Petkov <bp@suse.de>
7238
7239 * doc/extend.texi: Document some architecture specific
7240 constraints and sort entries.
7241
7242 2018-05-30 Martin Sebor <msebor@redhat.com>
7243
7244 PR middle-end/85369
7245 * builtins.c (expand_builtin_stpcpy_1): New function.
7246 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7247 only if the former succeeds.
7248
7249 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7250
7251 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7252 in saphira.
7253
7254 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7255
7256 * doc/invoke.texi (-flinker-output): Document
7257
7258 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7259
7260 * passes.c (ipa_write_summaries): Only modify statements if body
7261 is in memory.
7262 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7263 incrementally linking.
7264 (ipa_passes): Likewise.
7265 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7266 pass down resolution info.
7267 * common.opt (flag_incremental_link): Update info.
7268 * gcc.c (plugin specs): Turn flinker-output=* to
7269 -plugin-opt=-linker-output-known
7270 * toplev.c (compile_file): Also cut compilation when doing incremental
7271 link.
7272 * flag-types. (enum lto_partition_model): Add
7273 LTO_LINKER_OUTPUT_NOLTOREL.
7274 (invoke.texi): Add -flinker-output docs.
7275 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7276 link same way as WPA; do not stream in dead initializers.
7277
7278 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7279 darf2out_register_external_decl): Support incremental link.
7280
7281 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7282
7283 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7284
7285 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7286
7287 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7288 it down to simple_object_copy_lto_debug_sections.
7289 (run_gcc): Determine incremental LTO link time and configure
7290 lto1 into non-wpa mode, disable renaming of debug sections.
7291
7292 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7293
7294 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7295 descriptions of various incorrectly documented functions.
7296
7297 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7298
7299 Revert:
7300 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7301 address check not strict.
7302
7303 2018-05-30 Richard Biener <rguenther@suse.de>
7304
7305 PR tree-optimization/85964
7306 * tracer.c (better_p): Drop initialized count check, we only
7307 call the function with initialized counts now.
7308 (find_best_successor): Do find a best edge if one
7309 has uninitialized count.
7310 (find_best_predecessor): Likewise. Do BB frequency check only
7311 if count is initialized.
7312
7313 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7314
7315 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7316 (aarch64_ldrstr_offset_compare): New.
7317 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7318 load/store orderings.
7319 (aarch64_gen_adjusted_ldpstp): Likewise.
7320
7321 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7322
7323 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7324 Check for subset of GENERAL_REGS and FP_REGS.
7325 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7326 r=w alternative.
7327
7328 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7329
7330 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7331 and wi::to_poly_offset. Add the current offset and then check
7332 whether the sum fits, rather than using an unchecked addition of
7333 a checked term. Check for a shwi rather than a uhwi.
7334 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7335 (store_constructor): Use poly_int_tree_p.
7336 (expand_expr_real_1): Likewise.
7337 * function.c (assign_temp): Likewise.
7338 * fold-const.c (const_binop): Use poly_int_tree_p and
7339 wi::to_poly_offset.
7340 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7341 division.
7342 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7343 to_poly_offset for MEM offsets.
7344 * ipa-icf.c (sem_variable::equals): Likewise.
7345 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7346 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7347 wi::to_poly_offset for BIT_FIELD_REF offsets.
7348 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7349 wi::to_poly_offset.
7350 * var-tracking.c (emit_note_insn_var_location): Use
7351 tree_to_poly_uint64.
7352
7353 2018-05-29 Jim Wilson <jimw@sifive.com>
7354
7355 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7356
7357 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7358
7359 PR target/85950
7360 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7361 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7362 sequence.
7363 (sse4_1_round<mode>2): Use nonimmediate_operand
7364 for operand 1 predicate.
7365
7366 2018-05-29 Martin Sebor <msebor@redhat.com>
7367 Richard Biener <rguenther@suse.de>
7368
7369 PR testsuite/85888
7370 * calls.c (get_size_range): Call determine_value_range instead
7371 of get_value_range..
7372 * tree-vrp.h (determine_value_range): Declared new function.
7373 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7374
7375 2018-05-29 Richard Biener <rguenther@suse.de>
7376
7377 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7378 sure to use non-pattern stmts for get_earlier_stmt arguments.
7379 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7380 called on pattern stmts.
7381 (get_later_stmt): Likewise.
7382
7383 2018-05-29 Martin Liska <mliska@suse.cz>
7384
7385 PR gcov-profile/85759
7386 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7387 env variables.
7388
7389 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7390
7391 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7392 VEC_UNPACK_*_EXPR.
7393 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7394 VEC_PACK_*_EXPR.
7395
7396 PR target/85918
7397 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7398 VEC_PACK_FLOAT_EXPR): New tree codes.
7399 * tree-pretty-print.c (op_code_prio): Handle
7400 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7401 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7402 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7403 * tree-inline.c (estimate_operator_cost): Likewise.
7404 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7405 * fold-const.c (const_binop): Likewise.
7406 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7407 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7408 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7409 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7410 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7411 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7412 * expr.c (expand_expr_real_2): Likewise.
7413 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7414 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7415 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7416 optabs.
7417 * optabs.c (expand_widen_pattern_expr): For
7418 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7419 sign from result type rather than operand's type.
7420 (expand_binop_directly): For vec_packu_float_optab and
7421 vec_packs_float_optab allow result type to be different from operand's
7422 type.
7423 * optabs-tree.c (optab_for_tree_code): Handle
7424 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7425 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7426 * tree-vect-generic.c (expand_vector_operations_1): Handle
7427 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7428 VEC_PACK_FLOAT_EXPR.
7429 * tree-vect-stmts.c (supportable_widening_operation): Handle
7430 FIX_TRUNC_EXPR.
7431 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7432 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7433 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7434 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7435 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7436 mode attributes.
7437 (vec_pack<floatprefix>_float_<mode>): New expander.
7438 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7439 attributes.
7440 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7441 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7442 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7443 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7444 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7445 Document.
7446 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7447 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7448 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7449 VEC_PACK_FLOAT_EXPR): Document.
7450
7451 2018-05-29 Richard Biener <rguenther@suse.de>
7452
7453 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7454 member.
7455 (stmt_vec_info_vec): Make pointer.
7456 (init_stmt_vec_info_vec): Remove.
7457 (free_stmt_vec_info_vec): Likewise.
7458 (set_stmt_vec_info_vec): New function.
7459 (free_stmt_vec_infos): Likewise.
7460 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7461 (set_vinfo_for_stmt): Likewise.
7462 (get_earlier_stmt): Likewise.
7463 (get_later_stmt): Likewise.
7464 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7465 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7466 (vec_info::~vec_info): Free stmt_vec_infos.
7467 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7468 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7469 (pass_slp_vectorize::execute): Likewise.
7470 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7471 (free_stmt_vec_info_vec): Likewise.
7472 (set_stmt_vec_info_vec): New function.
7473 (free_stmt_vec_infos): Likewise.
7474 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7475 the global stmt_vec_info_vec.
7476 * tree-parloops.c (gather_scalar_reductions): Use
7477 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7478 vector.
7479
7480 2018-05-29 Richard Biener <rguenther@suse.de>
7481
7482 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7483
7484 2018-05-29 Martin Liska <mliska@suse.cz>
7485 David Malcolm <dmalcolm@redhat.com>
7486
7487 * vec.c (test_reverse): New.
7488 (vec_c_tests): Add new test.
7489 * vec.h (vl_ptr>::reverse): New function.
7490
7491 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7492
7493 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7494
7495 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7496 and later.
7497
7498 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7499
7500 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7501
7502 2018-05-28 Richard Biener <rguenther@suse.de>
7503
7504 PR tree-optimization/85933
7505 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7506 look at stmts marked as vectorizable.
7507
7508 2018-05-28 Richard Biener <rguenther@suse.de>
7509
7510 PR tree-optimization/85934
7511 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7512 vector boolean check before scalar optimization.
7513
7514 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7515
7516 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7517 for armv5te.
7518
7519 2018-05-28 Mark Wielaard <mark@klomp.org>
7520
7521 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7522 if it is an expression containing a minus sign.
7523
7524 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7525
7526 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7527
7528 2018-05-27 Paul Koning <ni1d@arrl.net>
7529
7530 * config/pdp11/pdp11.md (truncsihi2): Remove.
7531
7532 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7533 Chung-Ju Wu <jasonwucj@gmail.com>
7534
7535 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7536 implementation.
7537 (unaligned_store_dw): Ditto.
7538 * config/nds32/nds32-memory-manipulation.c
7539 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7540 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7541 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7542 (emit_setmem_word_loop): Rename to ...
7543 (emit_setmem_doubleword_loop): ... this.
7544 (nds32_gen_dup_4_byte_to_word_value): New function.
7545 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7546 (nds32_expand_setmem_loop): Refine implementation.
7547 (nds32_expand_setmem_loop_v3m): Ditto.
7548 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7549 pattern.
7550
7551 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7552
7553 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7554
7555 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7556
7557 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7558 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7559 machine->attr_no_prologue_p.
7560 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7561 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7562 (nds32_expand_epilogue): Consider attr_naked_p.
7563 (nds32_expand_epilogue_v3pop): Likewise.
7564 (nds32_can_use_return_insn): Likewise.
7565 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7566 attr_no_prologue_p fields.
7567 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7568
7569 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7570
7571 PR target/85918
7572 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7573 attributes.
7574 * config/i386/sse.md
7575 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7576 Rename to ...
7577 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7578 ... this.
7579 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7580 Rename to ...
7581 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7582 ... this.
7583 (*<floatsuffix>floatv2div2sf2): Rename to ...
7584 (*float<floatunssuffix>v2div2sf2): ... this.
7585 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7586 (float<floatunssuffix>v2div2sf2_mask): ... this.
7587 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7588 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7589 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7590 to ...
7591 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7592 ... this.
7593 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7594 Rename to ...
7595 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7596 ... this.
7597 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7598 Rename to ...
7599 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7600 ... this.
7601 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7602 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7603 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7604 gen_ufix_truncv8dfv8si2.
7605 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7606 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7607 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7608 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7609 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7610 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7611 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7612 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7613
7614 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7615
7616 PR target/85900
7617 PR target/85345
7618 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7619
7620 2018-05-25 Jim Wilson <jimw@sifive.com>
7621
7622 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7623 * config/riscv/riscv.c (struct machine_function): Add
7624 interrupt_handler_p and attribute_checked_p fields.
7625 (riscv_attribute_table): Add interrupt.
7626 (riscv_interrupt_type_p): New.
7627 (riscv_save_reg_p): Save extra regs for interrupt handler.
7628 (riscv_use_save_libcall): Return false for interrupt handler.
7629 (riscv_first_stack_step): Add forward declaration.
7630 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
7631 for interrupt handler with large frame. Use it for saved reg list.
7632 (riscv_expand_prologue): Move flag_stack_usage_info support to
7633 eliminate duplication.
7634 (riscv_expand_epilogue): Generate mret for interrupt handler.
7635 (riscv_epilogue_uses): New.
7636 (riscv_can_use_return_insn): Return false for interrupt handler.
7637 (riscv_function_ok_for_sibcall): Likewise.
7638 (riscv_set_current_function): Add interrupt handler support.
7639 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7640 * config/riscv/riscv.md (UNSPECV_MRET): New.
7641 (GP_REGNUM): New.
7642 (riscv_frflags, riscv_fsflags): Use tab after opcode.
7643 (riscv_mret): New.
7644 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7645
7646 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
7647
7648 PR tree-optimization/85712
7649 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7650 this candidate has already been replaced in-situ by a copy.
7651
7652 2018-05-25 Jason Merrill <jason@redhat.com>
7653
7654 PR c++/80485 - inline function non-zero address.
7655 * symtab.c (nonzero_address): Check DECL_COMDAT.
7656
7657 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
7658
7659 PR target/83628
7660 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7661 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7662 extension of SImode operation. Use const123_operand predicate.
7663 (*saddsi_1): Remove.
7664 (*saddl_se_1): Ditto.
7665 (*ssubsi_1): Ditto.
7666 (*ssubl_se_1): Ditto.
7667 * config/alpha/predicates.md (const123_operand): New predicate.
7668 * config/alpha/constraints.md (P): Use IN_RANGE.
7669
7670 2018-05-25 Richard Biener <rguenther@suse.de>
7671
7672 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7673 defaulted to true.
7674 (ref_maybe_used_by_stmt_p): Likewise.
7675 (stmt_may_clobber_ref_p): Likewise.
7676 (stmt_may_clobber_ref_p_1): Likewise.
7677 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7678 and pass it along.
7679 (ref_maybe_used_by_stmt_p): Likewise.
7680 (stmt_may_clobber_ref_p): Likewise.
7681 (stmt_may_clobber_ref_p_1): Likewise.
7682 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7683 the alias oracle to disambiguate DRs with stmts DR analysis
7684 couldn't handle.
7685 (vect_analyze_data_refs): Do not give up on not analyzable
7686 DRs for BB vectorization. Remove code truncating the dataref
7687 vector.
7688
7689 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7690
7691 PR target/85832
7692 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7693 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7694 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7695
7696 2018-05-25 Richard Biener <rguenther@suse.de>
7697
7698 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7699 function, combining stmt data ref gathering and fatal analysis
7700 parts.
7701 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7702 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7703 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7704 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7705 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7706
7707 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7708
7709 PR tree-optimization/85720
7710 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7711 SCC if all partitions are builtins.
7712 (version_loop_by_alias_check): New parameter. Generate cancelable
7713 runtime alias check if all partitions are builtins.
7714 (distribute_loop): Update call to above function.
7715
7716 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7717
7718 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7719 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7720 (parm_default_def_partition_arg): Ditto.
7721 (set_parm_default_def_partition): Ditto.
7722 (get_parm_default_def_partitions): Ditto and make it static.
7723 (get_undefined_value_partitions): Ditto and make it static.
7724 (remove_ssa_form): Refactor call to init_var_map here.
7725 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7726 computation for loop region.
7727 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7728 (register_default_def): Delete.
7729 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7730 (parm_default_def_partition_arg): Ditto.
7731 (set_parm_default_def_partition): Ditto.
7732 (get_parm_default_def_partitions): Ditto and make it static.
7733 (get_undefined_value_partitions): Ditto and make it static.
7734 (coalesce_with_default, coalesce_with_default): Update comment.
7735 (create_coalesce_list_for_region): New func factored out from
7736 create_outofssa_var_map.
7737 (populate_coalesce_list_for_outofssa): New func factored out from
7738 create_outofssa_var_map and coalesce_ssa_name.
7739 (create_outofssa_var_map): Delete.
7740 (coalesce_ssa_name): Refactor to support live range computation.
7741 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7742 (get_parm_default_def_partitions): Delete.
7743 (get_undefined_value_partitions): Ditto.
7744 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7745 computation for loop region.
7746 (new_tree_live_info, loe_visit_block): Ditto.
7747 (live_worklist, set_var_live_on_entry): Ditto.
7748 (calculate_live_on_exit, verify_live_on_entry): Ditto.
7749 * tree-ssa-live.h (struct _var_map): New fields.
7750 (init_var_map): Change decl.
7751 (region_contains_p): New.
7752
7753 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7754
7755 * tree-ssa-live.h (live_merge_and_clear): Delete.
7756
7757 2018-05-25 Richard Biener <rguenther@suse.de>
7758
7759 PR c++/85912
7760 * tree-dump.c (dequeue_and_dump): Remove access to removed
7761 operand 2 of a SWITCH_EXPR.
7762
7763 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7764
7765 * doc/sourcebuild.texi (vect_double_cond_arith): Include
7766 multiplication and division.
7767 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7768 (cond_udiv@var{m}, cond_umod@var{m}): Document.
7769 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7770 (cond_udiv_optab, cond_umod_optab): New optabs.
7771 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7772 (IFN_COND_RDIV): New internal functions.
7773 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7774 TRUNC_MOD_EXPR and RDIV_EXPR.
7775 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7776 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7777 New unspecs.
7778 (SVE_INT_BINARY): Include mult.
7779 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7780 (optab, sve_int_op): Handle mult.
7781 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7782 UNSPEC_COND_DIV.
7783 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7784 for SVE_INT_BINARY_SD.
7785
7786 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7787
7788 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7789 (optab, sve_int_op): Handle div and udiv.
7790 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7791 for SVE_INT_BINARY_SD.
7792 (*<optab><mode>3): New insn for the same.
7793
7794 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7795
7796 * tree-vect-patterns.c: Include predict.h.
7797 (vect_recog_divmod_pattern): Restrict check for division support
7798 to when optimizing for size.
7799
7800 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7801
7802 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7803 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7804 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7805 (gimple_match_op::set_op): Likewise.
7806 (gimple_resimplify4): Declare.
7807 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7808 (expr::gen_transform): Likewise.
7809 (decision_tree::gen): Generate a simplification routine for 4 operands.
7810 * gimple-match-head.c (gimple_simplify): Add an overload for
7811 4 operands. In the top-level function, handle up to 4 call
7812 arguments and call gimple_resimplify4.
7813 (gimple_resimplify4): New function.
7814 (build_call_internal): Pass a fourth operand.
7815 (maybe_push_to_seq): Likewise.
7816 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7817 Fold VEC_COND_EXPRs of an operation and a default value into
7818 an IFN_COND_* function if possible.
7819 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7820 New unspecs.
7821 (SVE_COND_FP_BINARY): Include them.
7822 (optab, sve_fp_op): Handle them.
7823 (SVE_INT_BINARY_REV): New code iterator.
7824 (SVE_COND_FP_BINARY_REV): New int iterator.
7825 (commutative): New int attribute.
7826 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7827 Declare.
7828 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7829 function.
7830 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7831 (*cond_<optab><mode>): New patterns for reversed operands.
7832
7833 2018-05-25 Richard Biener <rguenther@suse.de>
7834
7835 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7836 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7837 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7838 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7839 * tree-vect-data-refs.c (everywhere): Adjust users.
7840 * tree-vect-loop.c (everywhere): Likewise.
7841 * tree-vect-slp.c (everywhere): Likewise.
7842 * tree-vect-stmts.c (everywhere): Likewise.
7843 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7844
7845 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7846
7847 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7848 Rename to...
7849 (gcc_cv_as_section_exclude): ... this.
7850 Try Solaris as #exclude syntax.
7851 * configure: Regenerate.
7852 * config.in: Regenerate.
7853 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7854 SECTION_EXCLUDE.
7855 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7856 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7857
7858 * varasm.c (default_elf_asm_named_section): Don't check if
7859 HAVE_GAS_SECTION_EXCLUDE is defined.
7860
7861 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7862
7863 * doc/md.texi: Update the documentation of the cond_* optabs
7864 to mention the new final operand. Fix GET_MODE_NUNITS call.
7865 Describe the scalar case too.
7866 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7867 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7868 instead of 2.
7869 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7870 (get_conditional_internal_fn): Update comment.
7871 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7872 accumulator value as a final argument to conditional functions.
7873 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7874 a define_expand and add an "else" operand. Assert for now that
7875 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7876 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7877 (*cond_<optab><mode>): New patterns.
7878 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7879 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7880 (UNSPEC_COND_EOR): Delete.
7881 (optab): Remove associated mappings.
7882 (SVE_INT_BINARY): New code iterator.
7883 (sve_int_op): Remove int attribute and add "minus" to the code
7884 attribute.
7885 (SVE_COND_INT_OP): Delete.
7886 (SVE_COND_FP_OP): Rename to...
7887 (SVE_COND_FP_BINARY): ...this.
7888
7889 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7890
7891 * optabs.c (can_reuse_operands_p): New function.
7892 (maybe_legitimize_operands): Try to reuse the results for
7893 earlier operands.
7894
7895 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7896
7897 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7898 Add {q} suffix to insn mnemonic.
7899
7900 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7901
7902 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7903 (msp430_warn_func_return): New.
7904
7905 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7906
7907 * fold-const.c (tree_nonzero_bits): New function.
7908 * fold-const.h (tree_nonzero_bits): Likewise.
7909 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7910 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7911
7912 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7913
7914 PR target/85900
7915 PR target/85345
7916 * varasm.c (assemble_alias): Check ifunc_resolver only on
7917 FUNCTION_DECL.
7918
7919 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7920
7921 PR target/85903
7922 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7923 when memory input operand is handled.
7924
7925 2018-05-24 Luis Machado <luis.machado@linaro.org>
7926
7927 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7928 global.
7929 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7930
7931 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7932
7933 * match.pd: Delay FMA folds until after vectorization.
7934
7935 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7936
7937 PR target/83009
7938 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7939 address check not strict.
7940
7941 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7942
7943 * gimple-match.h (gimple_match_op): New class.
7944 (mprts_hook): Replace parameters with a gimple_match_op *.
7945 (maybe_build_generic_op): Likewise.
7946 (gimple_simplified_result_is_gimple_val): Replace parameters with
7947 a const gimple_match_op *.
7948 (gimple_simplify): Replace code_helper * and tree * parameters with
7949 a gimple_match_op * parameter.
7950 (gimple_resimplify1): Replace code_helper *, tree and tree *
7951 parameters with a gimple_match_op * parameter.
7952 (gimple_resimplify2): Likewise.
7953 (gimple_resimplify3): Likewise.
7954 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7955 parameters with a gimple_match_op * parameter.
7956 * gimple-match-head.c (gimple_simplify): Change prototypes of
7957 auto-generated functions to take a gimple_match_op * instead of
7958 separate code_helper * and tree * parameters. Make the same
7959 change in the top-level overload and update calls to the
7960 gimple_resimplify routines. Update calls to the auto-generated
7961 functions and to maybe_push_res_to_seq in the publicly-facing
7962 operation-specific gimple_simplify overloads.
7963 (gimple_match_op::MAX_NUM_OPS): Define.
7964 (gimple_resimplify1): Replace rcode and ops with a single res_op
7965 parameter. Update call to gimple_simplify.
7966 (gimple_resimplify2): Likewise.
7967 (gimple_resimplify3): Likewise.
7968 (mprts_hook): Replace parameters with a gimple_match_op *.
7969 (maybe_build_generic_op): Likewise.
7970 (build_call_internal): Replace type, nargs and ops with
7971 a gimple_match_op *.
7972 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7973 with a single gimple_match_op *. Update calls to mprts_hook,
7974 build_call_internal and gimple_simplified_result_is_gimple_val.
7975 Factor out code that is common to the tree_code and combined_fn cases.
7976 * genmatch.c (expr::gen_transform): Replace tem_code and
7977 tem_ops with a gimple_match_op called tem_op. Update calls
7978 to the gimple_resimplify functions and maybe_push_res_to_seq.
7979 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7980 res_ops. Update call to the gimple_resimplify functions.
7981 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7982 (decision_tree::gen): Make the functions take a gimple_match_op *
7983 called res_op instead of separate res_code and res_ops parameters.
7984 Update call accordingly.
7985 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7986 and ops with a single res_op parameter. Update calls to
7987 maybe_build_generic_op and maybe_push_res_to_seq.
7988 (fold_stmt_1): Update calls to gimple_simplify and
7989 replace_stmt_with_simplification.
7990 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7991 and gimple_simplified_result_is_gimple_val.
7992 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7993 gimple_simplify.
7994 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7995 with a gimple_match_op *.
7996 (vn_nary_build_or_lookup): Likewise. Update call to
7997 vn_nary_build_or_lookup_1.
7998 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7999 gimple_match_op *. Update calls to the gimple_resimplify routines
8000 and to gimple_simplified_result_is_gimple_val.
8001 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8002 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8003 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8004 (visit_nary_op): Likewise.
8005 (visit_reference_op_load): Likewise.
8006
8007 2018-05-23 Luis Machado <luis.machado@linaro.org>
8008
8009 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8010 modifier for printing the step amount.
8011
8012 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
8013
8014 PR target/78849
8015 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8016 types.
8017
8018 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
8019
8020 * doc/sourcebuild.texi (Endianness): New subsubsection.
8021
8022 2018-05-23 Luis Machado <luis.machado@linaro.org>
8023
8024 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8025 <prefetch_dynamic_strides>: New const bool field.
8026 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8027 prefetch_dynamic_strides.
8028 (exynosm1_prefetch_tune): Likewise.
8029 (thunderxt88_prefetch_tune): Likewise.
8030 (thunderx_prefetch_tune): Likewise.
8031 (thunderx2t99_prefetch_tune): Likewise.
8032 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8033 false.
8034 (aarch64_override_options_internal): Update to set
8035 PARAM_PREFETCH_DYNAMIC_STRIDES.
8036 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8037 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8038 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8039 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8040 prefetch-dynamic-strides setting.
8041
8042 2018-05-23 Luis Machado <luis.machado@linaro.org>
8043
8044 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8045 <minimum_stride>: New const int field.
8046 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8047 minimum_stride field defaulting to -1.
8048 (exynosm1_prefetch_tune): Likewise.
8049 (thunderxt88_prefetch_tune): Likewise.
8050 (thunderx_prefetch_tune): Likewise.
8051 (thunderx2t99_prefetch_tune): Likewise.
8052 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8053 <default_opt_level>: Set to 3.
8054 (aarch64_override_options_internal): Update to set
8055 PARAM_PREFETCH_MINIMUM_STRIDE.
8056 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8057 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8058 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8059 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8060 stride is constant and is below the minimum stride threshold.
8061
8062 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8063
8064 * config/arm/arm-cpus.in (mode26): Delete.
8065 (armv4): Delete mode26 reference.
8066 * config/arm/arm.c (arm_configure_build_target): Delete use of
8067 isa_bit_mode26.
8068
8069 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8070
8071 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8072 New insn pattern.
8073 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8074 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8075 for non-SSE modes.
8076 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8077 (floatunsdidf2): Ditto.
8078
8079 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8080
8081 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8082 (fixuns_trunc<mode>si2_avx512f): Ditto.
8083 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8084 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8085 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8086
8087 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8088
8089 PR rtl-optimization/79985
8090 * df-scan.c (df_insn_refs_collect): Remove special case for
8091 global registers and asm statements.
8092
8093 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8094
8095 * extend.texi (Global Register Variables): Rewrite the bullet list.
8096 Note that the register is available for allocation. Note that access
8097 via inline asm must use constraints. Add note about async-signal
8098 handlers. Remove paragraph about automagic register selection.
8099
8100 2018-05-23 Richard Biener <rguenther@suse.de>
8101
8102 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8103 of fixed offset from memset VN.
8104
8105 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8106
8107 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8108 first_interp field.
8109 (alloc_cand_and_find_basis): Initialize first_interp field.
8110 (slsr_process_mul): Modify first_interp field.
8111 (slsr_process_add): Likewise.
8112 (slsr_process_cast): Modify first_interp field for each new
8113 interpretation.
8114 (slsr_process_copy): Likewise.
8115 (dump_candidate): Dump first_interp field.
8116 (replace_mult_candidate): Process all interpretations, not just
8117 subsequent ones.
8118 (replace_rhs_if_not_dup): Likewise.
8119 (replace_one_candidate): Likewise.
8120
8121 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8122
8123 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8124 Add new boolean.
8125 (aarch64_needs_frame_chain): New function.
8126 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8127
8128 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8129
8130 PR target/84882
8131 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8132 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8133 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8134 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8135 as true for strict-align.
8136 (aarch64_can_inline_p): Perform checks even when callee has no
8137 attributes to check for strict alignment.
8138 * doc/extend.texi (AArch64 Function Attributes): Document
8139 no-strict-align.
8140 * doc/invoke.texi: (AArch64 Options): Likewise.
8141
8142 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
8143
8144 PR tree-optimization/85853
8145 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8146 the handling of the root of the node to...
8147 (vect_slp_analyze_node_operations_1): ...this new function,
8148 and run the whole thing with the child nodes' def types
8149 set according to their SLP node's def type.
8150
8151 2018-05-23 Richard Biener <rguenther@suse.de>
8152
8153 PR middle-end/85874
8154 * tree-data-ref.c (create_runtime_alias_checks): Defer
8155 and ignore overflow warnings.
8156
8157 2018-05-23 Yury Gribov <tetra2005@gmail.com>
8158
8159 PR tree-optimization/85822
8160 * tree-vrp.c (is_masked_range_test): Fix handling of negative
8161 constants.
8162
8163 2018-05-23 Richard Biener <rguenther@suse.de>
8164
8165 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8166 memset constants via native_interpret_expr.
8167
8168 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
8169
8170 PR target/85345
8171 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8172 attribute.
8173 (cgraph_node::create_alias): Likewise.
8174 (cgraph_node::get_availability): Check ifunc_resolver instead
8175 of looking up ifunc attribute.
8176 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8177 * varasm.c (do_assemble_alias): Likewise.
8178 (assemble_alias): Likewise.
8179 (default_binds_local_p_3): Likewise.
8180 * cgraph.h (cgraph_node): Add ifunc_resolver.
8181 (cgraph_node::only_called_directly_or_aliased_p): Return false
8182 for IFUNC resolver.
8183 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8184 attribute.
8185 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8186 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8187 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8188 instead of looking up ifunc attribute.
8189
8190 2018-05-22 Luis Machado <luis.machado@linaro.org>
8191
8192 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8193
8194 2018-05-22 Martin Sebor <msebor@redhat.com>
8195
8196 PR middle-end/85359
8197 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8198 only when expasion succeeds.
8199 (expand_builtin_strcmp): Same.
8200 (expand_builtin_strncmp): Same.
8201
8202 2018-05-22 Martin Sebor <msebor@redhat.com>
8203
8204 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8205
8206 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8207 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8208
8209 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8210 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8211 code.
8212 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8213 Add check for legitimate_address.
8214 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8215 (aarch64_swap_ldrstr_operands): New.
8216 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8217 Define prototype.
8218
8219 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8220 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8221
8222 * config/aarch64/aarch64.md: New patterns to generate stp
8223 and ldp.
8224 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8225 single words and double words.
8226 (load_pair_sw, load_pair_dw): Likewise.
8227 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8228 Delete.
8229 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8230 Delete.
8231 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8232 for different mode ldpstp and add peephole for merged zero stores.
8233 Likewise for loads.
8234 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8235 Add size check.
8236 (aarch64_gen_store_pair): Rename calls to match new patterns.
8237 (aarch64_gen_load_pair): Rename calls to match new patterns.
8238 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8239 (load_pair<DREG:mode><DREG2:mode>): ... This.
8240 (store_pair<mode>): Rename to...
8241 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8242 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8243 New mode iterators.
8244 (V_INT_EQUIV): Handle SImode.
8245 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8246 New predicate.
8247
8248 2018-05-22 Martin Sebor <msebor@redhat.com>
8249
8250 PR c/85623
8251 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8252 or ajust the presumed bound on an operation to avoid unnecessary
8253 warnings.
8254
8255 2018-05-22 Martin Sebor <msebor@redhat.com>
8256
8257 PR tree-optimization/85826
8258 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8259 assuming that a DECL necesarily has a constant size.
8260
8261 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8262
8263 PR middle-end/85862
8264 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8265
8266 2018-05-22 Richard Biener <rguenther@suse.de>
8267
8268 PR tree-optimization/85834
8269 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8270 non-constant and non-zero memset arguments.
8271
8272 2018-05-22 Martin Liska <mliska@suse.cz>
8273
8274 PR ipa/85607
8275 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8276
8277 2018-05-22 Richard Biener <rguenther@suse.de>
8278
8279 PR tree-optimization/85863
8280 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8281 comparisons when vectype is specified.
8282 (vectorizable_condition): Do not specify vectype for
8283 vect_is_simple_cond when SLP vectorizing.
8284
8285 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8286
8287 PR target/85657
8288 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8289 define __ibm128 as long double.
8290 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8291 as a distinct type when IEEE 128-bit support is enabled.
8292 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8293 128-bit types to use the correct functions.
8294 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8295 convert between 128-bit floating point types that have different
8296 modes but the same representation, instead of using gen_lowpart to
8297 makean alias.
8298 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8299 KFmode.
8300 (IFKF_reg): New attributes to give the register constraints for
8301 IFmode and KFmode.
8302 (extend<mode>tf2_internal): New insns to mark an explicit
8303 conversion between 128-bit floating point types that have a
8304 different mode but share the same representation.
8305
8306 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8307
8308 PR tree-optimization/85814
8309 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8310 a null return from get_strinfo when unsharing the next
8311 strinfo in the chain.
8312
8313 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8314
8315 PR gcc/84923
8316 * varasm.c (weak_finish): Clean up weak_decls.
8317
8318 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8319
8320 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8321 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8322 UNSPEC_UADALP values.
8323 * config/aarch64/iterators.md (ABAL): New int iterator.
8324 (ABDL2): Likewise.
8325 (ADALP): Likewise.
8326 (sur): Add mappings for the above.
8327 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8328 New define_insn.
8329 (aarch64_<sur>abal<mode>_4): Likewise.
8330 (aarch64_<sur>adalp<mode>_3): Likewise.
8331 (<sur>sadv16qi): New define_expand.
8332
8333 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8334
8335 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8336 (*movdf_internal): Ditto.
8337 (*rcpsf2_sse): Ditto.
8338 (*rsqrtsf2_sse): Ditto.
8339 (*sqrt<mode>2_sse): Ditto.
8340
8341 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8342
8343 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8344 eor3q<mode>4.
8345 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8346 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8347 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8348 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8349 vbcaxq_s64): New.
8350 * config/aarch64/arm_neon.h: Likewise.
8351 * config/aarch64/iterators.md (VQ_I): New.
8352
8353 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8354
8355 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8356 arc*-*-linux*.
8357 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8358 MULTILIB_DIRNAMES
8359
8360 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8361
8362 * config/nds32/constraints.md (S): New constraint.
8363 * config/nds32/nds32.md (call_internal): Use constraint S.
8364 (call_value_internal): Likewise.
8365 (sibcall_internal): Likewise.
8366 (sibcall_value_internal): Likewise.
8367
8368 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8369 Chung-Ju Wu <jasonwucj@gmail.com>
8370
8371 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8372 into consideration.
8373
8374 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8375 Chung-Ju Wu <jasonwucj@gmail.com>
8376
8377 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8378 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8379 (nds32_rtx_costs_impl): Simplify.
8380 (nds32_address_cost_impl): Simplify.
8381 (nds32_init_rtx_costs): New function.
8382 (nds32_rtx_costs_speed_prefer): Likewise.
8383 (nds32_rtx_costs_size_prefer): Likewise.
8384 (nds32_address_cost_speed_prefer): Likewise.
8385 (nds32_address_cost_speed_fwprop): Likewise.
8386 (nds32_address_cost_size_prefer): Likewise.
8387 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8388 * config/nds32/nds32.c (nds32_option_override): Use
8389 nds32_init_rtx_costs function.
8390
8391 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8392
8393 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8394 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8395 (TARGET_PIPELINE_N8): Likewise.
8396 (TARGET_PIPELINE_N10): Likewise.
8397 (TARGET_PIPELINE_N13): Likewise.
8398 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8399
8400 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8401
8402 * config/nds32/nds32-fpu.md: Update copyright year.
8403
8404 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8405
8406 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8407
8408 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8409
8410 * config/nds32/nds32.c
8411 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8412 * config/nds32/nds32.opt (minline-asm-r15): New option.
8413
8414 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8415
8416 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8417 MASK_HW_ABS.
8418 * config/nds32/nds32.md (abssi2): New pattern.
8419
8420 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8421
8422 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8423 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8424 Merge insn pattern from sse_cvtsi2ss<round_name> and
8425 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8426 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8427 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8428 using SWI48 mode iterator.
8429 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8430 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8431 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8432 pattern from sse_cvttss2si<round_saeonly_name>
8433 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8434 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8435 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8436 using SWI48 mode iterator.
8437 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8438 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8439 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8440 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8441 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8442 using SWI48 mode iterator.
8443 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8444 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8445 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8446 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8447 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8448 SWI48 mode iterator.
8449 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8450 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8451 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8452 pattern from sse_cvttsd2si<round_saeonly_name>
8453 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8454
8455 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8456
8457 * config/nds32/nds32-md-auxiliary.c
8458 (nds32_valid_smw_lwm_base_p): Refine.
8459 (nds32_output_smw_single_word): Refine.
8460 (nds32_output_smw_double_word): New.
8461 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8462
8463 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8464
8465 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8466 (nds32_output_stack_pop): Refine.
8467 (nds32_expand_unaligned_load): Refine.
8468 (nds32_expand_unaligned_store): Refine.
8469
8470 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8471 Chung-Ju Wu <jasonwucj@gmail.com>
8472
8473 * config/nds32/constants.md: Add TP_REGNUM constant.
8474 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8475 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8476 UNSPEC_ADD32.
8477 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8478 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8479 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8480 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8481 and PIC code generation.
8482 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8483 code generation.
8484 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8485 optimization.
8486 * config/nds32/nds32.md: Support TLS and PIC.
8487 * config/nds32/nds32.c: Support TLS and PIC.
8488 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8489 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8490 predicate.
8491
8492 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8493
8494 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8495 mode with E_ prefix.
8496
8497 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8498 Chung-Ju Wu <jasonwucj@gmail.com>
8499
8500 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8501 * config/nds32/nds32-md-auxiliary.c
8502 (symbolic_reference_mentioned_p): New.
8503 (nds32_legitimize_ict_address): New.
8504 (nds32_expand_ict_move): New.
8505 (nds32_indirect_call_referenced_p): New.
8506 (nds32_symbol_binds_local_p): Delete.
8507 (nds32_long_call_p): Modify.
8508 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8509 * config/nds32/nds32-protos.h
8510 (symbolic_reference_mentioned_p): Declare.
8511 (nds32_legitimize_ict_address): Declare.
8512 (nds32_expand_ict_move): Declare.
8513 (nds32_indirect_call_referenced_p): Declare.
8514 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8515 (nds32_relax_group): Use nds32_ict_const_p as condition.
8516 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8517 (nds32_asm_file_start): Output ict_model directive in asm code.
8518 (nds32_legitimate_address_p): Consider indirect call.
8519 (nds32_print_operand): Consider indirect call.
8520 (nds32_print_operand_address): Consider indirect call.
8521 (nds32_insert_attributes): Handle "indirect_call" attribute.
8522 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8523 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8524 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8525 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8526 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8527 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8528 (TARGET_ICT_MODEL_SMALL): Define.
8529 (TARGET_ICT_MODEL_LARGE): Define.
8530 * config/nds32/nds32.md (movsi): Consider ict model.
8531 (call, call_value): Consider ict model.
8532 (sibcall, sibcall_value): Consider ict model.
8533 * config/nds32/nds32.opt (mict-model): New option.
8534 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8535 model.
8536
8537 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8538 Monk Chiang <sh.chiang04@gmail.com>
8539 Jim Wilson <jimw@sifive.com>
8540
8541 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8542 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8543 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8544 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8545 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8546 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8547 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8548 compute save_libcall_adjustment properly.
8549 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8550 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8551 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8552 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8553 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8554 (ABI_SPEC): Handle mabi=ilp32e.
8555 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8556 (RVE): Add RVE mask.
8557 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8558 <-march>: Add rv32e as an example.
8559
8560 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8561
8562 PR c++/82899
8563 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8564 (intra_create_variable_infos): Handle C++ constructors.
8565
8566 2018-05-18 Martin Liska <mliska@suse.cz>
8567
8568 * passes.def: Remove a redundant pass.
8569
8570 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8571
8572 PR bootstrap/85838
8573 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8574
8575 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8576
8577 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8578 (ARMv4): Update.
8579 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8580 (ARMv6m): Update.
8581 (armv2, armv2a, armv3, armv3m): Delete architectures.
8582 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8583 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8584 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8585 Delete cpus.
8586 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8587 (*mulsidi3adddi): Likewise.
8588 (mulsidi3): Likewise.
8589 (*mulsidi3_nov6): Likewise.
8590 (umulsidi3): Likewise.
8591 (umulsidi3_nov6): Likewise.
8592 (umaddsidi4): Likewise.
8593 (*umulsidi3adddi): Likewise.
8594 (smulsi3_highpart): Likewise.
8595 (*smulsi3_highpart_nov6): Likewise.
8596 (umulsi3_highpart): Likewise.
8597 (*umulsi3_highpart_nov6): Likewise.
8598 * config/arm/arm.h (arm_arch3m): Delete.
8599 * config/arm/arm.c (arm_arch3m): Delete.
8600 (arm_option_override_internal): Update armv3-related comment.
8601 (arm_configure_build_target): Delete use of isa_bit_mode32.
8602 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8603 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8604 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8605 (mulsa3): Likewise.
8606 (mulusa3): Likewise.
8607 * config/arm/arm-protos.h (arm_arch3m): Delete.
8608 * config/arm/arm-tables.opt: Regenerate.
8609 * config/arm/arm-tune.md: Likewise.
8610 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8611 deleted architectures.
8612
8613 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8614
8615 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8616 (armv5t, armv5te): New features.
8617 (ARMv5, ARMv5e): Delete fgroups.
8618 (ARMv5t, ARMv5te): Adjust for above changes.
8619 (ARMv6m): Likewise.
8620 (armv5, armv5e): Delete arches.
8621 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8622 arm_arch5.
8623 (*call_reg_arm): Likewise.
8624 (*call_value_reg_armv5): Likewise.
8625 (*call_value_reg_arm): Likewise.
8626 (*call_symbol): Likewise.
8627 (*call_value_symbol): Likewise.
8628 (*sibcall_insn): Likewise.
8629 (*sibcall_value_insn): Likewise.
8630 (clzsi2): Likewise.
8631 (prefetch): Likewise.
8632 (define_split and define_peephole2 dependent on arm_arch5):
8633 Likewise.
8634 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8635 arm_arch5e.
8636 (TARGET_ARM_QBIT): Likewise.
8637 (TARGET_DSP_MULTIPLY): Likewise.
8638 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8639 (arm_arch5, arm_arch5e): Delete.
8640 (arm_arch5t, arm_arch5te): Declare.
8641 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8642 (arm_arch5t): Declare.
8643 (arm_option_reconfigure_globals): Update for the above.
8644 (arm_options_perform_arch_sanity_checks): Update comment, replace
8645 use of arm_arch5 with arm_arch5t.
8646 (use_return_insn): Likewise.
8647 (arm_emit_call_insn): Likewise.
8648 (output_return_instruction): Likewise.
8649 (arm_final_prescan_insn): Likewise.
8650 (arm_coproc_builtin_available): Likewise.
8651 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8652 arm_arch5e with arm_arch5t and arm_arch5te.
8653 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8654 (arm_arch5t, arm_arch5te): Declare.
8655 * config/arm/arm-tables.opt: Regenerate.
8656 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8657 * config/arm/t-multilib: Likewise.
8658 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8659 instead of arm_arch5.
8660 (*call_reg_thumb1): Likewise.
8661 (*call_value_reg_thumb1_v5): Likewise.
8662 (*call_value_reg_thumb1): Likewise.
8663 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8664 unreachable path.
8665 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8666
8667 2018-05-18 Martin Liska <mliska@suse.cz>
8668
8669 PR gcov-profile/84846
8670 * doc/gcov.texi: Document -t option of gcov tool.
8671
8672 2018-05-18 Martin Liska <mliska@suse.cz>
8673
8674 PR gcov-profile/84846
8675 * gcov.c (print_usage): Add new -t option.
8676 (process_args): Handle the option.
8677 (generate_results): Use stdout as output when requested by
8678 the option.
8679
8680 2018-05-18 Martin Liska <mliska@suse.cz>
8681
8682 PR gcov-profile/84846
8683 * coverage.c (coverage_init): Write PWD to .gcno file.
8684 * doc/gcov.texi: Document how working directory is printed.
8685 * gcov-dump.c (dump_gcov_file): Print PWD.
8686 * gcov.c (output_intermediate_file): Likewise.
8687 (read_graph_file): Read PWD string.
8688 (output_lines): Print PWD.
8689
8690 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8691
8692 PR middle-end/85817
8693 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8694 for retval and return false if all args to phi are zero.
8695
8696 2018-05-18 Richard Biener <rguenther@suse.de>
8697
8698 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8699 method.
8700 (evrp_dom_walker::before_dom_children): Call it.
8701
8702 2018-05-18 Richard Biener <rguenther@suse.de>
8703
8704 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8705 results when processing array refs with variable index.
8706
8707 2018-05-18 Toon Moene <toon@moene.org>
8708
8709 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8710 directly after that of -floop-interchange. Indicate that both
8711 options are enabled by default when specifying -O3.
8712
8713 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8714
8715 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8716 iterator. Delete separate integer-mode vec_set<mode> expander.
8717 (aarch64_simd_vec_setv2di): Delete.
8718 (vec_setv2di): Delete.
8719 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8720 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
8721 the "w, r" alternative.
8722
8723 2018-05-18 Martin Liska <mliska@suse.cz>
8724
8725 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8726 * tree-pass.h (make_pass_lower_switch_O0): New function.
8727 * tree-switch-conversion.c (node_has_low_bound): Remove.
8728 (node_has_high_bound): Likewise.
8729 (node_is_bounded): Likewise.
8730 (class pass_lower_switch): Make it a template type and create
8731 two instances.
8732 (pass_lower_switch::execute): Add template argument.
8733 (make_pass_lower_switch): New function.
8734 (make_pass_lower_switch_O0): New function.
8735 (do_jump_if_equal): Remove.
8736 (emit_case_nodes): Simplify to just handle all 3 cases and leave
8737 all the hard work to tree optimization passes.
8738
8739 2018-05-18 Martin Liska <mliska@suse.cz>
8740
8741 * dbgcnt.c (limit_low): Renamed from limit.
8742 (limit_high): New variable.
8743 (dbg_cnt_is_enabled): Check for upper limit.
8744 (dbg_cnt): Adjust dumping.
8745 (dbg_cnt_set_limit_by_index): Add new argument for high
8746 value.
8747 (dbg_cnt_set_limit_by_name): Likewise.
8748 (dbg_cnt_process_single_pair): Parse new format.
8749 (dbg_cnt_process_opt): Use strtok.
8750 (dbg_cnt_list_all_counters): Remove 'value' and add
8751 'limit_high'.
8752 * doc/invoke.texi: Document changes.
8753
8754 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
8755
8756 * doc/sourcebuild.texi (scalar_all_fma): Document.
8757 * tree.def (FMA_EXPR): Delete.
8758 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8759 * internal-fn.c (ternary_direct): New macro.
8760 (expand_ternary_optab_fn): Likewise.
8761 (direct_ternary_optab_supported_p): Likewise.
8762 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8763 * builtins.c (fold_builtin_fma): Delete.
8764 (fold_builtin_3): Don't call it.
8765 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8766 * expr.c (expand_expr_real_2): Likewise.
8767 * fold-const.c (operand_equal_p): Likewise.
8768 (fold_ternary_loc): Likewise.
8769 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8770 * gimple.c (DEFTREECODE): Likewise.
8771 * gimplify.c (gimplify_expr): Likewise.
8772 * optabs-tree.c (optab_for_tree_code): Likewise.
8773 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8774 * tree-eh.c (operation_could_trap_p): Likewise.
8775 (stmt_could_throw_1_p): Likewise.
8776 * tree-inline.c (estimate_operator_cost): Likewise.
8777 * tree-pretty-print.c (dump_generic_node): Likewise.
8778 (op_code_prio): Likewise.
8779 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8780 * tree-ssa-operands.c (get_expr_operands): Likewise.
8781 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8782 * fold-const-call.h (fold_fma): Delete.
8783 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8784 CFN_FNMA and CFN_FNMS.
8785 (fold_fma): Delete.
8786 * genmatch.c (combined_fn): New enum.
8787 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8788 (commutative_op): New function.
8789 (commutate): Use it. Handle more than 2 operands.
8790 (dt_operand::gen_gimple_expr): Use commutative_op.
8791 (parser::parse_expr): Allow :c to be used with non-binary
8792 operators if the commutative operand is known.
8793 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8794 CFN_FMS, CFN_FNMA and CFN_FNMS.
8795 (backprop::process_assign_use): Remove FMA_EXPR handling.
8796 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8797 (gen_hsa_fma): New function.
8798 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8799 IFN_FNMA and IFN_FNMS.
8800 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8801 * gimple-fold.h (follow_all_ssa_edges): Declare.
8802 * gimple-fold.c (follow_all_ssa_edges): New function.
8803 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8804 gimple_build interface and use follow_all_ssa_edges to fold the result.
8805 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8806 instead of checking for optabs directly.
8807 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8808 rather than FMA_EXPRs.
8809 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8810 call to IFN_FMA instead of an FMA_EXPR.
8811
8812 2018-05-17 Jim Wilson <jimw@sifive.com>
8813
8814 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8815 sign extended promoted subreg, and the range does not have the sign bit
8816 set, then do a sign extend.
8817
8818 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8819 test, check for sign extended subreg and/or constant operands, and
8820 do a sign extend in that case.
8821
8822 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8823
8824 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8825 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8826 Add untyped.
8827 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8828 Change logics_shift_reg to logics_shift_imm.
8829 (thunderx2t99_fp_loadpair_basic): Delete.
8830 (thunderx2t99_fp_storepair_basic): Delete.
8831 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8832 (thunderx2t99_asimd_polynomial): Delete.
8833 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8834 and neon_fp_mul_d_scalar_q.
8835 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8836 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8837 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8838 (thunderx2t99_asimd_lut): Add missing tbl types.
8839 (thunderx2t99_asimd_ext): Delete.
8840 (thunderx2t99_asimd_load1_1_mult): Delete.
8841 (thunderx2t99_asimd_load1_2_mult): Delete.
8842 (thunderx2t99_asimd_load1_ldp): New.
8843 (thunderx2t99_asimd_load1): New.
8844 (thunderx2t99_asimd_load2): Add missing *load2* types.
8845 (thunderx2t99_asimd_load3): New.
8846 (thunderx2t99_asimd_load4): New.
8847 (thunderx2t99_asimd_store1_1_mult): Delete.
8848 (thunderx2t99_asimd_store1_2_mult): Delete.
8849 (thunderx2t99_asimd_store2_mult): Delete.
8850 (thunderx2t99_asimd_store2_onelane): Delete.
8851 (thunderx2t99_asimd_store_stp): New.
8852 (thunderx2t99_asimd_store1): New.
8853 (thunderx2t99_asimd_store2): New.
8854 (thunderx2t99_asimd_store3): New.
8855 (thunderx2t99_asimd_store4): New.
8856
8857 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8858
8859 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8860 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8861
8862 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8863 Segher Boessenkool <segher@kernel.crashing.org>
8864
8865 PR target/85698
8866 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8867 operand.
8868
8869 2018-05-17 Richard Biener <rguenther@suse.de>
8870
8871 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8872 for pruning loop and prune defs feeding only already visited PHIs.
8873
8874 2018-05-17 Richard Biener <rguenther@suse.de>
8875
8876 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8877
8878 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8879 Richard Biener <rguenther@suse.de>
8880
8881 PR tree-optimization/85793
8882 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8883 for VMAT_ELEMENTWISE.
8884
8885 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8886
8887 * internal-fn.h (lookup_internal_fn): Declare
8888 * internal-fn.c (lookup_internal_fn): New function.
8889 * gimple.c (gimple_build_call_from_tree): Handle calls to
8890 internal functions.
8891 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8892 internal function names.
8893 * tree-pretty-print.c (dump_generic_node): Likewise.
8894 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8895
8896 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8897
8898 * gimple-fold.h (gimple_build): Make the function forms take
8899 combined_fn rather than built_in_function.
8900 (gimple_simplify): Likewise.
8901 * gimple-match-head.c (gimple_simplify): Likewise.
8902 * gimple-fold.c (gimple_build): Likewise.
8903 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8904 rather than gimple_build_call_internal.
8905 (get_initial_defs_for_reduction): Likewise.
8906 (vect_create_epilog_for_reduction): Likewise.
8907 (vectorizable_live_operation): Likewise.
8908
8909 2018-05-17 Martin Liska <mliska@suse.cz>
8910
8911 * gimple-ssa-sprintf.c (format_directive): Do not use
8912 space in between 'G_' and '('.
8913
8914 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8915
8916 PR target/85323
8917 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8918 even if the mask is not all ones.
8919
8920 PR target/85323
8921 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8922 vector.
8923 (ix86_gimple_fold_builtin): Likewise.
8924
8925 PR target/85323
8926 * config/i386/i386.c: Include tree-vector-builder.h.
8927 (ix86_vector_shift_count): New function.
8928 (ix86_fold_builtin): Fold shift builtins by scalar count.
8929 (ix86_gimple_fold_builtin): Likewise.
8930
8931 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8932 _mm512_setzero): New intrinsics.
8933
8934 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8935 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8936
8937 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8938 code generation for cases where splatting a value is not useful.
8939 * simplify-rtx.c (simplify_ternary_operation): Simplify
8940 vec_merge across a vec_duplicate and a paradoxical subreg forming
8941 a vector mode to a vec_concat.
8942
8943 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8944
8945 * config.gcc: Support "goldmont-plus".
8946 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8947 "goldmont-plus".
8948 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8949 PROCESSOR_GOLDMONT_PLUS.
8950 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8951 (processor_target_table): Add "goldmont-plus".
8952 (PTA_GOLDMONT_PLUS): Define.
8953 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8954 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8955 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8956 (fold_builtin_cpu): Add "goldmont-plus".
8957 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8958 (ix86_option_override_internal): Add "goldmont-plus".
8959 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8960 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8961 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8962 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8963
8964 2018-05-17 Richard Biener <rguenther@suse.de>
8965
8966 PR tree-optimization/85757
8967 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8968 remove defs that only feed that PHI from further processing.
8969
8970 2018-05-16 Jim Wilson <jimw@sifive.com>
8971
8972 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8973 asterisk to name.
8974 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8975
8976 2018-05-16 Mark Wielaard <mark@klomp.org>
8977
8978 * dwarf2out.c (count_index_strings): New function.
8979 (output_indirect_strings): Call count_index_strings and generate
8980 header for dwarf_version >= 5.
8981
8982 2018-05-16 Mark Wielaard <mark@klomp.org>
8983
8984 * dwarf2out.c (dwarf_FORM): New function.
8985 (set_indirect_string): Use dwarf_FORM.
8986 (reset_indirect_string): Likewise.
8987 (size_of_die): Likewise.
8988 (value_format): Likewise.
8989 (output_die): Likewise.
8990 (add_skeleton_AT_string): Likewise.
8991 (output_macinfo_op): Likewise.
8992 (index_string): Likewise.
8993 (output_index_string_offset): Likewise.
8994 (output_index_string): Likewise.
8995 (count_index_strings): Likewise.
8996
8997 2018-05-16 Carl Love <cel@us.ibm.com>
8998
8999 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9000 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9001
9002 2018-05-16 Martin Jambor <mjambor@suse.cz>
9003
9004 * ipa-prop.c (ipa_free_all_edge_args): Remove.
9005 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9006
9007 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
9008
9009 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9010 (fnma<mode>4): Likewise.
9011 (fms<mode>4): Likewise.
9012 (fnms<mode>4): Likewise.
9013 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9014 (aarch64_fnma<mode>4): Likewise.
9015 (aarch64_fms<mode>4): Likewise.
9016 (aarch64_fnms<mode>4): Likewise.
9017 (aarch64_fnmadd<mode>4): Likewise.
9018
9019 2018-05-16 Jason Merrill <jason@redhat.com>
9020
9021 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9022
9023 2018-05-16 Richard Biener <rguenther@suse.de>
9024
9025 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9026 (dump_stmt_cost): Declare.
9027 (add_stmt_cost): Dump cost we add.
9028 (add_stmt_costs): New function.
9029 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9030 No longer exported.
9031 (vect_analyze_stmt): Adjust prototype.
9032 (vectorizable_condition): Likewise.
9033 (vectorizable_live_operation): Likewise.
9034 (vectorizable_reduction): Likewise.
9035 (vectorizable_induction): Likewise.
9036 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9037 cost vector to pass to vectorizable_ and record afterwards.
9038 (vect_model_reduction_cost): Take cost vector argument and adjust.
9039 (vect_model_induction_cost): Likewise.
9040 (vectorizable_reduction): Likewise.
9041 (vectorizable_induction): Likewise.
9042 (vectorizable_live_operation): Likewise.
9043 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9044 SLP_TREE_NUMBER_OF_VEC_STMTS.
9045 (vect_analyze_slp_cost_1): Remove.
9046 (vect_analyze_slp_cost): Likewise.
9047 (vect_slp_analyze_node_operations): Take visited args and
9048 a target cost vector. Avoid processing already visited stmt sets.
9049 (vect_slp_analyze_operations): Use a local cost vector to gather
9050 costs and register those of non-discarded instances.
9051 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9052 (vect_schedule_slp_instance): Remove copying of
9053 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9054 zero.
9055 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9056 adding cost. Record cost entry location.
9057 (vect_prologue_cost_for_slp_op): Function to compute cost of
9058 a constant or invariant generated for SLP vect in the prologue,
9059 split out from vect_analyze_slp_cost_1.
9060 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9061 (vect_model_promotion_demotion_cost): Likewise.
9062 (vect_model_store_cost): Likewise, make static.
9063 (vect_model_load_cost): Likewise.
9064 (vectorizable_bswap): Add cost vector arg and adjust.
9065 (vectorizable_call): Likewise.
9066 (vectorizable_simd_clone_call): Likewise.
9067 (vectorizable_conversion): Likewise.
9068 (vectorizable_assignment): Likewise.
9069 (vectorizable_shift): Likewise.
9070 (vectorizable_operation): Likewise.
9071 (vectorizable_store): Likewise.
9072 (vectorizable_load): Likewise.
9073 (vectorizable_condition): Likewise.
9074 (vectorizable_comparison): Likewise.
9075 (can_vectorize_live_stmts): Likewise.
9076 (vect_analyze_stmt): Likewise.
9077 (vect_transform_stmt): Adjust calls to vectorizable_*.
9078 * tree-vectorizer.c: Include gimple-pretty-print.h.
9079 (dump_stmt_cost): New function.
9080
9081 2018-05-16 Richard Biener <rguenther@suse.de>
9082
9083 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9084 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9085 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9086 (check_name): New callback.
9087 (dse_classify_store): Track cycles via a visited bitmap of PHI
9088 defs and simplify handling of in-loop and across loop dead stores
9089 and properly fail for loop-variant refs. Handle byte-tracking with
9090 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9091 limiting the walk.
9092
9093 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9094
9095 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9096 (vect_get_mask_type_for_stmt): Likewise.
9097 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9098 split out from...
9099 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9100 to determine the statement's vector type and the vector type that
9101 should be used for calculating nunits. Deal with cases in which
9102 the type has to be deferred.
9103 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9104 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9105 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9106 (vect_determine_vf_for_stmt): New functions, split out from...
9107 (vect_determine_vectorization_factor): ...here.
9108 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9109 (vect_get_mask_type_for_stmt): New functions, split out from
9110 vect_determine_vectorization_factor.
9111
9112 2018-05-16 Richard Biener <rguenther@suse.de>
9113
9114 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9115 verify the [VEC_]COND_EXPR embedded comparison.
9116
9117 2018-05-15 Martin Sebor <msebor@redhat.com>
9118
9119 PR tree-optimization/85753
9120 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9121 RECORD_TYPE in addition to ARRAY_TYPE.
9122
9123 2018-05-15 Martin Sebor <msebor@redhat.com>
9124
9125 PR middle-end/85643
9126 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9127
9128 2018-05-15 Richard Biener <rguenther@suse.de>
9129
9130 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9131 add by_clobber_p one. Change algorithm to collect all defs
9132 representing uses we need to walk and try reducing them to
9133 a single one before failing.
9134 (dse_dom_walker::dse_optimize_stmt): Adjust.
9135
9136 2018-05-13 Mark Wielaard <mark@klomp.org>
9137
9138 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9139 (size_of_loc_descr): Likewise.
9140 (output_loc_operands): Likewise.
9141 (output_loc_operands_raw): Likewise.
9142 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9143 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9144 (hash_loc_operands): Likewise.
9145 (compare_loc_operands): Likewise.
9146
9147 2018-05-14 Mark Wielaard <mark@klomp.org>
9148
9149 * dwarf2out.c (count_index_addrs): New function.
9150 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9151
9152 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9153
9154 PR tree-optimization/83648
9155 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9156 return value as malloc candidate.
9157
9158 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9159
9160 PR ipa/85734
9161 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9162 param as true in call to suggest_attribute.
9163
9164 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
9165
9166 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9167 -mreadonly-in-sdata.
9168
9169 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9170
9171 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9172 New pattern.
9173 (aarch64_crypto_aesd_fused): Likewise.
9174
9175 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
9176
9177 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9178 (movsi_aarch64): Likewise.
9179 (load_pairsi): Likewise.
9180 (load_pairdi): Likewise.
9181 (store_pairsi): Likewise.
9182 (store_pairdi): Likewise.
9183 (load_pairsf): Likewise.
9184 (load_pairdf): Likewise.
9185 (store_pairsf): Likewise.
9186 (store_pairdf): Likewise.
9187 (zero_extend): Likewise.
9188 (trunc): Swap alternatives.
9189 (fcvt_target): Add '?' to prefer w over r.
9190
9191 2018-05-14 Jakub Jelinek <jakub@redhat.com>
9192
9193 PR target/85756
9194 * config/i386/i386.md: Disallow non-commutative arithmetics in
9195 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9196 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9197 in the peephole2 before it.
9198
9199 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9200
9201 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9202 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9203 (ix86_handle_option): Handle -mcldemote.
9204 * config.gcc: New header.
9205 * config/i386/cldemoteintrin.h: New file.
9206 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9207 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9208 -mcldemote.
9209 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9210 OPTION_MASK_ISA_CLDEMOTE.
9211 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9212 (ix86_valid_target_attribute_inner_p): Ditto.
9213 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9214 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9215 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9216 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9217 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9218 (cldemote): New.
9219 * config/i386/i386.opt: Add -mcldemote.
9220 * config/i386/x86intrin.h: New header.
9221 * doc/invoke.texi: Add -mcldemote.
9222
9223 2018-05-14 Richard Biener <rguenther@suse.de>
9224
9225 * doc/match-and-simplify.texi: Adjust :s documentation.
9226
9227 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9228
9229 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9230 intended memcpy size.
9231 (REORDER_45): Likewise.
9232
9233 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9234
9235 * sort.cc: New file.
9236 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9237 * vec.c (qsort_chk): Use gcc_qsort.
9238 * Makefile.in (OBJS-libcommon): Add sort.o.
9239 (build/sort.o): New target. Use it...
9240 (BUILD_RTL): ... here, and...
9241 (build/gencfn-macros): ... here, and...
9242 (build/genmatch): ... here.
9243
9244 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9245 Chung-Ju Wu <jasonwucj@gmail.com>
9246
9247 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9248 * config/nds32/nds32-graywolf.md: New file.
9249 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9250 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9251 pipeline.
9252 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9253 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9254 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9255 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9256 * config/nds32/pipelines.md: Include n15 settings.
9257
9258 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9259 Chung-Ju Wu <jasonwucj@gmail.com>
9260
9261 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9262 * config/nds32/nds32-n13.md: New file.
9263 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9264 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9265 pipeline.
9266 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9267 * config/nds32/nds32.md (pipeline_model): Add n13.
9268 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9269 * config/nds32/pipelines.md: Include n13 settings.
9270
9271 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9272 Chung-Ju Wu <jasonwucj@gmail.com>
9273
9274 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9275 * config/nds32/nds32-n10.md: New file.
9276 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9277 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9278 pipeline.
9279 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9280 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9281 * config/nds32/nds32.md (pipeline_model): Add n10.
9282 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9283 * config/nds32/pipelines.md: Include n10 settings.
9284
9285 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9286 Kito Cheng <kito.cheng@gmail.com>
9287 Chung-Ju Wu <jasonwucj@gmail.com>
9288
9289 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9290 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9291 Add enum values for DSP extension instructions.
9292 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9293 New constraints.
9294 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9295 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9296 New code iterators.
9297 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9298 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9299 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9300 * config/nds32/nds32-intrinsic.md: Likewise.
9301 * config/nds32/nds32_intrinsic.h: Likewise.
9302 * config/nds32/nds32-md-auxiliary.c: Likewise.
9303 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9304 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9305 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9306 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9307 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9308 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9309 TYPE_DMAC in switch statement.
9310 * config/nds32/nds32.c: New checking and implementation for DSP
9311 extension instructions.
9312 * config/nds32/nds32.h: Likewise.
9313 * config/nds32/nds32.md: Likewise.
9314 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9315 * config/nds32/predicates.md: Implement new predicates for DSP
9316 extension.
9317
9318 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9319
9320 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9321 Reformat alternatives and attributes so it is easier to identify
9322 which constraints/attributes go with which instruction.
9323 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9324 (mov<mode>_softfloat32, FMOVE64): Likewise.
9325 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9326 (mov<mode>_softfloat64, FMOVE64): Likewise.
9327
9328 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9329
9330 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9331 subsection.
9332 (Basic PowerPC Built-in Functions): The new name of the
9333 subsection previously known as "PowerPC Built-in Functions".
9334 (Basic PowerPC Built-in Functions Available on all Configurations):
9335 New subsubsection.
9336 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9337 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9338 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9339 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9340
9341 2018-05-11 Martin Jambor <mjambor@suse.cz>
9342
9343 PR ipa/85655
9344 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9345 single const.
9346
9347 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9348
9349 PR target/85733
9350 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9351
9352 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9353
9354 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9355 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9356 (ix86_handle_option): Handle -mwaitpkg.
9357 * config.gcc: New header.
9358 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9359 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9360 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9361 function type.
9362 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9363 OPTION_MASK_ISA_WAITPKG.
9364 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9365 (ix86_option_override_internal): Add PTA_WAITPKG.
9366 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9367 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9368 IX86_BUILTIN_TPAUSE.
9369 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9370 __builtin_ia32_umwait and __builtin_ia32_tpause.
9371 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9372 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9373 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9374 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9375 UNSPECV_TPAUSE): New.
9376 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9377 * config/i386/i386.opt: Add -mwaitpkg.
9378 * config/i386/waitpkgintrin.h: New file.
9379 * config/i386/x86intrin.h: New header.
9380 * doc/invoke.texi: Add -mwaitpkg.
9381
9382 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9383
9384 PR target/85606
9385 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9386 equivalent.
9387 (cortex-m0): Use armv6s-m isa.
9388 (cortex-m0plus): Likewise.
9389 (cortex-m1): Likewise.
9390 (cortex-m0.small-multiply): Likewise.
9391 (cortex-m0plus.small-multiply): Likewise.
9392 (cortex-m1.small-multiply): Likewise.
9393
9394 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9395 Jakub Jelinek <jakub@redhat.com>
9396
9397 PR tree-optimization/85692
9398 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9399 source permute as well.
9400
9401 2018-05-11 Martin Liska <mliska@suse.cz>
9402
9403 PR sanitizer/85556
9404 * doc/extend.texi: Document LLVM style format for no_sanitize
9405 attribute.
9406
9407 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9408
9409 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9410 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9411 (mode_supports_vsx_dform_quad): Likewise.
9412 (mode_supports_vmx_dform): Move these functions to be next to the
9413 other mode_supports functions.
9414 (mode_supports_dq_form): Likewise.
9415 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9416 mode_supports_dq_form.
9417 (reg_offset_addressing_ok_p): Likewise.
9418 (offsettable_ok_by_alignment): Likewise.
9419 (rs6000_legitimate_offset_address_p): Likewise.
9420 (legitimate_lo_sum_address_p): Likewise.
9421 (rs6000_legitimize_address): Likewise.
9422 (rs6000_legitimize_reload_address): Likewise.
9423 (rs6000_secondary_reload_inner): Likewise.
9424 (rs6000_preferred_reload_class): Likewise.
9425 (rs6000_output_move_128bit): Likewise.
9426
9427 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9428
9429 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9430 Generate SImode target register for null target.
9431 <case IX86_BUILTIN_XGETBV>: Ditto.
9432 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9433 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9434
9435 2018-05-10 Carl Love <cel@us.ibm.com>
9436
9437 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9438 dcbtt and dcbtstt if operands[2] is 0.
9439
9440 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9441
9442 PR target/85693
9443 * config/i386/sse.md (usadv64qi): New expander.
9444
9445 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9446
9447 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9448 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9449 -maltivec=be support.
9450 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9451 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9452 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9453 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9454 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9455 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9456 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9457 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9458 altivec_vsumsws): Adjust.
9459 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9460 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9461 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9462 support.
9463 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9464 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9465 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9466 (altivec_lve<VI_char>x): Delete expand.
9467 (*altivec_lve<VI_char>x_internal): Rename to...
9468 (altivec_lve<VI_char>x): ... this.
9469 (altivec_lvxl_<mode>): Delete expand.
9470 (*altivec_lvxl_<mode>_internal): Rename to ...
9471 (altivec_lvxl_<mode>): ... this.
9472 (altivec_stvxl_<mode>): Delete expand.
9473 (*altivec_stvxl_<mode>_internal): Rename to ...
9474 (altivec_stvxl_<mode>): ... this.
9475 (altivec_stve<VI_char>x): Delete expand.
9476 (*altivec_stve<VI_char>x_internal): Rename to ...
9477 (altivec_stve<VI_char>x): ... this.
9478 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9479 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9480 reduc_plus_scal_<mode>): Adjust.
9481 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9482 comment.
9483 (rs6000_cpu_cpp_builtins): Adjust.
9484 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9485 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9486 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9487 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9488 -maltivec=be support.
9489 (rs6000_split_vec_extract_var): Adjust.
9490 (rs6000_split_v4si_init): Adjust.
9491 (swap_selector_for_mode): Delete.
9492 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9493 altivec_expand_stvex_be): Delete.
9494 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9495 -maltivec=be support.
9496 (rs6000_gimple_fold_builtin): Ditto.
9497 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9498 Adjust.
9499 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9500 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9501 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9502 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9503 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9504 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9505 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9506 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9507 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9508 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9509 anonymous split): Adjust.
9510 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9511 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9512
9513 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9514
9515 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9516 when --with-gxx-include-dir is also specified.
9517 * configure: Regenerate.
9518
9519 2018-05-09 Jim Wilson <jimw@sifive.com>
9520
9521 PR target/84797
9522 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9523 * config/riscv/t-withmultilib: New.
9524 * config/riscv/withmultilib.h: New.
9525 * doc/install.texi: Document RISC-V --with-multilib-list support.
9526
9527 2018-05-09 Richard Biener <rguenther@suse.de>
9528
9529 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9530 vector.
9531 (vect_bb_vectorization_profitable_p): Adjust. Compute
9532 actual scalar cost using the cost vector and the add_stmt_cost
9533 machinery.
9534
9535 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9536
9537 PR rtl-optimization/85645
9538 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9539 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9540
9541 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9542
9543 PR rtl-optimization/85645
9544 * shrink-wrap.c (spread_components): Return a boolean saying if
9545 anything was changed.
9546 (try_shrink_wrapping_separate): Iterate spread_components until
9547 nothing changes anymore.
9548
9549 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9550
9551 PR rtl-optimization/85645
9552 * regrename.c (build_def_use): Also kill the chains that include the
9553 destination of a REG_CFA_REGISTER note.
9554
9555 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9556
9557 PR rtl-optimization/85645
9558 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9559 insn that has a REG_CFA_REGISTER note.
9560
9561 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9562
9563 * cfgexpand.c (expand_clobber): New function.
9564 (expand_gimple_stmt_1): Use it.
9565 * tree-vect-stmts.c (vect_clobber_variable): New function,
9566 split out from...
9567 (vectorizable_simd_clone_call): ...here.
9568 (vectorizable_store): Emit a clobber either side of an
9569 IFN_STORE_LANES sequence.
9570 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9571
9572 2018-05-09 Tom de Vries <tom@codesourcery.com>
9573
9574 PR target/85626
9575 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9576 (define_insn "trap_if_false"): Add exit after trap.
9577
9578 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9579
9580 PR rtl-optimization/85638
9581 * bb-reorder.c: Include common/common-target.h.
9582 (create_forwarder_block): New function extracted from...
9583 (fix_up_crossing_landing_pad): ...here. Rename into...
9584 (dw2_fix_up_crossing_landing_pad): ...this.
9585 (sjlj_fix_up_crossing_landing_pad): New function.
9586 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9587 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9588 from both partitions and exit the loop after one iteration.
9589
9590 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9591
9592 Revert:
9593 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9594 subsection.
9595 (Basic PowerPC Built-in Functions): The new name of the
9596 subsection previously known as "PowerPC Built-in Functions".
9597 (Basic PowerPC Built-in Functions Available on all Configurations):
9598 New subsubsection.
9599 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9600 subsubsection.
9601 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9602 subsubsection.
9603 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9604 subsubsection.
9605 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9606 subsubsection.
9607
9608 2018-05-08 Jim Wilson <jimw@sifive.com>
9609
9610 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9611 (LD_EMUL_SUFFIX): New.
9612 (LINK_SPEC): Use it.
9613
9614 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9615
9616 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9617 subsection.
9618 (Basic PowerPC Built-in Functions): The new name of the
9619 subsection previously known as "PowerPC Built-in Functions".
9620 (Basic PowerPC Built-in Functions Available on all Configurations):
9621 New subsubsection.
9622 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9623 subsubsection.
9624 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9625 subsubsection.
9626 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9627 subsubsection.
9628 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9629 subsubsection.
9630
9631 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9632
9633 PR target/85683
9634 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9635 after cmpelim optimization.
9636
9637 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
9638
9639 * config.gcc: Support "goldmont".
9640 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9641 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9642 PROCESSOR_GOLDMONT.
9643 * config/i386/i386.c (m_GOLDMONT): Define.
9644 (processor_target_table): Add "goldmont".
9645 (PTA_GOLDMONT): Define.
9646 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9647 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9648 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9649 (fold_builtin_cpu): Add "goldmont".
9650 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9651 (ix86_option_override_internal): Add "goldmont".
9652 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9653 (processor_type): Add PROCESSOR_GOLDMONT.
9654 * config/i386/i386.md: Add CPU "glm".
9655 * config/i386/glm.md: New file.
9656 * config/i386/x86-tune.def: Add m_GOLDMONT.
9657 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9658
9659 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9660
9661 PR target/85572
9662 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9663 E_V4DImode.
9664 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9665 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9666 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9667
9668 PR target/85317
9669 * config/i386/i386.c (ix86_fold_builtin): Handle
9670 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9671
9672 PR target/85480
9673 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9674 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9675
9676 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9677
9678 PR target/85658
9679 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9680 (check_arch): Likewise.
9681 (check_fpu): Return the result rather than printing it.
9682 (end arch): Fix operator precedence.
9683 (end cpu): Likewise.
9684 (END): Print the result from check_fpu.
9685
9686 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9687 Alan Hayward <alan.hayward@arm.com>
9688 David Sherwood <david.sherwood@arm.com>
9689
9690 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9691 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9692 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9693 (*fcmuo<mode>_and): New patterns.
9694
9695 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9696
9697 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9698 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9699 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9700 (cmp_op, sve_imm_con): New code attributes.
9701 (SVE_COND_INT_CMP, imm_con): Delete.
9702 (cmp_op): Remove above unspecs from int attribute.
9703 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9704 to...
9705 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9706 comparison-specific unspecs.
9707 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9708 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9709 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9710 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9711 (*vec_fcm<cmp_op><mode>): Rename to...
9712 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9713 (*vec_fcmuo<mode>): Rename to...
9714 (*fcmuo<mode>): ...this and adjust likewise.
9715 (*pred_fcm<cmp_op><mode>): New pattern.
9716 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9717 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9718 functions.
9719 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9720 and UNORDERED.
9721 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9722 (aarch64_emit_sve_predicated_cond): New function.
9723 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9724 (aarch64_emit_unspec_cond_or): Replace with...
9725 (aarch64_emit_sve_or_conds): ...this new function. Use
9726 aarch64_emit_sve_ptrue_op for the individual comparisons and
9727 aarch64_emit_binop to OR them together.
9728 (aarch64_emit_inverted_unspec_cond): Replace with...
9729 (aarch64_emit_sve_inverted_cond): ...this new function. Use
9730 aarch64_emit_sve_ptrue_op for the comparison and
9731 aarch64_emit_unop to invert the result.
9732 (aarch64_expand_sve_vec_cmp_float): Update after the above
9733 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
9734
9735 2018-05-07 Nathan Sidwell <nathan@acm.org>
9736
9737 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9738 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9739 (Backwards Compatibility): Likewise.
9740
9741 2018-05-07 Luis Machado <luis.machado@linaro.org>
9742
9743 PR bootstrap/85681
9744 Revert:
9745 2018-05-07 Luis Machado <luis.machado@linaro.org>
9746
9747 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9748 <prefetch_dynamic_strides>: New const bool field.
9749 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9750 prefetch_dynamic_strides.
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 prefetch_dynamic_strides
9756 to false.
9757 (aarch64_override_options_internal): Update to set
9758 PARAM_PREFETCH_DYNAMIC_STRIDES.
9759 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9760 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9761 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9762 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9763 prefetch-dynamic-strides setting.
9764
9765 2018-05-07 Luis Machado <luis.machado@linaro.org>
9766
9767 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9768 <minimum_stride>: New const int field.
9769 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9770 minimum_stride field.
9771 (exynosm1_prefetch_tune): Likewise.
9772 (thunderxt88_prefetch_tune): Likewise.
9773 (thunderx_prefetch_tune): Likewise.
9774 (thunderx2t99_prefetch_tune): Likewise.
9775 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9776 (aarch64_override_options_internal): Update to set
9777 PARAM_PREFETCH_MINIMUM_STRIDE.
9778 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9779 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9780 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9781 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9782 stride is constant and is below the minimum stride threshold.
9783
9784 2018-05-07 Luis Machado <luis.machado@linaro.org>
9785
9786 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9787 to 512.
9788
9789 2018-05-07 Luis Machado <luis.machado@linaro.org>
9790
9791 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9792 <prefetch_dynamic_strides>: New const bool field.
9793 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9794 prefetch_dynamic_strides.
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 prefetch_dynamic_strides
9800 to false.
9801 (aarch64_override_options_internal): Update to set
9802 PARAM_PREFETCH_DYNAMIC_STRIDES.
9803 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9804 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9805 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9806 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9807 prefetch-dynamic-strides setting.
9808
9809 2018-05-07 Luis Machado <luis.machado@linaro.org>
9810
9811 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9812 <minimum_stride>: New const int field.
9813 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9814 minimum_stride field.
9815 (exynosm1_prefetch_tune): Likewise.
9816 (thunderxt88_prefetch_tune): Likewise.
9817 (thunderx_prefetch_tune): Likewise.
9818 (thunderx2t99_prefetch_tune): Likewise.
9819 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9820 (aarch64_override_options_internal): Update to set
9821 PARAM_PREFETCH_MINIMUM_STRIDE.
9822 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9823 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9824 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9825 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9826 stride is constant and is below the minimum stride threshold.
9827
9828 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9829
9830 PR c++/85659
9831 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9832 the type is addressable. Don't force op into register if it has
9833 BLKmode.
9834
9835 2018-05-05 Roland McGrath <mcgrathr@google.com>
9836
9837 PR other/77609
9838 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9839 any section for which we don't know a specific type it should have,
9840 regardless of name. Previously this was done only for the exact
9841 names ".init_array", ".fini_array", and ".preinit_array".
9842 (default_elf_asm_named_section): Add comment about
9843 relationship with default_section_type_flags and SECTION_NOTYPE.
9844 (get_section): Don't consider it a type conflict if one side has
9845 SECTION_NOTYPE and the other doesn't, as long as neither has the
9846 SECTION_BSS et al used in the default_section_type_flags logic.
9847
9848 2018-05-05 Tom de Vries <tom@codesourcery.com>
9849
9850 PR target/85653
9851 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9852 (workaround_barsyncs): New function.
9853 (nvptx_reorg): Use workaround_barsyncs.
9854 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9855 (define_expand "nvptx_membar_cta"): New define_expand.
9856 (define_insn "*nvptx_membar_cta"): New insn.
9857
9858 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9859
9860 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9861 To improve optimization opportunities.
9862 * builtin-types.def: The new needed builtin types for the above.
9863
9864 2018-05-04 Richard Biener <rguenther@suse.de>
9865
9866 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9867 * gimple-ssa-store-merging.c
9868 (imm_store_chain_info::output_merged_store): Remove redundant create,
9869 release split_store vector contents on failure.
9870 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9871 scalar stmt vector on cache hit.
9872
9873 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9874
9875 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9876 Xilinx FP support.
9877 * config.gcc (powerpc-xilinx-eabi*): Remove.
9878 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9879 support.
9880 (fusion_addis_mem_combo_load): Ditto.
9881 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9882 FP support.
9883 (rs6000_cpu_cpp_builtins): Ditto.
9884 * config/rs6000/rs6000-linux.c
9885 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9886 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9887 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9888 support.
9889 (rs6000_setup_reg_addr_masks): Ditto.
9890 (rs6000_init_hard_regno_mode_ok): Ditto.
9891 (rs6000_option_override_internal): Ditto.
9892 (legitimate_lo_sum_address_p): Ditto.
9893 (rs6000_legitimize_address): Ditto.
9894 (rs6000_legitimize_reload_address): Ditto.
9895 (rs6000_legitimate_address_p): Ditto.
9896 (abi_v4_pass_in_fpr): Ditto.
9897 (setup_incoming_varargs): Ditto.
9898 (rs6000_gimplify_va_arg): Ditto.
9899 (rs6000_split_multireg_move): Ditto.
9900 (rs6000_savres_strategy): Ditto.
9901 (rs6000_emit_prologue_components): Ditto.
9902 (rs6000_emit_epilogue_components): Ditto.
9903 (rs6000_emit_prologue): Ditto.
9904 (rs6000_emit_epilogue): Ditto.
9905 (rs6000_elf_file_end): Ditto.
9906 (rs6000_function_value): Ditto.
9907 (rs6000_libcall_value): Ditto.
9908 * config/rs6000/rs6000.h: Ditto.
9909 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9910 (TARGET_MINMAX): ... this. New.
9911 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9912 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9913 (*movsi_internal1_single): Delete.
9914 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9915 mfpu=, mxilinx-fpu): Delete.
9916 * config/rs6000/singlefp.h: Delete.
9917 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9918 * config/rs6000/t-rs6000: Ditto.
9919 * config/rs6000/t-xilinx: Delete.
9920 * config/rs6000/titan.md: Adjust for fp_type removal.
9921 * config/rs6000/vsx.md: Remove Xilinx FP support.
9922 (VStype_simple): Delete.
9923 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9924 * config/rs6000/xfpu.h: Delete.
9925 * config/rs6000/xfpu.md: Delete.
9926 * config/rs6000/xilinx.h: Delete.
9927 * config/rs6000/xilinx.opt: Delete.
9928 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9929 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9930
9931 2018-05-04 Tom de Vries <tom@codesourcery.com>
9932
9933 PR libgomp/85639
9934 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9935 if ignore == 0.
9936
9937 2018-05-04 Richard Biener <rguenther@suse.de>
9938
9939 PR middle-end/85627
9940 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9941 (expand_complex_div_wide): Likewise.
9942 (expand_complex_operations_1): Likewise.
9943 (expand_complex_libcall): Preserve EH info of the original stmt.
9944 (tree_lower_complex): Handle removed blocks.
9945 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9946 on complex multiplication and division libcall builtins.
9947
9948 2018-05-04 Richard Biener <rguenther@suse.de>
9949
9950 PR middle-end/85574
9951 * fold-const.c (negate_expr_p): Restrict negation of operand
9952 zero of a division to when we know that can happen without
9953 overflow.
9954 (fold_negate_expr_1): Likewise.
9955
9956 2018-05-04 Jakub Jelinek <jakub@redhat.com>
9957
9958 PR libstdc++/85466
9959 * real.h (real_nextafter): Declare.
9960 * real.c (real_nextafter): New function.
9961 * fold-const-call.c (fold_const_nextafter): New function.
9962 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9963 CASE_CFN_NEXTTOWARD.
9964 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9965 even when arg1_mode is different from arg0_mode.
9966
9967 2018-05-03 Nathan Sidwell <nathan@acm.org>
9968
9969 * doc/extend.texi (Deprecated Features): Remove
9970 -ffriend-injection.
9971 (Backwards Compatibility): Likewise.
9972 * doc/invoke.texi (C++ Language Options): Likewise.
9973 (C++ Dialect Options): Likewise.
9974
9975 2018-05-03 Jakub Jelinek <jakub@redhat.com>
9976
9977 PR target/85530
9978 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9979 _mm512_mask_mullox_epi64): New intrinsics.
9980
9981 2018-05-03 Tom de Vries <tom@codesourcery.com>
9982
9983 PR testsuite/85106
9984 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9985 dump files): Add offload-tree.
9986
9987 2018-05-03 Richard Biener <rguenther@suse.de>
9988
9989 PR tree-optimization/85615
9990 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9991 to loops not nested in BBs loop father to avoid creating multi-entry
9992 loops.
9993
9994 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9995
9996 PR tree-optimization/70291
9997 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9998 arguments. Change return type to tree. Emit libcall as a new
9999 statement rather than replacing existing one when inplace_p is true.
10000 (expand_complex_multiplication_components): New function.
10001 (expand_complex_multiplication): Expand floating-point complex
10002 multiplication using the above.
10003 (expand_complex_division): Rename inner_type parameter to type.
10004 Update expand_complex_libcall call-site.
10005 (expand_complex_operations_1): Update expand_complex_multiplication
10006 and expand_complex_division call-sites.
10007
10008 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10009
10010 PR target/85582
10011 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10012 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10013 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10014 the highest significant bit of the shift count mask is clear. In
10015 check whether and[sq]i3 is needed verify that all significant bits
10016 of the shift count other than the highest are set.
10017
10018 2018-05-02 Tom de Vries <tom@codesourcery.com>
10019
10020 PR libgomp/82428
10021 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10022 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10023 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10024 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10025 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10026 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10027 __builtin_goacc_parlevel_size.
10028
10029 2018-05-02 Richard Biener <rguenther@suse.de>
10030
10031 PR tree-optimization/85597
10032 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10033 do not use split vect_get_vec_defs call but call vect_get_slp_defs
10034 directly.
10035
10036 2018-05-02 Tom de Vries <tom@codesourcery.com>
10037
10038 PR testsuite/85106
10039 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10040 dump files): Add ltrans-tree.
10041
10042 2018-05-02 Tom de Vries <tom@codesourcery.com>
10043
10044 PR testsuite/85106
10045 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10046 dump files): Add wpa-ipa.
10047
10048 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10049
10050 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10051 powerpc*-*-linux*paired* target.
10052 * config/rs6000/750cl.h: Delete.
10053 * config/rs6000/paired.h: Delete.
10054 * config/rs6000/paired.md: Delete.
10055 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10056 float support.
10057 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10058 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10059 comment. Remove paired float support.
10060 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10061 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10062 VECTOR_PAIRED.
10063 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10064 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10065 declarations.
10066 * config/rs6000/rs6000.c: Remove paired float support.
10067 (paired_expand_vector_init, paired_expand_vector_move,
10068 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10069 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10070 paired_expand_builtin, paired_expand_predicate_builtin,
10071 paired_init_builtins): Delete.
10072 * config/rs6000/rs6000.h: Remove paired float support.
10073 * config/rs6000/rs6000.md: Remove paired float support.
10074 (move_from_CR_ov_bit): Delete.
10075 * config/rs6000/rs6000.opt (mpaired): Delete.
10076 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10077 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10078
10079 2018-05-02 Richard Biener <rguenther@suse.de>
10080
10081 PR middle-end/85567
10082 * gimplify.c (gimplify_save_expr): When in SSA form allow
10083 SAVE_EXPRs to compute to SSA vars.
10084
10085 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10086
10087 PR target/85582
10088 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10089 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10090 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10091 clobber operands[2], instead use a new pseudo. Formatting fixes.
10092
10093 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10094
10095 PR tree-optimization/85586
10096 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10097 exit early for statements in the same group if the accesses are
10098 not strided.
10099
10100 2018-05-02 Tom de Vries <tom@codesourcery.com>
10101
10102 PR lto/85451
10103 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10104 error message.
10105
10106 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10107
10108 PR tree-optimization/85143
10109 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10110
10111 2018-05-01 Tom de Vries <tom@codesourcery.com>
10112
10113 PR lto/85451
10114 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10115 not found" error message.
10116
10117 2018-05-01 Tom de Vries <tom@codesourcery.com>
10118
10119 PR other/83786
10120 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10121 * vec.c (test_ordered_remove_if): New function.
10122 (vec_c_tests): Call test_ordered_remove_if.
10123 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10124 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10125 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10126 VEC_ORDERED_REMOVE_IF.
10127
10128 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10129
10130 PR tree-optimization/82665
10131 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10132 pointer subtraction where arguments come from a memchr call.
10133
10134 2018-05-01 Jakub Jelinek <jakub@redhat.com>
10135
10136 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10137 --push-state --as-needed and --pop-state instead of --as-needed and
10138 --no-as-needed if ld supports it.
10139 * configure: Regenerated.
10140
10141 PR web/85578
10142 * doc/install.texi2html: Replace _002d with - and _002a with * in
10143 generated html files using sed.
10144
10145 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10146
10147 PR c++/85523
10148 * gcc-rich-location.c (blank_line_before_p): New function.
10149 (use_new_line): New function.
10150 (gcc_rich_location::add_fixit_insert_formatted): New function.
10151 * gcc-rich-location.h
10152 (gcc_rich_location::add_fixit_insert_formatted): New function.
10153
10154 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10155
10156 * selftest.c (assert_streq): Rename "expected" and "actual" to
10157 "val1" and "val2". Extend NULL-handling to cover both inputs
10158 symmetrically, while still requiring both to be non-NULL for a pass.
10159 * selftest.h (assert_streq): Rename "expected" and "actual" to
10160 "val1" and "val2".
10161 (ASSERT_EQ): Likewise.
10162 (ASSERT_EQ_AT): Likewise.
10163 (ASSERT_KNOWN_EQ): Likewise.
10164 (ASSERT_KNOWN_EQ_AT): Likewise.
10165 (ASSERT_NE): Likewise.
10166 (ASSERT_MAYBE_NE): Likewise.
10167 (ASSERT_MAYBE_NE_AT): Likewise.
10168 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
10169 the assertion to pass.
10170 (ASSERT_STREQ_AT): Likewise.
10171
10172 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10173
10174 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10175 interaction with -pie.
10176
10177 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10178
10179 * selftest.h: Fix alphabetization of per-source-file selftest
10180 declarations.
10181
10182 2018-04-30 Jason Merrill <jason@redhat.com>
10183
10184 PR c++/61982 - dead stores to destroyed objects.
10185 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10186 of clobber.
10187
10188 2018-04-30 Jason Merrill <jason@redhat.com>
10189
10190 * tree.c (build_clobber): New.
10191 * tree.h: Declare it.
10192 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10193
10194 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10195
10196 * diagnostic-show-locus.c (layout::layout): Update for
10197 location_get_source_line returning a char_span.
10198 (struct char_span): Move to input.h.
10199 (struct correction): Update for fields in char_span becoming
10200 private.
10201 (struct source_line): Update for location_get_source_line
10202 returning a char_span.
10203 (layout::print_line): Likewise.
10204 * edit-context.c (edited_file::print_content): Likewise.
10205 (edited_file::print_diff_hunk): Likewise.
10206 (edited_file::print_run_of_changed_lines): Likewise.
10207 (edited_file::get_num_lines): Likewise.
10208 (edited_line::edited_line): Likewise.
10209 * final.c (asm_show_source): Likewise.
10210 * input.c (location_get_source_line): Convert return type
10211 from const char * to char_span, losing the final "line_len"
10212 param.
10213 (dump_location_info): Update for the above.
10214 (get_substring_ranges_for_loc): Likewise. Use a char_span
10215 when handling the literal within the line.
10216 (test_reading_source_line): Update for location_get_source_line
10217 returning a char_span.
10218 * input.h (class char_span): Move here from
10219 diagnostic-show-locus.c, converting from a struct to a class.
10220 Make data members private.
10221 (char_span::operator bool): New.
10222 (char_span::length): New.
10223 (char_span::get_buffer): New.
10224 (char_span::operator[]): New.
10225 (char_span::subspan): Make const.
10226 (char_span::xstrdup): New.
10227 (location_get_source_line): Convert return type from const char *
10228 to char_span, losing the final "line_size" param.
10229
10230 2018-04-30 Jan Hubicka <jh@suse.cz>
10231
10232 * lto-wrapper.c (ltrans_priorities): New static var.
10233 (cmp_priority): New.
10234 (run_gcc): Read priorities and if doing parallel build order
10235 the Makefile by them.
10236
10237 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10238
10239 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10240
10241 2018-04-30 Richard Biener <rguenther@suse.de>
10242
10243 * tree-cfg.c (verify_address): Remove base argument, add
10244 flag whether to check TREE_ADDRESSABLE and do that.
10245 (verify_expr): Remove.
10246 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10247 (verify_gimple_assign_single): Likewise.
10248 (verify_gimple_switch): Likewise.
10249 (verify_expr_location_1): Dereference tp once. Add (disabled)
10250 piece from verify_expr.
10251 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10252
10253 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10254
10255 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10256
10257 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10258
10259 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10260 (small_data_pattern): Likewise.
10261 (arc_rewrite_small_data): Likewise.
10262 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10263 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10264 (get_symbol_alignment): New function.
10265 (legitimate_small_data_address_p): Likewise.
10266 (legitimate_scaled_address): Update, call
10267 legitimate_small_data_address_p.
10268 (output_sdata): New static variable.
10269 (arc_print_operand): Update how we handle small data operands.
10270 (arc_print_operand_address): Likewise.
10271 (arc_legitimate_address_p): Update, use
10272 legitimate_small_data_address_p.
10273 (arc_rewrite_small_data_p): Remove.
10274 (arc_rewrite_small_data_1): Likewise.
10275 (arc_rewrite_small_data): Likewise.
10276 (small_data_pattern): Likewise.
10277 (compact_sda_memory_operand): Update to use
10278 legitimate_small_data_address_p and get_symbol_alignment.
10279 (prepare_move_operands): Don't rewite sdata pattern.
10280 (prepare_extend_operands): Remove.
10281 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10282 pattern.
10283 (zero_extendqisi2): Likewise.
10284 (zero_extendhisi2): Likewise.
10285 (extendqihi2): Likewise.
10286 (extendqisi2): Likewise.
10287 (extendhisi2): Likewise.
10288 (addsi3): Likewise.
10289 (subsi3): Likewise.
10290 (andsi3): Likewise.
10291 * config/arc/constraints.md (Usd): Change it to memory constraint.
10292
10293 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10294
10295 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10296 as source of std instructions.
10297 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10298 allow 6-bit constants as source for store instructions.
10299 (movdi_insn): Update instruction pattern to allow 6-bit constants
10300 as source for store instructions.
10301
10302 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10303
10304 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10305
10306 2018-04-30 Nathan Sidwell <nathan@acm.org>
10307 Sandra Loosemore <sandra@codesourcery.com>
10308
10309 * dumpfile.c (dump_open): Allow '-' for stdout.
10310 * doc/invoke.texi (Developer Options): Document dump filename
10311 determination early. Document stdin/stdout selection.
10312
10313 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10314
10315 Microblaze Target: PIC data text relative
10316
10317 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10318 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10319 Add declaration.
10320 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10321 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10322 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10323 New addressing mode for data-text relative position indepenedent code.
10324 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10325 'ADDRESS_SYMBOLIC_TXT_REL'.
10326 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10327 (microblaze_legitimate_pic_operand): Exclude function calls from
10328 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10329 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10330 addresses cases.
10331 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10332 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10333 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10334 for 'address + offset'.
10335 (microblaze_expand_prologue): Add new function prologue call for
10336 'r20' assignation.
10337 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10338 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10339 table in case of TARGET_PIC_DATA_TEXT_REL.
10340 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10341 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10342 Add new macros 'UNSPEC_TEXT',
10343 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10344 + exclude function calls from 'UNSPEC_PLT' in case of data text
10345 relative mode.
10346 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10347 new target hook for generating address diff vector tables in case of
10348 flag_pic.
10349 * doc/tm.texi : Regenerate.
10350 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10351 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10352 of addr diff vector generation.
10353 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10354 target hook definition.
10355 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10356 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10357 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10358 option for data text relative.
10359
10360 2018-04-30 Richard Biener <rguenther@suse.de>
10361
10362 * tree-chrec.h (evolution_function_is_constant_p): Remove
10363 redundant check.
10364 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10365
10366 2018-04-30 Richard Biener <rguenther@suse.de>
10367
10368 PR bootstrap/85571
10369 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10370
10371 2018-04-30 Richard Biener <rguenther@suse.de>
10372
10373 PR tree-optimization/28364
10374 PR tree-optimization/85275
10375 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10376 copying first exit test.
10377
10378 2018-04-28 Mark Wielaard <mark@klomp.org>
10379
10380 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10381 dwarf_version >= 5.
10382 (dwarf_AT): Handle DW_AT_addr_base.
10383 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10384
10385 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10386
10387 PR target/84431
10388 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10389 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10390 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10391 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10392
10393 2018-04-28 Richard Biener <rguenther@suse.de>
10394
10395 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10396 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10397 to reflect use. Only add interesting stmts.
10398
10399 2018-04-27 Martin Jambor <mjambor@suse.cz>
10400
10401 PR ipa/85549
10402 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10403 the jump function allows for passing through aggregate values.
10404
10405 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10406
10407 * input.h (in_system_header_at): Convert from macro to inline
10408 function.
10409 (from_macro_expansion_at): Likewise.
10410 (from_macro_definition_at): Likewise.
10411
10412 2018-04-27 Jeff Law <law@redhat.com>
10413
10414 * config.gcc: Mark tile* targets as deprecated/obsolete.
10415
10416 2018-04-27 Richard Biener <rguenther@suse.de>
10417
10418 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10419 fix for ILP32.
10420
10421 2018-04-27 Richard Biener <rguenther@suse.de>
10422
10423 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10424
10425 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10426
10427 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10428 with Yd constraint. Set "preferred_for_speed" attribute from
10429 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10430 with Yd constraint.
10431 (*movdi_internal): Ditto.
10432 (movti_interunit splitters): Remove
10433 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10434 (movdi_interunit splitters): Ditto.
10435 * config/i386/constraints.md (Ye): Remove.
10436 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10437
10438 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10439
10440 PR target/85512
10441 * config/aarch64/constraints.md (Usg): Limit to 31.
10442 (Usj): Limit to 63.
10443
10444 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10445
10446 PR tree-optimization/85529
10447 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10448 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10449 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10450 zero extension or masking of the MSB bit.
10451 (optimize_range_tests): Add FIRST_BB argument, pass it through
10452 to optimize_range_tests_var_bound.
10453 (maybe_optimize_range_tests, reassociate_bb): Adjust
10454 optimize_range_tests callers.
10455
10456 2018-04-26 Richard Biener <rguenther@suse.de>
10457 Jakub Jelinek <jakub@redhat.com>
10458
10459 * cgraph.h (symbol_table): Just declare debug method here.
10460 * symtab.c (symbol_table::debug): Define.
10461
10462 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10463
10464 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10465
10466 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10467
10468 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10469 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10470 (*movdi_internal): Substitute Yi and Yj constraint with x
10471 and Ym and Yn constraint with y constraint. Update "isa"
10472 attribute and set "preferred_for_speed" attribute from
10473 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10474 (*movsi_internal): Ditto.
10475 (*movdf_internal): Ditto.
10476 (*movsf_internal): Ditto.
10477 (*zero_extendsidi2): Ditto.
10478 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10479 (sse2_loadld): Ditto.
10480 (*vec_extract<ssevecmodelower>_0): Ditto.
10481 (*vec_extractv4si_0_zext_sse4): Ditto.
10482 (vec_concatv2di): Ditto.
10483 (*vec_dup<mode>): Ditto.
10484 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10485 * config/i386/constraints.md (Yi): Remove.
10486 (Yj): Remove.
10487 (Ym): Remove.
10488 (Yn): Remove.
10489
10490 2018-04-26 Nathan Sidwell <nathan@acm.org>
10491
10492 * dumpfile.c (dump_open): New.
10493 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10494 (dump_finish): Detect stdio/stderr by value not name.
10495
10496 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10497
10498 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10499
10500 2018-04-26 Tom de Vries <tom@codesourcery.com>
10501
10502 PR target/84952
10503 * config/nvptx/nvptx.c (verify_neutering_jumps)
10504 (verify_neutering_labels): New function
10505 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10506
10507 2018-04-26 Tom de Vries <tom@codesourcery.com>
10508
10509 PR target/84025
10510 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10511 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10512 need neutering.
10513
10514 2018-04-26 Richard Biener <rguenther@suse.de>
10515 Tom de Vries <tom@codesourcery.com>
10516
10517 PR lto/85422
10518 * lto-streamer-out.c (output_function): Fixup loops if required to match
10519 discovery done in the reader.
10520
10521 2018-04-26 Richard Biener <rguenther@suse.de>
10522
10523 PR tree-optimization/85116
10524 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10525 have a loop exit from the single latch predecessor. Remove
10526 case of header with just condition.
10527 (ch_base::copy_headers): Exclude infinite loops from any
10528 processing.
10529 (pass_ch::execute): Record exits.
10530
10531 2018-04-26 Richard Biener <rguenther@suse.de>
10532
10533 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10534 prologue cost vector and pass it to vect_get_load_cost.
10535 (vect_get_peeling_costs_all_drs): Likewise.
10536 (vect_peeling_hash_get_lowest_cost): Likewise.
10537 (vect_enhance_data_refs_alignment): Likewise.
10538
10539 2018-04-26 Richard Biener <rguenther@suse.de>
10540
10541 PR middle-end/85450
10542 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10543 checking of integer<->pointer conversions.
10544 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10545 sign-/zero-extending pointer types.
10546 (expand_omp_for_static_chunk): Likewise.
10547
10548 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10549 Jean Lee <xiaoyur347@gmail.com>
10550
10551 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10552 (TARGET_ASAN_SHADOW_OFFSET): Define.
10553 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10554 true for -fsanitize=address.
10555
10556 2018-04-25 Mark Wielaard <mark@klomp.org>
10557
10558 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10559 shorter ones.
10560
10561 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10562
10563 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10564 than "alu", remove explicit "memory" and "imm_disp" attributes.
10565 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10566
10567 PR middle-end/85414
10568 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10569 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10570 gen_lowpart_no_emit.
10571
10572 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10573
10574 PR target/85473
10575 * config/i386/i386.c (ix86_expand_builtin): Change memory
10576 operand to XI, extend p0 to Pmode.
10577 * config/i386/i386.md: Change unspec volatile and operand
10578 1 mode to XI, change operand 0 mode to P.
10579
10580 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10581
10582 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10583 GET_MODE_MASK before any checking.
10584 (nds32_can_use_bset_p): Likewise.
10585 (nds32_can_use_btgl_p): Likewise.
10586
10587 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10588
10589 * config/nds32/nds32-doubleword.md: New define_split pattern for
10590 illegal register number.
10591
10592 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10593
10594 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10595
10596 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10597
10598 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10599
10600 2018-04-25 Richard Biener <rguenther@suse.de>
10601
10602 * lto-streamer.h (LTO_major_version): Bump to 8.
10603
10604 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10605
10606 * BASE-VER: Set to 9.0.0.
10607
10608 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10609
10610 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10611 in __abskf2 and __powikf2.
10612
10613 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10614
10615 PR target/85512
10616 * config/aarch64/constraints.md (Usg, Usj): New constraints.
10617 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10618 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10619 Use the above on operand 2. Reindent.
10620 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10621
10622 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10623
10624 PR target/85485
10625 * common/config/i386/i386-common.c (ix86_handle_option): Don't
10626 handle OPT_mcet.
10627 * config/i386/i386.opt (mcet): Removed.
10628 * doc/install.texi: Remove -mcet documentation.
10629 * doc/invoke.texi: Likewise.
10630
10631 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10632
10633 PR target/85485
10634 * doc/install.texi: Remove -mcet from bootstrap-cet.
10635
10636 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10637
10638 PR target/85511
10639 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10640 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10641 if TARGET_64BIT.
10642
10643 PR target/85503
10644 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10645 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10646 containing a CONST_VECTOR.
10647
10648 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
10649
10650 * doc/install.texi: Update newlib dependency for nvptx.
10651
10652 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10653
10654 PR target/85508
10655 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10656 instead of INTVAL when shifting x left.
10657
10658 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
10659
10660 PR tree-optimization/85478
10661 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10662 vect_grouped_store_supported for single element vectors.
10663
10664 2018-04-24 Richard Biener <rguenther@suse.de>
10665
10666 PR target/85491
10667 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10668 load cost increase to the case of non-constant step.
10669
10670 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10671
10672 PR target/84828
10673 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10674 destination if any_malformed_asm.
10675
10676 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10677
10678 PR middle-end/85496
10679 * expr.c (store_field): In the bitfield case, if the value comes from
10680 a function call and is returned in registers by means of a PARALLEL,
10681 do not change the mode of the temporary unless BLKmode and VOIDmode.
10682
10683 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10684
10685 PR rtl-optimization/85423
10686 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10687 dependencies to debug insns when the previous insn is non-debug.
10688
10689 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10690
10691 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10692 enums into a single definition.
10693 (fls): Fix predicates and printing.
10694 (seti): Likewise.
10695
10696 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10697
10698 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10699 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10700 and short u6 immediate.
10701 (check_if_valid_sleep_operand): Remove.
10702 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10703
10704 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10705
10706 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10707 flag_always_save_lp condition.
10708 * config/nds32/nds32.opt (malways-save-lp): New option.
10709
10710 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10711
10712 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10713 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10714 * config/nds32/nds32.h
10715 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10716 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10717
10718 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10719
10720 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10721 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10722
10723 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10724 Chung-Ju Wu <jasonwucj@gmail.com>
10725
10726 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10727 Declare.
10728 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10729 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10730
10731 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10732
10733 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10734
10735 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10736
10737 * config/nds32/nds32-protos.h (nds32_data_alignment,
10738 nds32_local_alignment): Declare.
10739 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10740 nds32_local_alignment): New functions.
10741 (TARGET_CONSTANT_ALIGNMENT): Define.
10742 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10743
10744 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10745
10746 * config/nds32/nds32.c
10747 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10748 (TARGET_MODES_TIEABLE_P): Likewise.
10749
10750 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10751
10752 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10753 level Ofast and Og.
10754
10755 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
10756 Chung-Ju Wu <jasonwucj@gmail.com>
10757
10758 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10759 for unaligned access.
10760 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10761 unaligned access.
10762 * config/nds32/nds32-intrinsic.md: Likewise.
10763 * config/nds32/nds32_intrinsic.h: Likewise.
10764 * config/nds32/nds32.h (nds32_builtins): Likewise.
10765 * config/nds32/nds32.opt (munaligned-access): New option.
10766 * config/nds32/nds32.c (nds32_asm_file_start): Display
10767 flag_unaligned_access status.
10768
10769 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10770
10771 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10772 -mno-relax is present.
10773 * config/riscv/linux.h (LINK_SPEC): Ditto.
10774
10775 2018-04-20 Martin Sebor <msebor@redhat.com>
10776
10777 PR c/85365
10778 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10779 for null pointers.
10780 (gimple_fold_builtin_stxcpy_chk): Same.
10781 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10782
10783 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
10784
10785 PR target/85456
10786 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10787 __powikf2 when long double is IEEE 128-bit.
10788
10789 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10790
10791 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10792 step to make sure stack always aligned.
10793
10794 2018-04-20 Carl Love <cel@us.ibm.com>
10795
10796 PR target/83402
10797 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10798 size check for arg0.
10799
10800 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
10801 Tom de Vries <tom@codesourcery.com>
10802
10803 PR target/85445
10804 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10805 Emit insns for calls too.
10806 (nvptx_find_par): Always look for worker-level predecessor insn.
10807 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
10808 calls.
10809 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10810 (nvptx_process_pars): Propagate frames for calls.
10811
10812 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10813
10814 PR target/85469
10815 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10816 Removed.
10817 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10818 (ix86_handle_option): Don't handle OPT_mibt.
10819 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10820 __SHSTK__.
10821 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10822 has_ibt and ibt.
10823 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10824 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10825 (ix86_target_macros): Define __CET__ with flag_cf_protection
10826 for -fcf-protection.
10827 * config/i386/i386.c (isa2_opts): Remove -mibt.
10828 * config/i386/i386.h (TARGET_IBT): Removed.
10829 (TARGET_IBT_P): Likewise.
10830 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10831 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10832 * config/i386/i386.opt (mcet): Update help message.
10833 (mshstk): Likewise.
10834 (mibt): Removed.
10835 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10836 -mcet as an alias for -mshstk.
10837
10838 2018-04-20 Richard Biener <rguenther@suse.de>
10839
10840 PR middle-end/85475
10841 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10842 complexity by forcing a single use of the multiply operand.
10843
10844 2018-04-20 Martin Jambor <mjambor@suse.cz>
10845
10846 ipa/85449
10847 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10848 recursion dependency to only apply to non-clones.
10849
10850 2018-04-20 Martin Jambor <mjambor@suse.cz>
10851
10852 ipa/85447
10853 * ipa-cp.c (create_specialized_node): Check that clones of
10854 self-recursive edges exist during IPA-CP.
10855
10856 2018-04-19 Toon Moene <toon@moene.org>
10857
10858 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10859 by -O3.
10860
10861 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10862
10863 PR tree-optimization/85467
10864 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10865 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10866 VECTOR_CST element to type.
10867
10868 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10869
10870 PR target/85397
10871 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10872 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10873 (builtin_longjmp): Likewise.
10874 (save_stack_nonlocal): New pattern.
10875 (restore_stack_nonlocal): Likewise.
10876
10877 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10878
10879 PR target/85404
10880 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10881 Replace ASM_OUTPUT_LABEL with fprintf.
10882
10883 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10884
10885 PR target/85417
10886 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10887 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10888 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10889 define __IBT__ and __SHSTK__ for -fcf-protection.
10890 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10891 TARGET_IBT.
10892 (ix86_trampoline_init): Likewise.
10893 (x86_output_mi_thunk): Likewise.
10894 (ix86_notrack_prefixed_insn_p): Likewise.
10895 (ix86_option_override_internal): Don't disallow -fcf-protection.
10896 * config/i386/i386.md (rdssp<mode>): Also enable for
10897 -fcf-protection.
10898 (incssp<mode>): Likewise.
10899 (nop_endbr): Likewise.
10900 * config/i386/i386.opt (mcet): Change help message to built-in
10901 functions only.
10902 (mibt): Likewise.
10903 (mshstk): Likewise.
10904 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10905 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10906 enable CET built-in functions.
10907
10908 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10909
10910 * common/config/i386/i386-common.c
10911 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10912 OPTION_MASK_ISA_MOVDIRI_UNSET,
10913 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10914 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10915 * config.gcc (movdirintrin.h): New header.
10916 * config/i386/cpuid.h (bit_MOVDIRI,
10917 bit_MOVDIR64B): New bits.
10918 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10919 and -mmvodir64b.
10920 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10921 (VOID, PVOID, PCVOID)): New function types.
10922 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10923 __builtin_ia32_directstoreu_u64,
10924 __builtin_ia32_movdir64b): New builtins.
10925 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10926 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10927 and -mmovdiri.
10928 (ix86_valid_target_attribute_inner_p): Ditto.
10929 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10930 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10931 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10932 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10933 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10934 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10935 (movdiri<mode>, movdir64b_<mode>): New.
10936 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10937 * config/i386/immintrin.h: Include movdirintrin.h.
10938 * config/i386/movdirintrin.h: New file.
10939 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10940
10941 2018-04-19 Richard Biener <rguenther@suse.de>
10942
10943 PR middle-end/85455
10944 * cfg.c (clear_bb_flags): When loop state says we have
10945 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10946
10947 2018-04-19 Richard Biener <rguenther@suse.de>
10948
10949 PR tree-optimization/84737
10950 * tree-vect-data-refs.c (vect_copy_ref_info): New function
10951 copying restrict info.
10952 (vect_setup_realignment): Use it.
10953 * tree-vectorizer.h (vect_copy_ref_info): Declare.
10954 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10955 the first DR to all generated stores.
10956 (vectorizable_load): Likewise for loads.
10957
10958 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10959
10960 PR tree-optimization/85446
10961 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10962 the integral and pointer types to have the same precision.
10963
10964 * doc/install.texi: Document --disable-cet being the default and
10965 --enable-cet=auto.
10966
10967 2018-04-18 Martin Liska <mliska@suse.cz>
10968
10969 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10970 style.
10971
10972 2018-04-18 Martin Liska <mliska@suse.cz>
10973
10974 Revert
10975 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10976
10977 PR ipa/83983
10978 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10979 arguments if they are comparable.
10980
10981 2018-04-18 Martin Liska <mliska@suse.cz>
10982
10983 Revert
10984 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10985
10986 PR lto/84805
10987 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10988 incomplete types.
10989
10990 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
10991
10992 PR target/85388
10993 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10994 ENDBR after calling __morestack.
10995
10996 2018-04-18 David Malcolm <dmalcolm@redhat.com>
10997
10998 PR jit/85384
10999 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11000 by using gcc_base_ver to generate a gcc_driver_version, and use
11001 it when generating GCC_DRIVER_NAME.
11002 * configure: Regenerate.
11003
11004 2018-04-18 Jakub Jelinek <jakub@redhat.com>
11005
11006 PR target/81084
11007 * config.gcc: Obsolete powerpc*-*-*spe*.
11008
11009 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11010
11011 PR debug/84637
11012 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11013 (stabstr_D): Change type of unum from unsigned int to
11014 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
11015 type.
11016
11017 2018-04-17 Jim Wilson <jimw@sifive.com>
11018
11019 PR 84856
11020 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11021 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11022 Set arg_pointer_offset after using pretend_args_size.
11023
11024 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11025
11026 PR rtl-optimization/85431
11027 * dse.c (record_store): Ignore zero width stores.
11028
11029 PR sanitizer/85230
11030 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11031 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11032 __builtin_stack_restore rather than after it.
11033 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11034 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11035 argument instead of virtual_dynamic_stack_rtx.
11036
11037 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11038
11039 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11040 New prototype.
11041 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11042 Add note to error message to explain internal mapping of overloaded
11043 built-in function name to non-overloaded built-in function name.
11044 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11045 function.
11046
11047 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11048
11049 PR target/85424
11050 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11051 where the inputs overlap with the output.
11052
11053 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11054
11055 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11056 (=v, v) alternative and explicit "memory" attribute.
11057 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11058 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11059 attributes.
11060 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11061 "sselog1" type instead of "sselog".
11062 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11063 "sselog". Remove explicit "memory" attribute.
11064 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11065 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11066 attributes.
11067 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11068 "sselog1" type instead of "sselog". Remove explicit "memory"
11069 attribute.
11070 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11071 use "sselog1" type instead of "sselog". Remove explicit "memory"
11072 attribute.
11073 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11074 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11075 attributes.
11076 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11077 "sselog1" type instead of "sselog". Remove explicit "memory"
11078 attribute.
11079 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11080 use "sselog1" type instead of "sselog". Remove explicit "memory"
11081 attribute.
11082
11083 PR target/85430
11084 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11085
11086 PR middle-end/85414
11087 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11088 on a SUBREG.
11089
11090 2018-04-17 Martin Jambor <mjambor@suse.cz>
11091
11092 PR ipa/85421
11093 * ipa-cp.c (create_specialized_node): Call
11094 expand_all_artificial_thunks if necessary.
11095
11096 2018-04-17 Martin Liska <mliska@suse.cz>
11097
11098 PR lto/85405
11099 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11100 in message, remote space in between '_G' and '('.
11101
11102 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11103
11104 PR target/85281
11105 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11106 avx512f_vmcmp<mode>3<round_saeonly_name>,
11107 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11108 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11109 avx512f_rndscale<mode><round_saeonly_name>,
11110 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11111 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11112 Use %<iptr>2 instead of %2 for -masm=intel.
11113 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11114 avx512f_vcvttss2usi<round_saeonly_name>,
11115 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11116 -masm=intel.
11117 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11118 avx512f_vcvttsd2usi<round_saeonly_name>,
11119 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11120 Use %q1 instead of %1 for -masm=intel.
11121 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11122 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11123 of %3 for -masm=intel.
11124 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11125 -masm=intel.
11126 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11127 -masm=intel.
11128 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11129 -masm=intel.
11130 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11131 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11132 %g1.
11133 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11134 -masm=intel.
11135 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11136 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11137 %g1 and one with %0 and %1.
11138 (avx512er_vmrcp28<mode><round_saeonly_name>,
11139 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11140 %1 for -masm=intel.
11141 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11142 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11143 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11144 of %0 and %{%4%} for -masm=intel.
11145 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11146 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11147 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11148 order of %0 and %{%5%}%{z%} for -masm=intel.
11149
11150 2018-04-17 Jan Hubicka <jh@suse.cz>
11151
11152 PR lto/85405
11153 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11154
11155 2018-04-17 Martin Liska <mliska@suse.cz>
11156
11157 PR ipa/85329
11158 * multiple_target.c (create_dispatcher_calls): Set apostrophes
11159 for target_clone error message. Make default implementation
11160 clone to be a local declaration.
11161 (separate_attrs): Add new argument and check for an empty
11162 string.
11163 (expand_target_clones): Handle it.
11164 (ipa_target_clone): Make redirection just for target_clones
11165 functions.
11166
11167 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
11168 Tom de Vries <tom@codesourcery.com>
11169
11170 PR middle-end/84955
11171 * omp-expand.c (expand_oacc_for): Add dummy false branch for
11172 tiled basic blocks without omp continue statements.
11173
11174 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
11175
11176 PR target/83660
11177 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11178 vec_extract expression as having side effects to make sure it gets
11179 a cleanup point.
11180
11181 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
11182
11183 PR target/85403
11184 * config/i386/i386.c (get_builtin_code_for_version): Check
11185 error_mark_node.
11186
11187 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
11188
11189 PR target/84331
11190 * config.gcc: Support "skylake".
11191 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11192 PROCESSOR_SKYLAKE.
11193 * config/i386/i386.c (m_SKYLAKE): Define.
11194 (processor_target_table): Add "skylake".
11195 (ix86_option_override_internal): Add "skylake".
11196 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11197 PROCESSOR_CANNONLAKE.
11198 (get_builtin_code_for_version): Fix priority for
11199 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11200 PROCESSOR_SKYLAKE-AVX512.
11201 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11202 (processor_type): Add PROCESSOR_SKYLAKE.
11203
11204 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11205 Jason Merrill <jason@redhat.com>
11206
11207 PR c++/85112
11208 * convert.c (convert_to_integer_1): Use direct recursion for
11209 enumeral types and types with a precision less than the number
11210 of bits in their mode.
11211
11212 2018-04-16 Julia Koval <julia.koval@intel.com>
11213
11214 PR target/84413
11215 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11216 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11217
11218 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11219
11220 PR target/85293
11221 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11222 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11223 and -mno-direct-move.
11224
11225 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11226
11227 PR target/83402
11228 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11229 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11230 Ensure negative shifts result in {0}.
11231
11232 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11233
11234 PR rtl-optimization/79916
11235 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11236 regs (if any) to define how to gnerate SD moves when LRA is in
11237 progress.
11238
11239 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11240
11241 PR rtl-optimization/85393
11242 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11243 * except.c (expand_dw2_landing_pad_for_region): Make static.
11244 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11245 a label and unconditional jump to old_bb, rather than
11246 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11247 basic block.
11248
11249 PR rtl-optimization/85376
11250 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11251 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11252 instead of a specific value.
11253
11254 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11255 Bin Cheng <bin.cheng@arm.com>
11256
11257 PR tree-optimization/82965
11258 PR tree-optimization/83991
11259 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11260 by_profile_only parameter.
11261 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11262 information if the loop was predicted to iterate too many times.
11263 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11264
11265 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11266
11267 PR lto/71991
11268 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11269 always inline.
11270
11271 2018-04-13 Martin Liska <mliska@suse.cz>
11272 Jakub Jelinek <jakub@redhat.com>
11273
11274 PR middle-end/81657
11275 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11276 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11277 * builtins.c (expand_builtin_memory_copy_args): Use
11278 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11279 handle dest_addr == pc_rtx.
11280
11281 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11282
11283 PR target/85291
11284 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11285 asked to not generate direct moves.
11286 (fix_trunc<mode>si2_stfiwx): Similar.
11287 (fix_trunc<mode>si2_internal): Similar.
11288
11289 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11290
11291 PR debug/83157
11292 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11293 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11294 lookup if dest in some wider mode is known to be const0_rtx and
11295 if so, record permanent equivalence for it to be ZERO_EXTEND of
11296 the narrower mode destination.
11297
11298 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11299
11300 * lto-streamer-out.c (output_function): Revert 259346.
11301 * omp-expand.c (expand_oacc_for): Likewise.
11302
11303 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11304
11305 PR rtl-optimization/85354
11306 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11307 * sel-sched.c (sel_global_init): ... here.
11308
11309 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11310
11311 PR target/85238
11312 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11313 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11314 mode for PE-COFF targets.
11315 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11316 (i386_pe_asm_lto_end): Likewise.
11317 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11318 (TARGET_ASM_LTO_END): Likewise.
11319 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11320 (i386_pe_asm_lto_start): New function.
11321 (i386_pe_asm_lto_end): Likewise.
11322
11323 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11324 Richard Biener <rguenther@suse.de>
11325
11326 PR middle-end/84955
11327 * lto-streamer-out.c (output_function): Fix CFG loop state before
11328 streaming out.
11329 * omp-expand.c (expand_oacc_for): Handle calls to internal
11330 functions like regular functions.
11331
11332 2018-04-12 Richard Biener <rguenther@suse.de>
11333
11334 PR lto/85371
11335 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11336 for the early LTO debug to properly generate references to it
11337 during DIE emission. Do not re-use that for the skeleton for
11338 split-dwarf.
11339 (dwarf2out_early_finish): Likewise.
11340
11341 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11342
11343 PR target/85328
11344 * config/i386/sse.md
11345 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11346 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11347 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11348 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11349 and output is a reg, avoid creating invalid lowpart subreg, but
11350 instead split into a 512-bit move. Don't split if not AVX512VL,
11351 input is xmm16+ reg and output is a mem.
11352 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11353 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11354 xmm16+ reg and output is a mem.
11355
11356 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11357
11358 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11359 also for flag_dwarf2_cfi_asm.
11360
11361 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11362
11363 PR rtl-optimization/85342
11364 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11365 a bool scalar var inside of the loop instead. Don't try to update
11366 recog_data.operand after failed apply_change_group.
11367
11368 2018-04-12 Tom de Vries <tom@codesourcery.com>
11369
11370 PR target/85296
11371 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11372 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11373 array with flexible array member as array without given dimension.
11374 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11375 argument for undefined param to true.
11376
11377 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11378
11379 PR target/85321
11380 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11381 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11382 from PowerPC section.
11383 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11384 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11385 help text that is too long.
11386 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11387 help text that is too long.
11388 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11389 help text that is too long.
11390
11391 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11392
11393 * config/alpha/alpha.md (stack_probe_internal): Rename
11394 from "probe_stack". Update all callers.
11395
11396 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11397
11398 PR rtl-optimization/84566
11399 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11400 sched_macro_fuse_insns.
11401
11402 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11403
11404 PR target/84301
11405 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11406 (compute_block_dependences): ... from here.
11407
11408 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11409
11410 PR tree-optimization/85331
11411 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11412 from int to HOST_WIDE_INT.
11413
11414 2018-04-11 Martin Jambor <mjambor@suse.cz>
11415
11416 PR ipa/84149
11417 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11418 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11419 not the same as the source val.
11420 (cgraph_edge_brings_value_p): New parameter.
11421 (gather_edges_for_value): Pass destination value to
11422 cgraph_edge_brings_value_p.
11423 (perhaps_add_new_callers): Likewise.
11424 (get_info_about_necessary_edges): Likewise and exclude values brought
11425 only by self-recursive edges.
11426 (create_specialized_node): Redirect only clones of self-calling edges.
11427 (+self_recursive_pass_through_p): New function.
11428 (find_more_scalar_values_for_callers_subset): Use it.
11429 (find_aggregate_values_for_callers_subset): Likewise.
11430 (known_aggs_to_agg_replacement_list): Removed.
11431 (decide_whether_version_node): Re-calculate known constants for all
11432 remaining context clones.
11433
11434 2018-04-11 Richard Biener <rguenther@suse.de>
11435
11436 PR lto/85339
11437 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11438 from early DWARF output.
11439 (dwarf2out_early_finish): Output line info unconditionally into
11440 early DWARF and add reference to it.
11441
11442 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11443
11444 PR target/85281
11445 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11446 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11447 other than V2DFmode using iptr mode attribute.
11448 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11449
11450 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11451
11452 PR rtl-optimization/84659
11453 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11454
11455 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11456
11457 PR debug/85302
11458 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11459 SIZEP is NULL.
11460 (output_loc_list): Pass address of a dummy size variable even in the
11461 locview handling loop.
11462 (index_location_lists): Add comment on why skip_loc_list_entry can't
11463 call size_of_locs.
11464
11465 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11466
11467 PR target/85261
11468 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11469 into register.
11470
11471 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11472
11473 PR target/85321
11474 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11475 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11476 and -mstring-compare-inline-limit.
11477
11478 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11479
11480 PR target/85287
11481 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11482 for stack clash protection in a register whenever we need it to be in
11483 a register.
11484
11485 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11486
11487 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11488 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11489
11490 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11491
11492 PR target/85321
11493 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11494 the help text.
11495 (mlong-double-): Ditto.
11496 * config/rs6000/sysv4.opt (msdata=): Ditto.
11497 (mtls-size=): Ditto.
11498
11499 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11500
11501 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11502 erroneous entries for
11503 "vector int vec_ldl (int, long int *)", and
11504 "vector unsigned int vec_ldl (int, unsigned long int *)".
11505 Add comments and entries for
11506 "vector bool char vec_ldl (int, bool char *)",
11507 "vector bool short vec_ldl (int, bool short *)",
11508 "vector bool int vec_ldl (int, bool int *)",
11509 "vector bool long long vec_ldl (int, bool long long *)",
11510 "vector pixel vec_ldl (int, pixel *)",
11511 "vector long long vec_ldl (int, long long *)",
11512 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11513 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11514 type tree bool_long_long_type_node and correct definition of
11515 bool_V2DI_type_node to make reference to this new type tree.
11516 (rs6000_mangle_type): Replace erroneous reference to
11517 bool_long_type_node with bool_long_long_type_node.
11518 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11519 comments to emphasize sign distinctions for char and int types and
11520 replace RS6000_BTI_bool_long constant with
11521 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11522 use of RS6000_BTI_pixel.
11523 (bool_long_type_node): Remove this macro definition.
11524 (bool_long_long_type_node): New macro definition
11525
11526 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11527
11528 PR rtl-optimization/85300
11529 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11530 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11531 simplify_unary_operation fails.
11532
11533 2018-04-10 Martin Liska <mliska@suse.cz>
11534
11535 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11536 cgraph_edge and ipa_ref.
11537
11538 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11539
11540 PR target/85177
11541 PR target/85255
11542 * config/i386/sse.md
11543 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11544 computation of the VEC_MERGE selector from mask.
11545 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11546 Fix decoding of the VEC_MERGE selector into mask.
11547
11548 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11549
11550 PR tree-optimization/85286
11551 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11552
11553 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11554
11555 * final.c (final_1): Set insn_last_address as well as
11556 insn_current_address.
11557
11558 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11559
11560 PR target/85173
11561 * explow.c (emit_stack_probe): Call validize_mem on memory location
11562 before passing it to gen_probe_stack. Create address operand and
11563 legitimize it for the probe_stack_address case.
11564
11565 2018-04-09 Jan Hubicka <jh@suse.cz>
11566
11567 PR lto/85078
11568 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11569 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11570 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11571 walk basetypes.
11572 (free_lang_data): Rebuild type inheritance graph.
11573
11574 2018-04-09 Martin Sebor <msebor@redhat.com>
11575
11576 * invoke.texi (-finline-small-functions): Mention other optimization
11577 options.
11578 (-findirect-inlining, -fpartial-inlining): Same.
11579 (-finline-functions-called-once): Same.
11580 (-freorder-blocks-and-partition): Same.
11581
11582 2018-04-09 Jan Hubicka <jh@suse.cz>
11583
11584 PR rtl/84058
11585 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11586 jumps; choose last target that matches the criteria (i.e.
11587 no partition changes for non-crossing jumps).
11588 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11589 support for redirecting crossing jumps to non-crossing.
11590
11591 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11592
11593 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11594 also for naked functions.
11595
11596 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11597
11598 * config/arc/arc.md (add_shift): New pattern.
11599 (add_shift2): Likewise.
11600 (sub_shift): Likewise.
11601 (sub_shift_cmp0_noout): Likewise.
11602 (compare_si_ashiftsi): Likewise.
11603 (xbfu_cmp0_noout): New combine pattern.
11604 (xbfu_cmp0"): Likewise.
11605 (movsi_set_cc_insn): Place the predicable variant first.
11606 (commutative_binary_cmp0_noout): Remove clobber.
11607 (commutative_binary_cmp0): New pattern.
11608 (noncommutative_binary_cmp0): Likewise.
11609 (noncommutative_binary_cmp0_noout): Likewise.
11610 (noncommutative_binary_comparison_result_used): Removed.
11611 (rsub_cmp0): New pattern.
11612 (rsub_cmp0_noout): Likewise.
11613 (extzvsi): Changed, keep only meaningful variants.
11614 (SQH, SEZ): New iterators.
11615 (SQH_postfix): New mode attribute.
11616 (SEZ_prefix): New code attribute.
11617 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11618 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11619 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11620 of numerical value.
11621 (noncommutative_operator): Check the availability of barrel
11622 shifter option.
11623
11624 2018-04-09 Richard Biener <rguenther@suse.de>
11625
11626 PR tree-optimization/85284
11627 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11628 Only use the niter constraining form of simple_iv when the exit
11629 is always executed.
11630
11631 2018-04-09 Tom de Vries <tom@codesourcery.com>
11632
11633 PR target/84041
11634 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11635 (define_expand "*memory_barrier"): New define_expand.
11636 (define_insn "memory_barrier"): New insn.
11637
11638 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11639
11640 PR rtl-optimization/80463
11641 PR rtl-optimization/83972
11642 PR rtl-optimization/83480
11643
11644 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11645 correct producer for the insn.
11646 (tidy_control_flow): Fixup seqnos in case of debug insns.
11647
11648 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11649
11650 PR rtl-optimization/83913
11651
11652 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11653 different sched-times when merging exprs.
11654
11655 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11656
11657 PR rtl-optimization/83962
11658
11659 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11660 tidy_fallthru_edge and tidy_control_flow.
11661
11662 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11663
11664 PR rtl-optimization/83530
11665
11666 * sel-sched.c (force_next_insn): New global variable.
11667 (remove_insn_for_debug): When force_next_insn is true, also leave only
11668 next insn in the ready list.
11669 (sel_sched_region): When the region wasn't scheduled, make another pass
11670 over it with force_next_insn set to 1.
11671
11672 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11673
11674 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11675 into tm_file.
11676 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11677 for interrupt control.
11678 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11679 functions for interrupt control.
11680 * config/nds32/nds32-intrinsic.md: Likewise.
11681 * config/nds32/nds32_intrinsic.h: Likewise.
11682 * config/nds32/nds32.h (nds32_builtins): Likewise.
11683
11684 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11685
11686 * config/nds32/nds32.c (nds32_init_machine_status,
11687 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11688 strict_aligned_p field.
11689 (nds32_expand_to_rtl_hook): New function.
11690 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11691 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11692
11693 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11694 Chung-Ju Wu <jasonwucj@gmail.com>
11695
11696 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11697 * config/nds32/nds32-n7.md: New file.
11698 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11699 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11700 pipeline.
11701 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11702 * config/nds32/nds32.md (pipeline_model): Add n7.
11703 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11704 * config/nds32/pipelines.md: Include n7 settings.
11705
11706 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11707 Chung-Ju Wu <jasonwucj@gmail.com>
11708
11709 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11710 * config/nds32/nds32-e8.md: New file.
11711 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11712 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11713 pipeline.
11714 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11715 * config/nds32/nds32.md (pipeline_model): Add e8.
11716 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11717 * config/nds32/pipelines.md: Include e8 settings.
11718
11719 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11720 Chung-Ju Wu <jasonwucj@gmail.com>
11721
11722 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11723 * config/nds32/nds32-n8.md: New file.
11724 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11725 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11726 pipeline.
11727 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11728 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11729 * config/nds32/nds32.md (pipeline_model): Add n8.
11730 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11731 * config/nds32/pipelines.md: Include n8 settings.
11732
11733 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11734 Chung-Ju Wu <jasonwucj@gmail.com>
11735
11736 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11737 * config/nds32/nds32-n9-2r1w.md: New file.
11738 * config/nds32/nds32-n9-3r2w.md: New file.
11739 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11740 nds32_register_ports): New or modify for cpu n9.
11741 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11742 pipeline.
11743 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11744 * config/nds32/nds32-utils.c: New file.
11745 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11746 TARGET_MUL_SLOW): Define.
11747 * config/nds32/nds32.md (pipeline_model): New attribute.
11748 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11749 New options that support cpu n9.
11750 * config/nds32/pipelines.md: Include n9 settings.
11751 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11752
11753 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11754
11755 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11756 information if necessary.
11757 (output_cond_branch_compare_zero): Likewise.
11758 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11759 (nds32_target_alignment): Refine for alignment.
11760 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11761 (FUNCTION_BOUNDARY): Modify.
11762 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11763 align case.
11764 * config/nds32/nds32.opt (malways-align, malign-functions): New.
11765
11766 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11767
11768 * config/nds32/constants.md (unspec_volatile_element): Add values for
11769 TLB operation and data prefetch.
11770 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11771 functions for TLB operation and data prefetch.
11772 * config/nds32/nds32-intrinsic.md: Likewise.
11773 * config/nds32/nds32_intrinsic.h: Likewise.
11774 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11775 (nds32_print_operand): Likewise.
11776 * config/nds32/nds32.h (nds32_builtins): Likewise.
11777
11778 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
11779 Andrew Pinski <pinsika@gcc.gnu.org>
11780
11781 PR middle-end/82976
11782 * match.pd: Use constant_boolean_node of correct type instead of
11783 boolean_true_node or boolean_false_node for simplifying
11784 pointer comparisons to zero.
11785
11786 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11787
11788 PR tree-optimization/80021
11789 * tree.c (verify_type_variant): Make error call in verify_variant_match
11790 translatable and remove final full stop.
11791
11792 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11793
11794 * config/nds32/constants.md (unspec_volatile_element): Add
11795 UNSPEC_VOLATILE_EH_RETURN.
11796 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11797 nds32_output_stack_pop): Support dwarf exception handling process.
11798 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11799 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11800 exception handling process.
11801 (nds32_compute_stack_frame): Likewise.
11802 (nds32_return_addr_rtx): Likewise.
11803 (nds32_initial_elimination_offset): Likewise.
11804 (nds32_expand_prologue): Likewise.
11805 (nds32_expand_epilogue): Likewise.
11806 (nds32_dynamic_chain_address): New function.
11807 * config/nds32/nds32.h (machine_function): Add fields for dwarf
11808 exception handling.
11809 (DYNAMIC_CHAIN_ADDRESS): Define.
11810 (EH_RETURN_DATA_REGNO): Define.
11811 (EH_RETURN_STACKADJ_RTX): Define.
11812 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11813 patterns for dwarf exception handling.
11814
11815 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11816
11817 * config/nds32/nds32.h: Clean up obsolete macros.
11818
11819 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11820
11821 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11822 Add enum values for particular instructions.
11823 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11824 particular intrinsic functions.
11825 * config/nds32/nds32-intrinsic.md: Likewise.
11826 * config/nds32/nds32_intrinsic.h: Likewise.
11827 * config/nds32/nds32.h (nds32_builtins): Likewise.
11828 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11829 (btst, ave): New patterns for particular instructions.
11830
11831 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11832
11833 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11834 Add enum values for atomic load/store and memory sync.
11835 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11836 and memory sync.
11837 * config/nds32/nds32-intrinsic.md: Likewise.
11838 * config/nds32/nds32_intrinsic.h: Likewise.
11839 * config/nds32/nds32.h (nds32_builtins): Likewise.
11840
11841 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11842
11843 PR tree-optimization/85257
11844 * fold-const.c (native_encode_vector): If not all elts could fit
11845 and off is -1, return 0 rather than offset.
11846 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11847 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11848 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11849 adjust buffer in native_interpret_expr call.
11850
11851 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11852
11853 * config/nds32/constants.md (unspec_volatile_element): Add cache
11854 control enum values.
11855 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11856 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11857 * config/nds32/nds32.c (nds32_cctl_names): New.
11858 (nds32_print_operand): Handle cache control register names.
11859 * config/nds32/nds32.h (nds32_builtins): New enum values.
11860 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11861 macros.
11862 * config/nds32/nds32.md (type): Add mmu.
11863 * config/nds32/pipelines.md (simple_insn): Add mmu.
11864
11865 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11866
11867 * config/nds32/nds32.md (type): Remove call.
11868 * config/nds32/pipelines.md (simple_insn): Likewise.
11869
11870 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11871
11872 * config/nds32/constants.md (unspec_volatile_element): Add
11873 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11874 UNSPEC_VOLATILE_FMFCFG.
11875 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11876 description for fmfcfg and fmfcsr.
11877 (bdesc_1arg): Add fmtcsr.
11878 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11879 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11880 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11881 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11882 unspec_fmfcfg): New patterns.
11883 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11884 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11885 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11886 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11887 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11888 __nds32__fmfcfg): Define.
11889
11890 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11891
11892 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11893 intrinsic register names.
11894 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11895 intrinsic register enum values and macros.
11896
11897 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11898
11899 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11900 for load/store addressing form.
11901 (nds32_print_operand_address): Likewise.
11902
11903 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11904
11905 PR target/85196
11906 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11907 based on LABEL_REF. Remove useless assertion.
11908 (pic_address_needs_scratch): Fix formatting.
11909 (sparc_legitimize_pic_address): Minor tweaks.
11910 (sparc_delegitimize_address): Adjust assertion accordingly.
11911 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11912 into symbolic_operand.
11913 (movsi_high_pic_label_ref): Likewise.
11914 (movsi_lo_sum_pic_label_ref): Likewise.
11915 (movdi_pic_label_ref): Likewise.
11916 (movdi_high_pic_label_ref): Likewise.
11917 (movdi_lo_sum_pic_label_ref): Likewise.
11918
11919 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11920
11921 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11922 custom LIB_SPEC setup.
11923
11924 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11925 Kito Cheng <kito.cheng@gmail.com>
11926
11927 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11928 * config/riscv/freebsd.h: New.
11929
11930 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11931
11932 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11933 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11934 file.
11935
11936 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11937 Kito Cheng <kito.cheng@gmail.com>
11938
11939 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11940 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11941 * config/nds32/nds32-protos.h (nds32_output_call,
11942 nds32_output_return): Declare.
11943 * config/nds32/nds32.md: Refine all the call and return patterns.
11944
11945 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11946
11947 PR debug/85252
11948 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11949 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11950
11951 PR rtl-optimization/84872
11952 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11953 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11954 EDGE_CROSSING edge.
11955
11956 2018-04-06 Tamar Christina <tamar.christina@arm.com>
11957
11958 * expr.c (copy_blkmode_to_reg): Revert 254862.
11959 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11960
11961 2018-04-06 Richard Biener <rguenther@suse.de>
11962
11963 PR middle-end/85244
11964 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11965 after seeing a component reference with an adjacent field. Treat
11966 refs to arrays at struct end of external decls similar to
11967 refs to unconstrained commons.
11968
11969 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11970
11971 PR sanitizer/85213
11972 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11973 look through SAVE_EXPRs with non-side-effects argument. Adjust
11974 recursive calls.
11975 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11976 save_p here.
11977
11978 2018-04-06 Richard Biener <rguenther@suse.de>
11979
11980 PR middle-end/85180
11981 * alias.c (find_base_term): New wrapper around find_base_term
11982 unwinding CSELIB_VAL_PTR changes.
11983 (find_base_term): Do not restore CSELIB_VAL_PTR during the
11984 recursion.
11985
11986 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11987
11988 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11989 instructions.
11990 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11991 constant definitions.
11992 ("nop"): lr 0,0 -> nopr r0
11993 ("nop_lr0", "nop_lr1"): New insn definitions.
11994
11995 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11996
11997 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11998 NDS32_V3PUSH_AVAILABLE_P macro.
11999
12000 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
12001 Chung-Ju Wu <jasonwucj@gmail.com>
12002
12003 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12004 (nds32*-*-*): Add float and fpu_config into supported_defaults.
12005 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12006 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12007 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12008 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12009 * config/nds32/constraints.md: New constraints and checking for hard
12010 float configuration.
12011 * config/nds32/iterators.md: New mode iterator and attribute for hard
12012 float configuration.
12013 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12014 patterns.
12015 * config/nds32/nds32-fpu.md: New file.
12016 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12017 deal with hard float code generation.
12018 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12019 ARCH_V3S.
12020 (abi_type, float_reg_number): New enum type.
12021 * config/nds32/nds32-predicates.c: New predicates for hard float.
12022 * config/nds32/nds32-protos.h: Declare functions for hard float.
12023 * config/nds32/nds32.c: Implementation for hard float configuration.
12024 * config/nds32/nds32.h: Definitions for hard float configuration.
12025 * config/nds32/nds32.md: Include hard float machine description and
12026 modify patterns for hard float configuration.
12027 * config/nds32/nds32.opt: New options for hard float configuration.
12028 * config/nds32/predicates.md: New predicates for hard float
12029 configuration.
12030
12031 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12032
12033 * common/config/nds32/nds32-common.c
12034 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12035
12036 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12037
12038 PR middle-end/85195
12039 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12040 CONSTRUCTOR_ELT (ctor, ...)->value.
12041
12042 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12043
12044 PR target/85193
12045 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12046
12047 2018-04-05 Tom de Vries <tom@codesourcery.com>
12048
12049 PR target/85204
12050 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12051 cond jump.
12052
12053 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12054 Kito Cheng <kito.cheng@gmail.com>
12055
12056 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12057 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12058 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12059 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12060
12061 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12062 Kito Cheng <kito.cheng@gmail.com>
12063
12064 * config/nds32/constraints.md (Ufe): New memory constraint.
12065 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12066 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12067 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12068 operands.
12069 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12070 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12071
12072 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12073
12074 * config/nds32/nds32.md: Use optimize_size in the condition for
12075 alu-shift instructions.
12076
12077 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12078
12079 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12080
12081 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12082
12083 * config/nds32/nds32.md (negsi2): Refine pattern.
12084
12085 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12086 Chung-Ju Wu <jasonwucj@gmail.com>
12087
12088 * config/nds32/iterators.md (shift_rotate): New code iterator.
12089 (shift): New code attribute.
12090 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12091 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12092 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12093 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12094 bit-wise operations.
12095 (andsi3, *andsi3): Ditto.
12096 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12097 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12098 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12099 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12100 nds32_ior_operand, nds32_xor_operand): New predicates.
12101
12102 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12103
12104 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12105 (addsi3, subsi3): ... this.
12106
12107 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12108
12109 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12110
12111 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12112
12113 * config/nds32/nds32.md: Adjust indention.
12114
12115 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12116
12117 * config/nds32/nds32.md (feature): New attribute.
12118
12119 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12120
12121 * config/nds32/nds32.md (subtype): New attribute.
12122
12123 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12124
12125 PR target/85203
12126 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12127 expansion to perform a bitwise AND of the argument followed by a
12128 boolean negation of the result.
12129
12130 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12131
12132 PR rtl-optimization/84878
12133 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12134 the basic block. Assert the use reference is not artificial and that
12135 it has an associated insn.
12136
12137 2018-04-04 Michael Matz <matz@suse.de>
12138
12139 * builtins.c (compute_objsize): Pass correct operand
12140 to array_at_struct_end_p.
12141
12142 2018-04-04 Richard Biener <rguenther@suse.de>
12143
12144 PR lto/85176
12145 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12146 from contexts for DINFO_LEVEL_TERSE and below.
12147
12148 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12149
12150 * config/nds32/nds32-doubleword.md (move_<mode>): Require
12151 resiter_operand condition.
12152 * config/nds32/nds32.md (*move<mode>): Ditto.
12153
12154 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12155 Monk Chiang <sh.chiang04@gmail.com>
12156
12157 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12158
12159 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12160
12161 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12162
12163 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12164 Kito Cheng <kito.cheng@gmail.com>
12165
12166 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12167 nds32_cond_code_str, output_cond_branch,
12168 output_cond_branch_compare_zero, nds32_expand_cbranch,
12169 nds32_expand_cstore, nds32_expand_movcc,
12170 nds32_output_cbranchsi4_equality_zero,
12171 nds32_output_cbranchsi4_equality_reg,
12172 nds32_output_cbranchsi4_equality_reg_or_const_int,
12173 nds32_output_cbranchsi4_greater_less_zero: New functions.
12174 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12175 nds32_expand_cstore, nds32_expand_movcc,
12176 nds32_output_cbranchsi4_equality_zero,
12177 nds32_output_cbranchsi4_equality_reg,
12178 nds32_output_cbranchsi4_equality_reg_or_const_int,
12179 nds32_output_cbranchsi4_greater_less_zero): Declare.
12180 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12181 nds32_rimm11s_operand): New predicates.
12182 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12183 * config/nds32/nds32.md: Rewrite all the branch and conditional move
12184 patterns.
12185
12186 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12187
12188 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12189 * config/nds32/nds32.md: Ditto.
12190 * config/nds32/pipelines.md: Ditto.
12191
12192 2018-04-04 Richard Biener <rguenther@suse.de>
12193
12194 PR tree-optimization/85168
12195 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12196 propagating abnormals.
12197
12198 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12199
12200 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12201
12202 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12203 Kito Cheng <kito.cheng@gmail.com>
12204
12205 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12206 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12207 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12208 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12209 * config/nds32/nds32.md (sibcall_internal): New.
12210 (sibcall_register): Remove.
12211 (sibcall_immediate): Remove.
12212 (sibcall_value_internal): New.
12213 (sibcall_value_register): Remove.
12214 (sibcall_value_immediate): Remove.
12215 * config/nds32/predicates.md (nds32_general_register_operand): New.
12216 (nds32_call_address_operand): New.
12217
12218 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12219
12220 PR rtl-optimization/85167
12221 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12222 bb_defs if *split_p, instead preinitialize it to NULL.
12223
12224 PR tree-optimization/85156
12225 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12226 evaluating the argument multiple times.
12227
12228 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12229
12230 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12231 than vector.
12232 (_mm_cvtpd_ps): Likewise.
12233 (_mm_cvttpd_epi32): Likewise.
12234 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12235 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12236 vector, pixel, and bool following altivec.h include.
12237
12238 2018-04-03 Martin Sebor <msebor@redhat.com>
12239
12240 * doc/extend.texi (Common Function Attributes): Clarify.
12241 (const attribute): Likewise.
12242 (pure attribute): Likewise.
12243
12244 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12245
12246 PR target/85169
12247 * config/i386/i386.c (ix86_expand_vector_set): Use
12248 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12249
12250 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12251
12252 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12253 instructions when changing rounding bits to preserve precision bits
12254 in the x87 control word.
12255
12256 2018-04-03 Martin Liska <mliska@suse.cz>
12257
12258 PR tree-optimization/82491
12259 * rtl.h (strip_offset_and_add): Replace += suboffset with
12260 poly_uint64 () + suboffset.
12261
12262 2018-03-29 Martin Liska <mliska@suse.cz>
12263 Martin Jambor <mjambor@suse.cz>
12264
12265 PR ipa/84947
12266 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12267 param_type is not an integral or pointer type.
12268
12269 2018-04-03 Richard Biener <rguenther@suse.de>
12270
12271 * sese.h (recompute_all_dominators): Remove.
12272
12273 2018-04-02 Martin Sebor <msebor@redhat.com>
12274
12275 * doc/invoke.texi (-Wrestrict): Fix typos.
12276
12277 2018-04-02 Jim Wilson <jimw@sifive.com>
12278
12279 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12280 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12281 (<optab>di3, <optab>si3_extend): Likewise.
12282 (<optab>si3_mask, <optab>si3_mask_1): New.
12283 (<optab>di3_mask, <optab>di3_mask_1): New.
12284 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12285 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12286 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12287
12288 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12289
12290 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12291 example.
12292
12293 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12294
12295 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12296 (nds32_canonicalize_comparison): New function.
12297
12298 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12299 Kito Cheng <kito.cheng@gmail.com>
12300 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12301
12302 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12303 * config/nds32/constants.md (unspec_volatile_element): Add
12304 UNSPEC_VOLATILE_RELAX_GROUP.
12305 * config/nds32/nds32-relax-opt.c: New file.
12306 * config/nds32/nds32-predicates.c
12307 (nds32_symbol_load_store_p): New function.
12308 * config/nds32/nds32-protos.h
12309 (nds32_symbol_load_store_p): Declare function.
12310 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12311 * config/nds32/nds32.c
12312 (nds32_register_pass): New function to register pass.
12313 (nds32_register_passes): New function to register passes.
12314 * config/nds32/nds32.md (relax_group): New pattern.
12315 * config/nds32/nds32.opt (mrelax-hint): New option.
12316 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12317
12318 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12319
12320 * config/nds32/t-nds32: Modify files dependency.
12321
12322 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12323
12324 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12325 (PROFILE_HOOK): Define its implementation.
12326
12327 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12328
12329 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12330 type and 32-bit size.
12331
12332 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12333
12334 PR middle-end/85090
12335 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12336 (V_128_256): New mode iterator.
12337 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12338 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12339 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12340 of V.
12341 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12342 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12343
12344 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12345
12346 PR target/83315
12347 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12348 NaN inputs correctly.
12349
12350 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12351
12352 PR target/80546
12353 * config/rs6000/vsx.md (??r): New mode attribute.
12354 (*vsx_mov<mode>_64bit): Use it.
12355 (*vsx_mov<mode>_32bit): Likewise.
12356
12357 2018-03-30 Martin Sebor <msebor@redhat.com>
12358
12359 PR tree-optimization/84818
12360 * builtins.c (check_access): Use warning_n.
12361
12362 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12363
12364 PR target/83822
12365 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12366 condition.
12367 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12368 condition.
12369
12370 2018-03-30 Julia Koval <julia.koval@intel.com>
12371
12372 PR target/84413
12373 * x86-tune.def (movx, partial_reg_dependency): Enable for
12374 m_SKYLAKE_AVX512.
12375
12376 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12377
12378 PR inline-asm/84985
12379 * lra-constraints.c (process_alt_operands): Move setting
12380 this_alternative_matches below.
12381
12382 2018-03-29 Martin Liska <mliska@suse.cz>
12383
12384 PR lto/84995.
12385 * doc/invoke.texi: Document how LTO works with debug info.
12386 Describe auto-load support of binutils. Mention 'x86-64'
12387 as valid option value of -march option.
12388
12389 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12390
12391 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12392
12393 PR c/85094
12394 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12395 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12396 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12397 checking.
12398
12399 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12400
12401 PR target/84912
12402 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12403 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12404 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12405 for RS6000_BTM_POWERPC64.
12406 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12407 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12408 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12409 definition.
12410 (DIVDE): Use it.
12411 (DIVDEU): Likewise.
12412
12413 2018-03-28 Carl Love <cel@us.ibm.com>
12414
12415 Revert
12416 2017-09-27 Carl Love <cel@us.ibm.com>
12417
12418 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12419 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12420 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12421 fctiw instruction.
12422
12423 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12424
12425 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12426 instead of __vector bool.
12427 (_mm_max_pu8): Likewise.
12428 (_mm_min_pi16): Likewise.
12429
12430 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12431
12432 PR target/84912
12433 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12434 (DIVWEUO): Likewise.
12435 (DIVDEO): Likewise.
12436 (DIVDEUO): Likewise.
12437 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12438 DIVWEUO and DIVDEUO.
12439 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12440 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12441 (div_extend): Likewise.
12442 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12443 builtin function.
12444 (__builtin_divweuo): Likewise.
12445 (__builtin_divdeo): Likewise.
12446 (__builtin_divdeuo): Likewise.
12447
12448 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12449
12450 PR target/85095
12451 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12452 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12453
12454 PR tree-optimization/82004
12455 * gimple-match-head.c (optimize_pow_to_exp): New function.
12456 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12457 Don't fold to exp if optimize_pow_to_exp is false.
12458
12459 2018-03-28 Martin Liska <mliska@suse.cz>
12460
12461 PR other/84819
12462 * calls.c (initialize_argument_information): Fix trailing space.
12463 * common.opt: Fix typo and provide better explanation for
12464 -fsanitize-coverage option.
12465 * config/i386/i386.opt: Fix typo.
12466
12467 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12468 Martin Liska <mliska@suse.cz>
12469
12470 PR sanitizer/85081
12471 * gimplify.c (asan_poison_variable): Don't do the check for
12472 gimplify_omp_ctxp here.
12473 (gimplify_decl_expr): Do it here.
12474 (gimplify_target_expr): Likewise.
12475
12476 2018-03-28 Martin Liska <mliska@suse.cz>
12477
12478 PR target/84988
12479 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12480 chkp_type_bounds_count if MPX is not enabled.
12481
12482 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12483
12484 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12485
12486 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12487
12488 PR target/84914
12489 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12490 function to create the function decl for complex long double
12491 multiply and divide for -mabi=ieeelongdouble.
12492 (init_float128_ieee): Call it.
12493
12494 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12495
12496 PR target/85044
12497 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12498 -fcf-protection=branch -mibt.
12499 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12500
12501 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12502
12503 PR target/81863
12504 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12505 arm_word_relocations.
12506
12507 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12508
12509 PR target/85056
12510 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12511 extern array declarations.
12512
12513 2018-03-27 Richard Biener <rguenther@suse.de>
12514
12515 PR middle-end/84067
12516 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12517 explicit single_use checks.
12518
12519 2018-03-27 Richard Biener <rguenther@suse.de>
12520
12521 PR tree-optimization/85082
12522 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12523 Valueize the VUSE.
12524
12525 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12526
12527 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12528 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12529 Turn on fasynchronous-unwind-tables and funwind-tables.
12530
12531 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12532
12533 PR target/85073
12534 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12535 (*bmi_blsr_<mode>_ccz): Ditto.
12536
12537 2018-03-26 Tom de Vries <tom@codesourcery.com>
12538
12539 PR tree-optimization/85063
12540 * omp-general.c (offloading_function_p): New function. Factor out
12541 of ...
12542 * omp-offload.c (pass_omp_target_link::gate): ... here.
12543 * omp-general.h (offloading_function_p): Declare.
12544 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12545 with attribute omp declare target for offloading functions.
12546
12547 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12548
12549 PR tree-optimization/84005
12550 * tree-data-ref.h (get_base_for_alignment): Declare.
12551 * tree-data-ref.c (get_base_for_alignment_1): New function.
12552 (get_base_for_alignment): Likewise.
12553 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12554 get_base_for_alignment to find a suitable base object, instead
12555 of always using drb->base_address.
12556
12557 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12558
12559 PR inline-asm/85022
12560 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12561 known size by default.
12562
12563 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12564
12565 PR inline-asm/85030
12566 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12567 and non BLKmode operands.
12568
12569 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12570
12571 PR target/85026
12572 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12573 Clean up attributes.
12574
12575 2018-03-23 Richard Biener <rguenther@suse.de>
12576
12577 PR debug/85020
12578 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12579 we are going to emit early debug for LTO.
12580
12581 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12582
12583 PR inline-asm/85034
12584 * function.c (match_asm_constraints_1): Don't optimize if input
12585 doesn't satisfy general_operand predicate for output's mode.
12586
12587 PR inline-asm/85022
12588 * alias.c (write_dependence_p): Don't require for x_canonicalized
12589 non-VOIDmode if x has VOIDmode.
12590
12591 PR sanitizer/85029
12592 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12593 just don't try to optimize it rather than assert it never happens.
12594
12595 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12596
12597 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12598 macro expansions for definition of ST_INTERNAL_<mode> and
12599 LD_INTERNAL_<mode> builtins.
12600 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12601 Remove prototype.
12602 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12603 function.
12604 (altivec_expand_st_builtin): Likewise.
12605 (altivec_expand_builtin): Remove calls to deleted functions.
12606 (rs6000_address_for_altivec): Delete this function.
12607 * config/rs6000/vector.md: Remove expands for
12608 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12609
12610 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12611
12612 PR target/84826
12613 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12614 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12615 re-computing once computed.
12616 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12617 (arm_init_machine_status): Initialize
12618 machine->static_chain_stack_bytes.
12619
12620 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12621
12622 PR target/84760
12623 * doc/extend.texi: Add four new prototypes for vec_ld.
12624 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12625 definitions for more logical presentation.
12626 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12627 entries for V1TI variants of __builtin_altivec_ld builtin.
12628 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12629 handling of V1TI variant of LVX icode pattern.
12630 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12631 (rs6000_gimple_fold_builtin): Likewise.
12632 (altivec_init_builtins): Add code to define
12633 __builtin_altivec_lvx_v1ti function.
12634
12635 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12636
12637 PR inline-asm/84941
12638 * function.c (match_asm_constraints_1): Don't do the optimization
12639 if input isn't a REG, SUBREG, MEM or constant.
12640
12641 2018-03-22 Tom de Vries <tom@codesourcery.com>
12642
12643 PR tree-optimization/84956
12644 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12645 bb_has_abnormal_pred.
12646
12647 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12648
12649 PR sanitizer/85018
12650 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12651 DECL_INITIAL (decl) to decl at the end.
12652 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12653 adjust the comment.
12654
12655 2018-03-21 Joseph Myers <joseph@codesourcery.com>
12656
12657 * doc/extend.texi (__builtin_tgmath): Document when complex
12658 integer types are treated as _Complex _Float64.
12659
12660 2018-03-21 Tom de Vries <tom@codesourcery.com>
12661
12662 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12663
12664 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12665
12666 PR tree-optimization/84960
12667 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12668 if it is ENTRY block, move them into single succ of ENTRY in that case.
12669
12670 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12671
12672 PR tree-optimization/84811
12673 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12674 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12675 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12676 (known_subrange_p): Update accordingly. Cast each value involved
12677 in the size comparison, rather than casting the result of the
12678 subtraction.
12679
12680 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12681
12682 PR tree-optimization/84982
12683 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12684 by flipping the least significant bit rather than all bits from
12685 bitpos to bitpos + bitsize - 1.
12686
12687 2018-03-21 Nathan Sidwell <nathan@acm.org>
12688
12689 * doc/extend.texi (Deprecated Features): Remove mention of
12690 long-deleted deprecations.
12691
12692 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12693
12694 PR jit/84288
12695 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12696 * configure: Regenerate.
12697
12698 2018-03-21 Tom de Vries <tom@codesourcery.com>
12699
12700 PR tree-optimization/83126
12701 * tree-parloops.c (num_phis): New function.
12702 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12703
12704 2018-03-21 Nathan Sidwell <nathan@acm.org>
12705
12706 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12707 mention anon-struct/union members and trailing attributes.
12708
12709 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12710
12711 PR tree-optimization/84969
12712 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12713 builtin memset partitions if they set different rhs values.
12714
12715 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12716
12717 PR rtl-optimization/84989
12718 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12719 VEC_DUPLICATE with scalar result mode.
12720
12721 2018-03-21 Martin Liska <mliska@suse.cz>
12722
12723 PR ipa/84963
12724 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12725 not intended return statement.
12726
12727 2018-03-21 Martin Liska <mliska@suse.cz>
12728
12729 PR target/84988
12730 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12731 (chkp_find_bound_slots_1): Limit number of iterations.
12732
12733 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
12734
12735 PR target/84838
12736 * Minor grammar fixes for x86 options.
12737
12738 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12739
12740 PR debug/84875
12741 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12742 holding REG_CFA_RESTORE notes, instead turn them into a USE.
12743
12744 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
12745
12746 PR target/83789
12747 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12748 (altivec_lvx_<mode>_1op): Likewise.
12749 (altivec_stvx_<mode>_2op): Likewise.
12750 (altivec_stvx_<mode>_1op): Likewise.
12751 (altivec_lvx_<VM2:mode>): New define_expand.
12752 (altivec_stvx_<VM2:mode>): Likewise.
12753 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12754 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12755 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12756 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12757 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12758 (rs6000_gen_lvx): Likewise.
12759 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12760 (altivec_expand_stv_builtin): Likewise.
12761 (altivec_expand_builtin): Likewise.
12762 * config/rs6000/vector.md: Likewise.
12763
12764 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12765
12766 PR target/82518
12767 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12768 BYTES_BIG_ENDIAN.
12769
12770 2018-03-20 Richard Biener <rguenther@suse.de>
12771
12772 PR target/84986
12773 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12774 sign-conversions as zero, fall back to standard scalar_stmt
12775 cost for the rest.
12776
12777 2018-03-20 Martin Liska <mliska@suse.cz>
12778
12779 PR ipa/84825
12780 * predict.c (rebuild_frequencies): Handle case when we have
12781 PROFILE_ABSENT, but flag_guess_branch_prob is false.
12782
12783 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12784
12785 PR target/84990
12786 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12787 flag_section_anchors.
12788 * varasm.c (use_blocks_for_decl_p): Remove hack for
12789 dw2_force_const_mem.
12790
12791 PR target/84845
12792 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12793 to ...
12794 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
12795 be created, use lowpart_subreg of operands[0] rather than operands[0]
12796 itself.
12797 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12798 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12799 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12800 and n constraint instead of aarch64_shift_imm_di and Usd.
12801 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12802 (*aarch64_<optab>_reg_minus<mode>3): ... this.
12803
12804 2018-03-20 Sudakshina Das <sudi.das@arm.com>
12805
12806 PR target/82989
12807 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12808 to favor GPR over NEON registers.
12809 (<shift>di3_neon): Likewise.
12810
12811 2018-03-20 Tom de Vries <tom@codesourcery.com>
12812
12813 PR target/84952
12814 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12815 (nvptx_process_pars): Emit bar.sync asap and alap.
12816
12817 2018-03-20 Tom de Vries <tom@codesourcery.com>
12818
12819 PR target/84954
12820 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12821 seen_label if seen_label is already set.
12822
12823 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12824
12825 PR target/84945
12826 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12827 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12828 Use 1U instead of 1. Formatting fixes.
12829
12830 PR c/84953
12831 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12832 instead of TREE_TYPE (s1) for the return value.
12833
12834 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12835
12836 PR tree-optimization/84946
12837 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12838 bitsize + bitsize in poly_uint64 rather than poly_int64.
12839
12840 PR sanitizer/78651
12841 * dwarf2asm.c: Include fold-const.c.
12842 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12843 of decl rather than decl itself.
12844
12845 PR rtl-optimization/84643
12846 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12847
12848 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12849
12850 PR sanitizer/78651
12851 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12852 calling assemble_variable.
12853
12854 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12855
12856 PR target/81647
12857 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12858 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12859
12860 2018-03-19 Jim Wilson <jimw@sifive.com>
12861
12862 PR bootstrap/84856
12863 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12864 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12865 (riscv_first_stack_step): Likewise.
12866 (riscv_option_override): Use STACK_BOUNDARY instead of
12867 MIN_STACK_BOUNDARY.
12868 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12869 MIN_STACK_BOUNDARY.
12870 (BIGGEST_ALIGNMENT): Set to 128.
12871 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12872 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12873 STACK_BOUNDARY.
12874
12875 2018-03-19 Richard Biener <rguenther@suse.de>
12876
12877 PR tree-optimization/84933
12878 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12879 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12880
12881 2018-03-19 Richard Biener <rguenther@suse.de>
12882
12883 PR tree-optimization/84859
12884 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12885 (cond_if_else_store_replacement): Perform sinking operation on
12886 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12887 Generalize what a BB with a single eligible store is.
12888
12889 2018-03-19 Richard Biener <rguenther@suse.de>
12890
12891 PR tree-optimization/84929
12892 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12893 chrec_is_positive against non-chrec arg.
12894
12895 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12896
12897 PR target/84711
12898 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12899
12900 2018-03-18 Martin Liska <mliska@suse.cz>
12901
12902 PR rtl-optimization/84635
12903 * regrename.c (build_def_use): Use matches_mode only when
12904 matches >= 0.
12905
12906 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12907
12908 PR tree-optimization/84913
12909 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12910 vectorize chains of COND_EXPRs.
12911
12912 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12913
12914 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12915
12916 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12917
12918 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12919
12920 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12921
12922 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12923
12924 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12925 Kito Cheng <kito.cheng@gmail.com>
12926
12927 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12928 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12929 (nds32_adjust_reg_alloc_order): New function.
12930 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12931
12932 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12933
12934 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12935 nds32_print_operand, nds32_print_operand_address): Use
12936 HOST_WIDE_INT_PRINT_DEC instead.
12937
12938 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12939
12940 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12941
12942 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12943
12944 PR target/84902
12945 * config/i386/i386.c (initial_ix86_tune_features,
12946 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12947 unsigned long long.
12948 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12949 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12950 rather than 1u << ix86_tune. Formatting fix.
12951 (ix86_option_override_internal): Change ix86_arch_mask from
12952 unsigned int to unsigned HOST_WIDE_INT, initialize to
12953 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12954 (ix86_function_specific_restore): Likewise.
12955
12956 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12957
12958 PR target/84899
12959 * postreload.c (reload_combine_recognize_pattern): Perform
12960 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12961 truncate_int_for_mode the result for the destination's mode.
12962
12963 PR c/84909
12964 * hsa-gen.c (mem_type_for_type): Fix comment typo.
12965 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12966 Likewise.
12967 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12968 Likewise.
12969
12970 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
12971
12972 PR target/84876
12973 * lra-assigns.c (lra_split_hard_reg_for): Don't use
12974 regno_allocno_class_array and sorted_pseudos.
12975 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12976 insns where regno is used.
12977
12978 2018-03-16 Martin Liska <mliska@suse.cz>
12979
12980 PR ipa/84833
12981 * multiple_target.c (create_dispatcher_calls): Redirect
12982 reference in the symbol table.
12983
12984 2018-03-16 Martin Liska <mliska@suse.cz>
12985
12986 PR ipa/84722
12987 * multiple_target.c (create_dispatcher_calls): Redirect also
12988 an alias.
12989
12990 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12991
12992 PR c++/79937
12993 PR c++/82410
12994 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12995 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12996 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12997
12998 2018-03-16 Julia Koval <julia.koval@intel.com>
12999
13000 * doc/invoke.texi (Skylake Server): Add CLWB.
13001 Cannonlake): Remove CLWB.
13002
13003 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13004
13005 PR tree-optimization/84841
13006 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13007 1 << 3.
13008 (FLOAT_ONE_CONST_TYPE): Define.
13009 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13010 (sort_by_operand_rank): Put entries with higher constant_type last
13011 rather than first to match comments.
13012
13013 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
13014
13015 * config/nios2/nios2.md (movsi_internal): Fix thinko in
13016 split predicate.
13017
13018 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13019
13020 PR c++/79085
13021 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13022 check and use address of target always.
13023
13024 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13025
13026 PR target/84574
13027 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13028 (indirect_thunk_bnd_needed): Likewise.
13029 (indirect_thunks_used): Likewise.
13030 (indirect_thunks_bnd_used): Likewise.
13031 (indirect_return_needed): New.
13032 (indirect_return_bnd_needed): Likewise.
13033 (output_indirect_thunk_function): Add a bool argument for
13034 function return.
13035 (output_indirect_thunk_function): Don't generate alias for
13036 function return thunk.
13037 (ix86_code_end): Call output_indirect_thunk_function to generate
13038 function return thunks.
13039 (ix86_output_function_return): Set indirect_return_bnd_needed
13040 and indirect_return_needed instead of indirect_thunk_bnd_needed
13041 and indirect_thunk_needed.
13042
13043 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13044
13045 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13046 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13047 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13048
13049 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13050 Paul Hua <paul.hua.gm@gmail.com>
13051
13052 PR c/84852
13053 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13054
13055 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13056
13057 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13058 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13059 resp. SFmode cases.
13060
13061 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13062
13063 PR target/84711
13064 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13065 instead of GET_MODE_SIZE when comparing Units.
13066
13067 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13068
13069 PR target/68256
13070 * varasm.c (hash_section): Return an unchangeble hash value
13071 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13072 Return !aarch64_can_use_per_function_literal_pools_p ().
13073
13074 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13075
13076 PR target/84860
13077 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13078 rather than address of cmode as last argument to prepare_cmp_insn.
13079
13080 2018-03-15 Julia Koval <julia.koval@intel.com>
13081
13082 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13083 F_AVX512VNNI, F_AVX512BITALG): New.
13084
13085 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13086
13087 PR target/83451
13088 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13089 insn for floating-point loads and stores.
13090
13091 2018-03-14 Carl Love <cel@us.ibm.com>
13092
13093 * config/rs6000/rs6000-c.c: Add macro definitions for
13094 ALTIVEC_BUILTIN_VEC_PERMXOR.
13095 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13096 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13097 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13098 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13099 UNSPEC_VPERMXOR.
13100 * config/doc/extend.texi: Add prototypes for vec_permxor.
13101
13102 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13103
13104 PR c/84852
13105 * diagnostic-show-locus.c (class layout_point): Convert m_line
13106 from int to linenum_type.
13107 (line_span::comparator): Use linenum "compare" function when
13108 comparing line numbers.
13109 (test_line_span): New function.
13110 (layout_range::contains_point): Convert param "row" from int to
13111 linenum_type.
13112 (layout_range::intersects_line_p): Likewise.
13113 (layout::will_show_line_p): Likewise.
13114 (layout::print_source_line): Likewise.
13115 (layout::should_print_annotation_line_p): Likewise.
13116 (layout::print_annotation_line): Likewise.
13117 (layout::print_leading_fixits): Likewise.
13118 (layout::annotation_line_showed_range_p): Likewise.
13119 (struct line_corrections): Likewise for field m_row.
13120 (line_corrections::line_corrections): Likewise for param "row".
13121 (layout::print_trailing_fixits): Likewise.
13122 (layout::get_state_at_point): Likewise.
13123 (layout::get_x_bound_for_row): Likewise.
13124 (layout::print_line): Likewise.
13125 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13126 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13127 * input.c (selftest::test_linenum_comparisons): New function.
13128 (selftest::input_c_tests): Call it.
13129 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13130 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13131 * selftest.h (ASSERT_GT): New macro.
13132 (ASSERT_GT_AT): New macro.
13133 (ASSERT_LT): New macro.
13134 (ASSERT_LT_AT): New macro.
13135
13136 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
13137
13138 PR rtl-optimization/84780
13139 * combine.c (distribute_links): Don't make a link based on pc_rtx.
13140
13141 2018-03-14 Martin Liska <mliska@suse.cz>
13142
13143 * tree.c (record_node_allocation_statistics): Use
13144 get_stats_node_kind.
13145 (get_stats_node_kind): New function extracted from
13146 record_node_allocation_statistics.
13147 (free_node): Use get_stats_node_kind.
13148
13149 2018-03-14 Richard Biener <rguenther@suse.de>
13150
13151 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13152 that the value-set of ANTIC_IN doesn't grow.
13153
13154 Revert
13155 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13156 member.
13157 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13158 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13159
13160 2018-03-14 Julia Koval <julia.koval@intel.com>
13161
13162 * config.gcc (icelake-client, icelake-server): New.
13163 (icelake): Remove.
13164 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13165 (initial_ix86_arch_features): Ditto.
13166 (PTA_SKYLAKE): Add SGX.
13167 (PTA_ICELAKE): Remove.
13168 (PTA_ICELAKE_CLIENT): New.
13169 (PTA_ICELAKE_SERVER): New.
13170 (ix86_option_override_internal): Split up icelake on icelake client and
13171 icelake server.
13172 (get_builtin_code_for_version): Ditto.
13173 (fold_builtin_cpu): Ditto.
13174 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13175 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13176 * config/i386/i386.h (processor_type): Ditto.
13177 * doc/invoke.texi: Ditto.
13178
13179 2018-03-14 Jakub Jelinek <jakub@redhat.com>
13180
13181 PR sanitizer/83392
13182 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13183 INTEGER_CST offset, add it together with bitpos / 8 and
13184 sign extend based on POINTER_SIZE.
13185
13186 PR target/84844
13187 Revert
13188 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
13189
13190 PR target/78090
13191 * config/i386/constraints.md (Yc): New register constraint.
13192 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13193 Use Yc constraint for alternative 2 of operand 0. Remove
13194 preferred_for_speed attribute.
13195
13196 2018-03-14 Richard Biener <rguenther@suse.de>
13197
13198 PR tree-optimization/84830
13199 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13200 with the old one to avoid oscillations.
13201
13202 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13203
13204 PR target/83712
13205 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13206 pseudos.
13207 (assign_by_spills): Return a flag of reload assignment failure.
13208 Do not process the reload assignment failures. Do not spill other
13209 reload pseudos if they has the same reg class. Update n if
13210 necessary.
13211 (lra_assign): Add a return arg. Set up from the result of
13212 assign_by_spills call.
13213 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13214 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13215 usage_insns if it is not NULL.
13216 (spill_hard_reg_in_range): New function.
13217 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13218 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13219 function prototypes.
13220 (lra_assign): Change prototype.
13221 * lra.c (lra): Add code to deal with fails by splitting hard reg
13222 live ranges.
13223
13224 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13225
13226 * config/riscv/riscv.opt (mrelax): New option.
13227 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13228 "norelax" when riscv_mrelax is disabled.
13229 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13230
13231 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13232
13233 PR target/84743
13234 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13235 reassociation for int modes.
13236
13237 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13238
13239 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13240 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13241 for big-endian.
13242 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13243 * config/aarch64/aarch64-sve.md
13244 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13245 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13246 (*extend<mode><Vwide>2): Rename to...
13247 (aarch64_sve_extend<mode><Vwide>2): ...this.
13248 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13249 renaming the old pattern to...
13250 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13251 unsigned packs.
13252 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13253 define_expand, renaming the old pattern to...
13254 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13255 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13256 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13257 account when deciding which SVE instruction the optab should use.
13258 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13259
13260 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13261
13262 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13263 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13264 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13265 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13266 (tlsdesc_small_<mode>): Turn a define_expand and use
13267 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13268 (tlsdesc_small_advsimd_<mode>): ...this.
13269 (tlsdesc_small_sve_<mode>): New pattern.
13270
13271 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13272
13273 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13274 (UNSPEC_UMUL_HIGHPART): New constants.
13275 (MUL_HIGHPART): New int iteraor.
13276 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13277 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13278 define_expand.
13279 (*<su>mul<mode>3_highpart): New define_insn.
13280
13281 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13282
13283 PR lto/84805
13284 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13285 incomplete types.
13286
13287 2018-03-13 Martin Liska <mliska@suse.cz>
13288
13289 PR ipa/84658.
13290 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13291 vector.
13292 (sem_item_optimizer::~sem_item_optimizer): Release it.
13293 (sem_item_optimizer::merge_classes): Register variable aliases.
13294 (sem_item_optimizer::fixup_pt_set): New function.
13295 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13296 * ipa-icf.h: Declare new variables and functions.
13297
13298 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13299
13300 PR middle-end/84834
13301 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13302 integer_pow2p@2 and test integer_pow2p in condition.
13303 (A < 0 ? C : 0): Similarly for @1.
13304
13305 PR middle-end/84831
13306 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13307 characters starting at p contain '\0' character, don't look beyond
13308 that.
13309
13310 PR target/84827
13311 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13312 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13313
13314 PR target/84828
13315 * reg-stack.c (change_stack): Change update_end var from int to
13316 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13317 also call set_block_for_insn on the newly added insns and rescan.
13318
13319 PR target/84786
13320 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13321 on the last operand.
13322
13323 PR c++/84704
13324 * tree.c (stabilize_reference_1): Return save_expr (e) for
13325 STATEMENT_LIST even if it doesn't have side-effects.
13326
13327 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13328
13329 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13330
13331 2018-03-12 Renlin Li <renlin.li@arm.com>
13332
13333 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13334 aarch64_output_scalar_simd_mov_immediate.
13335
13336 2018-03-12 Martin Sebor <msebor@redhat.com>
13337
13338 PR tree-optimization/83456
13339 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13340 for perfectly overlapping calls to memcpy.
13341 (gimple_fold_builtin_memory_chk): Same.
13342 (gimple_fold_builtin_strcpy): Handle no-warning.
13343 (gimple_fold_builtin_stxcpy_chk): Same.
13344 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13345
13346 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13347
13348 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13349 parameter. Use it for SFmode.
13350 (rs6000_function_arg_advance_1): Adjust.
13351 (rs6000_function_arg): Adjust.
13352 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13353
13354 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13355
13356 PR rtl-optimization/84169
13357 PR rtl-optimization/84780
13358 * combine.c (can_combine_p): Check for a 2-insn combination whether
13359 the destination register is used between the two insns, too.
13360
13361 2018-03-12 Richard Biener <rguenther@suse.de>
13362
13363 PR tree-optimization/84803
13364 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13365 for refs DR analysis didn't process.
13366
13367 2018-03-12 Richard Biener <rguenther@suse.de>
13368
13369 PR tree-optimization/84777
13370 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13371 force-vectorize loops ignore whether we are optimizing for size.
13372
13373 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13374
13375 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13376 (TARGET_MD_ASM_ADJUST): Define.
13377
13378 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13379 Kito Cheng <kito.cheng@gmail.com>
13380 Chung-Ju Wu <jasonwucj@gmail.com>
13381
13382 * config/nds32/nds32.c (nds32_compute_stack_frame,
13383 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13384 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13385 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13386 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13387 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13388 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13389 * config/nds32/nds32.md (prologue, epilogue): Use macro
13390 NDS32_V3PUSH_AVAILABLE_P to do checking.
13391
13392 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13393
13394 PR debug/58150
13395 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13396 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13397 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13398 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13399 addition of most attributes on !orig_type_die or the attribute not
13400 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13401
13402 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13403 Chung-Ju Wu <jasonwucj@gmail.com>
13404
13405 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13406 __NDS32_VH__ macro.
13407 * config/nds32/nds32.opt (mvh): New option.
13408
13409 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13410 Chung-Ju Wu <jasonwucj@gmail.com>
13411
13412 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13413 function.
13414 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13415 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13416 definition.
13417
13418 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13419 Chung-Ju Wu <jasonwucj@gmail.com>
13420
13421 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13422 function.
13423 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13424 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13425
13426 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13427 Kito Cheng <kito.cheng@gmail.com>
13428 Chung-Ju Wu <jasonwucj@gmail.com>
13429
13430 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13431 UNSPEC_FFMISM and UNSPEC_FLMISM.
13432 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13433 for ffb, ffmism and flmism.
13434 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13435 (unspec_ffmism): Ditto.
13436 (unspec_flmism): Ditto.
13437 (nds32_expand_builtin_impl): Check if string extension is available.
13438 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13439 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13440
13441 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13442
13443 Reverting patch:
13444 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13445
13446 PR target/83712
13447 * lra-assigns.c (assign_by_spills): Return a flag of reload
13448 assignment failure. Do not process the reload assignment
13449 failures. Do not spill other reload pseudos if they has the same
13450 reg class.
13451 (lra_assign): Add a return arg. Set up from the result of
13452 assign_by_spills call.
13453 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13454 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13455 usage_insns if it is not NULL.
13456 (spill_hard_reg_in_range): New function.
13457 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13458 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13459 function prototypes.
13460 (lra_assign): Change prototype.
13461 * lra.c (lra): Add code to deal with fails by splitting hard reg
13462 live ranges.
13463
13464 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13465
13466 PR target/84807
13467 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13468
13469 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13470
13471 PR debug/84620
13472 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13473 (dw_val_node): Add val_symbolic_view.
13474 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13475 (symview_upper_bound): New.
13476 (new_line_info_table): Initialize symviews_since_reset.
13477 (dwarf2out_source_line): Count symviews_since_reset and set
13478 symview_upper_bound.
13479 (dw_val_equal_p): Handle symview.
13480 (add_AT_symview): New.
13481 (print_dw_val): Handle symview.
13482 (attr_checksum, attr_checksum_ordered): Likewise.
13483 (same_dw_val_p, size_of_die): Likewise.
13484 (value_format, output_die): Likewise.
13485 (add_high_low_attributes): Use add_AT_symview for entry_view.
13486 (dwarf2out_finish): Reset symview_upper_bound, clear
13487 zero_view_p.
13488
13489 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13490
13491 PR target/83969
13492 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13493 Add strict argument and use it.
13494 (rs6000_split_multireg_move): Update for new strict argument.
13495 (mem_operand_gpr): Disallow all non-offsettable addresses.
13496 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13497
13498 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13499
13500 PR target/84772
13501 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13502 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13503 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13504
13505 PR c++/84767
13506 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13507 decl, use remap_type if we want to use the type.
13508
13509 2018-03-09 Martin Sebor <msebor@redhat.com>
13510
13511 PR tree-optimization/84526
13512 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13513 Remove dead code.
13514 (builtin_access::generic_overlap): Be prepared to handle non-array
13515 base objects.
13516
13517 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13518
13519 PR rtl-optimization/84682
13520 * lra-constraints.c (process_address_1): Check is_address flag
13521 for address constraints.
13522 (process_alt_operands): Likewise.
13523 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13524 preprocess_constraints.
13525 * recog.h (preprocess_constraints): Add oploc parameter.
13526 Adjust callers.
13527 * recog.c (preprocess_constraints): Test address_operand for
13528 CT_ADDRESS constraints.
13529
13530 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13531
13532 PR target/83712
13533 * lra-assigns.c (assign_by_spills): Return a flag of reload
13534 assignment failure. Do not process the reload assignment
13535 failures. Do not spill other reload pseudos if they has the same
13536 reg class.
13537 (lra_assign): Add a return arg. Set up from the result of
13538 assign_by_spills call.
13539 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13540 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13541 usage_insns if it is not NULL.
13542 (spill_hard_reg_in_range): New function.
13543 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13544 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13545 function prototypes.
13546 (lra_assign): Change prototype.
13547 * lra.c (lra): Add code to deal with fails by splitting hard reg
13548 live ranges.
13549
13550 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13551
13552 PR target/83193
13553 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13554 Accept complain bool parameter. Only emit errors if it is true.
13555 (arm_parse_cpu_option_name): Likewise.
13556 (arm_target_thumb_only): Adjust callers of the above.
13557 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13558 prototype to take a default true bool parameter.
13559 (arm_parse_arch_option_name): Likewise.
13560
13561 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13562 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13563
13564 PR jit/64089
13565 PR jit/84288
13566 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13567 * configure: Regenerate.
13568 * configure.ac ("linker --version-script option"): New.
13569 ("linker soname option"): New.
13570
13571 2018-03-09 Richard Biener <rguenther@suse.de>
13572
13573 PR tree-optimization/84775
13574 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13575 immediate uses of predicate stmts and mark them modified.
13576
13577 Revert
13578 PR tree-optimization/84178
13579 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13580 to caller.
13581 (version_loop_for_if_conversion): Delay update_ssa call.
13582 (tree_if_conversion): Delay update_ssa until after predicate
13583 insertion.
13584
13585 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13586
13587 PR target/84763
13588 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13589 when the function accesses prior frames.
13590
13591 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13592
13593 PR debug/84456
13594 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13595 gen_llsym, otherwise call maybe_gen_llsym.
13596
13597 PR inline-asm/84742
13598 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13599 has ',' character inside of it.
13600
13601 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13602
13603 PR target/84748
13604 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13605 as clobbering CC_REGNUM.
13606
13607 2018-03-08 Richard Biener <rguenther@suse.de>
13608
13609 PR middle-end/84552
13610 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13611 (follow_copies_to_constant): Do not follow SSA names registered
13612 for update.
13613
13614 2018-03-08 Richard Biener <rguenther@suse.de>
13615
13616 PR tree-optimization/84178
13617 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13618 to caller.
13619 (version_loop_for_if_conversion): Delay update_ssa call.
13620 (tree_if_conversion): Delay update_ssa until after predicate
13621 insertion.
13622
13623 2018-03-08 David Malcolm <dmalcolm@redhat.com>
13624
13625 PR tree-optimization/84178
13626 * tree-if-conv.c (release_bb_predicate): Remove the
13627 the assertion that the stmts have NULL use_ops.
13628 Discard the statements, asserting that they haven't
13629 yet been added to a BB.
13630
13631 2018-03-08 Richard Biener <rguenther@suse.de>
13632
13633 PR tree-optimization/84746
13634 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13635 (phi_translate): Pass in destination ANTIC_OUT set.
13636 (phi_translate_1): Likewise. For a simplified result lookup
13637 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13638 (phi_translate_set): Adjust.
13639 (do_pre_regular_insertion): Likewise.
13640 (do_pre_partial_partial_insertion): Likewise.
13641
13642 2018-03-08 Martin Liska <mliska@suse.cz>
13643
13644 PR gcov-profile/84735
13645 * doc/gcov.texi: Document usage of profile files.
13646 * gcov-io.h: Document changes in the format.
13647
13648 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
13649
13650 PR debug/84404
13651 PR debug/84408
13652 * dwarf2out.c (struct dw_line_info_table): Update comments for
13653 view == -1.
13654 (FORCE_RESET_NEXT_VIEW): New.
13655 (FORCE_RESETTING_VIEW_P): New.
13656 (RESETTING_VIEW_P): Check for -1 too.
13657 (ZERO_VIEW_P): Likewise.
13658 (new_line_info_table): Force-reset next view.
13659 (dwarf2out_begin_function): Likewise.
13660 (dwarf2out_source_line): Simplify zero_view_p initialization.
13661 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13662 view directly. Omit view when omitting .loc at line 0.
13663
13664 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13665
13666 PR tree-optimization/84740
13667 * tree-switch-conversion.c (process_switch): Call build_constructors
13668 only if info.phi_count is non-zero.
13669
13670 PR tree-optimization/84739
13671 * tree-tailcall.c (find_tail_calls): Check call arguments against
13672 DECL_ARGUMENTS (current_function_decl) rather than
13673 DECL_ARGUMENTS (func) when checking for tail recursion.
13674
13675 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13676
13677 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13678 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13679 Volker Reichelt's entry and add entries for people that perform
13680 GCC fuzzy testing and report numerous bugs.
13681
13682 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13683
13684 PR target/82411
13685 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13686 readonly data in sdata, if that is disabled.
13687 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13688 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13689 -mreadonly-in-sdata option.
13690
13691 2018-03-07 Martin Sebor <msebor@redhat.com>
13692
13693 PR tree-optimization/84468
13694 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13695 basic block when looking for nul assignment.
13696
13697 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13698
13699 PR target/84277
13700 * except.h (output_function_exception_table): Adjust prototype.
13701 * except.c (output_function_exception_table): Remove FNNAME parameter
13702 and add SECTION parameter. Ouput one part of the table at a time.
13703 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13704 the first part of the exception table and emit unwind directives.
13705 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13706 (i386_pe_seh_cold_init): Likewise.
13707 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13708 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13709 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13710 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13711 * config/i386/winnt.c: Include except.h.
13712 (struct seh_frame_state): Add reg_offset, after_prologue and
13713 in_cold_section fields.
13714 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13715 (i386_pe_seh_cold_init): New function.
13716 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13717 to seh->in_cold_section.
13718 (seh_emit_push): Record the offset of the push.
13719 (seh_emit_save): Record the offet of the save.
13720 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13721 Test seh->after_prologue to disregard the epilogue.
13722 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13723 (i386_pe_end_cold_function): New function.
13724
13725 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13726
13727 PR fortran/84565
13728 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13729 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13730
13731 PR c++/84704
13732 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13733 on tmp_var.
13734 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13735 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13736
13737 PR middle-end/84723
13738 * multiple_target.c: Include tree-inline.h and intl.h.
13739 (expand_target_clones): Diagnose and fail if node->definition and
13740 !tree_versionable_function_p (node->decl).
13741
13742 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
13743
13744 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13745 sprint_ul.
13746 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13747 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13748 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13749
13750 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13751
13752 PR target/84710
13753 * combine.c (try_combine): Use reg_or_subregno instead of handling
13754 just paradoxical SUBREGs and REGs.
13755
13756 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
13757
13758 * config/arc/arc.c (arc_finalize_pic): Remove function.
13759 (arc_must_save_register): We use single base PIC register, remove
13760 checks to save/restore the PIC register.
13761 (arc_expand_prologue): Likewise.
13762 * config/arc/arc-protos.h (arc_set_default_type_attributes):
13763 Remove.
13764 (arc_verify_short): Likewise.
13765 (arc_attr_type): Likewise.
13766 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13767 (walk_stores): Likewise.
13768 (arc_address_cost): Make it static.
13769 (arc_verify_short): Likewise.
13770 (branch_dest): Likewise.
13771 (arc_attr_type): Likewise.
13772 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13773 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13774 (arc_final_prescan_insn): Remove inserting the nops due to
13775 hardware hazards. It is done in reorg step.
13776 (insn_length_variant_t): Remove.
13777 (insn_length_parameters_t): Likewise.
13778 (arc_insn_length_parameters): Likewise.
13779 (arc_get_insn_variants): Likewise.
13780 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13781
13782 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13783
13784 PR inline-asm/84683
13785 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13786 assertion failure.
13787
13788 PR tree-optimization/84687
13789 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13790 on new_node->decl.
13791 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13792
13793 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13794
13795 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13796 Rename to ppc_speculation_barrier.
13797 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13798 __builtin_ppc_speculation_barrier.
13799
13800 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13801
13802 PR target/84700
13803 * combine.c (combine_simplify_rtx): Don't try to simplify if
13804 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13805 are equal to x.
13806
13807 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
13808
13809 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13810 to 32 bytes when compiling for POWER9.
13811
13812 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13813
13814 PR target/84564
13815 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13816 regparm >= 3 with no arg reg available also for calls with
13817 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13818
13819 PR target/84524
13820 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13821 orig,vex.
13822 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13823
13824 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13825
13826 PR target/84264
13827 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13828
13829 2018-03-05 Richard Biener <rguenther@suse.de>
13830
13831 PR tree-optimization/84486
13832 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13833 When inserting a __builtin_assume_aligned call set the LHS
13834 SSA name alignment info accordingly.
13835
13836 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13837
13838 PR tree-optimization/84114
13839 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13840 Avoid reassociation of FLOAT_MODE addition.
13841
13842 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13843
13844 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13845 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13846 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13847 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13848 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13849 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13850 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13851 and -mwbnoinvd.
13852 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13853 __builtin_ia32_wbinvd): New builtins.
13854 (SPECIAL_ARGS2): New.
13855 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13856 (SPECIAL_ARGS2): New.
13857 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13858 (ix86_valid_target_attribute_inner_p): Ditto.
13859 (ix86_init_mmx_sse_builtins): Add special_args2.
13860 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13861 TARGET_WBNOINVD_P): New.
13862 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13863 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13864 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13865 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13866 * config/i386/pconfigintrin.h: New file.
13867 * config/i386/wbnoinvdintrin.h: Ditto.
13868 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13869 wbnoinvdintrin.h.
13870 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13871
13872 2018-03-05 Richard Biener <rguenther@suse.de>
13873
13874 PR tree-optimization/84670
13875 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13876 member.
13877 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13878 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13879 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13880 doesn't grow if all successors (recursively) were visited at least
13881 once.
13882
13883 2018-03-05 Richard Biener <rguenther@suse.de>
13884
13885 PR tree-optimization/84650
13886 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13887 if executed in the loop pipeline.
13888
13889 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13890
13891 * doc/configfiles.texi (Configuration Files): Move info about
13892 conditionalizing $target-protos.h to...
13893 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13894 differs from $target-protos.h.
13895
13896 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13897 Chung-Ju Wu <jasonwucj@gmail.com>
13898
13899 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13900 * config/nds32/nds32-multiple.md (setmemsi): Define.
13901 * config/nds32/nds32-memory-manipulation.c
13902 (nds32_gen_dup_4_byte_to_word_value): New.
13903 (emit_setmem_word_loop): New.
13904 (emit_setmem_byte_loop): New.
13905 (nds32_expand_setmem_loop): New.
13906 (nds32_expand_setmem_loop_v3m): New.
13907 (nds32_expand_setmem_unroll): New.
13908 (nds32_expand_setmem): New.
13909
13910 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13911 Chung-Ju Wu <jasonwucj@gmail.com>
13912
13913 * config/nds32/nds32-memory-manipulation.c
13914 (nds32_emit_load_store): New.
13915 (nds32_emit_post_inc_load_store): New.
13916 (nds32_emit_mem_move): New.
13917 (nds32_emit_mem_move_block): New.
13918 (nds32_expand_movmemsi_loop_unknown_size): New.
13919 (nds32_expand_movmemsi_loop_known_size): New.
13920 (nds32_expand_movmemsi_loop): New.
13921 (nds32_expand_movmemsi_unroll): New.
13922 (nds32_expand_movmemqi): Rename ...
13923 (nds32_expand_movmemsi): ... to this.
13924 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13925 (movmemsi): ... to this.
13926 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13927 (nds32_expand_movmemsi): ... to this.
13928
13929 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13930 Monk Chiang <sh.chiang04@gmail.com>
13931 Chung-Ju Wu <jasonwucj@gmail.com>
13932
13933 * config/nds32/nds32-protos.h
13934 (nds32_expand_load_multiple): New arguments.
13935 (nds32_expand_store_multiple): Ditto.
13936 (nds32_valid_multiple_load_store): Rename ...
13937 (nds32_valid_multiple_load_store_p): ... to this.
13938 * config/nds32/nds32-memory-manipulation.c
13939 (nds32_expand_load_multiple): Refine implementation.
13940 (nds32_expand_store_multiple): Ditto.
13941 * config/nds32/nds32-multiple.md
13942 (load_multiple): Update nds32_expand_load_multiple interface.
13943 (store_multiple): Update nds32_expand_store_multiple interface.
13944 * config/nds32/nds32-predicates.c
13945 (nds32_valid_multiple_load_store): Rename ...
13946 (nds32_valid_multiple_load_store_p): ... to this and refine
13947 implementation.
13948 * config/nds32/predicates.md
13949 (nds32_load_multiple_and_update_address_operation): New predicate.
13950 (nds32_store_multiple_and_update_address_operation): New predicate.
13951
13952 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13953 Chung-Ju Wu <jasonwucj@gmail.com>
13954
13955 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13956 (combo): New attribute.
13957 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13958
13959 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
13960
13961 * config/nds32/nds32.opt: Change -mcmodel= default value.
13962
13963 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
13964 Monk Chiang <sh.chiang04@gmail.com>
13965 Chung-Ju Wu <jasonwucj@gmail.com>
13966
13967 * config/nds32/constants.md (unspec_element): New enum.
13968 * config/nds32/constraints.md (Umw): New constraint.
13969 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13970 * config/nds32/nds32-intrinsic.md: Likewise.
13971 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13972 (nds32_valid_smw_lwm_base_p): New.
13973 (nds32_output_smw_single_word): New.
13974 (nds32_output_lmw_single_word): New.
13975 (nds32_expand_unaligned_load): New.
13976 (nds32_expand_unaligned_store): New.
13977 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13978 (nds32_output_smw_single_word): Declare.
13979 (nds32_output_lmw_single_word): Declare.
13980 (nds32_expand_unaligned_load): Declare.
13981 (nds32_expand_unaligned_store): Declare.
13982 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13983 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13984 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13985 NDS32_BUILTIN_UASTORE_DW.
13986 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13987 predicate.
13988
13989 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
13990 Kito Cheng <kito.cheng@gmail.com>
13991 Chung-Ju Wu <jasonwucj@gmail.com>
13992
13993 * config/nds32/nds32-intrinsic.c
13994 (nds32_expand_builtin_null_ftype_reg): Delete.
13995 (nds32_expand_builtin_reg_ftype_imm): Ditto.
13996 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13997 (nds32_read_argument): New.
13998 (nds32_legitimize_target): Ditto.
13999 (nds32_legitimize_argument): Ditto.
14000 (nds32_check_constant_argument): Ditto.
14001 (nds32_expand_unop_builtin): Ditto.
14002 (nds32_expand_unopimm_builtin): Ditto.
14003 (nds32_expand_binop_builtin): Ditto.
14004 (nds32_builtin_decl_impl): Ditto.
14005 (builtin_description): Ditto.
14006 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14007 (nds32_init_builtins_impl): Ditto.
14008 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14009 (nds32_builtin_decl): New.
14010 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14011 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14012
14013 2018-03-02 Jeff Law <law@redhat.com>
14014
14015 * reorg.c (stop_search_p): Handle DEBUG_INSN.
14016 (redundant_insn, fill_simple_delay_slots): Likewise.
14017 (fill_slots_from_thread): Likewise.
14018 * resource.c (mark_referenced_resources): Likewise.
14019 (mark_set_resources, find_dead_or_set_registers): Likewise.
14020
14021 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14022
14023 * substring-locations.h (format_warning_va): Formatting fix for
14024 ATTRIBUTE_GCC_DIAG.
14025 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14026 argument.
14027 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14028 * substring-locations.c: Include intl.h.
14029 (format_warning_va): Turned into small wrapper around
14030 format_warning_n_va, renamed to ...
14031 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14032 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14033 use ngettext.
14034 (format_warning_at_substring_n): New function.
14035 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14036 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14037 format_warning_at_substring with just a shorter name instead of
14038 const function pointer.
14039 (fmtwarn_n): New function.
14040 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14041 appropriate, get rid of all the fmtstr temporaries, move conditionals
14042 with G_() wrapped string literals directly into fmtwarn arguments,
14043 cast dir.len to (int), formatting fixes.
14044
14045 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14046
14047 * doc/invoke.texi: Remove "Cilk Plus" references.
14048
14049 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14050 Richard Biener <rguenther@suse.de>
14051
14052 PR ipa/84628
14053 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14054 for error or warning attributes if CALL_FROM_THUNK_P is set.
14055 Formatting fixes.
14056
14057 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14058
14059 PR target/56540
14060 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14061 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14062
14063 PR target/56540
14064 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14065 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14066
14067 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14068 instead of -1U in last predictors element's probability member.
14069
14070 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14071
14072 PR ipa/83983
14073 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14074 arguments if they are comparable.
14075
14076 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14077
14078 PR tree-optimization/84634
14079 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14080 masks and masked_loop_p with a single loop_masks, making sure it's
14081 null for bb vectorization.
14082
14083 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14084
14085 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14086 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14087 loop->force_vectorize to check whether there is no alias.
14088
14089 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14090
14091 PR target/84614
14092 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14093 prototypes.
14094 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14095 comments.
14096 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14097 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14098 instead of a loop around prev_real_insn.
14099 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14100 prev_real_insn.
14101
14102 PR inline-asm/84625
14103 * config/i386/i386.c (ix86_print_operand): Use conditional
14104 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14105 zero vector.
14106
14107 2018-03-02 Richard Biener <rguenther@suse.de>
14108
14109 PR tree-optimization/84427
14110 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14111 (bitmap_set_subtract_values): Rewrite to handle multiple
14112 exprs per value.
14113 (clean): Likewise.
14114 (prune_clobbered_mems): Likewise.
14115 (phi_translate): Take edge instead of pred/phiblock.
14116 (phi_translate_1): Likewise.
14117 (phi_translate_set): Likewise. Insert all translated
14118 exprs for a value into the set, keeping possibly multiple
14119 expressions per value.
14120 (compute_antic_aux): Adjust for phi_translate changes.
14121 When intersecting union the expressions and prune those
14122 not in the final value set, keeping possibly multiple
14123 expressions per value. Do not use value-insertion
14124 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14125 all expressions. Add verification that the value-sets
14126 only shrink during iteration.
14127 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14128 (do_pre_regular_insertion): Likewise.
14129 (do_pre_partial_partial_insertion): Likewise.
14130
14131 2018-03-02 Richard Biener <rguenther@suse.de>
14132
14133 PR target/82005
14134 * config/darwin.c (saved_debug_info_level): New static global.
14135 (darwin_asm_lto_start): Disable debug info generation for LTO out.
14136 (darwin_asm_lto_end): Restore debug info generation settings.
14137
14138 2018-03-01 Martin Liska <mliska@suse.cz>
14139
14140 PR sanitizer/82484
14141 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14142 volatile arguments.
14143
14144 2018-03-01 Richard Biener <rguenther@suse.de>
14145
14146 PR debug/84645
14147 * dwarf2out.c (gen_variable_die): Properly handle late VLA
14148 type annotation with LTO when debug was disabled at compile-time.
14149
14150 2018-03-01 Matthew Fortune <mfortune@gmail.com>
14151
14152 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14153 XINT with INTVAL.
14154 (mips_final_postscan_insn): Likewise.
14155
14156 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
14157
14158 PR rtl-optimization/84528
14159 * alias.c (init_alias_target): Add commentary.
14160 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14161 a unique base value if the frame pointer is not eliminated
14162 to the stack pointer.
14163
14164 2018-03-01 Tom de Vries <tom@codesourcery.com>
14165
14166 PR rtl-optimization/83327
14167 * lra-int.h (hard_regs_spilled_into): Declare.
14168 * lra.c (hard_regs_spilled_into): Define.
14169 (init_reg_info): Init hard_regs_spilled_into.
14170 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14171 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14172 (process_bb_lives): Handle hard_regs_spilled_into.
14173 (lra_create_live_ranges_1): Before doing liveness propagation, clear
14174 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14175
14176 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
14177
14178 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14179 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14180 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14181 * config/rs6000/aix72.h: New file.
14182
14183 2018-02-28 Jakub Jelinek <jakub@redhat.com>
14184
14185 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14186 instead of warning_at with conditional singular and plural messages
14187 where possible.
14188
14189 PR target/52991
14190 * stor-layout.c (update_alignment_for_field): For
14191 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14192 && !DECL_PACKED (field), do the alignment update, just use
14193 only desired_align instead of MAX (type_align, desired_align)
14194 as the alignment.
14195 (place_field): Don't do known_align < desired_align handling
14196 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14197 is non-NULL, instead do it after rli->prev_field handling and
14198 only if not within a bitfield word. For DECL_PACKED (field)
14199 use type_align of BITS_PER_UNIT.
14200
14201 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14202
14203 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14204 superfluous parentheses and trailing spaces.
14205
14206 2018-02-28 Richard Biener <rguenther@suse.de>
14207
14208 PR tree-optimization/84584
14209 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14210 SCoPs with fake exit edge.
14211
14212 2018-02-28 Martin Liska <mliska@suse.cz>
14213
14214 PR testsuite/84597
14215 * timevar.c (timer::print): Fix format to properly print 100%
14216 values.
14217
14218 2018-02-28 Richard Biener <rguenther@suse.de>
14219
14220 PR middle-end/84607
14221 * genmatch.c (capture_info::walk_match): Do not mark
14222 captured expressions without operands as expr_p given
14223 they act more like predicates and should be subject to
14224 "lost tail" side-effect preserving.
14225
14226 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14227
14228 PR rtl-optimization/81611
14229 * auto-inc-dec.c (attempt_change): Move dead note from
14230 mem_insn if it's the next use of regno
14231 (find_address): Take address use of reg holding
14232 non-incremented value. Add parm to limit search to the named
14233 reg only.
14234 (merge_in_block): Attempt to use a mem insn that is the next
14235 use of the original regno.
14236
14237 2018-02-27 Martin Sebor <msebor@redhat.com>
14238
14239 PR c++/83871
14240 * doc/invoke.texi (-Wmissing-attributes): New option.
14241 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14242
14243 2018-02-27 Martin Sebor <msebor@redhat.com>
14244
14245 PR translation/84207
14246 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14247 n argument to unsigned HOST_WIDE_INT.
14248 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14249 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14250 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14251 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14252
14253 2018-02-27 Richard Biener <rguenther@suse.de>
14254
14255 PR tree-optimization/84512
14256 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14257 Do not use the estimate returned from record_stmt_cost for
14258 the scalar iteration cost but sum properly using add_stmt_cost.
14259
14260 2018-02-27 Richard Biener <rguenther@suse.de>
14261
14262 PR tree-optimization/84466
14263 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14264 Adjust last change to less strictly validate use operands.
14265
14266 2018-02-27 Martin Liska <mliska@suse.cz>
14267
14268 PR gcov-profile/84548
14269 * gcov.c (process_file): Allow partial overlap and consider it
14270 also as group functions.
14271 (output_lines): Properly calculate range of lines for a group.
14272
14273 2018-02-27 Martin Liska <mliska@suse.cz>
14274
14275 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14276 'ggc' suffixes. Change first column width.
14277 (timer::print): Fix formatting of the column.
14278
14279 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14280
14281 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14282 preserve inline entry blocks for the sake of debug inline
14283 entry point markers alone.
14284 (remove_unused_locals): Suggest in comments a better place to
14285 force the preservation of inline entry blocks that are
14286 otherwise unused, but do not preserve them.
14287
14288 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14289
14290 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14291
14292 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14293
14294 PR target/84039
14295 * config/i386/constraints.md (Bs): Replace
14296 ix86_indirect_branch_register with
14297 TARGET_INDIRECT_BRANCH_REGISTER.
14298 (Bw): Likewise.
14299 * config/i386/i386.md (indirect_jump): Likewise.
14300 (tablejump): Likewise.
14301 (*sibcall_memory): Likewise.
14302 (*sibcall_value_memory): Likewise.
14303 Peepholes of indirect call and jump via memory: Likewise.
14304 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14305 (*sibcall_value_GOT_32): Likewise.
14306 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14307 (GOT_memory_operand): Likewise.
14308 (call_insn_operand): Likewise.
14309 (sibcall_insn_operand): Likewise.
14310 (GOT32_symbol_operand): Likewise.
14311 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14312
14313 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14314
14315 PR rtl-optimization/83496
14316 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14317 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14318 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14319 redundant insn, if any.
14320 (relax_delay_slots): Likewise.
14321 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14322
14323 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14324
14325 PR tree-optimization/83965
14326 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14327 that grouped statements are part of a reduction chain. Return
14328 true if the statement is not marked as a reduction itself but
14329 is part of a group.
14330 (vect_recog_dot_prod_pattern): Don't check whether the statement
14331 is part of a group here.
14332 (vect_recog_sad_pattern): Likewise.
14333 (vect_recog_widen_sum_pattern): Likewise.
14334
14335 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14336
14337 PR debug/84545
14338 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14339
14340 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14341
14342 PR target/84530
14343 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14344 the bool argument.
14345 (ix86_output_indirect_function_return): New prototype.
14346 (ix86_split_simple_return_pop_internal): Likewise.
14347 * config/i386/i386.c (indirect_return_via_cx): New.
14348 (indirect_return_via_cx_bnd): Likewise.
14349 (indirect_thunk_name): Handle return va CX_REG.
14350 (output_indirect_thunk_function): Create alias for
14351 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14352 (ix86_output_indirect_jmp): Remove the bool argument.
14353 (ix86_output_indirect_function_return): New function.
14354 (ix86_split_simple_return_pop_internal): Likewise.
14355 * config/i386/i386.md (*indirect_jump): Don't pass false
14356 to ix86_output_indirect_jmp.
14357 (*tablejump_1): Likewise.
14358 (simple_return_pop_internal): Change it to define_insn_and_split.
14359 Call ix86_split_simple_return_pop_internal to split it for
14360 -mfunction-return=.
14361 (simple_return_indirect_internal): Call
14362 ix86_output_indirect_function_return instead of
14363 ix86_output_indirect_jmp.
14364
14365 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14366
14367 PR bootstrap/84405
14368 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14369 memset and value initialization afterwards.
14370
14371 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14372
14373 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14374
14375 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14376
14377 PR target/84521
14378 * common/config/aarch64/aarch64-common.c
14379 (aarch_option_optimization_table[]): Switch
14380 off fomit-frame-pointer
14381
14382 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14383 Chung-Ju Wu <jasonwucj@gmail.com>
14384
14385 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14386 volatile memory.
14387 (store_multiple): Ditto.
14388
14389 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14390
14391 * config.gcc: Add --with-cpu support for nds32 target.
14392 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14393 * config/nds32/nds32.opt: Add -mcpu= option.
14394
14395 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14396
14397 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14398 isel=yes): Warn for these deprecated options.
14399
14400 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14401
14402 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14403 ISA_2_5_MASKS_EMBEDDED.
14404
14405 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14406
14407 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14408 p->max as pointers rather than using iterative_hash_expr.
14409
14410 2018-02-23 Carl Love <cel@us.ibm.com>
14411
14412 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14413 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14414 BU_P8V_OVERLOAD_2.
14415 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14416 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14417 P8V_BUILTIN_VEC_VUNSIGNED2.
14418
14419 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14420
14421 PR target/81572
14422 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14423 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14424 LRA_UNKNOWN_ALT.
14425 * lra-constraints.c (curr_insn_transform): Set up
14426 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14427 LRA_UNKNOWN_ALT.
14428 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14429 * lra-eliminations.c (spill_pseudos): Ditto.
14430 (process_insn_for_elimination): Ditto.
14431 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14432 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14433 LRA_NON_CLOBBERED_ALT.
14434
14435 2018-02-22 Martin Sebor <msebor@redhat.com>
14436
14437 PR tree-optimization/84480
14438 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14439 to maybe_diag_stxncpy_trunc. Call it.
14440 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14441 from gimple_fold_builtin_strcpy. Print inlining stack.
14442 (handle_builtin_stxncpy): Print inlining stack.
14443 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14444
14445 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14446
14447 PR target/84176
14448 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14449 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14450 and -fcheck-pointer-bounds are used together.
14451 (indirect_thunk_prefix): New enum.
14452 (indirect_thunk_need_prefix): New function.
14453 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14454 "_nt" instead of "_bnd" for NOTRACK prefix.
14455 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14456 (output_indirect_thunk_function): Likewise.
14457 (): Likewise.
14458 (ix86_code_end): Update output_indirect_thunk_function calls.
14459 (ix86_output_indirect_branch_via_reg): Replace
14460 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14461 (ix86_output_indirect_branch_via_push): Likewise.
14462 (ix86_output_function_return): Likewise.
14463 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14464 incompatible with -fcf-protection=branch and
14465 -fcheck-pointer-bounds.
14466
14467 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14468
14469 PR target/83335
14470 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14471 Change gcc_assert call to output_operand_lossage.
14472
14473 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14474
14475 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14476
14477 2018-02-22 DJ Delorie <dj@redhat.com>
14478 Sebastian Perta <sebastian.perta@renesas.com>
14479 Oleg Endo <olegendo@gcc.gnu.org>
14480
14481 * config/rx/rx.c (rx_rtx_costs): New function.
14482 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14483
14484 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14485
14486 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14487
14488 2018-02-22 Martin Liska <mliska@suse.cz>
14489
14490 PR driver/83193
14491 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14492 Add "native" as a possible value.
14493
14494 2018-02-22 Martin Liska <mliska@suse.cz>
14495
14496 PR driver/83193
14497 * config/i386/i386.c (ix86_option_override_internal):
14498 Add "native" as a possible value for -march and -mtune.
14499
14500 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14501
14502 PR target/84502
14503 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14504 to all type variants.
14505
14506 PR tree-optimization/84503
14507 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14508 width as info->bitpos + info->bitsize - start.
14509 (merged_store_group::merge_overlapping): Simplify width computation.
14510 (check_no_overlap): New function.
14511 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14512 start + width and last_order of the group, fail if check_no_overlap
14513 fails.
14514 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14515 to group if check_no_overlap fails.
14516
14517 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14518
14519 * config/rs6000/altivec.md: Delete contraint arguments to
14520 define_expand, define_split, and define_peephole2, and in
14521 define_insn_and_split if always unused.
14522 * config/rs6000/darwin.md: Ditto.
14523 * config/rs6000/dfp.md: Ditto.
14524 * config/rs6000/rs6000.md: Ditto.
14525 * config/rs6000/sync.md: Ditto.
14526 * config/rs6000/vector.md: Ditto.
14527 * config/rs6000/vsx.md: Ditto.
14528
14529 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14530
14531 * config/rs6000/altivec.md: Write output control strings as braced
14532 blocks instead of double-quoted strings.
14533 * config/rs6000/darwin.md: Ditto.
14534 * config/rs6000/rs6000.md: Ditto.
14535 * config/rs6000/vector.md: Ditto.
14536 * config/rs6000/vsx.md: Ditto.
14537
14538 2018-02-21 Jason Merrill <jason@redhat.com>
14539
14540 PR c++/84314 - ICE with templates and fastcall attribute.
14541 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14542
14543 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14544
14545 * ipa-cp.c (determine_versionability): Fix comment typos.
14546
14547 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14548
14549 PR c/84229
14550 * ipa-cp.c (determine_versionability): Do not version functions caling
14551 va_arg_pack.
14552
14553 2018-02-21 Martin Liska <mliska@suse.cz>
14554
14555 PR driver/83193
14556 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14557 Add "native" as a possible value.
14558 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14559 the macro when native cpu detection is available.
14560
14561 2018-02-21 Martin Liska <mliska@suse.cz>
14562
14563 PR driver/83193
14564 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14565 Add "native" as a possible value.
14566 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14567 when native cpu detection is available.
14568
14569 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14570 Martin Sebor <msebor@redhat.com>
14571
14572 PR tree-optimization/84478
14573 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14574 false.
14575 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14576 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14577 support which is conservatively correct, for 2 only stay conservative
14578 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14579 argument to the 2 argument get_range_strlen, adjust 6 arg
14580 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14581 false.
14582 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14583 (gimple_fold_builtin_strlen): Pass true as last argument to
14584 get_range_strlen.
14585
14586 2018-02-20 Martin Sebor <msebor@redhat.com>
14587
14588 PR middle-end/84095
14589 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14590 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14591 (builtin_memref::builtin_memref): Factor out parts into
14592 set_base_and_offset and call it.
14593
14594 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14595
14596 PR middle-end/84406
14597 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14598 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14599 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14600 search at the associated MODE_INT.
14601
14602 2018-02-20 Jeff Law <law@redhat.com>
14603
14604 PR middle-end/82123
14605 PR tree-optimization/81592
14606 PR middle-end/79257
14607 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14608 for range data rather than using global data.
14609 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14610 range data rather than using global data.
14611 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14612 pass it to children as needed.
14613 (struct directive::fmtresult): Similarly.
14614 (struct directive::set_width): Similarly.
14615 (struct directive::set_precision): Similarly.
14616 (format_integer, format_directive, parse_directive): Similarly.
14617 (format_none): Accept unnamed vr_values parameter.
14618 (format_percent, format_floating, format_character): Similarly.
14619 (format_string, format_plain): Similarly.
14620 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14621 the EVRP range analyzer for range data rather than using global data.
14622 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14623 gimple-ssa-evrp-analyze.h
14624 (class sprintf_dom_walker): Add after_dom_children member function.
14625 Add evrp_range_analyzer member.
14626 (sprintf_dom_walker::before_dom_children): Call into the EVRP
14627 range analyzer as needed.
14628 (sprintf_dom_walker::after_dom_children): New member function.
14629 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14630 if not optimizing.
14631 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14632 (evrp_range_analyzer::pop_to_marker): Likewise.
14633
14634 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14635
14636 PR tree-optimization/84419
14637 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14638 with the required type if its current type is compatible but
14639 different.
14640
14641 2018-02-20 Jakub Jelinek <jakub@redhat.com>
14642
14643 PR middle-end/82004
14644 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14645 after vectorization.
14646
14647 2018-02-20 Martin Liska <mliska@suse.cz>
14648
14649 PR driver/83193
14650 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14651 possible values if we don't have a hint.
14652
14653 2018-02-20 Martin Liska <mliska@suse.cz>
14654
14655 PR c/84310
14656 PR target/79747
14657 * final.c (shorten_branches): Build align_tab array with one
14658 more element.
14659 * opts.c (finish_options): Add alignment option limit check.
14660 (MAX_CODE_ALIGN): Likewise.
14661 (MAX_CODE_ALIGN_VALUE): Likewise.
14662 * doc/invoke.texi: Document maximum allowed option value for
14663 all -falign-* options.
14664
14665 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14666
14667 PR target/84146
14668 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14669 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14670 * var-tracking.c (emit_note_insn_var_location): Remove all references
14671 to NOTE_INSN_CALL_ARG_LOCATION.
14672 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14673 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14674 Use copy_rtx_if_shared.
14675 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14676 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14677 (dwarf2out_var_location): Remove handling of
14678 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14679 on call_insn.
14680 * final.c (final_scan_insn): Remove all references to
14681 NOTE_INSN_CALL_ARG_LOCATION.
14682 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14683 before dumping final insns.
14684 * except.c (emit_note_eh_region_end): Remove all references to
14685 NOTE_INSN_CALL_ARG_LOCATION.
14686 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14687 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14688 * config/arc/arc.c (hwloop_optimize): Likewise.
14689 * config/arm/arm.c (create_fix_barrier): Likewise.
14690 * config/s390/s390.c (s390_chunkify_start): Likewise.
14691 * config/sh/sh.c (find_barrier): Likewise.
14692 * config/i386/i386.c (rest_of_insert_endbranch,
14693 ix86_seh_fixup_eh_fallthru): Likewise.
14694 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14695 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14696 * config/frv/frv.c (frv_function_prologue): Likewise.
14697 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14698 reg note.
14699 (note_outside_basic_block_p): Remove all references to
14700 NOTE_INSN_CALL_ARG_LOCATION.
14701 * gengtype.c (adjust_field_rtx_def): Likewise.
14702 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14703 Likewise.
14704 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14705 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14706
14707 PR c++/84444
14708 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14709 is ADDR_EXPR.
14710
14711 PR tree-optimization/84452
14712 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14713 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14714 is NULL.
14715
14716 2018-02-19 Martin Liska <mliska@suse.cz>
14717
14718 PR sanitizer/82183
14719 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14720
14721 2018-02-19 Martin Liska <mliska@suse.cz>
14722 Richard Sandiford <richard.sandiford@linaro.org>
14723
14724 PR tree-optimization/82491
14725 * gimple-fold.c (get_base_constructor): Make earlier bail out
14726 to prevent ubsan.
14727
14728 2018-02-19 Carl Love <cel@us.ibm.com>
14729
14730 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14731 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14732 BU_P8V_OVERLOAD_1.
14733 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14734 P8V_BUILTIN_VEC_NEG.
14735
14736 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
14737
14738 * config/rl78/rl78.md (movdf): New define expand.
14739
14740 2018-02-19 Martin Liska <mliska@suse.cz>
14741
14742 PR other/80589
14743 * doc/invoke.texi: Fix typo.
14744 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14745
14746 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
14747
14748 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14749 handle rs6000_single_float and rs6000_double_float specially for
14750 e500 family CPUs.
14751
14752 2018-02-16 Jeff Law <law@redhat.com>
14753
14754 * config/rx/rx.c (add_pop_cfi_notes): New function.;
14755 (pop_regs): Use it.
14756
14757 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14758
14759 PR ipa/84425
14760 * ipa-inline.c (inline_small_functions): Fix a typo.
14761
14762 2018-02-16 Nathan Sidwell <nathan@acm.org>
14763
14764 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14765
14766 2018-02-16 Carl Love <cel@us.ibm.com>
14767
14768 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14769 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14770 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14771 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14772 expansion to P8V_BUILTIN_VEC_FLOAT2.
14773
14774 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
14775
14776 PR rtl-optimization/70023
14777 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14778 src_regno into account.
14779
14780 2018-02-16 Carl Love <cel@us.ibm.com>
14781
14782 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14783 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14784 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14785 * config/rs6000/rs6000.c: Remove case statements for
14786 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14787 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14788 and P9V_BUILTIN_VEC_VINSERT4B.
14789 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14790 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14791 * config/rs6000/vsx.md:
14792 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14793 vec_insert4b.
14794
14795 2018-02-16 Carl Love <cel@us.ibm.com>
14796
14797 * config/rs6000/altivec.h: Add builtin names vec_extract4b
14798 vec_insert4b.
14799 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14800 definitions.
14801 * config/rs6000/rs6000-c.c: Add the definitions for
14802 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14803 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14804 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14805 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
14806 definition for insert4b and define insn *insert3b_internal.
14807 * doc/extend.texi: Add documentation for vec_extract4b.
14808
14809 2018-02-16 Nathan Sidwell <nathan@acm.org>
14810
14811 * doc/extend.texi (Backwards Compatibility): Mention friend
14812 injection. Note for-scope is deprecated.
14813 * doc/invoke.texi (-ffriend-injection): Deprecate.
14814
14815 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14816
14817 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14818 that moved to I2, also allow destinations that are a paradoxical
14819 subreg (instead of a normal reg).
14820
14821 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14822
14823 PR target/83831
14824 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14825 to QImode.
14826
14827 2018-02-16 Richard Biener <rguenther@suse.de>
14828
14829 PR tree-optimization/84037
14830 PR tree-optimization/84016
14831 PR target/82862
14832 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14833 Adjust vec_construct for the fact we need additional higher latency
14834 128bit inserts for AVX256 and AVX512 vector builds.
14835 (ix86_add_stmt_cost): Scale vector construction cost for
14836 elementwise loads.
14837
14838 2018-02-16 Richard Biener <rguenther@suse.de>
14839
14840 PR tree-optimization/84417
14841 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14842 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14843 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14844
14845 2018-02-16 Martin Liska <mliska@suse.cz>
14846
14847 PR sanitizer/84307
14848 * internal-fn.def (ASAN_CHECK): Set proper flags.
14849 (ASAN_MARK): Likewise.
14850
14851 2018-02-16 Julia Koval <julia.koval@intel.com>
14852
14853 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14854 from PTA_CANNONLAKE.
14855
14856 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14857
14858 PR target/84272
14859 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14860 Use ++iter rather than iter++ for std::list iterators.
14861 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14862 defer deleting them until all nodes in the forest are processed. Do
14863 free even leaf nodes. Change to_process into auto_vec.
14864
14865 PR bootstrap/84405
14866 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14867 * vec.h (vec_default_construct): Use memset instead of placement new
14868 if BROKEN_VALUE_INITIALIZATION is defined.
14869 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14870 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14871 is defined.
14872
14873 PR rtl-optimization/83723
14874 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14875 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14876 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14877 recursive calls.
14878 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14879 callers.
14880 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14881
14882 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14883
14884 PR rtl-optimization/81443
14885 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14886 from inner REGs to paradoxical SUBREGs.
14887
14888 2018-02-16 Richard Biener <rguenther@suse.de>
14889
14890 PR tree-optimization/84399
14891 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14892 For operands we can analyze at their definition make sure we can
14893 analyze them at each use as well.
14894
14895 2018-02-16 Richard Biener <rguenther@suse.de>
14896
14897 PR tree-optimization/84190
14898 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14899 volatile accesses if the decl isn't volatile.
14900
14901 2018-02-15 Jason Merrill <jason@redhat.com>
14902
14903 PR c++/84314 - ICE with templates and fastcall attribute.
14904 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14905 TYPE_CANONICAL on an existing type.
14906
14907 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14908
14909 PR tree-optimization/84383
14910 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14911 dstoff nor call operand_equal_p if dstbase is NULL.
14912
14913 PR tree-optimization/84334
14914 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14915 also a CONSTANT_CLASS_P, punt.
14916
14917 2018-02-14 Jim Wilson <jimw@sifive.com>
14918
14919 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14920 first SMALL_OPERAND check. New local min_second_step. Move assert
14921 to where locals are set. Add TARGET_RVC support.
14922 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14923
14924 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14925
14926 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14927
14928 2018-02-14 Martin Sebor <msebor@redhat.com>
14929
14930 PR tree-optimization/83698
14931 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14932 arrays constrain the offset range to their bounds.
14933 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14934 (builtin_access::overlap): Avoid setting the size of overlap if it's
14935 already been set.
14936 (maybe_diag_overlap): Also consider arrays when deciding what values
14937 of offsets to include in diagnostics.
14938
14939 2018-02-14 Martin Sebor <msebor@redhat.com>
14940
14941 PR c/84108
14942 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14943 that correspond to the kind of a declaration.
14944
14945 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
14946
14947 PR target/83984
14948 * config/pa/pa.md: Load address of PIC label using the linkage table
14949 if the label is nonlocal.
14950
14951 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
14952
14953 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14954 warning message if user requests -maltivec=be.
14955 * doc/invoke.texi: Document deprecation of -maltivec=be.
14956
14957 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
14958
14959 PR target/84220
14960 * config/rs6000/rs6000-c.c: Update definitions for
14961 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14962 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14963
14964 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14965
14966 PR target/84239
14967 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14968 add _get_ssp intrinsics. Remove argument from
14969 __builtin_ia32_rdssp[d|q].
14970 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14971 * config/i386/i386-builtin.def: Remove argument from
14972 __builtin_ia32_rdssp[d|q].
14973 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14974 ix86_expand_special_args_builtin for _rdssp[d|q].
14975 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14976 Clear register before usage.
14977 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14978 Add documentation for new _get_ssp and _inc_ssp intrinsics.
14979
14980 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
14981
14982 PR tree-optimization/84357
14983 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14984 operand 1 of an ARRAY_REF too.
14985
14986 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
14987
14988 PR target/83831
14989 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14990 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14991 declarations.
14992 (set_of_reg): New struct.
14993 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14994 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14995 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14996 functions.
14997 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14998 Split into bitclr, bitset, bitinvert patterns if appropriate.
14999 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15000 use rx_fuse_in_memory_bitop.
15001 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15002 to named insn, correct maximum insn length.
15003
15004 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
15005
15006 PR target/79242
15007 * machmode.def: Define a complex mode for PARTIAL_INT.
15008 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15009 MODE_PARTIAL_INT.
15010 * doc/rtl.texi: Document CSPImode.
15011 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15012 handling.
15013 (msp430_hard_regno_nregs_with_padding): Likewise.
15014
15015 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
15016
15017 PR target/84279
15018 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15019
15020 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15021
15022 PR rtl-optimization/84169
15023 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15024 we generated a parallel as new i3 and we split that to new i2 and i3
15025 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15026 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15027 those to i2, not i1. Partially rewrite this scan code.
15028
15029 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15030
15031 PR c/82210
15032 * stor-layout.c (place_field): For variable length fields, adjust
15033 offset_align afterwards not just based on the field's alignment,
15034 but also on the size.
15035
15036 PR middle-end/84309
15037 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15038 of exps and logs in the use_exp2 case.
15039
15040 2018-02-13 Jeff Law <law@redhat.com>
15041
15042 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15043 entry for "vector".
15044
15045 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15046 ARGS as unused.
15047
15048 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15049
15050 PR debug/84342
15051 PR debug/84319
15052 * common.opt (gas-loc-support, gas-locview-support): New.
15053 (ginline-points, ginternal-reset-location-views): New.
15054 * doc/invoke.texi: Document them. Use @itemx where intended.
15055 (gvariable-location-views): Adjust.
15056 * target.def (reset_location_view): New.
15057 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15058 (TARGET_RESET_LOCATION_VIEW): New.
15059 * doc/tm.texi: Rebuilt.
15060 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15061 (dwarf2out_default_as_locview_support): New.
15062 (output_asm_line_debug_info): Use option variables.
15063 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15064 (output_loc_list): Likewise.
15065 (add_high_low_attributes): Check option variables.
15066 Don't output entry view attribute in strict mode.
15067 (gen_inlined_subroutine_die): Check option variables.
15068 (dwarf2out_inline_entry): Likewise.
15069 (init_sections_and_labels): Likewise.
15070 (dwarf2out_early_finish): Likewise.
15071 (maybe_reset_location_view): New, from...
15072 (dwarf2out_var_location): ... here. Call it.
15073 * debug.h (dwarf2out_default_as_loc_support): Declare.
15074 (dwarf2out_default_as_locview_support): Declare.
15075 * hooks.c (hook_int_rtx_insn_0): New.
15076 * hooks.h (hook_int_rtx_insn_0): Declare.
15077 * toplev.c (process_options): Take -gas-loc-support and
15078 -gas-locview-support from dwarf2out. Enable
15079 -gvariable-location-views by default only with locview
15080 assembler support. Enable -ginternal-reset-location-views by
15081 default only if the target defines the corresponding hook.
15082 Enable -ginline-points by default if location views are
15083 enabled; force it disabled if statement frontiers are
15084 disabled.
15085 * tree-inline.c (expand_call_inline): Check option variables.
15086 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15087
15088 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15089
15090 PR tree-optimization/84321
15091 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15092 handling. Also check whether the anti-range contains any values
15093 that satisfy the mask; switch to a VR_RANGE if not.
15094
15095 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15096
15097 PR sanitizer/84340
15098 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15099
15100 2018-02-13 Martin Jambor <mjambor@suse.cz>
15101
15102 PR c++/83990
15103 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15104 of call statements, also set location of a load to a temporary.
15105
15106 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15107
15108 * config/rl78/rl78.c (add_vector_labels): New function.
15109 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15110 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15111 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15112 which checks that no arguments are passed.
15113 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15114 * doc/extend.texi: Documentation for the new attribute.
15115
15116 2018-02-13 Andreas Schwab <schwab@suse.de>
15117
15118 * config/riscv/linux.h (CPP_SPEC): Define.
15119
15120 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15121
15122 PR target/84335
15123 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15124 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15125 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15126 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15127 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15128 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15129 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15130 temporarily for AES and PCLMUL builtins.
15131
15132 PR tree-optimization/84339
15133 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15134 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15135 Formatting fixes.
15136
15137 PR middle-end/84309
15138 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15139 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15140 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15141 inline function.
15142 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15143 inline function.
15144 * omp-simd-clone.h: New file.
15145 * omp-simd-clone.c: Include omp-simd-clone.h.
15146 (expand_simd_clones): No longer static.
15147 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15148 cgraph.h and omp-simd-clone.h.
15149 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15150 (vect_recog_widen_shift_pattern): Formatting fix.
15151 (vect_pattern_recog_1): Don't check optab for calls.
15152
15153 PR target/84336
15154 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15155 operands[2] into a REG before using gen_lowpart on it.
15156
15157 2018-02-12 Jeff Law <law@redhat.com>
15158
15159 PR target/83760
15160 * config/sh/sh.c (find_barrier): Consider a sibling call
15161 a barrier as well.
15162
15163 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15164 successfully back substituting a reg.
15165
15166 2018-02-12 Richard Biener <rguenther@suse.de>
15167
15168 PR tree-optimization/84037
15169 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15170 parameter, move visited init to caller.
15171 (vect_slp_analyze_operations): Separate cost from validity
15172 check, initialize visited once for all instances.
15173 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15174 for all instances.
15175 * tree-vect-stmts.c (vect_model_simple_cost): Make early
15176 out an assert.
15177 (vect_model_promotion_demotion_cost): Likewise.
15178 (vectorizable_bswap): Guard cost modeling with !slp_node
15179 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15180 SLP stmts.
15181 (vectorizable_call): Likewise.
15182 (vectorizable_conversion): Likewise.
15183 (vectorizable_assignment): Likewise.
15184 (vectorizable_shift): Likewise.
15185 (vectorizable_operation): Likewise.
15186 (vectorizable_store): Likewise.
15187 (vectorizable_load): Likewise.
15188 (vectorizable_condition): Likewise.
15189 (vectorizable_comparison): Likewise.
15190
15191 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
15192
15193 PR sanitizer/84307
15194 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15195 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15196 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15197
15198 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15199
15200 PR middle-end/83665
15201 * params.def (inline-min-speedup): Increase from 8 to 15.
15202 (max-inline-insns-auto): Decrease from 40 to 30.
15203 * ipa-split.c (consider_split): Add some buffer for function to
15204 be considered inlining candidate.
15205 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15206 default values.
15207
15208 2018-02-12 Richard Biener <rguenther@suse.de>
15209
15210 PR tree-optimization/84037
15211 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15212 matched stmts if we cannot swap the non-matched ones.
15213
15214 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15215
15216 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15217 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15218 _mm_maskz_scalef_round_ss): New intrinsics.
15219 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15220 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15221 __builtin_ia32_scalefss_round): Remove.
15222 (__builtin_ia32_scalefsd_mask_round,
15223 __builtin_ia32_scalefss_mask_round): New intrinsics.
15224 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15225 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15226 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15227 "<round_constraint>")): Changed to ...
15228 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15229 "<round_scalar_constraint>")): ... this.
15230 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15231 %0, %1, %2<round_op3>}"): Changed to ...
15232 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15233 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15234 %2<round_scalar_mask_op3>}"): ... this.
15235 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15236
15237 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15238
15239 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15240 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15241 (_mm_maskz_sqrt_round_ss): New intrinsics.
15242 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15243 (__builtin_ia32_sqrtsd_mask_round)
15244 (__builtin_ia32_sqrtss_mask_round): New builtins.
15245 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15246 (__builtin_ia32_sqrtss_round): Remove.
15247 (__builtin_ia32_sqrtsd_mask_round)
15248 (__builtin_ia32_sqrtss_mask_round): New builtins.
15249 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15250 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15251 ((match_operand:VF_128 1 "vector_operand"
15252 "xBm,<round_constraint>")): Changed to ...
15253 ((match_operand:VF_128 1 "vector_operand"
15254 "xBm,<round_scalar_constraint>")): ... this.
15255 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15256 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15257 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15258 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15259 %<iptr>1<round_scalar_mask_op3>}): ... this.
15260 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15261 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15262
15263 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15264
15265 PR target/84266
15266 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15267 Cast vec_cmpeq result to correct type.
15268 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15269 Cast vec_cmpgt result to correct type.
15270
15271 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15272
15273 * final.c (final_scan_insn_1): Renamed from...
15274 (final_scan_insn): ... this. New wrapper, to recover
15275 seen from the outermost call in recursive ones.
15276 * config/sparc/sparc.c (output_return): Drop seen from call.
15277 (output_sibcall): Likewise.
15278 * config/visium/visium.c (output_branch): Likewise.
15279
15280 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15281
15282 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15283 function label.
15284
15285 2018-02-10 Alan Modra <amodra@gmail.com>
15286
15287 PR target/84300
15288 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15289 Specify LR as an input.
15290
15291 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15292
15293 PR sanitizer/83987
15294 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15295 remove_member_access_dummy_vars): New functions.
15296 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15297 lower_omp_1, execute_lower_omp): Use them.
15298
15299 PR rtl-optimization/84308
15300 * shrink-wrap.c (spread_components): Release todo vector.
15301
15302 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15303
15304 PR rtl-optimization/57193
15305 * ira-color.c (struct allocno_color_data): Add member
15306 conflict_allocno_hard_prefs.
15307 (update_conflict_allocno_hard_prefs): New.
15308 (bucket_allocno_compare_func): Add a preference based on
15309 conflict_allocno_hard_prefs.
15310 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15311 (color_allocnos): Remove a dead code. Initiate
15312 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15313
15314 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15315
15316 PR target/84226
15317 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15318 constraint from =wa to wa. Avoid a subreg on the output operand,
15319 instead use a pseudo and subreg it in a move.
15320 (p9_xxbrd_<mode>): Changed to ...
15321 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15322 (p9_xxbrd_v2df): New expander.
15323 (p9_xxbrw_<mode>): Changed to ...
15324 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15325 (p9_xxbrw_v4sf): New expander.
15326
15327 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15328
15329 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15330
15331 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15332
15333 PR target/83926
15334 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15335 multiply in 32-bit mode.
15336 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15337 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15338 mode.
15339
15340 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15341
15342 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15343 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15344 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15345 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15346
15347 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15348
15349 PR lto/84213
15350 * dwarf2out.c (is_trivial_indirect_ref): New function.
15351 (dwarf2out_late_global_decl): Do not generate a location
15352 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15353 and that are not defined in the current unit.
15354
15355 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15356
15357 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15358 instead of a libcall for UNORDERED.
15359
15360 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15361
15362 PR target/82641
15363 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15364 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15365
15366 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15367
15368 PR target/PR84295
15369 * config/s390/s390.c (s390_set_current_function): Invoke
15370 s390_indirect_branch_settings also if fndecl didn't change.
15371
15372 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15373
15374 * config/rs6000/rs6000.md (blockage): Set length to zero.
15375
15376 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15377
15378 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15379
15380 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15381
15382 PR sanitizer/84285
15383 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15384 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15385 -static-lib*san.
15386
15387 PR debug/84252
15388 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15389 PARALLEL incoming that failed vt_get_decl_and_offset check.
15390
15391 PR middle-end/84237
15392 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15393 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15394 TREE_READONLY bit.
15395 (get_variable_section): For decls in named .bss* sections pass true as
15396 second argument to bss_initializer_p.
15397
15398 2018-02-09 Marek Polacek <polacek@redhat.com>
15399 Jakub Jelinek <jakub@redhat.com>
15400
15401 PR c++/83659
15402 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15403 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15404 Sync some changes from cxx_fold_indirect_ref.
15405
15406 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15407
15408 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15409 markers.
15410 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15411 (BLOCK_INLINE_ENTRY_LABEL): New.
15412 (dwarf2out_var_location): Disregard inline entry markers.
15413 (inline_entry_data): New struct.
15414 (inline_entry_data_hasher): New hashtable type.
15415 (inline_entry_data_hasher::hash): New.
15416 (inline_entry_data_hasher::equal): New.
15417 (inline_entry_data_table): New variable.
15418 (add_high_low_attributes): Add DW_AT_entry_pc and
15419 DW_AT_GNU_entry_view attributes if a pending entry is found
15420 in inline_entry_data_table. Add old entry_pc attribute only
15421 if debug nonbinding markers are disabled.
15422 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15423 markers are enabled.
15424 (block_within_block_p, dwarf2out_inline_entry): New.
15425 (dwarf2out_finish): Check that no entries remained in
15426 inline_entry_data_table.
15427 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15428 (final_scan_insn, notice_source_line): Likewise.
15429 (rest_of_clean_state): Skip inline entry markers.
15430 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15431 markers.
15432 * gimple.c (gimple_build_debug_inline_entry): New.
15433 * gimple.h (enum gimple_debug_subcode): Add
15434 GIMPLE_DEBUG_INLINE_ENTRY.
15435 (gimple_build_debug_inline_entry): Declare.
15436 (gimple_debug_inline_entry_p): New.
15437 (gimple_debug_nonbind_marker_p): Adjust.
15438 * insn-notes.def (INLINE_ENTRY): New.
15439 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15440 inline entry marker notes.
15441 (print_insn): Likewise.
15442 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15443 (INSN_DEBUG_MARKER_KIND): Likewise.
15444 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15445 * tree-inline.c (expand_call_inline): Build and insert
15446 debug_inline_entry stmt.
15447 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15448 inline entry blocks early, if nonbind markers are enabled.
15449 (dump_scope_block): Dump fragment info.
15450 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15451 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15452 (gimple_build_debug_inline_entry): New.
15453 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15454 Enable/disable inline entry points too.
15455 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15456 (DEBUG_INSN): Describe inline entry markers.
15457
15458 * common.opt (gvariable-location-views): New.
15459 (gvariable-location-views=incompat5): New.
15460 * config.in: Rebuilt.
15461 * configure: Rebuilt.
15462 * configure.ac: Test assembler for view support.
15463 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15464 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15465 * dwarf2out.c (var_loc_view): New typedef.
15466 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15467 (dwarf2out_locviews_in_attribute): New.
15468 (dwarf2out_locviews_in_loclist): New.
15469 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15470 (enum dw_line_info_opcode): Add LI_adv_address.
15471 (struct dw_line_info_table): Add view.
15472 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15473 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15474 (zero_view_p): New variable.
15475 (ZERO_VIEW_P): New macro.
15476 (output_asm_line_debug_info): New.
15477 (struct var_loc_node): Add view.
15478 (add_AT_view_list, AT_loc_list): New.
15479 (add_var_loc_to_decl): Add view param. Test it against last.
15480 (new_loc_list): Add view params. Record them.
15481 (AT_loc_list_ptr): Handle loc and view lists.
15482 (view_list_to_loc_list_val_node): New.
15483 (print_dw_val): Handle dw_val_class_view_list.
15484 (size_of_die): Likewise.
15485 (value_format): Likewise.
15486 (loc_list_has_views): New.
15487 (gen_llsym): Set vl_symbol too.
15488 (maybe_gen_llsym, skip_loc_list_entry): New.
15489 (dwarf2out_maybe_output_loclist_view_pair): New.
15490 (output_loc_list): Output view list or entries too.
15491 (output_view_list_offset): New.
15492 (output_die): Handle dw_val_class_view_list.
15493 (output_dwarf_version): New.
15494 (output_compilation_unit_header): Use it.
15495 (output_skeleton_debug_sections): Likewise.
15496 (output_rnglists, output_line_info): Likewise.
15497 (output_pubnames, output_aranges): Update version comments.
15498 (output_one_line_info_table): Output view numbers in asm comments.
15499 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15500 Call maybe_gen_llsym.
15501 (loc_list_from_tree_1): Adjust.
15502 (add_AT_location_description): Create view list attribute if
15503 needed, check it's absent otherwise.
15504 (convert_cfa_to_fb_loc_list): Adjust.
15505 (maybe_emit_file): Call output_asm_line_debug_info for test.
15506 (dwarf2out_var_location): Reset views as needed. Precompute
15507 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15508 attribute. Set view.
15509 (new_line_info_table): Reset next view.
15510 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15511 (dwarf2out_source_line): Likewise. Output view resets and labels to
15512 the assembler, or select appropriate line info opcodes.
15513 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15514 (optimize_string_length): Catch it. Adjust.
15515 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15516 dw_val_class_view_list, and remove it if no longer needed.
15517 (hash_loc_list): Hash view numbers.
15518 (loc_list_hasher::equal): Compare them.
15519 (optimize_location_lists): Check whether a view list symbol is
15520 needed, and whether the locview attribute is present, and
15521 whether they match. Remove the locview attribute if no longer
15522 needed.
15523 (index_location_lists): Call skip_loc_list_entry for test.
15524 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15525 Use output_dwarf_version.
15526 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15527 (struct dw_val_node): Add val_view_list.
15528 * final.c (SEEN_NEXT_VIEW): New.
15529 (set_next_view_needed): New.
15530 (clear_next_view_needed): New.
15531 (maybe_output_next_view): New.
15532 (final_start_function): Rename to...
15533 (final_start_function_1): ... this. Take pointer to FIRST,
15534 add SEEN parameter. Emit param bindings in the initial view.
15535 (final_start_function): Reintroduce SEEN-less interface.
15536 (final): Rename to...
15537 (final_1): ... this. Take SEEN parameter. Output final pending
15538 next view at the end.
15539 (final): Reintroduce seen-less interface.
15540 (final_scan_insn): Output pending next view before switching
15541 sections or ending a block. Mark the next view as needed when
15542 outputting variable locations. Notify debug backend of section
15543 changes, and of location view changes.
15544 (rest_of_handle_final): Adjust.
15545 * toplev.c (process_options): Autodetect value for debug variable
15546 location views option. Warn on incompat5 without -gdwarf-5.
15547 * doc/invoke.texi (gvariable-location-views): New.
15548 (gvariable-location-views=incompat5): New.
15549 (gno-variable-location-views): New.
15550
15551 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15552
15553 PR tree-optimization/84136
15554 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15555 that the result of find_edge is non-NULL.
15556
15557 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15558
15559 PR target/83008
15560 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15561 storing integer register in SImode. Fix cost of 256 and 512
15562 byte aligned SSE register store.
15563
15564 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15565
15566 * config/i386/i386.c (ix86_multiplication_cost): Fix
15567 multiplication cost for TARGET_AVX512DQ.
15568
15569 2018-02-08 Marek Polacek <polacek@redhat.com>
15570
15571 PR tree-optimization/84238
15572 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15573 get_range_strlen.
15574
15575 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15576
15577 PR tree-optimization/84265
15578 * tree-vect-stmts.c (vectorizable_store): Don't treat
15579 VMAT_CONTIGUOUS accesses as grouped.
15580 (vectorizable_load): Likewise.
15581
15582 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15583
15584 PR tree-optimization/81635
15585 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15586 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15587 (test_round_for_mask): New functions.
15588 (wide_int_cc_tests): Call test_round_for_mask.
15589 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15590 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15591 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15592 range returned by get_range_info.
15593
15594 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15595
15596 PR ipa/81360
15597 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15598 * symtab.c: Include builtins.h
15599 (symtab_node::output_to_lto_symbol_table_p): Move here
15600 from lto-streamer-out.c:output_symbol_p.
15601 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15602 (output_symbol_p): Move all logic to symtab.c
15603 (produce_symtab): Update.
15604
15605 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15606
15607 * config/s390/s390-opts.h (enum indirect_branch): Define.
15608 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15609 (s390_indirect_branch_via_thunk)
15610 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15611 (enum s390_indirect_branch_type): Define.
15612 * config/s390/s390.c (struct s390_frame_layout, struct
15613 machine_function): Remove.
15614 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15615 (indirect_branch_table_label_no, indirect_branch_table_name):
15616 Define variables.
15617 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15618 (enum s390_indirect_branch_option): Define.
15619 (s390_return_addr_from_memory): New function.
15620 (s390_handle_string_attribute): New function.
15621 (s390_attribute_table): Add new attribute handler.
15622 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15623 (s390_indirect_branch_via_thunk): New function.
15624 (s390_indirect_branch_via_inline_thunk): New function.
15625 (s390_function_ok_for_sibcall): When jumping via thunk disallow
15626 sibling call optimization for non z10 compiles.
15627 (s390_emit_call): Force indirect branch target to be a single
15628 register. Add r1 clobber for non-z10 compiles.
15629 (s390_emit_epilogue): Emit return jump via return_use expander.
15630 (s390_reorg): Handle JUMP_INSNs as execute targets.
15631 (s390_option_override_internal): Perform validity checks for the
15632 new command line options.
15633 (s390_indirect_branch_attrvalue): New function.
15634 (s390_indirect_branch_settings): New function.
15635 (s390_set_current_function): Invoke s390_indirect_branch_settings.
15636 (s390_output_indirect_thunk_function): New function.
15637 (s390_code_end): Implement target hook.
15638 (s390_case_values_threshold): Implement target hook.
15639 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15640 macros.
15641 * config/s390/s390.h (struct s390_frame_layout)
15642 (struct machine_function): Move here from s390.c.
15643 (TARGET_INDIRECT_BRANCH_NOBP_RET)
15644 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15645 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15646 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15647 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15648 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15649 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15650 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15651 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15652 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15653 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15654 (mnemonic attribute): Add values which aren't recognized
15655 automatically.
15656 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15657 pattern for branch conversion. Fix mnemonic attribute.
15658 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15659 indirect branch via thunk if requested.
15660 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15661 ("*indirect_jump"): Disable for branch conversion using out of
15662 line thunks.
15663 ("indirect_jump_via_thunk<mode>_z10")
15664 ("indirect_jump_via_thunk<mode>")
15665 ("indirect_jump_via_inlinethunk<mode>_z10")
15666 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15667 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15668 ("casesi_jump_via_inlinethunk<mode>_z10")
15669 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15670 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15671 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15672 ("*indirect2_jump"): Disable for branch conversion.
15673 ("casesi_jump"): Turn into expander and expand patterns for branch
15674 conversion.
15675 ("return_use"): New expander.
15676 ("*return"): Emit return via thunk and rename it to ...
15677 ("*return<mode>"): ... this one.
15678 * config/s390/s390.opt: Add new options and and enum for the
15679 option values.
15680
15681 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15682
15683 * lra-constraints.c (match_reload): Unconditionally use
15684 gen_lowpart_SUBREG, rather than selecting between that
15685 and equivalent gen_rtx_SUBREG code.
15686
15687 2018-02-08 Richard Biener <rguenther@suse.de>
15688
15689 PR tree-optimization/84233
15690 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15691 changed flag instead of boguously re-using phi_inserted.
15692
15693 2018-02-08 Martin Jambor <mjambor@suse.cz>
15694
15695 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15696 static local variables.
15697
15698 2018-02-08 Richard Biener <rguenther@suse.de>
15699
15700 PR tree-optimization/84278
15701 * tree-vect-stmts.c (vectorizable_store): When looking for
15702 smaller vector types to perform grouped strided loads/stores
15703 make sure the mode is supported by the target.
15704 (vectorizable_load): Likewise.
15705
15706 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15707
15708 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15709 Increase LDP/STP opportunities by adding adjacent callee-saves.
15710
15711 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15712
15713 PR rtl-optimization/84068
15714 PR rtl-optimization/83459
15715 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15716
15717 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
15718
15719 PR tree-optimization/84224
15720 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15721 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15722 non-zero arguments.
15723
15724 2018-02-07 Iain Sandoe <iain@codesourcery.com>
15725
15726 PR target/84113
15727 * config/rs6000/altivec.md (*restore_world): Remove LR use.
15728 * config/rs6000/predicates.md (restore_world_operation): Adjust op
15729 count, remove one USE.
15730
15731 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
15732
15733 * doc/install.texi (Configuration): Document the
15734 --with-long-double-format={ibm,ieee} PowerPC configuration
15735 options.
15736
15737 PR target/84154
15738 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15739 Convert from define_expand to be define_insn_and_split. Rework
15740 float/double/_Float128 conversions to QI/HI/SImode to work with
15741 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
15742 conversions to QI/HImode types did a store and then a load to
15743 truncate the value. For conversions to VSX registers, don't split
15744 the insn, instead emit the code directly. Use the code iterator
15745 any_fix to combine signed and unsigned conversions.
15746 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15747 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15748 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15749 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15750 (fix_<mode>di2_hw): Likewise.
15751 (fixuns_<mode>di2_hw): Likewise.
15752 (fix_<mode>si2_hw): Likewise.
15753 (fixuns_<mode>si2_hw): Likewise.
15754 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15755 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15756 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15757 fix<uns>_trunc<SFDF:mode>si2_p8.
15758 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15759 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15760 (fix<uns>_<mode>_mem): Likewise.
15761 (fctiw<u>z_<mode>_mem): Likewise.
15762 (fix<uns>_<mode>_mem): Likewise.
15763 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15764 the register allocator from doing a direct move to the GPRs to do
15765 a store, and instead use the ISA 3.0 store byte/half-word from
15766 vector register instruction. For IEEE 128-bit floating point,
15767 also optimize stores of 32-bit ints.
15768 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15769
15770 2018-02-07 Alan Hayward <alan.hayward@arm.com>
15771
15772 * genextract.c (push_pathstr_operand): New function to support
15773 [a-zA-Z].
15774 (walk_rtx): Call push_pathstr_operand.
15775 (print_path): Support [a-zA-Z].
15776
15777 2018-02-07 Richard Biener <rguenther@suse.de>
15778
15779 PR tree-optimization/84037
15780 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15781 (cse_and_gimplify_to_preheader): Declare.
15782 (vect_get_place_in_interleaving_chain): Likewise.
15783 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15784 ivexpr_map.
15785 (_loop_vec_info::~_loop_vec_info): Delete it.
15786 (cse_and_gimplify_to_preheader): New function.
15787 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15788 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15789 (vectorizable_load): Likewise. For grouped stores always base
15790 the IV on the first element.
15791 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15792 condition before gimplifying.
15793
15794 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15795
15796 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15797 *DIV_EXPR and *MOD_EXPR.
15798
15799 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
15800
15801 PR target/84248
15802 * config/i386/i386.c (ix86_option_override_internal): Mask out
15803 the CF_SET bit when checking -fcf-protection.
15804
15805 2018-02-07 Tom de Vries <tom@codesourcery.com>
15806
15807 PR libgomp/84217
15808 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15809 enough.
15810
15811 2018-02-07 Richard Biener <rguenther@suse.de>
15812
15813 PR tree-optimization/84204
15814 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15815 this place.
15816
15817 PR tree-optimization/84205
15818 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15819 special-case isl_ast_op_zdiv_r.
15820
15821 PR tree-optimization/84223
15822 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15823 Only add conditions from within the region.
15824 (gather_bbs::after_dom_children): Adjust.
15825
15826 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15827
15828 PR target/84209
15829 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15830 * config/avr/avr.md: Only post-reload split REG-REG moves if
15831 either register is GENERAL_REG_P.
15832
15833 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15834
15835 PR tree-optimization/84235
15836 * tree-ssa-scopedtables.c
15837 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15838 if the subtraction is performed in floating point type where NaNs are
15839 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15840 build 1. Formatting fix.
15841
15842 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15843
15844 PR target/84146
15845 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15846 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15847 and skip it regardless of bb boundaries. Use CALL_P macro,
15848 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15849 unnecessarily, formatting fix.
15850
15851 2018-02-06 Michael Collison <michael.collison@arm.com>
15852
15853 * config/arm/thumb2.md:
15854 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15855 (*thumb_mov_notscc): Ditto.
15856
15857 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15858
15859 PR target/84154
15860 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15861 unsigned_fix, not "s".
15862
15863 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15864
15865 * configure.ac (gcc_fn_eh_frame_ro): New function.
15866 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15867 correct .eh_frame permissions.
15868 * configure: Regenerate.
15869
15870 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15871
15872 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15873 irrelevant options.
15874
15875 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15876
15877 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15878 Display warning message for -mno-speculate-indirect-jumps.
15879
15880 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15881
15882 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15883 Undocumented.
15884 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15885
15886 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15887
15888 PR tree-optimization/84225
15889 * tree-eh.c (find_trapping_overflow): Only call
15890 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15891
15892 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15893
15894 PR target/84145
15895 * config/i386/i386.c: Reimplement the check of possible options
15896 -mibt/-mshstk conbination. Change error messages.
15897 * doc/invoke.texi: Fix a typo: remove extra '='.
15898
15899 2018-02-06 Marek Polacek <polacek@redhat.com>
15900
15901 PR tree-optimization/84228
15902 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15903
15904 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15905
15906 PR target/82641
15907 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15908 emitted arch directives.
15909 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15910 __ARM_FEATURE_COPROC before changing architectures.
15911
15912 2018-02-06 Richard Biener <rguenther@suse.de>
15913
15914 * config/i386/i386.c (print_reg): Fix typo.
15915 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15916
15917 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15918
15919 * configure: Regenerate.
15920
15921 2018-02-05 Martin Sebor <msebor@redhat.com>
15922
15923 PR tree-optimization/83369
15924 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15925 inlining context.
15926
15927 2018-02-05 Martin Liska <mliska@suse.cz>
15928
15929 * doc/invoke.texi: Cherry-pick upstream r323995.
15930
15931 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15932
15933 * ira.c (ira_init_register_move_cost): Adjust comment.
15934
15935 2018-02-05 Martin Liska <mliska@suse.cz>
15936
15937 PR gcov-profile/84137
15938 * doc/gcov.texi: Fix typo in documentation.
15939
15940 2018-02-05 Martin Liska <mliska@suse.cz>
15941
15942 PR gcov-profile/83879
15943 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15944 using dlopen functionality.
15945
15946 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
15947
15948 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15949 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15950 _mm_maskz_range_ss, _mm_mask_range_round_ss,
15951 _mm_maskz_range_round_ss): New intrinsics.
15952 (__builtin_ia32_rangesd128_round)
15953 (__builtin_ia32_rangess128_round): Remove.
15954 (__builtin_ia32_rangesd128_mask_round,
15955 __builtin_ia32_rangess128_mask_round): New builtins.
15956 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15957 __builtin_ia32_rangess128_round): Remove.
15958 (__builtin_ia32_rangesd128_mask_round,
15959 __builtin_ia32_rangess128_mask_round): New builtins.
15960 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15961 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15962 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15963 "<round_saeonly_constraint>")): Changed to ...
15964 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15965 "<round_saeonly_scalar_constraint>")): ... this.
15966 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15967 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15968 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15969 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15970 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15971
15972 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
15973
15974 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15975 options.
15976 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15977 Remove all values except native, 8540 and 8548.
15978
15979 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
15980
15981 * config/i386/i386.c (ix86_output_function_return): Pass
15982 INVALID_REGNUM, instead of -1, as invalid register number to
15983 indirect_thunk_name and output_indirect_thunk.
15984
15985 2018-02-02 Julia Koval <julia.koval@intel.com>
15986
15987 * config.gcc: Add -march=icelake.
15988 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15989 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15990 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15991 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15992 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15993 (processor_target_table): Add icelake.
15994 (ix86_option_override_internal): Handle new PTAs.
15995 (get_builtin_code_for_version): Handle icelake.
15996 (M_INTEL_COREI7_ICELAKE): New.
15997 (fold_builtin_cpu): Handle icelake.
15998 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15999 * doc/invoke.texi: Add -march=icelake.
16000
16001 2018-02-02 Julia Koval <julia.koval@intel.com>
16002
16003 * config/i386/i386.c (ix86_option_override_internal): Change flags type
16004 to wide_int_bitmask.
16005 * wide-int-bitmask.h: New.
16006
16007 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16008
16009 PR target/84066
16010 * config/i386/i386.md: Replace Pmode with word_mode in
16011 builtin_setjmp_setup and builtin_longjmp to support x32.
16012
16013 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
16014
16015 PR target/56010
16016 PR target/83743
16017 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16018 #include "opts.h".
16019 (rs6000_supported_cpu_names): New static variable.
16020 (linux_cpu_translation_table): Likewise.
16021 (elf_platform) <cpu>: Define new static variable and use it.
16022 Translate kernel AT_PLATFORM name to canonical name if needed.
16023 Error if platform name is unknown.
16024
16025 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16026
16027 PR target/84089
16028 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16029
16030 2018-02-01 Jeff Law <law@redhat.com>
16031
16032 PR target/84128
16033 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16034 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16035 the scratch if RELEASE_VIA_POP is false.
16036 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16037 If we have to save a temporary register, decrement SIZE appropriately.
16038 Pass new arguments to release_scratch_register_on_entry.
16039 (ix86_adjust_stack_and_probe): Likewise.
16040 (ix86_emit_probe_stack_range): Pass new arguments to
16041 release_scratch_register_on_entry.
16042
16043 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16044
16045 PR rtl-optimization/84157
16046 * combine.c (change_zero_ext): Use REG_P predicate in
16047 front of HARD_REGISTER_P predicate.
16048
16049 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16050
16051 * config/avr/avr.c (avr_option_override): Move disabling of
16052 -fdelete-null-pointer-checks to...
16053 * common/config/avr/avr-common.c (avr_option_optimization_table):
16054 ...here.
16055
16056 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16057
16058 PR tree-optimization/81635
16059 * tree-data-ref.c (split_constant_offset_1): For types that
16060 wrap on overflow, try to use range info to prove that wrapping
16061 cannot occur.
16062
16063 2018-02-01 Renlin Li <renlin.li@arm.com>
16064
16065 PR target/83370
16066 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16067 TAILCALL_ADDR_REGS.
16068 (aarch64_register_move_cost): Likewise.
16069 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16070 TAILCALL_ADDR_REGS.
16071 (REG_CLASS_NAMES): Likewise.
16072 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16073 TAILCALL_ADDR_REGS. Remove IP registers.
16074 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16075
16076 2018-02-01 Richard Biener <rguenther@suse.de>
16077
16078 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16079 for specifying RPO order and allow NULL for that.
16080 * domwalk.c (dom_walker::dom_walker): Likewise.
16081 (dom_walker::walk): Handle NULL RPO order.
16082 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16083 in RPO order.
16084 (rewrite_update_dom_walker): Likewise.
16085 (mark_def_dom_walker): Likewise.
16086
16087 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16088
16089 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16090 (aarch64_maybe_expand_sve_subreg_move): Declare.
16091 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16092 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16093 predicate.
16094 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16095 that are semantically a reverse operation.
16096 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16097 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16098 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16099 functions.
16100 (aarch64_can_change_mode_class): For big-endian, forbid changes
16101 between two SVE modes if they have different element sizes.
16102
16103 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16104
16105 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16106 the TImode handling for big-endian targets.
16107
16108 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16109
16110 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16111 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16112 not just bytes.
16113 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16114 Remove BSWAP handing for big-endian targets and use the form of
16115 LD1RQ appropariate for the mode.
16116
16117 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16118
16119 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16120 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16121 duplicated element.
16122
16123 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16124
16125 PR tearget/83845
16126 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16127 check for operands that need to go through aarch64_sve_reload_be.
16128
16129 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16130
16131 PR tree-optimization/81661
16132 PR tree-optimization/84117
16133 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16134 * tree-eh.c: Include gimplify.h.
16135 (find_trapping_overflow, replace_trapping_overflow,
16136 rewrite_to_non_trapping_overflow): New functions.
16137 * tree-vect-loop.c: Include tree-eh.h.
16138 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16139 * tree-data-ref.c: Include tree-eh.h.
16140 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16141
16142 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
16143
16144 PR rtl-optimization/84123
16145 * combine.c (change_zero_ext): Check if hard register satisfies
16146 can_change_dest_mode before calling gen_lowpart_SUBREG.
16147
16148 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
16149
16150 PR target/82444
16151 * ira.c (ira_init_register_move_cost): Remove assert.
16152
16153 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16154
16155 PR rtl-optimization/84071
16156 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16157 * doc/tm.texi: Regenerate.
16158
16159 2018-01-31 Richard Biener <rguenther@suse.de>
16160
16161 PR tree-optimization/84132
16162 * tree-data-ref.c (analyze_miv_subscript): Properly
16163 check whether evolution_function_is_affine_multivariate_p
16164 before calling gcd_of_steps_may_divide_p.
16165
16166 2018-01-31 Julia Koval <julia.koval@intel.com>
16167
16168 PR target/83618
16169 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16170 * config/i386/i386.md (rdpid_rex64) New.
16171 (rdpid): Make 32bit only.
16172
16173 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
16174
16175 PR lto/84105
16176 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16177 an IDENTIFIER_NODE for FUNCTION_TYPE's.
16178
16179 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16180
16181 Revert
16182 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16183
16184 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16185
16186 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16187
16188 PR rtl-optimization/84071
16189 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16190 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16191
16192 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16193
16194 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16195 (arc_attribute_table): Add 'aux' attribute.
16196 (arc_in_small_data_p): Consider aux like variables.
16197 (arc_is_aux_reg_p): New function.
16198 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16199 (arc_get_aux_arg): New function.
16200 (prepare_move_operands): Handle aux-register access.
16201 (arc_handle_aux_attribute): New function.
16202 * doc/extend.texi (ARC Variable attributes): Add subsection.
16203
16204 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16205
16206 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16207 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16208 (arc_attribute_table): Add 'uncached' attribute.
16209 (arc_print_operand): Print '.di' flag for uncached memory
16210 accesses.
16211 (arc_in_small_data_p): Do not consider for small data the uncached
16212 types.
16213 (arc_is_uncached_mem_p): New function.
16214 * config/arc/predicates.md (compact_store_memory_operand): Check
16215 for uncached memory accesses.
16216 (nonvol_nonimm_operand): Likewise.
16217 * doc/extend.texi (ARC Type Attribute): New subsection.
16218
16219 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16220
16221 PR c/84100
16222 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16223 falign-loops=): Add Optimization flag.
16224
16225 2018-01-30 Jeff Law <law@redhat.com>
16226
16227 PR target/84064
16228 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16229 INT_REGISTERS_SAVED. Check it prior to calling
16230 get_scratch_register_on_entry.
16231 (ix86_adjust_stack_and_probe): Similarly.
16232 (ix86_emit_probe_stack_range): Similarly.
16233 (ix86_expand_prologue): Corresponding changes.
16234
16235 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16236
16237 PR target/40411
16238 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16239 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16240
16241 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16242
16243 PR target/84112
16244 * lra-constraints.c (curr_insn_transform): Process AND in the
16245 address.
16246
16247 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16248
16249 PR rtl-optimization/83986
16250 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16251 dependence against last_pending_memory_flush in addition to
16252 pending_jump_insns.
16253
16254 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16255
16256 PR tree-optimization/81611
16257 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16258 copies.
16259
16260 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16261
16262 PR target/83758
16263 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16264 a reg rtx.
16265
16266 2018-01-30 Richard Biener <rguenther@suse.de>
16267 Jakub Jelinek <jakub@redhat.com>
16268
16269 PR tree-optimization/84111
16270 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16271 inner loops added during recursion, as they don't have up-to-date
16272 SSA form.
16273
16274 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16275
16276 PR ipa/81360
16277 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16278 (can_inline_edge_by_limits_p): ... here.
16279 (can_early_inline_edge_p, check_callers,
16280 update_caller_keys, update_callee_keys, recursive_inlining,
16281 add_new_edges_to_heap, speculation_useful_p,
16282 inline_small_functions,
16283 inline_small_functions, flatten_function,
16284 inline_to_all_callers_1): Update.
16285
16286 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16287
16288 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16289 zeros correctly.
16290
16291 2018-01-30 Richard Biener <rguenther@suse.de>
16292
16293 PR tree-optimization/83008
16294 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16295 invariant and constant vector uses in stmts when they need
16296 more than one stmt.
16297
16298 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16299
16300 PR bootstrap/84017
16301 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16302 * configure: Regenerate.
16303
16304 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16305
16306 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16307 pattern.
16308 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16309 Use gen_rtx_REG rather than gen_lowpart.
16310
16311 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16312
16313 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16314 rather than 0 when creating partial subregs.
16315
16316 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16317
16318 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16319 of usage.
16320
16321 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16322
16323 PR target/81550
16324 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16325 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16326 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16327 flags. This restores the settings used before the 2017-07-24.
16328 Turning off pre increment/decrement/modify allows IVOPTS to
16329 optimize DF/SF loops where the index is an int.
16330
16331 2018-01-29 Richard Biener <rguenther@suse.de>
16332 Kelvin Nilsen <kelvin@gcc.gnu.org>
16333
16334 PR bootstrap/80867
16335 * tree-vect-stmts.c (vectorizable_call): Don't call
16336 targetm.vectorize_builtin_md_vectorized_function if callee is
16337 NULL.
16338
16339 2018-01-22 Carl Love <cel@us.ibm.com>
16340
16341 * doc/extend.tex: Fix typo in second arg in
16342 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16343
16344 2018-01-29 Richard Biener <rguenther@suse.de>
16345
16346 PR tree-optimization/84086
16347 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16348 (flush_ssaname_freelist): When SSA names were released reset
16349 the SCEV hash table.
16350
16351 2018-01-29 Richard Biener <rguenther@suse.de>
16352
16353 PR tree-optimization/84057
16354 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16355 removed paths when removing edges.
16356
16357 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16358
16359 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16360 -mfunction-return=@var{choice}.
16361
16362 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16363
16364 PR diagnostic/84034
16365 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16366 Handle CR like TAB.
16367 (layout::print_source_line): Likewise.
16368 (test_get_line_width_without_trailing_whitespace): Add test cases.
16369
16370 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16371
16372 PR middle-end/84040
16373 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16374 debug insns.
16375
16376 2018-01-26 Jim Wilson <jimw@sifive.com>
16377
16378 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16379
16380 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16381 specified.
16382
16383 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16384
16385 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16386 and CMP + SUB-immediate -> SUBS.
16387
16388 2018-01-26 Martin Sebor <msebor@redhat.com>
16389
16390 PR tree-optimization/83896
16391 * tree-ssa-strlen.c (get_string_len): Rename...
16392 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16393 Avoid assuming length is constant.
16394 (handle_char_store): Use HOST_WIDE_INT for string length.
16395
16396 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16397
16398 PR target/81763
16399 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16400 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16401
16402 2018-01-26 Richard Biener <rguenther@suse.de>
16403
16404 PR rtl-optimization/84003
16405 * dse.c (record_store): Only record redundant stores when
16406 the earlier store aliases at least all accesses the later one does.
16407
16408 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16409
16410 PR rtl-optimization/83985
16411 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16412 REG_CFA_RESTORE insns.
16413 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16414 REG_CFA_RESTORE insns here.
16415
16416 PR c/83989
16417 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16418 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16419
16420 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16421
16422 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16423 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16424 (arc_init): Likewise.
16425 (arc_override_options): Likewise.
16426 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16427 value.
16428 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16429 support.
16430 * config/arc/arc.h (TARGET_DBNZ): Define.
16431 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16432 properly set the tune attribute.
16433 (dbnz): Use TARGET_DBNZ guard.
16434 * config/arc/arc.opt (mtune): Add core3 option.
16435
16436 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16437
16438 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16439 recognize new pic like addresses.
16440 (arc_delegitimize_address): Clean up.
16441
16442 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16443
16444 * config/arc/arc-arches.def: Option mrf16 valid for all
16445 architectures.
16446 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16447 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16448 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16449 * config/arc/arc-tables.opt: Regenerate.
16450 * config/arc/arc.c (arc_conditional_register_usage): Handle
16451 reduced register file case.
16452 (arc_file_start): Set must have build attributes.
16453 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16454 mrf16 option value.
16455 * config/arc/arc.opt (mrf16): Add new option.
16456 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16457 * config/arc/genmultilib.awk: Handle new mrf16 option.
16458 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16459 * config/arc/t-multilib: Regenerate.
16460 * doc/invoke.texi (ARC Options): Document mrf16 option.
16461
16462 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16463
16464 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16465 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16466 (arc_attribute_table): Add 'secure_call' attribute.
16467 (arc_print_operand): Print secure call operand.
16468 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16469 secure.
16470 (arc_is_secure_call_p): New function. * config/arc/arc.md
16471 (call_i): Add support for sjli instruction.
16472 (call_value_i): Likewise.
16473 * config/arc/constraints.md (Csc): New constraint.
16474
16475 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16476 John Eric Martin <John.Martin@emmicro-us.com>
16477
16478 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16479 * config/arc/arc.c (_arc_jli_section): New struct.
16480 (arc_jli_section): New type.
16481 (rc_jli_sections): New static variable.
16482 (arc_handle_jli_attribute): New function.
16483 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16484 (arc_file_end): New function.
16485 (TARGET_ASM_FILE_END): Define.
16486 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16487 (arc_add_jli_section): New function.
16488 (jli_call_scan): Likewise.
16489 (arc_reorg): Call jli_call_scan.
16490 (arc_output_addsi): Remove 'S' from printing asm operand.
16491 (arc_is_jli_call_p): New function.
16492 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16493 operand.
16494 (movhi_insn): Likewise.
16495 (movsi_insn): Likewise.
16496 (movsi_set_cc_insn): Likewise.
16497 (loadqi_update): Likewise.
16498 (load_zeroextendqisi_update): Likewise.
16499 (load_signextendqisi_update): Likewise.
16500 (loadhi_update): Likewise.
16501 (load_zeroextendhisi_update): Likewise.
16502 (load_signextendhisi_update): Likewise.
16503 (loadsi_update): Likewise.
16504 (loadsf_update): Likewise.
16505 (movsicc_insn): Likewise.
16506 (bset_insn): Likewise.
16507 (bxor_insn): Likewise.
16508 (bclr_insn): Likewise.
16509 (bmsk_insn): Likewise.
16510 (bicsi3_insn): Likewise.
16511 (cmpsi_cc_c_insn): Likewise.
16512 (movsi_ne): Likewise.
16513 (movsi_cond_exec): Likewise.
16514 (clrsbsi2): Likewise.
16515 (norm_f): Likewise.
16516 (normw): Likewise.
16517 (swap): Likewise.
16518 (divaw): Likewise.
16519 (flag): Likewise.
16520 (sr): Likewise.
16521 (kflag): Likewise.
16522 (ffs): Likewise.
16523 (ffs_f): Likewise.
16524 (fls): Likewise.
16525 (call_i): Remove 'S' asm letter, add jli instruction.
16526 (call_value_i): Likewise.
16527 * config/arc/arc.op (mjli-always): New option.
16528 * config/arc/constraints.md (Cji): New constraint.
16529 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16530 operand.
16531 (subsf3_fpx): Likewise.
16532 (mulsf3_fpx): Likewise.
16533 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16534 asm operand.
16535 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16536 function attrbutes.
16537 * doc/invoke.texi (ARC): Document mjli-always option.
16538
16539 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16540
16541 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16542 avoid addition with 0 and use incw and decw where possible.
16543
16544 2018-01-26 Richard Biener <rguenther@suse.de>
16545
16546 PR tree-optimization/81082
16547 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16548 association if it requires casting to unsigned.
16549 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16550 from fold_plusminus_mult_expr to catch important cases late when
16551 range info is available.
16552
16553 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16554
16555 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16556 * configure.ac (hidden_linkonce): New test.
16557 * configure: Regenerate.
16558 * config.in: Regenerate.
16559
16560 2018-01-26 Julia Koval <julia.koval@intel.com>
16561
16562 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16563 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16564 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16565 _mm_mask_bitshuffle_epi64_mask): Fix type.
16566 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16567 USI_FTYPE_V4DI_V4DI_USI): Remove.
16568 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16569 __builtin_ia32_vpshufbitqmb256_mask,
16570 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16571 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16572 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16573
16574 2018-01-26 Alan Modra <amodra@gmail.com>
16575
16576 PR target/84033
16577 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16578 UNSPEC_VBPERMQ. Sort other unspecs.
16579
16580 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16581
16582 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16583
16584 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16585
16586 PR middle-end/83055
16587 * predict.c (drop_profile): Do not push/pop cfun; update also
16588 node->count.
16589 (handle_missing_profiles): Fix logic looking for zero profiles.
16590
16591 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16592
16593 PR middle-end/83977
16594 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16595 on functions with #pragma omp declare simd or functions with simd
16596 attribute.
16597 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16598 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16599 Remove trailing \n from warning_at calls.
16600
16601 2018-01-25 Tom de Vries <tom@codesourcery.com>
16602
16603 PR target/84028
16604 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16605 for neutered workers.
16606
16607 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16608
16609 PR target/68467
16610 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16611 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16612
16613 2018-01-24 Jeff Law <law@redhat.com>
16614
16615 PR target/83994
16616 * i386.c (get_probe_interval): Move to earlier point.
16617 (ix86_compute_frame_layout): If -fstack-clash-protection and
16618 the frame is larger than the probe interval, then use pushes
16619 to save registers rather than reg->mem moves.
16620 (ix86_expand_prologue): Remove conditional for int_registers_saved
16621 assertion.
16622
16623 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
16624
16625 PR target/84014
16626 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16627 min/max for never referenced object.
16628
16629 2018-01-24 Jakub Jelinek <jakub@redhat.com>
16630
16631 PR middle-end/83977
16632 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16633 here.
16634 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16635 attributes from DECL_ATTRIBUTES (decl) without affecting
16636 DECL_ATTRIBUTES (current_function_decl).
16637 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16638 functions with non-NULL DECL_ABSTRACT_ORIGIN.
16639
16640 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
16641
16642 PR tree-optimization/83979
16643 * fold-const.c (fold_comparison): Use constant_boolean_node
16644 instead of boolean_{true,false}_node.
16645
16646 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
16647
16648 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16649 with zero counts.
16650
16651 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16652
16653 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16654 Simplify the clause that sets the length attribute.
16655 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16656 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16657 clause that sets the length attribute.
16658 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16659
16660 2018-01-24 Tom de Vries <tom@codesourcery.com>
16661
16662 PR target/83589
16663 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16664 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16665 Add strict parameter.
16666 (prevent_branch_around_nothing): Insert dummy insn between branch to
16667 label and label with no ptx insn inbetween.
16668 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16669
16670 2018-01-24 Tom de Vries <tom@codesourcery.com>
16671
16672 PR target/81352
16673 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16674 for neutered threads in warp.
16675 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16676
16677 2018-01-24 Richard Biener <rguenther@suse.de>
16678
16679 PR tree-optimization/83176
16680 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16681 operands.
16682
16683 2018-01-24 Richard Biener <rguenther@suse.de>
16684
16685 PR tree-optimization/82819
16686 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16687 code generating pluses that are no-ops in the target precision.
16688
16689 2018-01-24 Richard Biener <rguenther@suse.de>
16690
16691 PR middle-end/84000
16692 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16693
16694 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16695
16696 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16697 to merge probabilities.
16698 * predict.c (probably_never_executed): Also mark as cold functions
16699 with global 0 profile and guessed local profile.
16700 * profile-count.c (profile_probability::combine_with_count): New
16701 member function.
16702 * profile-count.h (profile_probability::operator*,
16703 profile_probability::operator*=, profile_probability::operator/,
16704 profile_probability::operator/=): Reduce precision to adjusted
16705 and set value to guessed on contradictory divisions.
16706 (profile_probability::combine_with_freq): Remove.
16707 (profile_probability::combine_wiht_count): Declare.
16708 (profile_count::force_nonzero):: Set to adjusted.
16709 (profile_count::probability_in):: Set quality to adjusted.
16710 * tree-ssa-tail-merge.c (replace_block_by): Use
16711 combine_with_count.
16712
16713 2018-01-23 Andrew Waterman <andrew@sifive.com>
16714 Jim Wilson <jimw@sifive.com>
16715
16716 * config/riscv/riscv.c (riscv_stack_boundary): New.
16717 (riscv_option_override): Set riscv_stack_boundary. Handle
16718 riscv_preferred_stack_boundary_arg.
16719 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16720 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16721 (STACK_BOUNDARY): Set to riscv_stack_boundary.
16722 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16723 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16724 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16725
16726 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
16727
16728 PR target/83905
16729 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16730 of struct ix86_frame.
16731 (ix86_expand_epilogue): Likewise. Add a local variable for
16732 the reg_save_offset field in struct ix86_frame.
16733
16734 2018-01-23 Bin Cheng <bin.cheng@arm.com>
16735
16736 PR tree-optimization/82604
16737 * tree-loop-distribution.c (enum partition_kind): New enum item
16738 PKIND_PARTIAL_MEMSET.
16739 (partition_builtin_p): Support above new enum item.
16740 (generate_code_for_partition): Ditto.
16741 (compute_access_range): Differentiate cases that equality can be
16742 proven at all loops, the innermost loops or no loops.
16743 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16744 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
16745 (finalize_partitions, distribute_loop): Don't fuse partition of
16746 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16747 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16748 parloop is enabled.
16749
16750 2018-01-23 Martin Liska <mliska@suse.cz>
16751
16752 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16753 order to ignore the predictor.
16754 (PRED_POLYMORPHIC_CALL): Likewise.
16755 (PRED_RECURSIVE_CALL): Likewise.
16756
16757 2018-01-23 Martin Liska <mliska@suse.cz>
16758
16759 * tree-profile.c (tree_profiling): Print function header to
16760 aware reader which function we are working on.
16761 * value-prof.c (gimple_find_values_to_profile): Do not print
16762 not interesting value histograms.
16763
16764 2018-01-23 Martin Liska <mliska@suse.cz>
16765
16766 * profile-count.h (enum profile_quality): Add
16767 profile_uninitialized as the first value. Do not number values
16768 as they are zero based.
16769 (profile_count::verify): Update sanity check.
16770 (profile_probability::verify): Likewise.
16771
16772 2018-01-23 Nathan Sidwell <nathan@acm.org>
16773
16774 * doc/invoke.texi (ffor-scope): Deprecate.
16775
16776 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16777
16778 PR tree-optimization/83510
16779 * domwalk.c (set_all_edges_as_executable): New function.
16780 (dom_walker::dom_walker): Convert bool param
16781 "skip_unreachable_blocks" to enum reachability. Move setup of
16782 edge flags to set_all_edges_as_executable and only do it when
16783 reachability is REACHABLE_BLOCKS.
16784 * domwalk.h (enum dom_walker::reachability): New enum.
16785 (dom_walker::dom_walker): Convert bool param
16786 "skip_unreachable_blocks" to enum reachability.
16787 (set_all_edges_as_executable): New decl.
16788 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
16789 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16790 "reachability".
16791 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16792 but converting true to REACHABLE_BLOCKS.
16793 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16794 * tree-vrp.c
16795 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16796 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16797 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16798 REACHABLE_BLOCKS.
16799 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16800 if check_all_array_refs will be called.
16801
16802 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16803
16804 * tree.c (selftest::test_location_wrappers): Add more test
16805 coverage.
16806
16807 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16808
16809 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16810 (selftest::test_bit_in_range): Likewise.
16811
16812 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16813
16814 PR testsuite/83888
16815 * doc/sourcebuild.texi (vect_float): Say that the selector
16816 only describes the situation when -funsafe-math-optimizations is on.
16817 (vect_float_strict): Document.
16818
16819 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16820
16821 PR tree-optimization/83965
16822 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16823 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16824 instead of checking only for a reduction.
16825 (vect_recog_widen_sum_pattern): Likewise.
16826
16827 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16828
16829 * predict.c (probably_never_executed): Only use precise profile info.
16830 (compute_function_frequency): Skip after inlining hack since we now
16831 have quality checking.
16832
16833 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16834
16835 * profile-count.h (profile_probability::very_unlikely,
16836 profile_probability::unlikely, profile_probability::even): Set
16837 precision to guessed.
16838
16839 2018-01-23 Richard Biener <rguenther@suse.de>
16840
16841 PR tree-optimization/83963
16842 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16843 Properly terminate dominator walk when crossing the exit edge not
16844 when visiting its source block.
16845
16846 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16847
16848 PR c++/83918
16849 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16850 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16851
16852 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16853
16854 PR tree-optimization/83957
16855 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16856 semicolon after for body surrounded by braces.
16857
16858 PR tree-optimization/83081
16859 * profile-count.h (profile_probability::split): New method.
16860 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16861 Use profile_probability::split.
16862 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16863 when splitting a single conditional jump into 2.
16864
16865 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16866
16867 PR tree-optimization/69452
16868 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16869 decl.
16870
16871 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16872
16873 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16874 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16875 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16876
16877 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16878
16879 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16880 declaration.
16881 * config/rl78/rl78.md (movdi): New define_expand.
16882 * config/rl78/rl78.c (rl78_split_movdi): New function.
16883
16884 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16885
16886 PR target/83862
16887 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16888 no longer used.
16889 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16890 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16891 128-bit to produce an UNSPEC move to get the double word with the
16892 signbit and then a shift directly to do signbit.
16893 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16894 implementation with a new version that just does either a direct
16895 move or a regular move. Move memory interface to separate insns.
16896 Move insns so they are next to the expander.
16897 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16898 with signbit move. Split big and little endian case.
16899 (signbit<mode>2_dm_mem_le): Likewise.
16900 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16901 (signbit<mode>2_dm2): Likewise.
16902
16903 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16904
16905 * config/rl78/rl78.md (anddi3): New define_expand.
16906
16907 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16908
16909 * config/rl78/rl78.md (umindi3): New define_expand.
16910
16911 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16912
16913 * config/rl78/rl78.md (smindi3): New define_expand.
16914
16915 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16916
16917 * config/rl78/rl78.md (smaxdi3): New define_expand.
16918
16919 2018-01-22 Carl Love <cel@us.ibm.com>
16920
16921 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16922 LVX_V1TI): Add macro expansion.
16923 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16924 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16925 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16926 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16927 Change check to determine if the instruction is a byte reversing
16928 entry. Fix typo in comment.
16929 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16930 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16931 Add def_builtin calls for new builtins.
16932 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16933 Add define_insn expansion.
16934
16935 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16936
16937 * config/rl78/rl78.md (umaxdi3): New define_expand.
16938
16939 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16940
16941 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16942 for non-QImode registers.
16943
16944 2018-01-22 Richard Biener <rguenther@suse.de>
16945
16946 PR tree-optimization/83963
16947 * graphite-scop-detection.c (scop_detection::get_sese): Delay
16948 including the loop exit block.
16949 (scop_detection::merge_sese): Likewise.
16950 (scop_detection::add_scop): Do it here instead.
16951
16952 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16953
16954 * doc/sourcebuild.texi (arm_softfloat): Document.
16955
16956 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
16957
16958 PR gcc/77734
16959 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16960 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16961 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16962
16963 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16964 David Edelsohn <dje.gcc@gmail.com>
16965
16966 PR target/83946
16967 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16968 Change "crset eq" to "crset 2".
16969 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16970 (*call_indirect_aix<mode>_nospec): Likewise.
16971 (*call_value_indirect_aix<mode>_nospec): Likewise.
16972 (*call_indirect_elfv2<mode>_nospec): Likewise.
16973 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16974 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16975 change assembly output from . to $.
16976 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16977 (indirect_jump<mode>_nospec): Change assembly output from . to $.
16978 (*tablejump<mode>_internal1_nospec): Likewise.
16979
16980 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
16981
16982 PR target/80870
16983 * config/sh/sh_optimize_sett_clrt.cc:
16984 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16985
16986 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
16987
16988 PR tree-optimization/83940
16989 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16990 offset_dt to vect_constant_def rather than vect_unknown_def_type.
16991 (vect_check_load_store_mask): Add a mask_dt_out parameter and
16992 use it to pass back the definition type.
16993 (vect_check_store_rhs): Likewise rhs_dt_out.
16994 (vect_build_gather_load_calls): Add a mask_dt argument and use
16995 it instead of a call to vect_is_simple_use.
16996 (vectorizable_store): Update calls to vect_check_load_store_mask
16997 and vect_check_store_rhs. Use the dt returned by the latter instead
16998 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
16999 instead of calls to vect_is_simple_use. Pass the scalar rather
17000 than the vector operand to vect_is_simple_use when handling
17001 second and subsequent copies of an rhs value.
17002 (vectorizable_load): Update calls to vect_check_load_store_mask
17003 and vect_build_gather_load_calls. Use the cached mask_dt and
17004 gs_info.offset_dt instead of calls to vect_is_simple_use.
17005
17006 2018-01-20 Jakub Jelinek <jakub@redhat.com>
17007
17008 PR middle-end/83945
17009 * tree-emutls.c: Include gimplify.h.
17010 (lower_emutls_2): New function.
17011 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17012 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17013 it before further processing.
17014
17015 PR target/83930
17016 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17017 UINTVAL (trueop1) instead of INTVAL (op1).
17018
17019 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17020
17021 PR debug/81570
17022 PR debug/83728
17023 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17024 INCOMING_FRAME_SP_OFFSET if not defined.
17025 (scan_trace): Add ENTRY argument. If true and
17026 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17027 emit a note to adjust the CFA offset.
17028 (create_cfi_notes): Adjust scan_trace callers.
17029 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17030 INCOMING_FRAME_SP_OFFSET in the CIE.
17031 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17032 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17033 Likewise.
17034 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17035 * doc/tm.texi: Regenerated.
17036
17037 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17038
17039 PR rtl-optimization/83147
17040 * lra-constraints.c (remove_inheritance_pseudos): Use
17041 lra_substitute_pseudo_within_insn.
17042
17043 2018-01-19 Tom de Vries <tom@codesourcery.com>
17044 Cesar Philippidis <cesar@codesourcery.com>
17045
17046 PR target/83920
17047 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17048
17049 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17050
17051 PR target/83790
17052 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17053 spaces for function labels.
17054
17055 2018-01-19 Martin Liska <mliska@suse.cz>
17056
17057 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17058 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17059 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17060 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17061 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17062 (PRED_CONST_RETURN): Change from 69 to 65.
17063 (PRED_NULL_RETURN): Change from 91 to 71.
17064 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17065 (PRED_LOOP_GUARD): Change from 66 to 73.
17066
17067 2018-01-19 Martin Liska <mliska@suse.cz>
17068
17069 * predict.c (predict_insn_def): Add new assert.
17070 (struct branch_predictor): Change type to signed integer.
17071 (test_prediction_value_range): Amend test to cover
17072 PROB_UNINITIALIZED.
17073 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17074 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17075 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17076 (PRED_LOOP_IV_COMPARE): Likewise.
17077 * predict.h (PROB_UNINITIALIZED): Define new constant.
17078
17079 2018-01-19 Martin Liska <mliska@suse.cz>
17080
17081 * predict.c (dump_prediction): Add new format for
17082 analyze_brprob.py script which is enabled with -details
17083 suboption.
17084 * profile-count.h (precise_p): New function.
17085
17086 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17087
17088 PR tree-optimization/83922
17089 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17090 there are no statements that need masking.
17091 (vect_active_double_reduction_p): New function.
17092 (vect_analyze_loop_operations): Use it when handling phis that
17093 are not in the loop header.
17094
17095 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17096
17097 PR tree-optimization/83914
17098 * tree-vect-loop.c (vectorizable_induction): Don't convert
17099 init_expr or apply the peeling adjustment for inductions
17100 that are nested within the vectorized loop.
17101
17102 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17103
17104 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17105 instead of NEG.
17106
17107 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17108
17109 PR sanitizer/81715
17110 PR testsuite/83882
17111 * function.h (gimplify_parameters): Add gimple_seq * argument.
17112 * function.c: Include gimple.h and options.h.
17113 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17114 for the added local temporaries if needed.
17115 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17116 if there are any parameter cleanups, wrap whole body into a
17117 try/finally with the cleanups.
17118
17119 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17120
17121 PR target/82964
17122 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17123 Use GET_MODE_CLASS for scalar floating point.
17124
17125 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17126
17127 PR ipa/82256
17128 patch by PaX Team
17129 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17130 Fix call of call_cgraph_insertion_hooks.
17131
17132 2018-01-18 Martin Sebor <msebor@redhat.com>
17133
17134 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17135
17136 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17137
17138 PR ipa/83619
17139 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17140 frequencies.
17141
17142 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
17143
17144 PR other/70268
17145 * common.opt: (-ffile-prefix-map): New option.
17146 * opts.c (common_handle_option): Defer it.
17147 * opts-global.c (handle_common_deferred_options): Handle it.
17148 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17149 * file-prefix-map.h: New file.
17150 (remap_debug_filename, add_debug_prefix_map): ...here.
17151 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17152 * final.c (debug_prefix_map, add_debug_prefix_map
17153 remap_debug_filename): Move to...
17154 * file-prefix-map.c: New file.
17155 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17156 generalize, get rid of alloca(), use strrchr() instead of strchr().
17157 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17158 Implement in terms of add_prefix_map().
17159 (remap_macro_filename, remap_debug_filename): Implement in term of
17160 remap_filename().
17161 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17162 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17163 * dbxout.c: Include file-prefix-map.h.
17164 * varasm.c: Likewise.
17165 * vmsdbgout.c: Likewise.
17166 * xcoffout.c: Likewise.
17167 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17168 * doc/cppopts.texi (-fmacro-prefix-map): Document.
17169 * doc/invoke.texi (-ffile-prefix-map): Document.
17170 (-fdebug-prefix-map): Update description.
17171
17172 2018-01-18 Martin Liska <mliska@suse.cz>
17173
17174 * config/i386/i386.c (indirect_thunk_name): Document that also
17175 lfence is emitted.
17176 (output_indirect_thunk): Document why both instructions
17177 (pause and lfence) are generated.
17178
17179 2018-01-18 Richard Biener <rguenther@suse.de>
17180
17181 PR tree-optimization/83887
17182 * graphite-scop-detection.c
17183 (scop_detection::get_nearest_dom_with_single_entry): Remove.
17184 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17185 (scop_detection::merge_sese): Re-implement with a flood-fill
17186 algorithm that properly finds a SESE region if it exists.
17187
17188 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17189
17190 PR c/61240
17191 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17192 pointer_diff optimizations use view_convert instead of convert.
17193
17194 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17195
17196 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17197 Generate different code for -mno-speculate-indirect-jumps.
17198 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17199 (*call_indirect_aix<mode>): Disable for
17200 -mno-speculate-indirect-jumps.
17201 (*call_indirect_aix<mode>_nospec): New define_insn.
17202 (*call_value_indirect_aix<mode>): Disable for
17203 -mno-speculate-indirect-jumps.
17204 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17205 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17206 -mno-speculate-indirect-jumps.
17207 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17208
17209 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17210
17211 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17212 long double type, set the flags for noting the default long double
17213 type, even if we don't pass or return a long double type.
17214
17215 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17216
17217 PR ipa/83051
17218 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17219 failure.
17220
17221 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17222
17223 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17224 support for merge[hl].
17225 (fold_mergehl_helper): New helper function.
17226 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17227 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17228 (altivec_vmrglw_direct): Add xxmrglw insn.
17229
17230 2018-01-17 Andrew Waterman <andrew@sifive.com>
17231
17232 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17233 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17234
17235 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17236
17237 PR lto/83121
17238 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17239 call the lto_location_cache before reading the
17240 DECL_SOURCE_LOCATION of the types.
17241
17242 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17243 Richard Sandiford <richard.sandiford@linaro.org>
17244
17245 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17246 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17247 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17248 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17249 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17250 Add declaration.
17251 * config/aarch64/constraints.md (aarch64_movti_operand):
17252 Limit immediates.
17253 * config/aarch64/predicates.md (Uti): Add new constraint.
17254
17255 2018-01-17 Carl Love <cel@us.ibm.com>
17256
17257 * config/rs6000/vsx.md (define_expand xl_len_r,
17258 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17259 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17260 lxvll.
17261 (define_expand, define_insn): Move the shift left from the
17262 define_insn to the define_expand for lxvl and stxvl instructions.
17263 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17264 and XL_LEN_R definitions to PURE.
17265
17266 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17267
17268 * config/i386/i386.c (indirect_thunk_name): Declare regno
17269 as unsigned int. Compare regno with INVALID_REGNUM.
17270 (output_indirect_thunk): Ditto.
17271 (output_indirect_thunk_function): Ditto.
17272 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17273 in the call to output_indirect_thunk_function.
17274
17275 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17276
17277 PR middle-end/83884
17278 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17279 rather than the size of inner_type to determine the stack slot size
17280 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17281
17282 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17283
17284 PR target/83546
17285 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17286 to PTA_SILVERMONT.
17287
17288 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17289
17290 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17291 endian Linux systems to optionally enable multilibs for selecting
17292 the long double type if the user configured an explicit type.
17293 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17294 have no long double multilibs if not defined.
17295 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17296 warn if the user used -mabi={ieee,ibm}longdouble and we built
17297 multilibs for long double.
17298 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17299 appropriate multilib option.
17300 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17301 multilib options.
17302 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17303 for building long double multilibs.
17304 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17305
17306 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17307
17308 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17309 copies.
17310
17311 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17312 64 bits.
17313 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17314 128 bits.
17315
17316 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17317 variables.
17318
17319 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17320 return value.
17321
17322 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17323
17324 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17325 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17326
17327 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17328
17329 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17330 different rtl trees depending on TARGET_64BIT.
17331 (rs6000_gen_lvx): Likewise.
17332
17333 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17334
17335 * config/visium/visium.md (nop): Tweak comment.
17336 (hazard_nop): Likewise.
17337
17338 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17339
17340 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17341 -mspeculate-indirect-jumps.
17342 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17343 for -mno-speculate-indirect-jumps.
17344 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17345 (*call_value_indirect_elfv2<mode>): Disable for
17346 -mno-speculate-indirect-jumps.
17347 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17348 (indirect_jump): Emit different RTL for
17349 -mno-speculate-indirect-jumps.
17350 (*indirect_jump<mode>): Disable for
17351 -mno-speculate-indirect-jumps.
17352 (*indirect_jump<mode>_nospec): New define_insn.
17353 (tablejump): Emit different RTL for
17354 -mno-speculate-indirect-jumps.
17355 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17356 (tablejumpsi_nospec): New define_expand.
17357 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17358 (tablejumpdi_nospec): New define_expand.
17359 (*tablejump<mode>_internal1): Disable for
17360 -mno-speculate-indirect-jumps.
17361 (*tablejump<mode>_internal1_nospec): New define_insn.
17362 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17363 option.
17364
17365 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17366
17367 * caller-save.c (insert_save): Drop unnecessary parameter. All
17368 callers updated.
17369
17370 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17371 Richard Biener <rguenth@suse.de>
17372
17373 PR libgomp/83590
17374 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17375 return early, inline manually is_gimple_sizepos. Make sure if we
17376 call gimplify_expr we don't end up with a gimple constant.
17377 * tree.c (variably_modified_type_p): Don't return true for
17378 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17379 * gimplify.h (is_gimple_sizepos): Remove.
17380
17381 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17382
17383 PR tree-optimization/83857
17384 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17385 vectorizable_live_operation for pure SLP statements.
17386 (vectorizable_live_operation): Handle PHIs.
17387
17388 2018-01-16 Richard Biener <rguenther@suse.de>
17389
17390 PR tree-optimization/83867
17391 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17392 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17393
17394 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17395
17396 PR c/83844
17397 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17398 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17399 If off is not INTEGER_CST, issue a may not be aligned warning
17400 rather than isn't aligned. Use isn%'t rather than isn't.
17401 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17402 into MULT_EXPR.
17403 <case MULT_EXPR>: Improve the case when bottom and one of the
17404 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17405 operand, in that case check if the other operand is multiple of
17406 bottom divided by the INTEGER_CST operand.
17407
17408 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17409
17410 PR target/83858
17411 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17412 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17413 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17414 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17415 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17416 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17417 (pa_function_arg_size): New function.
17418
17419 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17420
17421 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17422 in a separate statement.
17423
17424 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17425
17426 PR tree-optimization/83847
17427 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17428 group gathers and scatters.
17429
17430 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17431
17432 PR rtl-optimization/86620
17433 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17434
17435 PR rtl-optimization/83213
17436 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17437 to last if both are JUMP_INSNs.
17438
17439 PR tree-optimization/83843
17440 * gimple-ssa-store-merging.c
17441 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17442 store_immediate_info for bswap/nop orig_stores.
17443
17444 2018-01-15 Andrew Waterman <andrew@sifive.com>
17445
17446 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17447 !TARGET_MUL.
17448 <UDIV>: Increase cost if !TARGET_DIV.
17449
17450 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17451
17452 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17453 (define_attr "cr_logical_3op"): New.
17454 (cceq_ior_compare): Adjust.
17455 (cceq_ior_compare_complement): Adjust.
17456 (*cceq_rev_compare): Adjust.
17457 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17458 (is_cracked_insn): Adjust.
17459 (insn_must_be_first_in_group): Adjust.
17460 * config/rs6000/40x.md: Adjust.
17461 * config/rs6000/440.md: Adjust.
17462 * config/rs6000/476.md: Adjust.
17463 * config/rs6000/601.md: Adjust.
17464 * config/rs6000/603.md: Adjust.
17465 * config/rs6000/6xx.md: Adjust.
17466 * config/rs6000/7450.md: Adjust.
17467 * config/rs6000/7xx.md: Adjust.
17468 * config/rs6000/8540.md: Adjust.
17469 * config/rs6000/cell.md: Adjust.
17470 * config/rs6000/e300c2c3.md: Adjust.
17471 * config/rs6000/e500mc.md: Adjust.
17472 * config/rs6000/e500mc64.md: Adjust.
17473 * config/rs6000/e5500.md: Adjust.
17474 * config/rs6000/e6500.md: Adjust.
17475 * config/rs6000/mpc.md: Adjust.
17476 * config/rs6000/power4.md: Adjust.
17477 * config/rs6000/power5.md: Adjust.
17478 * config/rs6000/power6.md: Adjust.
17479 * config/rs6000/power7.md: Adjust.
17480 * config/rs6000/power8.md: Adjust.
17481 * config/rs6000/power9.md: Adjust.
17482 * config/rs6000/rs64.md: Adjust.
17483 * config/rs6000/titan.md: Adjust.
17484
17485 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17486
17487 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17488 ix86_indirect_branch_register logic.
17489
17490 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17491
17492 * config/i386/constraints.md (Bs): Update
17493 ix86_indirect_branch_register check. Don't check
17494 ix86_indirect_branch_register with GOT_memory_operand.
17495 (Bw): Likewise.
17496 * config/i386/predicates.md (GOT_memory_operand): Don't check
17497 ix86_indirect_branch_register here.
17498 (GOT32_symbol_operand): Likewise.
17499
17500 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17501
17502 * config/i386/predicates.md (constant_call_address_operand):
17503 Rewrite ix86_indirect_branch_register logic.
17504 (sibcall_insn_operand): Likewise.
17505
17506 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17507
17508 * config/i386/constraints.md (Bs): Replace
17509 ix86_indirect_branch_thunk_register with
17510 ix86_indirect_branch_register.
17511 (Bw): Likewise.
17512 * config/i386/i386.md (indirect_jump): Likewise.
17513 (tablejump): Likewise.
17514 (*sibcall_memory): Likewise.
17515 (*sibcall_value_memory): Likewise.
17516 Peepholes of indirect call and jump via memory: Likewise.
17517 * config/i386/i386.opt: Likewise.
17518 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17519 (GOT_memory_operand): Likewise.
17520 (call_insn_operand): Likewise.
17521 (sibcall_insn_operand): Likewise.
17522 (GOT32_symbol_operand): Likewise.
17523
17524 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17525
17526 PR middle-end/83837
17527 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17528 type rather than type addr's type points to.
17529 (expand_omp_atomic_mutex): Likewise.
17530 (expand_omp_atomic): Likewise.
17531
17532 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17533
17534 PR target/83839
17535 * config/i386/i386.c (output_indirect_thunk_function): Use
17536 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17537 for __x86_return_thunk.
17538
17539 2018-01-15 Richard Biener <rguenther@suse.de>
17540
17541 PR middle-end/83850
17542 * expmed.c (extract_bit_field_1): Fix typo.
17543
17544 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17545
17546 PR target/83687
17547 * config/arm/iterators.md (VF): New mode iterator.
17548 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17549 Remove integer-related logic from pattern.
17550 (neon_vabd<mode>_3): Likewise.
17551
17552 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17553
17554 PR middle-end/82694
17555 * common.opt (fstrict-overflow): No longer an alias.
17556 (fwrapv-pointer): New option.
17557 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17558 also for pointer types based on flag_wrapv_pointer.
17559 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17560 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17561 opts->x_flag_wrapv got set.
17562 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17563 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17564 POINTER_TYPE_OVERFLOW_UNDEFINED.
17565 * match.pd: Likewise in address comparison pattern.
17566 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17567
17568 2018-01-15 Richard Biener <rguenther@suse.de>
17569
17570 PR lto/83804
17571 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17572 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17573 Reset type names to their identifier if their TYPE_DECL doesn't
17574 have linkage (and thus is used for ODR and devirt).
17575 (save_debug_info_for_decl): Remove.
17576 (save_debug_info_for_type): Likewise.
17577 (add_tree_to_fld_list): Adjust.
17578 * tree-pretty-print.c (dump_generic_node): Make dumping of
17579 type names more robust.
17580
17581 2018-01-15 Richard Biener <rguenther@suse.de>
17582
17583 * BASE-VER: Bump to 8.0.1.
17584
17585 2018-01-14 Martin Sebor <msebor@redhat.com>
17586
17587 PR other/83508
17588 * builtins.c (check_access): Avoid warning when the no-warning bit
17589 is set.
17590
17591 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17592
17593 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17594 * ira-color (allocno_hard_regs_compare): Likewise.
17595
17596 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17597
17598 PR target/83013
17599 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17600 Use .pushsection/.popsection.
17601
17602 2018-01-14 Martin Sebor <msebor@redhat.com>
17603
17604 PR c++/81327
17605 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17606
17607 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17608
17609 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17610 entry from extra_headers.
17611 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17612 extra_headers, make the list bitwise identical to the i?86-*-* one.
17613
17614 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17615
17616 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17617 -mcmodel=large with -mindirect-branch=thunk,
17618 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17619 -mfunction-return=thunk-extern.
17620 * doc/invoke.texi: Document -mcmodel=large is incompatible with
17621 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17622 -mfunction-return=thunk and -mfunction-return=thunk-extern.
17623
17624 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17625
17626 * config/i386/i386.c (print_reg): Print the name of the full
17627 integer register without '%'.
17628 (ix86_print_operand): Handle 'V'.
17629 * doc/extend.texi: Document 'V' modifier.
17630
17631 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17632
17633 * config/i386/constraints.md (Bs): Disallow memory operand for
17634 -mindirect-branch-register.
17635 (Bw): Likewise.
17636 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17637 (GOT_memory_operand): Likewise.
17638 (call_insn_operand): Likewise.
17639 (sibcall_insn_operand): Likewise.
17640 (GOT32_symbol_operand): Likewise.
17641 * config/i386/i386.md (indirect_jump): Call convert_memory_address
17642 for -mindirect-branch-register.
17643 (tablejump): Likewise.
17644 (*sibcall_memory): Likewise.
17645 (*sibcall_value_memory): Likewise.
17646 Disallow peepholes of indirect call and jump via memory for
17647 -mindirect-branch-register.
17648 (*call_pop): Replace m with Bw.
17649 (*call_value_pop): Likewise.
17650 (*sibcall_pop_memory): Replace m with Bs.
17651 * config/i386/i386.opt (mindirect-branch-register): New option.
17652 * doc/invoke.texi: Document -mindirect-branch-register option.
17653
17654 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17655
17656 * config/i386/i386-protos.h (ix86_output_function_return): New.
17657 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17658 set function_return_type.
17659 (indirect_thunk_name): Add ret_p to indicate thunk for function
17660 return.
17661 (output_indirect_thunk_function): Pass false to
17662 indirect_thunk_name.
17663 (ix86_output_indirect_branch_via_reg): Likewise.
17664 (ix86_output_indirect_branch_via_push): Likewise.
17665 (output_indirect_thunk_function): Create alias for function
17666 return thunk if regno < 0.
17667 (ix86_output_function_return): New function.
17668 (ix86_handle_fndecl_attribute): Handle function_return.
17669 (ix86_attribute_table): Add function_return.
17670 * config/i386/i386.h (machine_function): Add
17671 function_return_type.
17672 * config/i386/i386.md (simple_return_internal): Use
17673 ix86_output_function_return.
17674 (simple_return_internal_long): Likewise.
17675 * config/i386/i386.opt (mfunction-return=): New option.
17676 (indirect_branch): Mention -mfunction-return=.
17677 * doc/extend.texi: Document function_return function attribute.
17678 * doc/invoke.texi: Document -mfunction-return= option.
17679
17680 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17681
17682 * config/i386/i386-opts.h (indirect_branch): New.
17683 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17684 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17685 with local indirect jump when converting indirect call and jump.
17686 (ix86_set_indirect_branch_type): New.
17687 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17688 (indirectlabelno): New.
17689 (indirect_thunk_needed): Likewise.
17690 (indirect_thunk_bnd_needed): Likewise.
17691 (indirect_thunks_used): Likewise.
17692 (indirect_thunks_bnd_used): Likewise.
17693 (INDIRECT_LABEL): Likewise.
17694 (indirect_thunk_name): Likewise.
17695 (output_indirect_thunk): Likewise.
17696 (output_indirect_thunk_function): Likewise.
17697 (ix86_output_indirect_branch_via_reg): Likewise.
17698 (ix86_output_indirect_branch_via_push): Likewise.
17699 (ix86_output_indirect_branch): Likewise.
17700 (ix86_output_indirect_jmp): Likewise.
17701 (ix86_code_end): Call output_indirect_thunk_function if needed.
17702 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17703 needed.
17704 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17705 (ix86_attribute_table): Add indirect_branch.
17706 * config/i386/i386.h (machine_function): Add indirect_branch_type
17707 and has_local_indirect_jump.
17708 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17709 to true.
17710 (tablejump): Likewise.
17711 (*indirect_jump): Use ix86_output_indirect_jmp.
17712 (*tablejump_1): Likewise.
17713 (simple_return_indirect_internal): Likewise.
17714 * config/i386/i386.opt (mindirect-branch=): New option.
17715 (indirect_branch): New.
17716 (keep): Likewise.
17717 (thunk): Likewise.
17718 (thunk-inline): Likewise.
17719 (thunk-extern): Likewise.
17720 * doc/extend.texi: Document indirect_branch function attribute.
17721 * doc/invoke.texi: Document -mindirect-branch= option.
17722
17723 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
17724
17725 PR ipa/83051
17726 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17727
17728 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
17729
17730 * ipa-inline.c (want_inline_small_function_p): Return false if
17731 inlining has already failed with CIF_FINAL_ERROR.
17732 (update_caller_keys): Call want_inline_small_function_p before
17733 can_inline_edge_p.
17734 (update_callee_keys): Likewise.
17735
17736 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17737
17738 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17739 New function.
17740 (rs6000_quadword_masked_address_p): Likewise.
17741 (quad_aligned_load_p): Likewise.
17742 (quad_aligned_store_p): Likewise.
17743 (const_load_sequence_p): Add comment to describe the outer-most loop.
17744 (mimic_memory_attributes_and_flags): New function.
17745 (rs6000_gen_stvx): Likewise.
17746 (replace_swapped_aligned_store): Likewise.
17747 (rs6000_gen_lvx): Likewise.
17748 (replace_swapped_aligned_load): Likewise.
17749 (replace_swapped_load_constant): Capitalize argument name in
17750 comment describing this function.
17751 (rs6000_analyze_swaps): Add a third pass to search for vector loads
17752 and stores that access quad-word aligned addresses and replace
17753 with stvx or lvx instructions when appropriate.
17754 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17755 New function prototype.
17756 (rs6000_quadword_masked_address_p): Likewise.
17757 (rs6000_gen_lvx): Likewise.
17758 (rs6000_gen_stvx): Likewise.
17759 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17760 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17761 when memory address is aligned.
17762 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17763 this split to select lvx instruction when memory address is aligned.
17764 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17765 instruction when memory address is aligned.
17766 (*vsx_le_perm_load_v16qi): Likewise.
17767 (four unnamed splitters): Modify to select the stvx instruction
17768 when memory is aligned.
17769
17770 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
17771
17772 * predict.c (determine_unlikely_bbs): Handle correctly BBs
17773 which appears in the queue multiple times.
17774
17775 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17776 Alan Hayward <alan.hayward@arm.com>
17777 David Sherwood <david.sherwood@arm.com>
17778
17779 * tree-vectorizer.h (vec_lower_bound): New structure.
17780 (_loop_vec_info): Add check_nonzero and lower_bounds.
17781 (LOOP_VINFO_CHECK_NONZERO): New macro.
17782 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17783 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17784 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17785 fields. Make seg_len the distance travelled, not including the
17786 access size.
17787 (dr_direction_indicator): Declare.
17788 (dr_zero_step_indicator): Likewise.
17789 (dr_known_forward_stride_p): Likewise.
17790 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17791 tree-ssanames.h.
17792 (runtime_alias_check_p): Allow runtime alias checks with
17793 variable strides.
17794 (operator ==): Compare access_size and align.
17795 (prune_runtime_alias_test_list): Rework for new distinction between
17796 the access_size and seg_len.
17797 (create_intersect_range_checks_index): Likewise. Cope with polynomial
17798 segment lengths.
17799 (get_segment_min_max): New function.
17800 (create_intersect_range_checks): Use it.
17801 (dr_step_indicator): New function.
17802 (dr_direction_indicator): Likewise.
17803 (dr_zero_step_indicator): Likewise.
17804 (dr_known_forward_stride_p): Likewise.
17805 * tree-loop-distribution.c (data_ref_segment_size): Return
17806 DR_STEP * (niters - 1).
17807 (compute_alias_check_pairs): Update call to the dr_with_seg_len
17808 constructor.
17809 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17810 (vect_preserves_scalar_order_p): New function, split out from...
17811 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17812 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17813 (vect_vfa_access_size): New function.
17814 (vect_vfa_align): Likewise.
17815 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17816 (dump_lower_bound): New function.
17817 (vect_check_lower_bound): Likewise.
17818 (vect_small_gap_p): Likewise.
17819 (vectorizable_with_step_bound_p): Likewise.
17820 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17821 depencies if the vectorization factor is 1. Convert the checks
17822 for nonzero steps into checks on the bounds of DR_STEP. Try using
17823 a bunds check for variable steps if the minimum required step is
17824 relatively small. Update calls to the dr_with_seg_len
17825 constructor and to vect_compile_time_alias.
17826 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17827 function.
17828 (vect_loop_versioning): Call it.
17829 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17830 when retrying.
17831 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17832
17833 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17834 Alan Hayward <alan.hayward@arm.com>
17835 David Sherwood <david.sherwood@arm.com>
17836
17837 * doc/sourcebuild.texi (vect_scatter_store): Document.
17838 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17839 optabs.
17840 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17841 Document.
17842 * genopinit.c (main): Add supports_vec_scatter_store and
17843 supports_vec_scatter_store_cached to target_optabs.
17844 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17845 IFN_MASK_SCATTER_STORE.
17846 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17847 functions.
17848 * internal-fn.h (internal_store_fn_p): Declare.
17849 (internal_fn_stored_value_index): Likewise.
17850 * internal-fn.c (scatter_store_direct): New macro.
17851 (expand_scatter_store_optab_fn): New function.
17852 (direct_scatter_store_optab_supported_p): New macro.
17853 (internal_store_fn_p): New function.
17854 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17855 IFN_MASK_SCATTER_STORE.
17856 (internal_fn_mask_index): Likewise.
17857 (internal_fn_stored_value_index): New function.
17858 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17859 for scatter stores.
17860 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17861 * optabs-query.c (supports_vec_scatter_store_p): New function.
17862 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17863 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17864 true for scatter stores.
17865 (vect_gather_scatter_fn_p): Handle scatter stores too.
17866 (vect_check_gather_scatter): Consider using scatter stores if
17867 supports_vec_scatter_store_p.
17868 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17869 scatter stores too.
17870 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17871 internal_fn_stored_value_index.
17872 (check_load_store_masking): Handle scatter stores too.
17873 (vect_get_store_rhs): Make public.
17874 (vectorizable_call): Use internal_store_fn_p.
17875 (vectorizable_store): Handle scatter store internal functions.
17876 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17877 when deciding whether the end of the group has been reached.
17878 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17879 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17880 (mask_scatter_store<mode>): New insns.
17881
17882 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17883 Alan Hayward <alan.hayward@arm.com>
17884 David Sherwood <david.sherwood@arm.com>
17885
17886 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17887 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17888 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17889 function.
17890 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17891 Use vect_truncate_gather_scatter_offset if we can't treat the
17892 operation as a normal gather load or scatter store.
17893 (get_group_load_store_type): Take the gather_scatter_info
17894 as argument. Try using a gather load or scatter store for
17895 single-element groups.
17896 (get_load_store_type): Update calls to get_group_load_store_type
17897 and vect_use_strided_gather_scatters_p.
17898
17899 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17900 Alan Hayward <alan.hayward@arm.com>
17901 David Sherwood <david.sherwood@arm.com>
17902
17903 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17904 optional tree argument.
17905 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17906 null target hooks.
17907 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17908 but continue to use the current value as a fallback.
17909 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17910 to compare the updates.
17911 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17912 (get_load_store_type): Use it when handling a strided access.
17913 (vect_get_strided_load_store_ops): New function.
17914 (vect_get_data_ptr_increment): Likewise.
17915 (vectorizable_load): Handle strided gather loads. Always pass
17916 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17917
17918 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17919 Alan Hayward <alan.hayward@arm.com>
17920 David Sherwood <david.sherwood@arm.com>
17921
17922 * doc/md.texi (gather_load@var{m}): Document.
17923 (mask_gather_load@var{m}): Likewise.
17924 * genopinit.c (main): Add supports_vec_gather_load and
17925 supports_vec_gather_load_cached to target_optabs.
17926 * optabs-tree.c (init_tree_optimization_optabs): Use
17927 ggc_cleared_alloc to allocate target_optabs.
17928 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17929 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17930 functions.
17931 * internal-fn.h (internal_load_fn_p): Declare.
17932 (internal_gather_scatter_fn_p): Likewise.
17933 (internal_fn_mask_index): Likewise.
17934 (internal_gather_scatter_fn_supported_p): Likewise.
17935 * internal-fn.c (gather_load_direct): New macro.
17936 (expand_gather_load_optab_fn): New function.
17937 (direct_gather_load_optab_supported_p): New macro.
17938 (direct_internal_fn_optab): New function.
17939 (internal_load_fn_p): Likewise.
17940 (internal_gather_scatter_fn_p): Likewise.
17941 (internal_fn_mask_index): Likewise.
17942 (internal_gather_scatter_fn_supported_p): Likewise.
17943 * optabs-query.c (supports_at_least_one_mode_p): New function.
17944 (supports_vec_gather_load_p): Likewise.
17945 * optabs-query.h (supports_vec_gather_load_p): Declare.
17946 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17947 and memory_type field.
17948 (NUM_PATTERNS): Bump to 15.
17949 * tree-vect-data-refs.c: Include internal-fn.h.
17950 (vect_gather_scatter_fn_p): New function.
17951 (vect_describe_gather_scatter_call): Likewise.
17952 (vect_check_gather_scatter): Try using internal functions for
17953 gather loads. Recognize existing calls to a gather load function.
17954 (vect_analyze_data_refs): Consider using gather loads if
17955 supports_vec_gather_load_p.
17956 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17957 (vect_get_gather_scatter_offset_type): Likewise.
17958 (vect_convert_mask_for_vectype): Likewise.
17959 (vect_add_conversion_to_patterm): Likewise.
17960 (vect_try_gather_scatter_pattern): Likewise.
17961 (vect_recog_gather_scatter_pattern): New pattern recognizer.
17962 (vect_vect_recog_func_ptrs): Add it.
17963 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17964 internal_fn_mask_index and internal_gather_scatter_fn_p.
17965 (check_load_store_masking): Take the gather_scatter_info as an
17966 argument and handle gather loads.
17967 (vect_get_gather_scatter_ops): New function.
17968 (vectorizable_call): Check internal_load_fn_p.
17969 (vectorizable_load): Likewise. Handle gather load internal
17970 functions.
17971 (vectorizable_store): Update call to check_load_store_masking.
17972 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17973 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17974 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17975 (aarch64_gather_scale_operand_d): New predicates.
17976 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17977 (mask_gather_load<mode>): New insns.
17978
17979 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17980 Alan Hayward <alan.hayward@arm.com>
17981 David Sherwood <david.sherwood@arm.com>
17982
17983 * optabs.def (fold_left_plus_optab): New optab.
17984 * doc/md.texi (fold_left_plus_@var{m}): Document.
17985 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17986 * internal-fn.c (fold_left_direct): Define.
17987 (expand_fold_left_optab_fn): Likewise.
17988 (direct_fold_left_optab_supported_p): Likewise.
17989 * fold-const-call.c (fold_const_fold_left): New function.
17990 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17991 * tree-parloops.c (valid_reduction_p): New function.
17992 (gather_scalar_reductions): Use it.
17993 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17994 (vect_finish_replace_stmt): Declare.
17995 * tree-vect-loop.c (fold_left_reduction_fn): New function.
17996 (needs_fold_left_reduction_p): New function, split out from...
17997 (vect_is_simple_reduction): ...here. Accept reductions that
17998 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17999 (vect_force_simple_reduction): Also store the reduction type in
18000 the assignment's STMT_VINFO_REDUC_TYPE.
18001 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18002 (merge_with_identity): New function.
18003 (vect_expand_fold_left): Likewise.
18004 (vectorize_fold_left_reduction): Likewise.
18005 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
18006 scalar phi in place for it. Check for target support and reject
18007 cases that would reassociate the operation. Defer the transform
18008 phase to vectorize_fold_left_reduction.
18009 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18010 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18011 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18012
18013 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18014
18015 * tree-if-conv.c (predicate_mem_writes): Remove redundant
18016 call to ifc_temp_var.
18017
18018 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18019 Alan Hayward <alan.hayward@arm.com>
18020 David Sherwood <david.sherwood@arm.com>
18021
18022 * target.def (legitimize_address_displacement): Take the original
18023 offset as a poly_int.
18024 * targhooks.h (default_legitimize_address_displacement): Update
18025 accordingly.
18026 * targhooks.c (default_legitimize_address_displacement): Likewise.
18027 * doc/tm.texi: Regenerate.
18028 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18029 as an argument, moving assert of ad->disp == ad->disp_term to...
18030 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18031 Try calling targetm.legitimize_address_displacement before expanding
18032 the address rather than afterwards, and adjust for the new interface.
18033 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18034 Match the new hook interface. Handle SVE addresses.
18035 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18036 new hook interface.
18037
18038 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18039
18040 * Makefile.in (OBJS): Add early-remat.o.
18041 * target.def (select_early_remat_modes): New hook.
18042 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18043 * doc/tm.texi: Regenerate.
18044 * targhooks.h (default_select_early_remat_modes): Declare.
18045 * targhooks.c (default_select_early_remat_modes): New function.
18046 * timevar.def (TV_EARLY_REMAT): New timevar.
18047 * passes.def (pass_early_remat): New pass.
18048 * tree-pass.h (make_pass_early_remat): Declare.
18049 * early-remat.c: New file.
18050 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18051 function.
18052 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18053
18054 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18055 Alan Hayward <alan.hayward@arm.com>
18056 David Sherwood <david.sherwood@arm.com>
18057
18058 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18059 vfm1 with a bound_epilog parameter.
18060 (vect_do_peeling): Update calls accordingly, and move the prologue
18061 call earlier in the function. Treat the base bound_epilog as 0 for
18062 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18063 this base when peeling for gaps.
18064 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18065 with fully-masked loops.
18066 (vect_estimate_min_profitable_iters): Handle the single peeled
18067 iteration in that case.
18068
18069 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18070 Alan Hayward <alan.hayward@arm.com>
18071 David Sherwood <david.sherwood@arm.com>
18072
18073 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18074 single-element interleaving even if the size is not a power of 2.
18075 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18076 accesses for single-element interleaving if the group size is
18077 not a power of 2.
18078
18079 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18080 Alan Hayward <alan.hayward@arm.com>
18081 David Sherwood <david.sherwood@arm.com>
18082
18083 * doc/md.texi (fold_extract_last_@var{m}): Document.
18084 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18085 * optabs.def (fold_extract_last_optab): New optab.
18086 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18087 * internal-fn.c (fold_extract_direct): New macro.
18088 (expand_fold_extract_optab_fn): Likewise.
18089 (direct_fold_extract_optab_supported_p): Likewise.
18090 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18091 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18092 EXTRACT_LAST_REDUCTION.
18093 (get_initial_def_for_reduction): Do not create an initial vector
18094 for EXTRACT_LAST_REDUCTION reductions.
18095 (vectorizable_reduction): Leave the scalar phi in place for
18096 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18097 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18098 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18099 transform phase to vectorizable_condition.
18100 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18101 split out from...
18102 (vect_finish_stmt_generation): ...here.
18103 (vect_finish_replace_stmt): New function.
18104 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18105 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18106 pattern.
18107 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18108
18109 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18110 Alan Hayward <alan.hayward@arm.com>
18111 David Sherwood <david.sherwood@arm.com>
18112
18113 * doc/md.texi (extract_last_@var{m}): Document.
18114 * optabs.def (extract_last_optab): New optab.
18115 * internal-fn.def (EXTRACT_LAST): New internal function.
18116 * internal-fn.c (cond_unary_direct): New macro.
18117 (expand_cond_unary_optab_fn): Likewise.
18118 (direct_cond_unary_optab_supported_p): Likewise.
18119 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18120 loops using EXTRACT_LAST.
18121 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18122 (extract_last_<mode>): ...this optab.
18123 (vec_extract<mode><Vel>): Update accordingly.
18124
18125 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18126 Alan Hayward <alan.hayward@arm.com>
18127 David Sherwood <david.sherwood@arm.com>
18128
18129 * target.def (empty_mask_is_expensive): New hook.
18130 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18131 * doc/tm.texi: Regenerate.
18132 * targhooks.h (default_empty_mask_is_expensive): Declare.
18133 * targhooks.c (default_empty_mask_is_expensive): New function.
18134 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18135 if the target says that empty masks are expensive.
18136 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18137 New function.
18138 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18139
18140 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18141 Alan Hayward <alan.hayward@arm.com>
18142 David Sherwood <david.sherwood@arm.com>
18143
18144 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18145 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18146 (vect_use_loop_mask_for_alignment_p): New function.
18147 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18148 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18149 niters_skip argument. Make sure that the first niters_skip elements
18150 of the first iteration are inactive.
18151 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18152 Update call to vect_set_loop_masks_directly.
18153 (get_misalign_in_elems): New function, split out from...
18154 (vect_gen_prolog_loop_niters): ...here.
18155 (vect_update_init_of_dr): Take a code argument that specifies whether
18156 the adjustment should be added or subtracted.
18157 (vect_update_init_of_drs): Likewise.
18158 (vect_prepare_for_masked_peels): New function.
18159 (vect_do_peeling): Skip prologue peeling if we're using a mask
18160 instead. Update call to vect_update_inits_of_drs.
18161 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18162 mask_skip_niters.
18163 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18164 alignment. Do not include the number of peeled iterations in
18165 the minimum threshold in that case.
18166 (vectorizable_induction): Adjust the start value down by
18167 LOOP_VINFO_MASK_SKIP_NITERS iterations.
18168 (vect_transform_loop): Call vect_prepare_for_masked_peels.
18169 Take the number of skipped iterations into account when calculating
18170 the loop bounds.
18171 * tree-vect-stmts.c (vect_gen_while_not): New function.
18172
18173 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18174 Alan Hayward <alan.hayward@arm.com>
18175 David Sherwood <david.sherwood@arm.com>
18176
18177 * doc/sourcebuild.texi (vect_fully_masked): Document.
18178 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18179 default value to 0.
18180 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18181 split out from...
18182 (vect_analyze_loop_2): ...here. Don't check the vectorization
18183 factor against the number of loop iterations if the loop is
18184 fully-masked.
18185
18186 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18187 Alan Hayward <alan.hayward@arm.com>
18188 David Sherwood <david.sherwood@arm.com>
18189
18190 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18191 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18192 (dump_groups): Update accordingly.
18193 (iv_use::mem_type): New member variable.
18194 (address_p): New function.
18195 (record_use): Add a mem_type argument and initialize the new
18196 mem_type field.
18197 (record_group_use): Add a mem_type argument. Use address_p.
18198 Remove obsolete null checks of base_object. Update call to record_use.
18199 (find_interesting_uses_op): Update call to record_group_use.
18200 (find_interesting_uses_cond): Likewise.
18201 (find_interesting_uses_address): Likewise.
18202 (get_mem_type_for_internal_fn): New function.
18203 (find_address_like_use): Likewise.
18204 (find_interesting_uses_stmt): Try find_address_like_use before
18205 calling find_interesting_uses_op.
18206 (addr_offset_valid_p): Use the iv mem_type field as the type
18207 of the addressed memory.
18208 (add_autoinc_candidates): Likewise.
18209 (get_address_cost): Likewise.
18210 (split_small_address_groups_p): Use address_p.
18211 (split_address_groups): Likewise.
18212 (add_iv_candidate_for_use): Likewise.
18213 (autoinc_possible_for_pair): Likewise.
18214 (rewrite_groups): Likewise.
18215 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18216 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18217 (get_alias_ptr_type_for_ptr_address): New function.
18218 (rewrite_use_address): Rewrite address uses in calls that were
18219 identified by find_address_like_use.
18220
18221 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18222 Alan Hayward <alan.hayward@arm.com>
18223 David Sherwood <david.sherwood@arm.com>
18224
18225 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18226 TARGET_MEM_REFs.
18227 * gimple-expr.h (is_gimple_addressable: Likewise.
18228 * gimple-expr.c (is_gimple_address): Likewise.
18229 * internal-fn.c (expand_call_mem_ref): New function.
18230 (expand_mask_load_optab_fn): Use it.
18231 (expand_mask_store_optab_fn): Likewise.
18232
18233 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18234 Alan Hayward <alan.hayward@arm.com>
18235 David Sherwood <david.sherwood@arm.com>
18236
18237 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18238 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18239 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18240 (cond_umax@var{mode}): Document.
18241 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18242 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18243 (cond_umin_optab, cond_umax_optab): New optabs.
18244 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18245 (COND_IOR, COND_XOR): New internal functions.
18246 * internal-fn.h (get_conditional_internal_fn): Declare.
18247 * internal-fn.c (cond_binary_direct): New macro.
18248 (expand_cond_binary_optab_fn): Likewise.
18249 (direct_cond_binary_optab_supported_p): Likewise.
18250 (get_conditional_internal_fn): New function.
18251 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18252 Cope with reduction statements that are vectorized as calls rather
18253 than assignments.
18254 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18255 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18256 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18257 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18258 (UNSPEC_COND_EOR): New unspecs.
18259 (optab): Add mappings for them.
18260 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18261 (sve_int_op, sve_fp_op): New int attributes.
18262
18263 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18264 Alan Hayward <alan.hayward@arm.com>
18265 David Sherwood <david.sherwood@arm.com>
18266
18267 * optabs.def (while_ult_optab): New optab.
18268 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18269 * internal-fn.def (WHILE_ULT): New internal function.
18270 * internal-fn.h (direct_internal_fn_supported_p): New override
18271 that takes two types as argument.
18272 * internal-fn.c (while_direct): New macro.
18273 (expand_while_optab_fn): New function.
18274 (convert_optab_supported_p): Likewise.
18275 (direct_while_optab_supported_p): New macro.
18276 * wide-int.h (wi::udiv_ceil): New function.
18277 * tree-vectorizer.h (rgroup_masks): New structure.
18278 (vec_loop_masks): New typedef.
18279 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18280 and fully_masked_p.
18281 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18282 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18283 (vect_max_vf): New function.
18284 (slpeel_make_loop_iterate_ntimes): Delete.
18285 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18286 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18287 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18288 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18289 internal-fn.h, stor-layout.h and optabs-query.h.
18290 (vect_set_loop_mask): New function.
18291 (add_preheader_seq): Likewise.
18292 (add_header_seq): Likewise.
18293 (interleave_supported_p): Likewise.
18294 (vect_maybe_permute_loop_masks): Likewise.
18295 (vect_set_loop_masks_directly): Likewise.
18296 (vect_set_loop_condition_masked): Likewise.
18297 (vect_set_loop_condition_unmasked): New function, split out from
18298 slpeel_make_loop_iterate_ntimes.
18299 (slpeel_make_loop_iterate_ntimes): Rename to..
18300 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18301 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18302 (vect_do_peeling): Update call accordingly.
18303 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18304 loops.
18305 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18306 mask_compare_type, can_fully_mask_p and fully_masked_p.
18307 (release_vec_loop_masks): New function.
18308 (_loop_vec_info): Use it to free the loop masks.
18309 (can_produce_all_loop_masks_p): New function.
18310 (vect_get_max_nscalars_per_iter): Likewise.
18311 (vect_verify_full_masking): Likewise.
18312 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18313 retries, and free the mask rgroups before retrying. Check loop-wide
18314 reasons for disallowing fully-masked loops. Make the final decision
18315 about whether use a fully-masked loop or not.
18316 (vect_estimate_min_profitable_iters): Do not assume that peeling
18317 for the number of iterations will be needed for fully-masked loops.
18318 (vectorizable_reduction): Disable fully-masked loops.
18319 (vectorizable_live_operation): Likewise.
18320 (vect_halve_mask_nunits): New function.
18321 (vect_double_mask_nunits): Likewise.
18322 (vect_record_loop_mask): Likewise.
18323 (vect_get_loop_mask): Likewise.
18324 (vect_transform_loop): Handle the case in which the final loop
18325 iteration might handle a partial vector. Call vect_set_loop_condition
18326 instead of slpeel_make_loop_iterate_ntimes.
18327 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18328 (check_load_store_masking): New function.
18329 (prepare_load_store_mask): Likewise.
18330 (vectorizable_store): Handle fully-masked loops.
18331 (vectorizable_load): Likewise.
18332 (supportable_widening_operation): Use vect_halve_mask_nunits for
18333 booleans.
18334 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18335 (vect_gen_while): New function.
18336 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18337 (aarch64_uqdec<mode>): New insn.
18338
18339 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18340 Alan Hayward <alan.hayward@arm.com>
18341 David Sherwood <david.sherwood@arm.com>
18342
18343 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18344 (reduc_xor_scal_optab): New optabs.
18345 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18346 (reduc_xor_scal_@var{m}): Document.
18347 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18348 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18349 internal functions.
18350 * fold-const-call.c (fold_const_call): Handle them.
18351 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18352 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18353 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18354 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18355 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18356 (UNSPEC_XORV): New unspecs.
18357 (optab): Add entries for them.
18358 (BITWISEV): New int iterator.
18359 (bit_reduc_op): New int attributes.
18360
18361 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18362 Alan Hayward <alan.hayward@arm.com>
18363 David Sherwood <david.sherwood@arm.com>
18364
18365 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18366 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18367 * optabs.def (vec_shl_insert_optab): New optab.
18368 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18369 (duplicate_and_interleave): Likewise.
18370 * tree-vect-loop.c: Include internal-fn.h.
18371 (neutral_op_for_slp_reduction): New function, split out from
18372 get_initial_defs_for_reduction.
18373 (get_initial_def_for_reduction): Handle option 2 for variable-length
18374 vectors by loading the neutral value into a vector and then shifting
18375 the initial value into element 0.
18376 (get_initial_defs_for_reduction): Replace the code argument with
18377 the neutral value calculated by neutral_op_for_slp_reduction.
18378 Use gimple_build_vector for constant-length vectors.
18379 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18380 but the first group_size elements have a neutral value.
18381 Use duplicate_and_interleave otherwise.
18382 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18383 Update call to get_initial_defs_for_reduction. Handle SLP
18384 reductions for variable-length vectors by creating one vector
18385 result for each scalar result, with the elements associated
18386 with other scalar results stubbed out with the neutral value.
18387 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18388 Require IFN_VEC_SHL_INSERT for double reductions on
18389 variable-length vectors, or SLP reductions that have
18390 a neutral value. Require can_duplicate_and_interleave_p
18391 support for variable-length unchained SLP reductions if there
18392 is no neutral value, such as for MIN/MAX reductions. Also require
18393 the number of vector elements to be a multiple of the number of
18394 SLP statements when doing variable-length unchained SLP reductions.
18395 Update call to vect_create_epilog_for_reduction.
18396 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18397 and remove initial values.
18398 (duplicate_and_interleave): Make public.
18399 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18400 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18401
18402 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18403 Alan Hayward <alan.hayward@arm.com>
18404 David Sherwood <david.sherwood@arm.com>
18405
18406 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18407 (can_duplicate_and_interleave_p): New function.
18408 (vect_get_and_check_slp_defs): Take the vector of statements
18409 rather than just the current one. Remove excess parentheses.
18410 Restriction rejectinon of vect_constant_def and vect_external_def
18411 for variable-length vectors to boolean types, or types for which
18412 can_duplicate_and_interleave_p is false.
18413 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18414 (duplicate_and_interleave): New function.
18415 (vect_get_constant_vectors): Use gimple_build_vector for
18416 constant-length vectors and suitable variable-length constant
18417 vectors. Use duplicate_and_interleave for other variable-length
18418 vectors. Don't defer the update when inserting new statements.
18419
18420 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18421 Alan Hayward <alan.hayward@arm.com>
18422 David Sherwood <david.sherwood@arm.com>
18423
18424 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18425 min_profitable_iters doesn't go negative.
18426
18427 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18428 Alan Hayward <alan.hayward@arm.com>
18429 David Sherwood <david.sherwood@arm.com>
18430
18431 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18432 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18433 * optabs.def (vec_mask_load_lanes_optab): New optab.
18434 (vec_mask_store_lanes_optab): Likewise.
18435 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18436 (MASK_STORE_LANES): Likewise.
18437 * internal-fn.c (mask_load_lanes_direct): New macro.
18438 (mask_store_lanes_direct): Likewise.
18439 (expand_mask_load_optab_fn): Handle masked operations.
18440 (expand_mask_load_lanes_optab_fn): New macro.
18441 (expand_mask_store_optab_fn): Handle masked operations.
18442 (expand_mask_store_lanes_optab_fn): New macro.
18443 (direct_mask_load_lanes_optab_supported_p): Likewise.
18444 (direct_mask_store_lanes_optab_supported_p): Likewise.
18445 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18446 parameter.
18447 (vect_load_lanes_supported): Likewise.
18448 * tree-vect-data-refs.c (strip_conversion): New function.
18449 (can_group_stmts_p): Likewise.
18450 (vect_analyze_data_ref_accesses): Use it instead of checking
18451 for a pair of assignments.
18452 (vect_store_lanes_supported): Take a masked_p parameter.
18453 (vect_load_lanes_supported): Likewise.
18454 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18455 vect_store_lanes_supported and vect_load_lanes_supported.
18456 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18457 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18458 parameter. Don't allow gaps for masked accesses.
18459 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18460 and vect_load_lanes_supported.
18461 (get_load_store_type): Take a masked_p parameter and update
18462 call to get_group_load_store_type.
18463 (vectorizable_store): Update call to get_load_store_type.
18464 Handle IFN_MASK_STORE_LANES.
18465 (vectorizable_load): Update call to get_load_store_type.
18466 Handle IFN_MASK_LOAD_LANES.
18467
18468 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18469 Alan Hayward <alan.hayward@arm.com>
18470 David Sherwood <david.sherwood@arm.com>
18471
18472 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18473 modes for SVE.
18474 * config/aarch64/aarch64-protos.h
18475 (aarch64_sve_struct_memory_operand_p): Declare.
18476 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18477 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18478 (VPRED, vpred): Handle SVE structure modes.
18479 * config/aarch64/constraints.md (Utx): New constraint.
18480 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18481 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18482 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18483 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18484 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18485 structure modes. Split into pieces after RA.
18486 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18487 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18488 New patterns.
18489 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18490 SVE structure modes.
18491 (aarch64_classify_address): Likewise.
18492 (sizetochar): Move earlier in file.
18493 (aarch64_print_operand): Handle SVE register lists.
18494 (aarch64_array_mode): New function.
18495 (aarch64_sve_struct_memory_operand_p): Likewise.
18496 (TARGET_ARRAY_MODE): Redefine.
18497
18498 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18499 Alan Hayward <alan.hayward@arm.com>
18500 David Sherwood <david.sherwood@arm.com>
18501
18502 * target.def (array_mode): New target hook.
18503 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18504 * doc/tm.texi: Regenerate.
18505 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18506 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18507 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18508 targetm.array_mode.
18509 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18510 type sizes.
18511
18512 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18513 Alan Hayward <alan.hayward@arm.com>
18514 David Sherwood <david.sherwood@arm.com>
18515
18516 * fold-const.c (fold_binary_loc): Check the argument types
18517 rather than the result type when testing for a vector operation.
18518
18519 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18520
18521 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18522 * doc/tm.texi: Regenerate.
18523
18524 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18525 Alan Hayward <alan.hayward@arm.com>
18526 David Sherwood <david.sherwood@arm.com>
18527
18528 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18529 (sve): Document new AArch64 extension.
18530 * doc/md.texi (w): Extend the description of the AArch64
18531 constraint to include SVE vectors.
18532 (Upl, Upa): Document new AArch64 predicate constraints.
18533 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18534 enum.
18535 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18536 (msve-vector-bits=): New option.
18537 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18538 SVE when these are disabled.
18539 (sve): New extension.
18540 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18541 modes. Adjust their number of units based on aarch64_sve_vg.
18542 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18543 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18544 aarch64_addr_query_type.
18545 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18546 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18547 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18548 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18549 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18550 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18551 (aarch64_simd_imm_zero_p): Delete.
18552 (aarch64_check_zero_based_sve_index_immediate): Declare.
18553 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18554 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18555 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18556 (aarch64_sve_float_mul_immediate_p): Likewise.
18557 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18558 rather than an rtx.
18559 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18560 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18561 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18562 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18563 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18564 (aarch64_regmode_natural_size): Likewise.
18565 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18566 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18567 left one place.
18568 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18569 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18570 for VG and the SVE predicate registers.
18571 (V_ALIASES): Add a "z"-prefixed alias.
18572 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18573 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18574 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18575 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18576 (REG_CLASS_NAMES): Add entries for them.
18577 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18578 and the predicate registers.
18579 (aarch64_sve_vg): Declare.
18580 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18581 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18582 (REGMODE_NATURAL_SIZE): Define.
18583 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18584 SVE macros.
18585 * config/aarch64/aarch64.c: Include cfgrtl.h.
18586 (simd_immediate_info): Add a constructor for series vectors,
18587 and an associated step field.
18588 (aarch64_sve_vg): New variable.
18589 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18590 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18591 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18592 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18593 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18594 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18595 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18596 (aarch64_get_mask_mode): New functions.
18597 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18598 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18599 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18600 predicate modes and predicate registers. Explicitly restrict
18601 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18602 to store a vector mode if it is recognized by
18603 aarch64_classify_vector_mode.
18604 (aarch64_regmode_natural_size): New function.
18605 (aarch64_hard_regno_caller_save_mode): Return the original mode
18606 for predicates.
18607 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18608 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18609 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18610 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18611 functions.
18612 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18613 does not overlap dest if the function is frame-related. Handle
18614 SVE constants.
18615 (aarch64_split_add_offset): New function.
18616 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18617 them aarch64_add_offset.
18618 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18619 and update call to aarch64_sub_sp.
18620 (aarch64_add_cfa_expression): New function.
18621 (aarch64_expand_prologue): Pass extra temporary registers to the
18622 functions above. Handle the case in which we need to emit new
18623 DW_CFA_expressions for registers that were originally saved
18624 relative to the stack pointer, but now have to be expressed
18625 relative to the frame pointer.
18626 (aarch64_output_mi_thunk): Pass extra temporary registers to the
18627 functions above.
18628 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
18629 IP0 and IP1 values for SVE frames.
18630 (aarch64_expand_vec_series): New function.
18631 (aarch64_expand_sve_widened_duplicate): Likewise.
18632 (aarch64_expand_sve_const_vector): Likewise.
18633 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18634 Handle SVE constants. Use emit_move_insn to move a force_const_mem
18635 into the register, rather than emitting a SET directly.
18636 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18637 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18638 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18639 (offset_9bit_signed_scaled_p): New functions.
18640 (aarch64_replicate_bitmask_imm): New function.
18641 (aarch64_bitmask_imm): Use it.
18642 (aarch64_cannot_force_const_mem): Reject expressions involving
18643 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
18644 (aarch64_classify_index): Handle SVE indices, by requiring
18645 a plain register index with a scale that matches the element size.
18646 (aarch64_classify_address): Handle SVE addresses. Assert that
18647 the mode of the address is VOIDmode or an integer mode.
18648 Update call to aarch64_classify_symbol.
18649 (aarch64_classify_symbolic_expression): Update call to
18650 aarch64_classify_symbol.
18651 (aarch64_const_vec_all_in_range_p): New function.
18652 (aarch64_print_vector_float_operand): Likewise.
18653 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
18654 "vN" for FP registers with SVE modes. Handle (const ...) vectors
18655 and the FP immediates 1.0 and 0.5.
18656 (aarch64_print_address_internal): Handle SVE addresses.
18657 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18658 (aarch64_regno_regclass): Handle predicate registers.
18659 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18660 data modes.
18661 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18662 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18663 (aarch64_convert_sve_vector_bits): New function.
18664 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18665 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18666 rather than an rtx.
18667 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18668 Handle SVE vector and predicate modes. Accept VL-based constants
18669 that need only one temporary register, and VL offsets that require
18670 no temporary registers.
18671 (aarch64_conditional_register_usage): Mark the predicate registers
18672 as fixed if SVE isn't available.
18673 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18674 Return true for SVE vector and predicate modes.
18675 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18676 rather than an unsigned int. Handle SVE modes.
18677 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18678 SVE modes.
18679 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18680 if SVE is enabled.
18681 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18682 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18683 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18684 (aarch64_sve_float_mul_immediate_p): New functions.
18685 (aarch64_sve_valid_immediate): New function.
18686 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18687 Explicitly reject structure modes. Check for INDEX constants.
18688 Handle PTRUE and PFALSE constants.
18689 (aarch64_check_zero_based_sve_index_immediate): New function.
18690 (aarch64_simd_imm_zero_p): Delete.
18691 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18692 vector modes. Accept constants in the range of CNT[BHWD].
18693 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18694 ask for an Advanced SIMD mode.
18695 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18696 (aarch64_simd_vector_alignment): Handle SVE predicates.
18697 (aarch64_vectorize_preferred_vector_alignment): New function.
18698 (aarch64_simd_vector_alignment_reachable): Use it instead of
18699 the vector size.
18700 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18701 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18702 functions.
18703 (MAX_VECT_LEN): Delete.
18704 (expand_vec_perm_d): Add a vec_flags field.
18705 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18706 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18707 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18708 for SVE modes.
18709 (aarch64_evpc_rev): Rename to...
18710 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18711 (aarch64_evpc_rev_global): New function.
18712 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18713 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18714 MAX_VECT_LEN.
18715 (aarch64_evpc_sve_tbl): New function.
18716 (aarch64_expand_vec_perm_const_1): Update after rename of
18717 aarch64_evpc_rev. Handle SVE permutes too, trying
18718 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18719 than aarch64_evpc_tbl.
18720 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18721 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18722 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18723 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18724 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18725 (aarch64_expand_sve_vcond): New functions.
18726 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18727 of aarch64_vector_mode_p.
18728 (aarch64_dwarf_poly_indeterminate_value): New function.
18729 (aarch64_compute_pressure_classes): Likewise.
18730 (aarch64_can_change_mode_class): Likewise.
18731 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18732 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18733 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18734 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18735 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18736 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18737 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18738 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18739 constraints.
18740 (Dn, Dl, Dr): Accept const as well as const_vector.
18741 (Dz): Likewise. Compare against CONST0_RTX.
18742 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18743 of "vector" where appropriate.
18744 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18745 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18746 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18747 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18748 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18749 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18750 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18751 (v_int_equiv): Extend to SVE modes.
18752 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18753 mode attributes.
18754 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18755 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18756 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18757 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18758 (SVE_COND_FP_CMP): New int iterators.
18759 (perm_hilo): Handle the new unpack unspecs.
18760 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18761 attributes.
18762 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18763 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18764 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18765 (aarch64_equality_operator, aarch64_constant_vector_operand)
18766 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18767 (aarch64_sve_nonimmediate_operand): Likewise.
18768 (aarch64_sve_general_operand): Likewise.
18769 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18770 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18771 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18772 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18773 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18774 (aarch64_sve_float_arith_immediate): Likewise.
18775 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18776 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18777 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18778 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18779 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18780 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18781 (aarch64_sve_float_arith_operand): Likewise.
18782 (aarch64_sve_float_arith_with_sub_operand): Likewise.
18783 (aarch64_sve_float_mul_operand): Likewise.
18784 (aarch64_sve_vec_perm_operand): Likewise.
18785 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18786 (aarch64_mov_operand): Accept const_poly_int and const_vector.
18787 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18788 as well as const_vector.
18789 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18790 in file. Use CONST0_RTX and CONSTM1_RTX.
18791 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
18792 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18793 Use aarch64_simd_imm_zero.
18794 * config/aarch64/aarch64-sve.md: New file.
18795 * config/aarch64/aarch64.md: Include it.
18796 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18797 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18798 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18799 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18800 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18801 (sve): New attribute.
18802 (enabled): Disable instructions with the sve attribute unless
18803 TARGET_SVE.
18804 (movqi, movhi): Pass CONST_POLY_INT operaneds through
18805 aarch64_expand_mov_immediate.
18806 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18807 CNT[BHSD] immediates.
18808 (movti): Split CONST_POLY_INT moves into two halves.
18809 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18810 Split additions that need a temporary here if the destination
18811 is the stack pointer.
18812 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18813 (*add<mode>3_poly_1): New instruction.
18814 (set_clobber_cc): New expander.
18815
18816 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18817
18818 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18819 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18820 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18821 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18822 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18823 Change innermode from fixed_mode_size to machine_mode.
18824 (simplify_subreg): Update call accordingly. Handle a constant-sized
18825 subreg of a variable-length CONST_VECTOR.
18826
18827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18828 Alan Hayward <alan.hayward@arm.com>
18829 David Sherwood <david.sherwood@arm.com>
18830
18831 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18832 (add_offset_to_base): New function, split out from...
18833 (create_mem_ref): ...here. When handling a scale other than 1,
18834 check first whether the address is valid without the offset.
18835 Add it into the base if so, leaving the index and scale as-is.
18836
18837 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18838
18839 PR c++/83778
18840 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18841 fold_for_warn before checking if arg2 is INTEGER_CST.
18842
18843 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18844
18845 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18846 (store_multiple_operation): Delete.
18847 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18848 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18849 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18850 guarded by TARGET_STRING.
18851 (rs6000_output_load_multiple): Delete.
18852 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18853 OPTION_MASK_STRING / TARGET_STRING handling.
18854 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18855 (const rs6000_opt_masks) <"string">: Change mask to 0.
18856 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18857 (MASK_STRING): Delete.
18858 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18859 parts. Simplify.
18860 (load_multiple): Delete.
18861 (*ldmsi8): Delete.
18862 (*ldmsi7): Delete.
18863 (*ldmsi6): Delete.
18864 (*ldmsi5): Delete.
18865 (*ldmsi4): Delete.
18866 (*ldmsi3): Delete.
18867 (store_multiple): Delete.
18868 (*stmsi8): Delete.
18869 (*stmsi7): Delete.
18870 (*stmsi6): Delete.
18871 (*stmsi5): Delete.
18872 (*stmsi4): Delete.
18873 (*stmsi3): Delete.
18874 (movmemsi_8reg): Delete.
18875 (corresponding unnamed define_insn): Delete.
18876 (movmemsi_6reg): Delete.
18877 (corresponding unnamed define_insn): Delete.
18878 (movmemsi_4reg): Delete.
18879 (corresponding unnamed define_insn): Delete.
18880 (movmemsi_2reg): Delete.
18881 (corresponding unnamed define_insn): Delete.
18882 (movmemsi_1reg): Delete.
18883 (corresponding unnamed define_insn): Delete.
18884 * config/rs6000/rs6000.opt (mno-string): New.
18885 (mstring): Replace by deprecation warning stub.
18886 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18887
18888 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18889
18890 * regrename.c (regrename_do_replace): If replacing the same
18891 reg multiple times, try to reuse last created gen_raw_REG.
18892
18893 PR debug/81155
18894 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18895 main to workaround a bug in GDB.
18896
18897 2018-01-12 Tom de Vries <tom@codesourcery.com>
18898
18899 PR target/83737
18900 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18901
18902 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18903
18904 PR rtl-optimization/80481
18905 * ira-color.c (get_cap_member): New function.
18906 (allocnos_conflict_by_live_ranges_p): Use it.
18907 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18908 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18909
18910 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18911
18912 PR target/83628
18913 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18914 (*saddl_se_1): Ditto.
18915 (*ssubsi_1): Ditto.
18916 (*ssubl_se_1): Ditto.
18917
18918 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18919
18920 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18921 rather than wi::to_widest for DR_INITs.
18922 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18923 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18924 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18925 INTEGER_CSTs.
18926 (vect_analyze_group_access_1): Note that here.
18927
18928 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18929
18930 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18931 polynomial type sizes.
18932
18933 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18934
18935 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18936 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18937 (gimple_add_tmp_var): Likewise.
18938
18939 2018-01-12 Martin Liska <mliska@suse.cz>
18940
18941 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18942 (gimple_alloc_sizes): Likewise.
18943 (dump_gimple_statistics): Use PRIu64 in printf format.
18944 * gimple.h: Change uint64_t to int.
18945
18946 2018-01-12 Martin Liska <mliska@suse.cz>
18947
18948 * tree-core.h: Use uint64_t instead of int.
18949 * tree.c (tree_node_counts): Likewise.
18950 (tree_node_sizes): Likewise.
18951 (dump_tree_statistics): Use PRIu64 in printf format.
18952
18953 2018-01-12 Martin Liska <mliska@suse.cz>
18954
18955 * Makefile.in: As qsort_chk is implemented in vec.c, add
18956 vec.o to linkage of gencfn-macros.
18957 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18958 passing the info to record_node_allocation_statistics.
18959 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18960 and pass the info.
18961 * ggc-common.c (struct ggc_usage): Add operator== and use
18962 it in operator< and compare function.
18963 * mem-stats.h (struct mem_usage): Likewise.
18964 * vec.c (struct vec_usage): Remove operator< and compare
18965 function. Can be simply inherited.
18966
18967 2018-01-12 Martin Jambor <mjambor@suse.cz>
18968
18969 PR target/81616
18970 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18971 * tree-ssa-math-opts.c: Include domwalk.h.
18972 (convert_mult_to_fma_1): New function.
18973 (fma_transformation_info): New type.
18974 (fma_deferring_state): Likewise.
18975 (cancel_fma_deferring): New function.
18976 (result_of_phi): Likewise.
18977 (last_fma_candidate_feeds_initial_phi): Likewise.
18978 (convert_mult_to_fma): Added deferring logic, split actual
18979 transformation to convert_mult_to_fma_1.
18980 (math_opts_dom_walker): New type.
18981 (math_opts_dom_walker::after_dom_children): New method, body moved
18982 here from pass_optimize_widening_mul::execute, added deferring logic
18983 bits.
18984 (pass_optimize_widening_mul::execute): Moved most of code to
18985 math_opts_dom_walker::after_dom_children.
18986 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18987 * config/i386/i386.c (ix86_option_override_internal): Added
18988 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18989
18990 2018-01-12 Richard Biener <rguenther@suse.de>
18991
18992 PR debug/83157
18993 * dwarf2out.c (gen_variable_die): Do not reset old_die for
18994 inline instance vars.
18995
18996 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
18997
18998 PR target/81819
18999 * config/rx/rx.c (rx_is_restricted_memory_address):
19000 Handle SUBREG case.
19001
19002 2018-01-12 Richard Biener <rguenther@suse.de>
19003
19004 PR tree-optimization/80846
19005 * target.def (split_reduction): New target hook.
19006 * targhooks.c (default_split_reduction): New function.
19007 * targhooks.h (default_split_reduction): Declare.
19008 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19009 target requests first reduce vectors by combining low and high
19010 parts.
19011 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19012 (get_vectype_for_scalar_type_and_size): Export.
19013 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19014 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19015 * doc/tm.texi: Regenerate.
19016 * config/i386/i386.c (ix86_split_reduction): Implement
19017 TARGET_VECTORIZE_SPLIT_REDUCTION.
19018
19019 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19020
19021 PR target/83368
19022 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19023 in PIC mode except for TARGET_VXWORKS_RTP.
19024 * config/sparc/sparc.c: Include cfgrtl.h.
19025 (TARGET_INIT_PIC_REG): Define.
19026 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19027 (sparc_pic_register_p): New predicate.
19028 (sparc_legitimate_address_p): Use it.
19029 (sparc_legitimize_pic_address): Likewise.
19030 (sparc_delegitimize_address): Likewise.
19031 (sparc_mode_dependent_address_p): Likewise.
19032 (gen_load_pcrel_sym): Remove 4th parameter.
19033 (load_got_register): Adjust call to above. Remove obsolete stuff.
19034 (sparc_expand_prologue): Do not call load_got_register here.
19035 (sparc_flat_expand_prologue): Likewise.
19036 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19037 (sparc_use_pseudo_pic_reg): New function.
19038 (sparc_init_pic_reg): Likewise.
19039 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19040 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19041
19042 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19043
19044 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19045 Add item for branch_cost.
19046
19047 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19048
19049 PR rtl-optimization/83565
19050 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19051 not extend the result to a larger mode for rotate operations.
19052 (num_sign_bit_copies1): Likewise.
19053
19054 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19055
19056 PR target/40411
19057 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19058 -symbolic.
19059 Use values-Xc.o for -pedantic.
19060 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19061
19062 2018-01-12 Martin Liska <mliska@suse.cz>
19063
19064 PR ipa/83054
19065 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19066 New function.
19067 (possible_polymorphic_call_targets): Use it.
19068 (ipa_devirt): Likewise.
19069
19070 2018-01-12 Martin Liska <mliska@suse.cz>
19071
19072 * profile-count.h (enum profile_quality): Use 0 as invalid
19073 enum value of profile_quality.
19074
19075 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19076
19077 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19078 -mext-string options.
19079
19080 2018-01-12 Richard Biener <rguenther@suse.de>
19081
19082 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19083 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19084 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19085 Likewise.
19086 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19087
19088 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19089
19090 * configure.ac (--with-long-double-format): Add support for the
19091 configuration option to change the default long double format on
19092 PowerPC systems.
19093 * config.gcc (powerpc*-linux*-*): Likewise.
19094 * configure: Regenerate.
19095 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19096 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19097 used without modification.
19098
19099 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19100
19101 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19102 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19103 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19104 MISC_BUILTIN_SPEC_BARRIER.
19105 (rs6000_init_builtins): Likewise.
19106 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19107 enum value.
19108 (speculation_barrier): New define_insn.
19109 * doc/extend.texi: Document __builtin_speculation_barrier.
19110
19111 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19112
19113 PR target/83203
19114 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19115 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19116 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19117 iterators.
19118 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19119 integral modes instead of "ss" and "sd".
19120 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19121 vectors with 32-bit and 64-bit elements.
19122 (vecdupssescalarmodesuffix): New mode attribute.
19123 (vec_dup<mode>): Use it.
19124
19125 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19126
19127 PR target/83330
19128 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19129 frame if argument is passed on stack.
19130
19131 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19132
19133 PR target/82682
19134 * ree.c (combine_reaching_defs): Optimize also
19135 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19136 reg2=any_extend(exp); reg1=reg2;, formatting fix.
19137
19138 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19139
19140 PR middle-end/83189
19141 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19142
19143 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19144
19145 PR middle-end/83718
19146 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19147 after they are computed.
19148
19149 2018-01-11 Bin Cheng <bin.cheng@arm.com>
19150
19151 PR tree-optimization/83695
19152 * gimple-loop-linterchange.cc
19153 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19154 reset cached scev information after interchange.
19155 (pass_linterchange::execute): Remove call to scev_reset_htab.
19156
19157 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19158
19159 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19160 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19161 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19162 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19163 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19164 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19165 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19166 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19167 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19168 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19169 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19170 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19171 (V_lane_reg): Likewise.
19172 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19173 New define_expand.
19174 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19175 (vfmal_lane_low<mode>_intrinsic,
19176 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19177 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19178 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19179 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19180 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19181 vfmsl_lane_high<mode>_intrinsic): New define_insns.
19182
19183 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19184
19185 * config/arm/arm-cpus.in (fp16fml): New feature.
19186 (ALL_SIMD): Add fp16fml.
19187 (armv8.2-a): Add fp16fml as an option.
19188 (armv8.3-a): Likewise.
19189 (armv8.4-a): Add fp16fml as part of fp16.
19190 * config/arm/arm.h (TARGET_FP16FML): Define.
19191 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19192 when appropriate.
19193 * config/arm/arm-modes.def (V2HF): Define.
19194 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19195 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19196 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19197 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19198 vfmsl_low, vfmsl_high): New set of builtins.
19199 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19200 (vfml_op): New code attribute.
19201 (VFMLHALVES): New int iterator.
19202 (VFML, VFMLSEL): New mode attributes.
19203 (V_reg): Define mapping for V2HF.
19204 (V_hi, V_lo): New mode attributes.
19205 (VF_constraint): Likewise.
19206 (vfml_half, vfml_half_selector): New int attributes.
19207 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19208 define_expand.
19209 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19210 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19211 New define_insn.
19212 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19213 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19214 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19215 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19216 documentation.
19217 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19218 Document new effective target and option set.
19219
19220 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19221
19222 * config/arm/arm-cpus.in (armv8_4): New feature.
19223 (ARMv8_4a): New fgroup.
19224 (armv8.4-a): New arch.
19225 * config/arm/arm-tables.opt: Regenerate.
19226 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19227 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19228 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19229 Add matching rules for -march=armv8.4-a and extensions.
19230 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19231
19232 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19233
19234 PR target/81821
19235 * config/rx/rx.md (BW): New mode attribute.
19236 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19237
19238 2018-01-11 Richard Biener <rguenther@suse.de>
19239
19240 PR tree-optimization/83435
19241 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19242 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19243 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19244
19245 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19246 Alan Hayward <alan.hayward@arm.com>
19247 David Sherwood <david.sherwood@arm.com>
19248
19249 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19250 field.
19251 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19252 (aarch64_print_address_internal): Use it to check for a zero offset.
19253
19254 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19255 Alan Hayward <alan.hayward@arm.com>
19256 David Sherwood <david.sherwood@arm.com>
19257
19258 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19259 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19260 Return a poly_int64 rather than a HOST_WIDE_INT.
19261 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19262 rather than a HOST_WIDE_INT.
19263 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19264 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19265 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19266 final_offset from HOST_WIDE_INT to poly_int64.
19267 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19268 to_constant when getting the number of units in an Advanced SIMD
19269 mode.
19270 (aarch64_builtin_vectorized_function): Check for a constant number
19271 of units.
19272 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19273 GET_MODE_SIZE.
19274 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19275 attribute instead of GET_MODE_NUNITS.
19276 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19277 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19278 GET_MODE_SIZE for fixed-size registers.
19279 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19280 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19281 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19282 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19283 (aarch64_print_operand, aarch64_print_address_internal)
19284 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19285 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19286 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19287 Handle polynomial GET_MODE_SIZE.
19288 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19289 wider than SImode without modification.
19290 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19291 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19292 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19293 passing and returning SVE modes.
19294 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19295 rather than GEN_INT.
19296 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19297 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19298 (aarch64_allocate_and_probe_stack_space): Likewise.
19299 (aarch64_layout_frame): Cope with polynomial offsets.
19300 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19301 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19302 polynomial offsets.
19303 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19304 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19305 poly_int64 rather than a HOST_WIDE_INT.
19306 (aarch64_get_separate_components, aarch64_process_components)
19307 (aarch64_expand_prologue, aarch64_expand_epilogue)
19308 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19309 (aarch64_anchor_offset): New function, split out from...
19310 (aarch64_legitimize_address): ...here.
19311 (aarch64_builtin_vectorization_cost): Handle polynomial
19312 TYPE_VECTOR_SUBPARTS.
19313 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19314 GET_MODE_NUNITS.
19315 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19316 number of elements from the PARALLEL rather than the mode.
19317 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19318 rather than GET_MODE_BITSIZE.
19319 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19320 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19321 (aarch64_expand_vec_perm_const_1): Handle polynomial
19322 d->perm.length () and d->perm elements.
19323 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19324 Apply to_constant to d->perm elements.
19325 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19326 polynomial CONST_VECTOR_NUNITS.
19327 (aarch64_move_pointer): Take amount as a poly_int64 rather
19328 than an int.
19329 (aarch64_progress_pointer): Avoid temporary variable.
19330 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19331 the mode attribute instead of GET_MODE.
19332
19333 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19334 Alan Hayward <alan.hayward@arm.com>
19335 David Sherwood <david.sherwood@arm.com>
19336
19337 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19338 x exists before using it.
19339 (aarch64_add_constant_internal): Rename to...
19340 (aarch64_add_offset_1): ...this. Replace regnum with separate
19341 src and dest rtxes. Handle the case in which they're different,
19342 including when the offset is zero. Replace scratchreg with an rtx.
19343 Use 2 additions if there is no spare register into which we can
19344 move a 16-bit constant.
19345 (aarch64_add_constant): Delete.
19346 (aarch64_add_offset): Replace reg with separate src and dest
19347 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19348 Use aarch64_add_offset_1.
19349 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19350 an rtx rather than an int. Take the delta as a poly_int64
19351 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19352 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19353 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19354 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19355 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19356 and aarch64_add_sp.
19357 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19358 aarch64_add_constant.
19359
19360 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19361
19362 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19363 Use scalar_float_mode.
19364
19365 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19366
19367 * config/aarch64/aarch64-simd.md
19368 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19369 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19370 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19371 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19372 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19373 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19374 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19375 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19376 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19377 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19378
19379 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19380
19381 PR target/83514
19382 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19383 targ_options->x_arm_arch_string is non NULL.
19384
19385 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19386
19387 * config/aarch64/aarch64.h
19388 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19389
19390 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19391
19392 PR target/82096
19393 * expmed.c (emit_store_flag_force): Swap if const op0
19394 and change VOIDmode to mode of op0.
19395
19396 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19397
19398 PR rtl-optimization/83761
19399 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19400 than bytes to mode_for_size.
19401
19402 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19403
19404 PR middle-end/83189
19405 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19406 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19407 profile.
19408
19409 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19410
19411 PR middle-end/83575
19412 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19413 when in layout mode.
19414 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19415 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19416 partition fixup.
19417
19418 2018-01-10 Michael Collison <michael.collison@arm.com>
19419
19420 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19421 * config/aarch64/aarch64-option-extension.def: Add
19422 AARCH64_OPT_EXTENSION of 'fp16fml'.
19423 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19424 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19425 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19426 * config/aarch64/constraints.md (Ui7): New constraint.
19427 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19428 (VFMLA_SEL_W): Ditto.
19429 (f16quad): Ditto.
19430 (f16mac1): Ditto.
19431 (VFMLA16_LOW): New int iterator.
19432 (VFMLA16_HIGH): Ditto.
19433 (UNSPEC_FMLAL): New unspec.
19434 (UNSPEC_FMLSL): Ditto.
19435 (UNSPEC_FMLAL2): Ditto.
19436 (UNSPEC_FMLSL2): Ditto.
19437 (f16mac): New code attribute.
19438 * config/aarch64/aarch64-simd-builtins.def
19439 (aarch64_fmlal_lowv2sf): Ditto.
19440 (aarch64_fmlsl_lowv2sf): Ditto.
19441 (aarch64_fmlalq_lowv4sf): Ditto.
19442 (aarch64_fmlslq_lowv4sf): Ditto.
19443 (aarch64_fmlal_highv2sf): Ditto.
19444 (aarch64_fmlsl_highv2sf): Ditto.
19445 (aarch64_fmlalq_highv4sf): Ditto.
19446 (aarch64_fmlslq_highv4sf): Ditto.
19447 (aarch64_fmlal_lane_lowv2sf): Ditto.
19448 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19449 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19450 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19451 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19452 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19453 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19454 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19455 (aarch64_fmlal_lane_highv2sf): Ditto.
19456 (aarch64_fmlsl_lane_highv2sf): Ditto.
19457 (aarch64_fmlal_laneq_highv2sf): Ditto.
19458 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19459 (aarch64_fmlalq_lane_highv4sf): Ditto.
19460 (aarch64_fmlsl_lane_highv4sf): Ditto.
19461 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19462 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19463 * config/aarch64/aarch64-simd.md:
19464 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19465 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19466 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19467 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19468 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19469 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19470 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19471 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19472 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19473 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19474 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19475 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19476 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19477 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19478 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19479 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19480 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19481 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19482 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19483 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19484 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19485 (vfmlsl_low_u32): Ditto.
19486 (vfmlalq_low_u32): Ditto.
19487 (vfmlslq_low_u32): Ditto.
19488 (vfmlal_high_u32): Ditto.
19489 (vfmlsl_high_u32): Ditto.
19490 (vfmlalq_high_u32): Ditto.
19491 (vfmlslq_high_u32): Ditto.
19492 (vfmlal_lane_low_u32): Ditto.
19493 (vfmlsl_lane_low_u32): Ditto.
19494 (vfmlal_laneq_low_u32): Ditto.
19495 (vfmlsl_laneq_low_u32): Ditto.
19496 (vfmlalq_lane_low_u32): Ditto.
19497 (vfmlslq_lane_low_u32): Ditto.
19498 (vfmlalq_laneq_low_u32): Ditto.
19499 (vfmlslq_laneq_low_u32): Ditto.
19500 (vfmlal_lane_high_u32): Ditto.
19501 (vfmlsl_lane_high_u32): Ditto.
19502 (vfmlal_laneq_high_u32): Ditto.
19503 (vfmlsl_laneq_high_u32): Ditto.
19504 (vfmlalq_lane_high_u32): Ditto.
19505 (vfmlslq_lane_high_u32): Ditto.
19506 (vfmlalq_laneq_high_u32): Ditto.
19507 (vfmlslq_laneq_high_u32): Ditto.
19508 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19509 (AARCH64_FL_FOR_ARCH8_4): New.
19510 (AARCH64_ISA_F16FML): New ISA flag.
19511 (TARGET_F16FML): New feature flag for fp16fml.
19512 (doc/invoke.texi): Document new fp16fml option.
19513
19514 2018-01-10 Michael Collison <michael.collison@arm.com>
19515
19516 * config/aarch64/aarch64-builtins.c:
19517 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19518 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19519 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19520 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19521 (AARCH64_ISA_SHA3): New ISA flag.
19522 (TARGET_SHA3): New feature flag for sha3.
19523 * config/aarch64/iterators.md (sha512_op): New int attribute.
19524 (CRYPTO_SHA512): New int iterator.
19525 (UNSPEC_SHA512H): New unspec.
19526 (UNSPEC_SHA512H2): Ditto.
19527 (UNSPEC_SHA512SU0): Ditto.
19528 (UNSPEC_SHA512SU1): Ditto.
19529 * config/aarch64/aarch64-simd-builtins.def
19530 (aarch64_crypto_sha512hqv2di): New builtin.
19531 (aarch64_crypto_sha512h2qv2di): Ditto.
19532 (aarch64_crypto_sha512su0qv2di): Ditto.
19533 (aarch64_crypto_sha512su1qv2di): Ditto.
19534 (aarch64_eor3qv8hi): Ditto.
19535 (aarch64_rax1qv2di): Ditto.
19536 (aarch64_xarqv2di): Ditto.
19537 (aarch64_bcaxqv8hi): Ditto.
19538 * config/aarch64/aarch64-simd.md:
19539 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19540 (aarch64_crypto_sha512su0qv2di): Ditto.
19541 (aarch64_crypto_sha512su1qv2di): Ditto.
19542 (aarch64_eor3qv8hi): Ditto.
19543 (aarch64_rax1qv2di): Ditto.
19544 (aarch64_xarqv2di): Ditto.
19545 (aarch64_bcaxqv8hi): Ditto.
19546 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19547 (vsha512h2q_u64): Ditto.
19548 (vsha512su0q_u64): Ditto.
19549 (vsha512su1q_u64): Ditto.
19550 (veor3q_u16): Ditto.
19551 (vrax1q_u64): Ditto.
19552 (vxarq_u64): Ditto.
19553 (vbcaxq_u16): Ditto.
19554 * config/arm/types.md (crypto_sha512): New type attribute.
19555 (crypto_sha3): Ditto.
19556 (doc/invoke.texi): Document new sha3 option.
19557
19558 2018-01-10 Michael Collison <michael.collison@arm.com>
19559
19560 * config/aarch64/aarch64-builtins.c:
19561 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19562 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19563 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19564 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19565 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19566 (AARCH64_ISA_SM4): New ISA flag.
19567 (TARGET_SM4): New feature flag for sm4.
19568 * config/aarch64/aarch64-simd-builtins.def
19569 (aarch64_sm3ss1qv4si): Ditto.
19570 (aarch64_sm3tt1aq4si): Ditto.
19571 (aarch64_sm3tt1bq4si): Ditto.
19572 (aarch64_sm3tt2aq4si): Ditto.
19573 (aarch64_sm3tt2bq4si): Ditto.
19574 (aarch64_sm3partw1qv4si): Ditto.
19575 (aarch64_sm3partw2qv4si): Ditto.
19576 (aarch64_sm4eqv4si): Ditto.
19577 (aarch64_sm4ekeyqv4si): Ditto.
19578 * config/aarch64/aarch64-simd.md:
19579 (aarch64_sm3ss1qv4si): Ditto.
19580 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19581 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19582 (aarch64_sm4eqv4si): Ditto.
19583 (aarch64_sm4ekeyqv4si): Ditto.
19584 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19585 (sm3part_op): Ditto.
19586 (CRYPTO_SM3TT): Ditto.
19587 (CRYPTO_SM3PART): Ditto.
19588 (UNSPEC_SM3SS1): New unspec.
19589 (UNSPEC_SM3TT1A): Ditto.
19590 (UNSPEC_SM3TT1B): Ditto.
19591 (UNSPEC_SM3TT2A): Ditto.
19592 (UNSPEC_SM3TT2B): Ditto.
19593 (UNSPEC_SM3PARTW1): Ditto.
19594 (UNSPEC_SM3PARTW2): Ditto.
19595 (UNSPEC_SM4E): Ditto.
19596 (UNSPEC_SM4EKEY): Ditto.
19597 * config/aarch64/constraints.md (Ui2): New constraint.
19598 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19599 * config/arm/types.md (crypto_sm3): New type attribute.
19600 (crypto_sm4): Ditto.
19601 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19602 (vsm3tt1aq_u32): Ditto.
19603 (vsm3tt1bq_u32): Ditto.
19604 (vsm3tt2aq_u32): Ditto.
19605 (vsm3tt2bq_u32): Ditto.
19606 (vsm3partw1q_u32): Ditto.
19607 (vsm3partw2q_u32): Ditto.
19608 (vsm4eq_u32): Ditto.
19609 (vsm4ekeyq_u32): Ditto.
19610 (doc/invoke.texi): Document new sm4 option.
19611
19612 2018-01-10 Michael Collison <michael.collison@arm.com>
19613
19614 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19615 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19616 (AARCH64_FL_FOR_ARCH8_4): New.
19617 (AARCH64_FL_V8_4): New flag.
19618 (doc/invoke.texi): Document new armv8.4-a option.
19619
19620 2018-01-10 Michael Collison <michael.collison@arm.com>
19621
19622 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19623 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19624 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19625 * config/aarch64/aarch64-option-extension.def: Add
19626 AARCH64_OPT_EXTENSION of 'sha2'.
19627 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19628 (crypto): Disable sha2 and aes if crypto disabled.
19629 (crypto): Enable aes and sha2 if enabled.
19630 (simd): Disable sha2 and aes if simd disabled.
19631 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19632 New flags.
19633 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19634 (TARGET_SHA2): New feature flag for sha2.
19635 (TARGET_AES): New feature flag for aes.
19636 * config/aarch64/aarch64-simd.md:
19637 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19638 conditional on TARGET_AES.
19639 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19640 (aarch64_crypto_sha1hsi): Make pattern conditional
19641 on TARGET_SHA2.
19642 (aarch64_crypto_sha1hv4si): Ditto.
19643 (aarch64_be_crypto_sha1hv4si): Ditto.
19644 (aarch64_crypto_sha1su1v4si): Ditto.
19645 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19646 (aarch64_crypto_sha1su0v4si): Ditto.
19647 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19648 (aarch64_crypto_sha256su0v4si): Ditto.
19649 (aarch64_crypto_sha256su1v4si): Ditto.
19650 (doc/invoke.texi): Document new aes and sha2 options.
19651
19652 2018-01-10 Martin Sebor <msebor@redhat.com>
19653
19654 PR tree-optimization/83781
19655 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19656 as string arrays.
19657
19658 2018-01-11 Martin Sebor <msebor@gmail.com>
19659 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19660
19661 PR tree-optimization/83501
19662 PR tree-optimization/81703
19663
19664 * tree-ssa-strlen.c (get_string_cst): Rename...
19665 (get_string_len): ...to this. Handle global constants.
19666 (handle_char_store): Adjust.
19667
19668 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19669 Jim Wilson <jimw@sifive.com>
19670
19671 * config/riscv/riscv-protos.h (riscv_output_return): New.
19672 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19673 (riscv_attribute_table, riscv_output_return),
19674 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19675 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19676 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19677 function.
19678 (riscv_expand_prologue): Add early return for naked function.
19679 (riscv_expand_epilogue): Likewise.
19680 (riscv_function_ok_for_sibcall): Return false for naked function.
19681 (riscv_set_current_function): New.
19682 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19683 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19684 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19685 * doc/extend.texi (RISC-V Function Attributes): New.
19686
19687 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19688
19689 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19690 check for 128-bit long double before checking TCmode.
19691 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19692 128-bit long doubles before checking TFmode or TCmode.
19693 (FLOAT128_IBM_P): Likewise.
19694
19695 2018-01-10 Martin Sebor <msebor@redhat.com>
19696
19697 PR tree-optimization/83671
19698 * builtins.c (c_strlen): Unconditionally return zero for the empty
19699 string.
19700 Use -Warray-bounds for warnings.
19701 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19702 for non-constant array indices with COMPONENT_REF, arrays of
19703 arrays, and pointers to arrays.
19704 (gimple_fold_builtin_strlen): Determine and set length range for
19705 non-constant character arrays.
19706
19707 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19708
19709 PR middle-end/81897
19710 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19711 empty blocks.
19712
19713 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19714
19715 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19716
19717 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19718
19719 PR target/83399
19720 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19721 VECTOR_MEM_ALTIVEC_OR_VSX_P.
19722 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19723 indexed_or_indirect_operand predicate.
19724 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19725 (*vsx_le_perm_load_v8hi): Likewise.
19726 (*vsx_le_perm_load_v16qi): Likewise.
19727 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19728 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19729 (*vsx_le_perm_store_v8hi): Likewise.
19730 (*vsx_le_perm_store_v16qi): Likewise.
19731 (eight unnamed splitters): Likewise.
19732
19733 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19734
19735 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19736 * config/rs6000/emmintrin.h: Likewise.
19737 * config/rs6000/mmintrin.h: Likewise.
19738 * config/rs6000/xmmintrin.h: Likewise.
19739
19740 2018-01-10 David Malcolm <dmalcolm@redhat.com>
19741
19742 PR c++/43486
19743 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19744 "public_flag".
19745 * tree.c (tree_nop_conversion): Return true for location wrapper
19746 nodes.
19747 (maybe_wrap_with_location): New function.
19748 (selftest::check_strip_nops): New function.
19749 (selftest::test_location_wrappers): New function.
19750 (selftest::tree_c_tests): Call it.
19751 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19752 (maybe_wrap_with_location): New decl.
19753 (EXPR_LOCATION_WRAPPER_P): New macro.
19754 (location_wrapper_p): New inline function.
19755 (tree_strip_any_location_wrapper): New inline function.
19756
19757 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
19758
19759 PR target/83735
19760 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19761 stack_realign_offset for the largest alignment of stack slot
19762 actually used.
19763 (ix86_find_max_used_stack_alignment): New function.
19764 (ix86_finalize_stack_frame_flags): Use it. Set
19765 max_used_stack_alignment if we don't realign stack.
19766 * config/i386/i386.h (machine_function): Add
19767 max_used_stack_alignment.
19768
19769 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
19770
19771 * config/arm/arm.opt (-mbranch-cost): New option.
19772 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19773 account.
19774
19775 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
19776
19777 PR target/83629
19778 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19779 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19780
19781 2018-01-10 Richard Biener <rguenther@suse.de>
19782
19783 PR debug/83765
19784 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19785 early out so it also covers the case where we have a non-NULL
19786 origin.
19787
19788 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19789
19790 PR tree-optimization/83753
19791 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19792 for non-strided grouped accesses if the number of elements is 1.
19793
19794 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19795
19796 PR target/81616
19797 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19798 * i386.h (TARGET_USE_GATHER): Define.
19799 * x86-tune.def (X86_TUNE_USE_GATHER): New.
19800
19801 2018-01-10 Martin Liska <mliska@suse.cz>
19802
19803 PR bootstrap/82831
19804 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19805 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19806 partitioning.
19807 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19808 CLEANUP_NO_PARTITIONING is not set.
19809
19810 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19811
19812 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19813 for vectors, as a partial revert of r254296.
19814 * rtl.h (const_vec_p): Delete.
19815 (const_vec_duplicate_p): Don't test for vector CONSTs.
19816 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19817 * expmed.c (make_tree): Likewise.
19818
19819 Revert:
19820 * common.md (E, F): Use CONSTANT_P instead of checking for
19821 CONST_VECTOR.
19822 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19823 checking for CONST_VECTOR.
19824
19825 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19826
19827 PR middle-end/83575
19828 * predict.c (force_edge_cold): Handle in more sane way edges
19829 with no prediction.
19830
19831 2018-01-09 Carl Love <cel@us.ibm.com>
19832
19833 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19834 V4SI, V4SF types.
19835 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19836 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19837 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19838 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19839 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19840 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19841 * config/rs6000/rs6000-protos.h: Add extern defition for
19842 rs6000_generate_float2_double_code.
19843 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19844 function.
19845 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19846 (float2_v2df): Add define_expand.
19847
19848 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19849
19850 PR target/83628
19851 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19852 op_mode in the force_to_mode call.
19853
19854 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19855
19856 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19857 instead of checking each element individually.
19858 (aarch64_evpc_uzp): Likewise.
19859 (aarch64_evpc_zip): Likewise.
19860 (aarch64_evpc_ext): Likewise.
19861 (aarch64_evpc_rev): Likewise.
19862 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19863 instead of checking each element individually. Return true without
19864 generating rtl if
19865 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19866 whether all selected elements come from the same input, instead of
19867 checking each element individually. Remove calls to gen_rtx_REG,
19868 start_sequence and end_sequence and instead assert that no rtl is
19869 generated.
19870
19871 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19872
19873 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19874 order of HIGH and CONST checks.
19875
19876 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19877
19878 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19879 if the destination isn't an SSA_NAME.
19880
19881 2018-01-09 Richard Biener <rguenther@suse.de>
19882
19883 PR tree-optimization/83668
19884 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19885 move prologue...
19886 (canonicalize_loop_form): ... here, renamed from ...
19887 (canonicalize_loop_closed_ssa_form): ... this and amended to
19888 swap successor edges for loop exit blocks to make us use
19889 the RPO order we need for initial schedule generation.
19890
19891 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19892
19893 PR tree-optimization/64811
19894 * match.pd: When optimizing comparisons with Inf, avoid
19895 introducing or losing exceptions from comparisons with NaN.
19896
19897 2018-01-09 Martin Liska <mliska@suse.cz>
19898
19899 PR sanitizer/82517
19900 * asan.c (shadow_mem_size): Add gcc_assert.
19901
19902 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19903
19904 Don't save registers in main().
19905
19906 PR target/83738
19907 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19908 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19909 * config/avr/avr.c (avr_set_current_function): Don't error if
19910 naked, OS_task or OS_main are specified at the same time.
19911 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19912 OS_main.
19913 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19914 attribute.
19915 * common/config/avr/avr-common.c (avr_option_optimization_table):
19916 Switch on -mmain-is-OS_task for optimizing compilations.
19917
19918 2018-01-09 Richard Biener <rguenther@suse.de>
19919
19920 PR tree-optimization/83572
19921 * graphite.c: Include cfganal.h.
19922 (graphite_transform_loops): Connect infinite loops to exit
19923 and remove fake edges at the end.
19924
19925 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19926
19927 * ipa-inline.c (edge_badness): Revert accidental checkin.
19928
19929 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19930
19931 PR ipa/80763
19932 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19933 symbols; not inline clones.
19934
19935 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19936
19937 PR target/83507
19938 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19939 hard registers. Formatting fixes.
19940
19941 PR preprocessor/83722
19942 * gcc.c (try_generate_repro): Pass
19943 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19944 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19945 do_report_bug.
19946
19947 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
19948 Kito Cheng <kito.cheng@gmail.com>
19949
19950 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19951 (riscv_leaf_function_p): Delete.
19952 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19953
19954 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19955
19956 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19957 function.
19958 (do_ifelse): New function.
19959 (do_isel): New function.
19960 (do_sub3): New function.
19961 (do_add3): New function.
19962 (do_load_mask_compare): New function.
19963 (do_overlap_load_compare): New function.
19964 (expand_compare_loop): New function.
19965 (expand_block_compare): Call expand_compare_loop() when appropriate.
19966 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19967 option description.
19968 (-mblock-compare-inline-loop-limit): New option.
19969
19970 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19971
19972 PR target/83677
19973 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19974 Reverse order of second and third operands in first alternative.
19975 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19976 of first and second elements in UNSPEC_VPERMR vector.
19977 (altivec_expand_vec_perm_le): Likewise.
19978
19979 2018-01-08 Jeff Law <law@redhat.com>
19980
19981 PR rtl-optimizatin/81308
19982 * tree-switch-conversion.c (cfg_altered): New file scoped static.
19983 (process_switch): If group_case_labels makes a change, then set
19984 cfg_altered.
19985 (pass_convert_switch::execute): If a switch is converted, then
19986 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
19987
19988 PR rtl-optimization/81308
19989 * recog.c (split_all_insns): Conditionally cleanup the CFG after
19990 splitting insns.
19991
19992 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
19993
19994 PR target/83663 - Revert r255946
19995 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19996 generation for cases where splatting a value is not useful.
19997 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19998 across a vec_duplicate and a paradoxical subreg forming a vector
19999 mode to a vec_concat.
20000
20001 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20002
20003 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20004 -march=armv8.3-a variants.
20005 * config/arm/t-multilib: Likewise.
20006 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
20007
20008 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20009
20010 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20011 to generate rtl.
20012 (cceq_ior_compare_complement): Give it a name so I can use it, and
20013 change boolean_or_operator predicate to boolean_operator so it can
20014 be used to generate a crand.
20015 (eqne): New code iterator.
20016 (bd/bd_neg): New code_attrs.
20017 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20018 a single define_insn.
20019 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20020 decrement (bdnzt/bdnzf/bdzt/bdzf).
20021 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20022 with the new names of the branch decrement patterns, and added the
20023 names of the branch decrement conditional patterns.
20024
20025 2018-01-08 Richard Biener <rguenther@suse.de>
20026
20027 PR tree-optimization/83563
20028 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20029 cache.
20030
20031 2018-01-08 Richard Biener <rguenther@suse.de>
20032
20033 PR middle-end/83713
20034 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20035
20036 2018-01-08 Richard Biener <rguenther@suse.de>
20037
20038 PR tree-optimization/83685
20039 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20040 references to abnormals.
20041
20042 2018-01-08 Richard Biener <rguenther@suse.de>
20043
20044 PR lto/83719
20045 * dwarf2out.c (output_indirect_strings): Handle empty
20046 skeleton_debug_str_hash.
20047 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20048
20049 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20050
20051 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20052 (emit_store_direct): Likewise.
20053 (arc_trampoline_adjust_address): Likewise.
20054 (arc_asm_trampoline_template): New function.
20055 (arc_initialize_trampoline): Use asm_trampoline_template.
20056 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20057 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20058 * config/arc/arc.md (flush_icache): Delete pattern.
20059
20060 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20061
20062 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20063 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20064 munaligned-access.
20065
20066 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20067
20068 PR target/83681
20069 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20070 by not USED_FOR_TARGET.
20071 (make_pass_resolve_sw_modes): Likewise.
20072
20073 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20074
20075 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20076 USED_FOR_TARGET.
20077
20078 2018-01-08 Richard Biener <rguenther@suse.de>
20079
20080 PR middle-end/83580
20081 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20082
20083 2018-01-08 Richard Biener <rguenther@suse.de>
20084
20085 PR middle-end/83517
20086 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20087
20088 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20089
20090 PR middle-end/81897
20091 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20092 basic blocks with a small number of successors.
20093 (convert_control_dep_chain_into_preds): Improve handling of
20094 forwarder blocks.
20095 (dump_predicates): Split apart into...
20096 (dump_pred_chain): ...here...
20097 (dump_pred_info): ...and here.
20098 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20099 (can_chain_union_be_invalidated_p): Improve check for invalidation
20100 of paths.
20101 (uninit_uses_cannot_happen): Avoid unnecessary if
20102 convert_control_dep_chain_into_preds yielded nothing.
20103
20104 2018-01-06 Martin Sebor <msebor@redhat.com>
20105
20106 PR tree-optimization/83640
20107 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20108 subtracting negative offset from size.
20109 (builtin_access::overlap): Adjust offset bounds of the access to fall
20110 within the size of the object if possible.
20111
20112 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20113
20114 PR rtl-optimization/83699
20115 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20116 extract_bit_field_as_subreg to cases in which the extracted
20117 value is also a vector.
20118
20119 * lra-constraints.c (process_alt_operands): Test for the equivalence
20120 substitutions when detecting a possible reload cycle.
20121
20122 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20123
20124 PR debug/83480
20125 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20126 by default if flag_selective_schedling{,2}. Formatting fixes.
20127
20128 PR rtl-optimization/83682
20129 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20130 if it has non-VECTOR_MODE element mode.
20131 (vec_duplicate_p): Likewise.
20132
20133 PR middle-end/83694
20134 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20135 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20136
20137 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20138
20139 PR target/83604
20140 * config/i386/i386-builtin.def
20141 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20142 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20143 Require also OPTION_MASK_ISA_AVX512F in addition to
20144 OPTION_MASK_ISA_GFNI.
20145 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20146 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20147 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20148 to OPTION_MASK_ISA_GFNI.
20149 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20150 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20151 OPTION_MASK_ISA_AVX512BW.
20152 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20153 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20154 addition to OPTION_MASK_ISA_GFNI.
20155 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20156 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20157 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20158 to OPTION_MASK_ISA_GFNI.
20159 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20160 a requirement for all ISAs rather than any of them with a few
20161 exceptions.
20162 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20163 processing.
20164 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20165 bitmasks to be enabled with 3 exceptions, instead of requiring any
20166 enabled ISA with lots of exceptions.
20167 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20168 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20169 Change avx512bw in isa attribute to avx512f.
20170 * config/i386/sgxintrin.h: Add license boilerplate.
20171 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
20172 to __AVX512F__ and __AVX512VL to __AVX512VL__.
20173 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20174 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20175 defined.
20176 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20177 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20178 temporarily sse2 rather than sse if not enabled already.
20179
20180 PR target/83604
20181 * config/i386/sse.md (VI248_VLBW): Rename to ...
20182 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
20183 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20184 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20185 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20186 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20187 mode iterator instead of VI248_VLBW.
20188
20189 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
20190
20191 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20192 (record_modified): Skip clobbers; add debug output.
20193 (param_change_prob): Use sreal frequencies.
20194
20195 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20196
20197 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20198 punt for user-aligned variables.
20199
20200 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20201
20202 * tree-chrec.c (chrec_contains_symbols): Return true for
20203 POLY_INT_CST.
20204
20205 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20206
20207 PR target/82439
20208 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20209 of (x|y) == x for BICS pattern.
20210
20211 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20212
20213 PR tree-optimization/83605
20214 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20215 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20216 can throw.
20217
20218 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20219
20220 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20221 * config/epiphany/rtems.h: New file.
20222
20223 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20224 Uros Bizjak <ubizjak@gmail.com>
20225
20226 PR target/83554
20227 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20228 QIreg_operand instead of register_operand predicate.
20229 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20230 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20231 comments instead of -fmitigate[-_]rop.
20232
20233 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20234
20235 PR bootstrap/81926
20236 * cgraphunit.c (symbol_table::compile): Switch to text_section
20237 before calling assembly_start debug hook.
20238 * run-rtl-passes.c (run_rtl_passes): Likewise.
20239 Include output.h.
20240
20241 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20242
20243 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20244 range_int_cst_p rather than !symbolic_range_p before calling
20245 extract_range_from_multiplicative_op_1.
20246
20247 2018-01-04 Jeff Law <law@redhat.com>
20248
20249 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20250 redundant test in assertion.
20251
20252 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20253
20254 * doc/rtl.texi: Document machine_mode wrapper classes.
20255
20256 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20257
20258 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20259 using tree_to_uhwi.
20260
20261 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20262
20263 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20264 the VEC_PERM_EXPR fold to fail.
20265
20266 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20267
20268 PR debug/83585
20269 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20270 to switched_sections.
20271
20272 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20273
20274 PR target/83680
20275 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20276 test for d.testing.
20277
20278 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20279
20280 PR target/83387
20281 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20282 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20283
20284 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20285
20286 PR debug/83666
20287 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20288 is BLKmode and bitpos not zero or mode change is needed.
20289
20290 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20291
20292 PR target/83675
20293 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20294 TARGET_VIS2.
20295
20296 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20297
20298 PR target/83628
20299 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20300 instead of MULT rtx. Update all corresponding splitters.
20301 (*saddl_se): Ditto.
20302 (*ssub<modesuffix>): Ditto.
20303 (*ssubl_se): Ditto.
20304 (*cmp_sadd_di): Update split patterns.
20305 (*cmp_sadd_si): Ditto.
20306 (*cmp_sadd_sidi): Ditto.
20307 (*cmp_ssub_di): Ditto.
20308 (*cmp_ssub_si): Ditto.
20309 (*cmp_ssub_sidi): Ditto.
20310 * config/alpha/predicates.md (const23_operand): New predicate.
20311 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20312 Look for ASHIFT, not MULT inner operand.
20313 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20314
20315 2018-01-04 Martin Liska <mliska@suse.cz>
20316
20317 PR gcov-profile/83669
20318 * gcov.c (output_intermediate_file): Add version to intermediate
20319 gcov file.
20320 * doc/gcov.texi: Document new field 'version' in intermediate
20321 file format. Fix location of '-k' option of gcov command.
20322
20323 2018-01-04 Martin Liska <mliska@suse.cz>
20324
20325 PR ipa/82352
20326 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20327
20328 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20329
20330 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20331
20332 2018-01-03 Martin Sebor <msebor@redhat.com>
20333
20334 PR tree-optimization/83655
20335 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20336 checking calls with invalid arguments.
20337
20338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20339
20340 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20341 (vectorizable_mask_load_store): Delete.
20342 (vectorizable_call): Return false for masked loads and stores.
20343 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20344 instead of gimple_assign_rhs1.
20345 (vectorizable_load): Handle IFN_MASK_LOAD.
20346 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20347
20348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20349
20350 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20351 split out from..,
20352 (vectorizable_mask_load_store): ...here.
20353 (vectorizable_load): ...and here.
20354
20355 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20356
20357 * tree-vect-stmts.c (vect_build_all_ones_mask)
20358 (vect_build_zero_merge_argument): New functions, split out from...
20359 (vectorizable_load): ...here.
20360
20361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20362
20363 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20364 split out from...
20365 (vectorizable_mask_load_store): ...here.
20366 (vectorizable_store): ...and here.
20367
20368 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20369
20370 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20371 split out from...
20372 (vectorizable_mask_load_store): ...here.
20373
20374 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20375
20376 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20377 (vect_model_store_cost): Take a vec_load_store_type instead of a
20378 vect_def_type.
20379 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20380 (vect_model_store_cost): Take a vec_load_store_type instead of a
20381 vect_def_type.
20382 (vectorizable_mask_load_store): Update accordingly.
20383 (vectorizable_store): Likewise.
20384 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20385
20386 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20387
20388 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20389 IFN_MASK_LOAD calls here rather than...
20390 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20391
20392 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20393 Alan Hayward <alan.hayward@arm.com>
20394 David Sherwood <david.sherwood@arm.com>
20395
20396 * expmed.c (extract_bit_field_1): For vector extracts,
20397 fall back to extract_bit_field_as_subreg if vec_extract
20398 isn't available.
20399
20400 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20401 Alan Hayward <alan.hayward@arm.com>
20402 David Sherwood <david.sherwood@arm.com>
20403
20404 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20405 they are variable or constant sized.
20406 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20407 slots for constant-sized data.
20408
20409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20410 Alan Hayward <alan.hayward@arm.com>
20411 David Sherwood <david.sherwood@arm.com>
20412
20413 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20414 handling COND_EXPRs with boolean comparisons, try to find a better
20415 basis for the mask type than the boolean itself.
20416
20417 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20418
20419 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20420 is calculated and how it can be overridden.
20421 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20422 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20423 if defined.
20424 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20425 if nonzero.
20426
20427 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20428 Alan Hayward <alan.hayward@arm.com>
20429 David Sherwood <david.sherwood@arm.com>
20430
20431 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20432 Remove the mode argument.
20433 (aarch64_simd_valid_immediate): Remove the mode and inverse
20434 arguments.
20435 * config/aarch64/iterators.md (bitsize): New iterator.
20436 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20437 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20438 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20439 aarch64_simd_valid_immediate.
20440 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20441 (aarch64_reg_or_bic_imm): Likewise.
20442 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20443 with an insn_type enum and msl with a modifier_type enum.
20444 Replace element_width with a scalar_mode. Change the shift
20445 to unsigned int. Add constructors for scalar_float_mode and
20446 scalar_int_mode elements.
20447 (aarch64_vect_float_const_representable_p): Delete.
20448 (aarch64_can_const_movi_rtx_p)
20449 (aarch64_simd_scalar_immediate_valid_for_move)
20450 (aarch64_simd_make_constant): Update call to
20451 aarch64_simd_valid_immediate.
20452 (aarch64_advsimd_valid_immediate_hs): New function.
20453 (aarch64_advsimd_valid_immediate): Likewise.
20454 (aarch64_simd_valid_immediate): Remove mode and inverse
20455 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20456 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20457 and aarch64_float_const_representable_p on the result.
20458 (aarch64_output_simd_mov_immediate): Remove mode argument.
20459 Update call to aarch64_simd_valid_immediate and use of
20460 simd_immediate_info.
20461 (aarch64_output_scalar_simd_mov_immediate): Update call
20462 accordingly.
20463
20464 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20465 Alan Hayward <alan.hayward@arm.com>
20466 David Sherwood <david.sherwood@arm.com>
20467
20468 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20469 (mode_nunits): Likewise CONST_MODE_NUNITS.
20470 * machmode.def (ADJUST_NUNITS): Document.
20471 * genmodes.c (mode_data::need_nunits_adj): New field.
20472 (blank_mode): Update accordingly.
20473 (adj_nunits): New variable.
20474 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20475 parameter.
20476 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20477 listed in adj_nunits.
20478 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20479 listed in adj_nunits. Don't emit case statements for such modes.
20480 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20481 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20482 nothing if adj_nunits is nonnull.
20483 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20484 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20485 (emit_mode_fbit): Update use of print_maybe_const_decl.
20486 (emit_move_size): Likewise. Treat the array as non-const
20487 if adj_nunits.
20488 (emit_mode_adjustments): Handle adj_nunits.
20489
20490 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20491
20492 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20493 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20494 (VECTOR_MODES): Use it.
20495 (make_vector_modes): Take the prefix as an argument.
20496
20497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20498 Alan Hayward <alan.hayward@arm.com>
20499 David Sherwood <david.sherwood@arm.com>
20500
20501 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20502 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20503 for MODE_VECTOR_BOOL.
20504 * machmode.def (VECTOR_BOOL_MODE): Document.
20505 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20506 (make_vector_bool_mode): New function.
20507 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20508 MODE_VECTOR_BOOL.
20509 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20510 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20511 Likewise.
20512 * stor-layout.c (int_mode_for_mode): Likewise.
20513 * tree.c (build_vector_type_for_mode): Likewise.
20514 * varasm.c (output_constant_pool_2): Likewise.
20515 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20516 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20517 for MODE_VECTOR_BOOL.
20518 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20519 of mode class checks.
20520 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20521 instead of a list of mode class checks.
20522 (expand_vector_scalar_condition): Likewise.
20523 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20524
20525 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20526 Alan Hayward <alan.hayward@arm.com>
20527 David Sherwood <david.sherwood@arm.com>
20528
20529 * machmode.h (mode_size): Change from unsigned short to
20530 poly_uint16_pod.
20531 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20532 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20533 or if measurement_type is not polynomial.
20534 (fixed_size_mode::includes_p): Check for constant-sized modes.
20535 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20536 return a poly_uint16 rather than an unsigned short.
20537 (emit_mode_size): Change the type of mode_size from unsigned short
20538 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20539 (emit_mode_adjustments): Cope with polynomial vector sizes.
20540 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20541 for GET_MODE_SIZE.
20542 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20543 for GET_MODE_SIZE.
20544 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20545 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20546 * caller-save.c (setup_save_areas): Likewise.
20547 (replace_reg_with_saved_mem): Likewise.
20548 * calls.c (emit_library_call_value_1): Likewise.
20549 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20550 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20551 (gen_lowpart_for_combine): Likewise.
20552 * convert.c (convert_to_integer_1): Likewise.
20553 * cse.c (equiv_constant, cse_insn): Likewise.
20554 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20555 (cselib_subst_to_values): Likewise.
20556 * dce.c (word_dce_process_block): Likewise.
20557 * df-problems.c (df_word_lr_mark_ref): Likewise.
20558 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20559 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20560 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20561 (rtl_for_decl_location): Likewise.
20562 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20563 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20564 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20565 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20566 (expand_expr_real_1): Likewise.
20567 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20568 (pad_below): Likewise.
20569 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20570 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20571 * ira.c (get_subreg_tracking_sizes): Likewise.
20572 * ira-build.c (ira_create_allocno_objects): Likewise.
20573 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20574 (ira_sort_regnos_for_alter_reg): Likewise.
20575 * ira-costs.c (record_operand_costs): Likewise.
20576 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20577 (resolve_simple_move): Likewise.
20578 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20579 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20580 (lra_constraints): Likewise.
20581 (CONST_POOL_OK_P): Reject variable-sized modes.
20582 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20583 (add_pseudo_to_slot, lra_spill): Likewise.
20584 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20585 * optabs-query.c (get_best_extraction_insn): Likewise.
20586 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20587 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20588 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20589 * recog.c (offsettable_address_addr_space_p): Likewise.
20590 * regcprop.c (maybe_mode_change): Likewise.
20591 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20592 * regrename.c (build_def_use): Likewise.
20593 * regstat.c (dump_reg_info): Likewise.
20594 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20595 (find_reloads, find_reloads_subreg_address): Likewise.
20596 * reload1.c (eliminate_regs_1): Likewise.
20597 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20598 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20599 (simplify_binary_operation_1, simplify_subreg): Likewise.
20600 * targhooks.c (default_function_arg_padding): Likewise.
20601 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20602 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20603 (verify_gimple_assign_ternary): Likewise.
20604 * tree-inline.c (estimate_move_cost): Likewise.
20605 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20606 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20607 (get_address_cost_ainc): Likewise.
20608 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20609 (vect_supportable_dr_alignment): Likewise.
20610 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20611 (vectorizable_reduction): Likewise.
20612 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20613 (vectorizable_operation, vectorizable_load): Likewise.
20614 * tree.c (build_same_sized_truth_vector_type): Likewise.
20615 * valtrack.c (cleanup_auto_inc_dec): Likewise.
20616 * var-tracking.c (emit_note_insn_var_location): Likewise.
20617 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20618 (ADDR_VEC_ALIGN): Likewise.
20619
20620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20621 Alan Hayward <alan.hayward@arm.com>
20622 David Sherwood <david.sherwood@arm.com>
20623
20624 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20625 unsigned short.
20626 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20627 or if measurement_type is polynomial.
20628 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20629 * combine.c (make_extraction): Likewise.
20630 * dse.c (find_shift_sequence): Likewise.
20631 * dwarf2out.c (mem_loc_descriptor): Likewise.
20632 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20633 (extract_bit_field, extract_low_bits): Likewise.
20634 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20635 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20636 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20637 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20638 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20639 * reload.c (find_reloads): Likewise.
20640 * reload1.c (alter_reg): Likewise.
20641 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20642 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20643 * tree-if-conv.c (predicate_mem_writes): Likewise.
20644 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20645 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20646 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20647 * valtrack.c (dead_debug_insert_temp): Likewise.
20648 * varasm.c (mergeable_constant_section): Likewise.
20649 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20650
20651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20652 Alan Hayward <alan.hayward@arm.com>
20653 David Sherwood <david.sherwood@arm.com>
20654
20655 * expr.c (expand_assignment): Cope with polynomial mode sizes
20656 when assigning to a CONCAT.
20657
20658 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20659 Alan Hayward <alan.hayward@arm.com>
20660 David Sherwood <david.sherwood@arm.com>
20661
20662 * machmode.h (mode_precision): Change from unsigned short to
20663 poly_uint16_pod.
20664 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20665 short.
20666 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20667 or if measurement_type is not polynomial.
20668 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20669 in which the mode is already known to be a scalar_int_mode.
20670 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20671 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20672 initializer.
20673 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20674 for GET_MODE_PRECISION.
20675 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20676 for GET_MODE_PRECISION.
20677 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20678 as polynomial.
20679 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20680 (expand_field_assignment, make_extraction): Likewise.
20681 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20682 (get_last_value): Likewise.
20683 * convert.c (convert_to_integer_1): Likewise.
20684 * cse.c (cse_insn): Likewise.
20685 * expr.c (expand_expr_real_1): Likewise.
20686 * lra-constraints.c (simplify_operand_subreg): Likewise.
20687 * optabs-query.c (can_atomic_load_p): Likewise.
20688 * optabs.c (expand_atomic_load): Likewise.
20689 (expand_atomic_store): Likewise.
20690 * ree.c (combine_reaching_defs): Likewise.
20691 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20692 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20693 * tree.h (type_has_mode_precision_p): Likewise.
20694 * ubsan.c (instrument_si_overflow): Likewise.
20695
20696 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20697 Alan Hayward <alan.hayward@arm.com>
20698 David Sherwood <david.sherwood@arm.com>
20699
20700 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20701 polynomial numbers of units.
20702 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20703 (valid_vector_subparts_p): New function.
20704 (build_vector_type): Remove temporary shim and take the number
20705 of units as a poly_uint64 rather than an int.
20706 (build_opaque_vector_type): Take the number of units as a
20707 poly_uint64 rather than an int.
20708 * tree.c (build_vector_from_ctor): Handle polynomial
20709 TYPE_VECTOR_SUBPARTS.
20710 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20711 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20712 (build_vector_from_val): If the number of units is variable,
20713 use build_vec_duplicate_cst for constant operands and
20714 VEC_DUPLICATE_EXPR otherwise.
20715 (make_vector_type): Remove temporary is_constant ().
20716 (build_vector_type, build_opaque_vector_type): Take the number of
20717 units as a poly_uint64 rather than an int.
20718 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20719 VECTOR_CST_NELTS.
20720 * cfgexpand.c (expand_debug_expr): Likewise.
20721 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20722 (store_constructor, expand_expr_real_1): Likewise.
20723 (const_scalar_mask_from_tree): Likewise.
20724 * fold-const-call.c (fold_const_reduction): Likewise.
20725 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20726 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20727 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20728 (fold_relational_const): Likewise.
20729 (native_interpret_vector): Likewise. Change the size from an
20730 int to an unsigned int.
20731 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20732 TYPE_VECTOR_SUBPARTS.
20733 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20734 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20735 duplicating a non-constant operand into a variable-length vector.
20736 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20737 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20738 * ipa-icf.c (sem_variable::equals): Likewise.
20739 * match.pd: Likewise.
20740 * omp-simd-clone.c (simd_clone_subparts): Likewise.
20741 * print-tree.c (print_node): Likewise.
20742 * stor-layout.c (layout_type): Likewise.
20743 * targhooks.c (default_builtin_vectorization_cost): Likewise.
20744 * tree-cfg.c (verify_gimple_comparison): Likewise.
20745 (verify_gimple_assign_binary): Likewise.
20746 (verify_gimple_assign_ternary): Likewise.
20747 (verify_gimple_assign_single): Likewise.
20748 * tree-pretty-print.c (dump_generic_node): Likewise.
20749 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20750 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20751 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20752 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20753 (vect_shift_permute_load_chain): Likewise.
20754 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20755 (expand_vector_condition, optimize_vector_constructor): Likewise.
20756 (lower_vec_perm, get_compute_type): Likewise.
20757 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20758 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20759 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20760 (vect_recog_mask_conversion_pattern): Likewise.
20761 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20762 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20763 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20764 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20765 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20766 (vectorizable_shift, vectorizable_operation, vectorizable_store)
20767 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20768 (supportable_widening_operation): Likewise.
20769 (supportable_narrowing_operation): Likewise.
20770 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20771 Likewise.
20772 * varasm.c (output_constant): Likewise.
20773
20774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20775 Alan Hayward <alan.hayward@arm.com>
20776 David Sherwood <david.sherwood@arm.com>
20777
20778 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20779 so that both the length == 3 and length != 3 cases set up their
20780 own permute vectors. Add comments explaining why we know the
20781 number of elements is constant.
20782 (vect_permute_load_chain): Likewise.
20783
20784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20785 Alan Hayward <alan.hayward@arm.com>
20786 David Sherwood <david.sherwood@arm.com>
20787
20788 * machmode.h (mode_nunits): Change from unsigned char to
20789 poly_uint16_pod.
20790 (ONLY_FIXED_SIZE_MODES): New macro.
20791 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20792 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20793 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20794 New typedefs.
20795 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20796 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20797 or if measurement_type is not polynomial.
20798 * genmodes.c (ZERO_COEFFS): New macro.
20799 (emit_mode_nunits_inline): Make mode_nunits_inline return a
20800 poly_uint16.
20801 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20802 Use ZERO_COEFFS when emitting initializers.
20803 * data-streamer.h (bp_pack_poly_value): New function.
20804 (bp_unpack_poly_value): Likewise.
20805 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20806 for GET_MODE_NUNITS.
20807 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20808 for GET_MODE_NUNITS.
20809 * tree.c (make_vector_type): Remove temporary shim and make
20810 the real function take the number of units as a poly_uint64
20811 rather than an int.
20812 (build_vector_type_for_mode): Handle polynomial nunits.
20813 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20814 * emit-rtl.c (const_vec_series_p_1): Likewise.
20815 (gen_rtx_CONST_VECTOR): Likewise.
20816 * fold-const.c (test_vec_duplicate_folding): Likewise.
20817 * genrecog.c (validate_pattern): Likewise.
20818 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20819 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20820 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20821 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20822 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20823 * rtlanal.c (subreg_get_info): Likewise.
20824 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20825 (vect_grouped_load_supported): Likewise.
20826 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20827 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20828 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20829 (simplify_const_unary_operation, simplify_binary_operation_1)
20830 (simplify_const_binary_operation, simplify_ternary_operation)
20831 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20832 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20833 instead of CONST_VECTOR_NUNITS.
20834 * varasm.c (output_constant_pool_2): Likewise.
20835 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20836 explicit-encoded elements in the XVEC for variable-length vectors.
20837
20838 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20839
20840 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20841
20842 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20843 Alan Hayward <alan.hayward@arm.com>
20844 David Sherwood <david.sherwood@arm.com>
20845
20846 * coretypes.h (fixed_size_mode): Declare.
20847 (fixed_size_mode_pod): New typedef.
20848 * builtins.h (target_builtins::x_apply_args_mode)
20849 (target_builtins::x_apply_result_mode): Change type to
20850 fixed_size_mode_pod.
20851 * builtins.c (apply_args_size, apply_result_size, result_vector)
20852 (expand_builtin_apply_args_1, expand_builtin_apply)
20853 (expand_builtin_return): Update accordingly.
20854
20855 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20856
20857 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20858 * cselib.c (cselib_hash_rtx): Likewise.
20859 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20860 CONST_VECTOR encoding.
20861
20862 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20863 Jeff Law <law@redhat.com>
20864
20865 PR target/83641
20866 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20867 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20868 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20869 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20870
20871 PR target/83641
20872 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20873 explicitly probe *sp in a noreturn function if there were any callee
20874 register saves or frame pointer is needed.
20875
20876 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20877
20878 PR debug/83621
20879 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20880 BLKmode for ternary, binary or unary expressions.
20881
20882 PR debug/83645
20883 * var-tracking.c (delete_vta_debug_insn): New inline function.
20884 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20885 insns from get_insns () to NULL instead of each bb separately.
20886 Use delete_vta_debug_insn. No longer static.
20887 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20888 delete_vta_debug_insns callers.
20889 * rtl.h (delete_vta_debug_insns): Declare.
20890 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20891 instead of variable_tracking_main.
20892
20893 2018-01-03 Martin Sebor <msebor@redhat.com>
20894
20895 PR tree-optimization/83603
20896 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20897 arguments past the endof the argument list in functions declared
20898 without a prototype.
20899 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20900 Avoid checking when arguments are null.
20901
20902 2018-01-03 Martin Sebor <msebor@redhat.com>
20903
20904 PR c/83559
20905 * doc/extend.texi (attribute const): Fix a typo.
20906 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20907 issuing -Wsuggest-attribute for void functions.
20908
20909 2018-01-03 Martin Sebor <msebor@redhat.com>
20910
20911 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20912 offset_int::from instead of wide_int::to_shwi.
20913 (maybe_diag_overlap): Remove assertion.
20914 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20915 * gimple-ssa-sprintf.c (format_directive): Same.
20916 (parse_directive): Same.
20917 (sprintf_dom_walker::compute_format_length): Same.
20918 (try_substitute_return_value): Same.
20919
20920 2018-01-03 Jeff Law <law@redhat.com>
20921
20922 PR middle-end/83654
20923 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20924 non-constant residual for zero at runtime and avoid probing in
20925 that case. Reorganize code for trailing problem to mirror handling
20926 of the residual.
20927
20928 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20929
20930 PR tree-optimization/83501
20931 * tree-ssa-strlen.c (get_string_cst): New.
20932 (handle_char_store): Call get_string_cst.
20933
20934 2018-01-03 Martin Liska <mliska@suse.cz>
20935
20936 PR tree-optimization/83593
20937 * tree-ssa-strlen.c: Include tree-cfg.h.
20938 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20939 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20940 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20941 to false.
20942 (strlen_dom_walker::before_dom_children): Call
20943 gimple_purge_dead_eh_edges. Dump tranformation with details
20944 dump flags.
20945 (strlen_dom_walker::before_dom_children): Update call by adding
20946 new argument cleanup_eh.
20947 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20948
20949 2018-01-03 Martin Liska <mliska@suse.cz>
20950
20951 PR ipa/83549
20952 * cif-code.def (VARIADIC_THUNK): New enum value.
20953 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20954 thunks.
20955
20956 2018-01-03 Jan Beulich <jbeulich@suse.com>
20957
20958 * sse.md (mov<mode>_internal): Tighten condition for when to use
20959 vmovdqu<ssescalarsize> for TI and OI modes.
20960
20961 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20962
20963 Update copyright years.
20964
20965 2018-01-03 Martin Liska <mliska@suse.cz>
20966
20967 PR ipa/83594
20968 * ipa-visibility.c (function_and_variable_visibility): Skip
20969 functions with noipa attribure.
20970
20971 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20972
20973 * gcc.c (process_command): Update copyright notice dates.
20974 * gcov-dump.c (print_version): Ditto.
20975 * gcov.c (print_version): Ditto.
20976 * gcov-tool.c (print_version): Ditto.
20977 * gengtype.c (create_file): Ditto.
20978 * doc/cpp.texi: Bump @copying's copyright year.
20979 * doc/cppinternals.texi: Ditto.
20980 * doc/gcc.texi: Ditto.
20981 * doc/gccint.texi: Ditto.
20982 * doc/gcov.texi: Ditto.
20983 * doc/install.texi: Ditto.
20984 * doc/invoke.texi: Ditto.
20985
20986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20987
20988 * vector-builder.h (vector_builder::m_full_nelts): Change from
20989 unsigned int to poly_uint64.
20990 (vector_builder::full_nelts): Update prototype accordingly.
20991 (vector_builder::new_vector): Likewise.
20992 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20993 (vector_builder::operator ==): Likewise.
20994 (vector_builder::finalize): Likewise.
20995 * int-vector-builder.h (int_vector_builder::int_vector_builder):
20996 Take the number of elements as a poly_uint64 rather than an
20997 unsigned int.
20998 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20999 from unsigned int to poly_uint64.
21000 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21001 (vec_perm_indices::new_vector): Likewise.
21002 (vec_perm_indices::length): Likewise.
21003 (vec_perm_indices::nelts_per_input): Likewise.
21004 (vec_perm_indices::input_nelts): Likewise.
21005 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21006 number of elements per input as a poly_uint64 rather than an
21007 unsigned int. Use the original encoding for variable-length
21008 vectors, rather than clamping each individual element.
21009 For the second and subsequent elements in each pattern,
21010 clamp the step and base before clamping their sum.
21011 (vec_perm_indices::series_p): Handle polynomial element counts.
21012 (vec_perm_indices::all_in_range_p): Likewise.
21013 (vec_perm_indices_to_tree): Likewise.
21014 (vec_perm_indices_to_rtx): Likewise.
21015 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21016 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21017 (tree_vector_builder::new_binary_operation): Handle polynomial
21018 element counts. Return false if we need to know the number
21019 of elements at compile time.
21020 * fold-const.c (fold_vec_perm): Punt if the number of elements
21021 isn't known at compile time.
21022
21023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21024
21025 * vec-perm-indices.h (vec_perm_builder): Change element type
21026 from HOST_WIDE_INT to poly_int64.
21027 (vec_perm_indices::element_type): Update accordingly.
21028 (vec_perm_indices::clamp): Handle polynomial element_types.
21029 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21030 (vec_perm_indices::all_in_range_p): Likewise.
21031 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21032 than shwi trees.
21033 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21034 polynomial vec_perm_indices element types.
21035 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21036 * fold-const.c (fold_vec_perm): Likewise.
21037 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21038 * tree-vect-generic.c (lower_vec_perm): Likewise.
21039 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21040 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21041 element type to HOST_WIDE_INT.
21042
21043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21044 Alan Hayward <alan.hayward@arm.com>
21045 David Sherwood <david.sherwood@arm.com>
21046
21047 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21048 rather than an int. Use plus_constant.
21049 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21050 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21051
21052 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21053 Alan Hayward <alan.hayward@arm.com>
21054 David Sherwood <david.sherwood@arm.com>
21055
21056 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21057 a HOST_WIDE_INT to a poly_int64.
21058
21059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21060 Alan Hayward <alan.hayward@arm.com>
21061 David Sherwood <david.sherwood@arm.com>
21062
21063 * calls.c (load_register_parameters): Cope with polynomial
21064 mode sizes. Require a constant size for BLKmode parameters
21065 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21066 forces a parameter to be padded at the lsb end in order to
21067 fill a complete number of words, require the parameter size
21068 to be ordered wrt UNITS_PER_WORD.
21069
21070 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21071 Alan Hayward <alan.hayward@arm.com>
21072 David Sherwood <david.sherwood@arm.com>
21073
21074 * reload1.c (spill_stack_slot_width): Change element type
21075 from unsigned int to poly_uint64_pod.
21076 (alter_reg): Treat mode sizes as polynomial.
21077
21078 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21079 Alan Hayward <alan.hayward@arm.com>
21080 David Sherwood <david.sherwood@arm.com>
21081
21082 * reload.c (complex_word_subreg_p): New function.
21083 (reload_inner_reg_of_subreg, push_reload): Use it.
21084
21085 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21086 Alan Hayward <alan.hayward@arm.com>
21087 David Sherwood <david.sherwood@arm.com>
21088
21089 * lra-constraints.c (process_alt_operands): Reject matched
21090 operands whose sizes aren't ordered.
21091 (match_reload): Refer to this check here.
21092
21093 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21094 Alan Hayward <alan.hayward@arm.com>
21095 David Sherwood <david.sherwood@arm.com>
21096
21097 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21098 that the mode size is in the set {1, 2, 4, 8, 16}.
21099
21100 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21101 Alan Hayward <alan.hayward@arm.com>
21102 David Sherwood <david.sherwood@arm.com>
21103
21104 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21105 Use plus_constant instead of gen_rtx_PLUS.
21106
21107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21108 Alan Hayward <alan.hayward@arm.com>
21109 David Sherwood <david.sherwood@arm.com>
21110
21111 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21112 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21113 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21114 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21115 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21116 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21117 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21118 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21119 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21120 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21121 a poly_int64.
21122 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21123 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21124 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21125 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21126 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21127 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21128 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21129 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21130 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21131 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21132 function.
21133 * expr.c (emit_move_resolve_push): Treat the input and result
21134 of PUSH_ROUNDING as a poly_int64.
21135 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21136 (emit_push_insn): Likewise.
21137 * lra-eliminations.c (mark_not_eliminable): Likewise.
21138 * recog.c (push_operand): Likewise.
21139 * reload1.c (elimination_effects): Likewise.
21140 * rtlanal.c (nonzero_bits1): Likewise.
21141 * calls.c (store_one_arg): Likewise. Require the padding to be
21142 known at compile time.
21143
21144 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21145 Alan Hayward <alan.hayward@arm.com>
21146 David Sherwood <david.sherwood@arm.com>
21147
21148 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21149 Use plus_constant instead of gen_rtx_PLUS.
21150
21151 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21152 Alan Hayward <alan.hayward@arm.com>
21153 David Sherwood <david.sherwood@arm.com>
21154
21155 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21156 rather than an int.
21157
21158 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21159 Alan Hayward <alan.hayward@arm.com>
21160 David Sherwood <david.sherwood@arm.com>
21161
21162 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21163 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21164 via stack temporaries. Treat the mode size as polynomial too.
21165
21166 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21167 Alan Hayward <alan.hayward@arm.com>
21168 David Sherwood <david.sherwood@arm.com>
21169
21170 * expr.c (expand_expr_real_2): When handling conversions involving
21171 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21172 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
21173 as a poly_uint64 too.
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 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21180
21181 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21182 Alan Hayward <alan.hayward@arm.com>
21183 David Sherwood <david.sherwood@arm.com>
21184
21185 * combine.c (can_change_dest_mode): Handle polynomial
21186 REGMODE_NATURAL_SIZE.
21187 * expmed.c (store_bit_field_1): Likewise.
21188 * expr.c (store_constructor): Likewise.
21189 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21190 and polynomial REGMODE_NATURAL_SIZE.
21191 (gen_lowpart_common): Likewise.
21192 * reginfo.c (record_subregs_of_mode): Likewise.
21193 * rtlanal.c (read_modify_subreg_p): Likewise.
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 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21200 numbers of elements.
21201
21202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21203 Alan Hayward <alan.hayward@arm.com>
21204 David Sherwood <david.sherwood@arm.com>
21205
21206 * match.pd: Cope with polynomial numbers of vector elements.
21207
21208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21209 Alan Hayward <alan.hayward@arm.com>
21210 David Sherwood <david.sherwood@arm.com>
21211
21212 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21213 in a POINTER_PLUS_EXPR.
21214
21215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21216 Alan Hayward <alan.hayward@arm.com>
21217 David Sherwood <david.sherwood@arm.com>
21218
21219 * omp-simd-clone.c (simd_clone_subparts): New function.
21220 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21221 (ipa_simd_modify_function_body): Likewise.
21222
21223 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21224 Alan Hayward <alan.hayward@arm.com>
21225 David Sherwood <david.sherwood@arm.com>
21226
21227 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21228 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21229 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21230 (expand_vector_condition, vector_element): Likewise.
21231 (subparts_gt): New function.
21232 (get_compute_type): Use subparts_gt.
21233 (count_type_subparts): Delete.
21234 (expand_vector_operations_1): Use subparts_gt instead of
21235 count_type_subparts.
21236
21237 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21238 Alan Hayward <alan.hayward@arm.com>
21239 David Sherwood <david.sherwood@arm.com>
21240
21241 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21242 (vect_compile_time_alias): ...this new function. Do the calculation
21243 on poly_ints rather than trees.
21244 (vect_prune_runtime_alias_test_list): Update call accordingly.
21245
21246 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21247 Alan Hayward <alan.hayward@arm.com>
21248 David Sherwood <david.sherwood@arm.com>
21249
21250 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21251 numbers of units.
21252 (vect_schedule_slp_instance): Likewise.
21253
21254 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21255 Alan Hayward <alan.hayward@arm.com>
21256 David Sherwood <david.sherwood@arm.com>
21257
21258 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21259 constant and extern definitions for variable-length vectors.
21260 (vect_get_constant_vectors): Note that the number of units
21261 is known to be constant.
21262
21263 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21264 Alan Hayward <alan.hayward@arm.com>
21265 David Sherwood <david.sherwood@arm.com>
21266
21267 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21268 of units as polynomial. Choose between WIDE and NARROW based
21269 on multiple_p.
21270
21271 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21272 Alan Hayward <alan.hayward@arm.com>
21273 David Sherwood <david.sherwood@arm.com>
21274
21275 * tree-vect-stmts.c (simd_clone_subparts): New function.
21276 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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-stmts.c (vectorizable_call): Treat the number of
21283 vectors as polynomial. Use build_index_vector for
21284 IFN_GOMP_SIMD_LANE.
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-stmts.c (get_load_store_type): Treat the number of
21291 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21292 for variable-length vectors.
21293 (vectorizable_mask_load_store): Treat the number of units as
21294 polynomial, asserting that it is constant if the condition has
21295 already been enforced.
21296 (vectorizable_store, vectorizable_load): Likewise.
21297
21298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21299 Alan Hayward <alan.hayward@arm.com>
21300 David Sherwood <david.sherwood@arm.com>
21301
21302 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21303 of units as polynomial. Punt if we can't tell at compile time
21304 which vector contains the final result.
21305
21306 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21307 Alan Hayward <alan.hayward@arm.com>
21308 David Sherwood <david.sherwood@arm.com>
21309
21310 * tree-vect-loop.c (vectorizable_induction): Treat the number
21311 of units as polynomial. Punt on SLP inductions. Use an integer
21312 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21313 cast of such a series for variable-length floating-point
21314 reductions.
21315
21316 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21317 Alan Hayward <alan.hayward@arm.com>
21318 David Sherwood <david.sherwood@arm.com>
21319
21320 * tree.h (build_index_vector): Declare.
21321 * tree.c (build_index_vector): New function.
21322 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21323 of units as polynomial, forcibly converting it to a constant if
21324 vectorizable_reduction has already enforced the condition.
21325 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21326 to create a {1,2,3,...} vector.
21327 (vectorizable_reduction): Treat the number of units as polynomial.
21328 Choose vectype_in based on the largest scalar element size rather
21329 than the smallest number of units. Enforce the restrictions
21330 relied on above.
21331
21332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21333 Alan Hayward <alan.hayward@arm.com>
21334 David Sherwood <david.sherwood@arm.com>
21335
21336 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21337 number of units as polynomial.
21338
21339 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21340 Alan Hayward <alan.hayward@arm.com>
21341 David Sherwood <david.sherwood@arm.com>
21342
21343 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21344 * target.def (autovectorize_vector_sizes): Return the vector sizes
21345 by pointer, using vector_sizes rather than a bitmask.
21346 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21347 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21348 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21349 Likewise.
21350 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21351 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21352 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21353 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21354 * omp-general.c (omp_max_vf): Likewise.
21355 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21356 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21357 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21358 * tree-vect-slp.c (vect_slp_bb): Likewise.
21359 * doc/tm.texi: Regenerate.
21360 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21361 to a poly_uint64.
21362 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21363 the vector size as a poly_uint64 rather than an unsigned int.
21364 (current_vector_size): Change from an unsigned int to a poly_uint64.
21365 (get_vectype_for_scalar_type): Update accordingly.
21366 * tree.h (build_truth_vector_type): Take the size and number of
21367 units as a poly_uint64 rather than an unsigned int.
21368 (build_vector_type): Add a temporary overload that takes
21369 the number of units as a poly_uint64 rather than an unsigned int.
21370 * tree.c (make_vector_type): Likewise.
21371 (build_truth_vector_type): Take the number of units as a poly_uint64
21372 rather than an unsigned int.
21373
21374 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21375 Alan Hayward <alan.hayward@arm.com>
21376 David Sherwood <david.sherwood@arm.com>
21377
21378 * target.def (get_mask_mode): Take the number of units and length
21379 as poly_uint64s rather than unsigned ints.
21380 * targhooks.h (default_get_mask_mode): Update accordingly.
21381 * targhooks.c (default_get_mask_mode): Likewise.
21382 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21383 * doc/tm.texi: Regenerate.
21384
21385 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21386 Alan Hayward <alan.hayward@arm.com>
21387 David Sherwood <david.sherwood@arm.com>
21388
21389 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21390 * omp-general.c (omp_max_vf): Likewise.
21391 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21392 (expand_omp_simd): Handle polynomial safelen.
21393 * omp-low.c (omplow_simd_context): Add a default constructor.
21394 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21395 (lower_rec_simd_input_clauses): Update accordingly.
21396 (lower_rec_input_clauses): Likewise.
21397
21398 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21399 Alan Hayward <alan.hayward@arm.com>
21400 David Sherwood <david.sherwood@arm.com>
21401
21402 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21403 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21404 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21405 (vect_analyze_slp_cost): Likewise.
21406 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21407 (vect_model_load_cost): Likewise.
21408
21409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21410 Alan Hayward <alan.hayward@arm.com>
21411 David Sherwood <david.sherwood@arm.com>
21412
21413 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21414 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21415 from an unsigned int * to a poly_uint64_pod *.
21416 (calculate_unrolling_factor): New function.
21417 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21418
21419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21420 Alan Hayward <alan.hayward@arm.com>
21421 David Sherwood <david.sherwood@arm.com>
21422
21423 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21424 from an unsigned int to a poly_uint64.
21425 (_loop_vec_info::slp_unrolling_factor): Likewise.
21426 (_loop_vec_info::vectorization_factor): Change from an int
21427 to a poly_uint64.
21428 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21429 (vect_get_num_vectors): New function.
21430 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21431 (vect_get_num_copies): Use vect_get_num_vectors.
21432 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21433 to an unsigned int *.
21434 (vect_analyze_data_refs): Change min_vf from an int * to a
21435 poly_uint64 *.
21436 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21437 than an unsigned HOST_WIDE_INT.
21438 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21439 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21440 to an unsigned int *.
21441 (vect_analyze_data_ref_dependences): Likewise.
21442 (vect_compute_data_ref_alignment): Handle polynomial vf.
21443 (vect_enhance_data_refs_alignment): Likewise.
21444 (vect_prune_runtime_alias_test_list): Likewise.
21445 (vect_shift_permute_load_chain): Likewise.
21446 (vect_supportable_dr_alignment): Likewise.
21447 (dependence_distance_ge_vf): Take the vectorization factor as a
21448 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21449 (vect_analyze_data_refs): Change min_vf from an int * to a
21450 poly_uint64 *.
21451 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21452 vfm1 as a poly_uint64 rather than an int. Make the same change
21453 for the returned bound_scalar.
21454 (vect_gen_vector_loop_niters): Handle polynomial vf.
21455 (vect_do_peeling): Likewise. Update call to
21456 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21457 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21458 be constant.
21459 * tree-vect-loop.c (vect_determine_vectorization_factor)
21460 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21461 (vect_get_known_peeling_cost): Likewise.
21462 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21463 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21464 (vect_transform_loop): Likewise. Use the lowest possible VF when
21465 updating the upper bounds of the loop.
21466 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21467 rather than an int.
21468 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21469 polynomial unroll factors.
21470 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21471 (vect_make_slp_decision): Likewise.
21472 (vect_supported_load_permutation_p): Likewise, and polynomial
21473 vf too.
21474 (vect_analyze_slp_cost): Handle polynomial vf.
21475 (vect_slp_analyze_node_operations): Likewise.
21476 (vect_slp_analyze_bb_1): Likewise.
21477 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21478 than an unsigned HOST_WIDE_INT.
21479 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21480 (vectorizable_load): Handle polynomial vf.
21481 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21482 a poly_uint64.
21483 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21484
21485 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21486 Alan Hayward <alan.hayward@arm.com>
21487 David Sherwood <david.sherwood@arm.com>
21488
21489 * match.pd: Handle bit operations involving three constants
21490 and try to fold one pair.
21491
21492 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21493
21494 * tree-vect-loop-manip.c: Include gimple-fold.h.
21495 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21496 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21497 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21498 Add a path that uses a step of VF instead of 1, but disable it
21499 for now.
21500 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21501 and niters_no_overflow parameters. Update calls to
21502 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21503 Create a new SSA name if the latter choses to use a ste other
21504 than zero, and return it via niters_vector_mult_vf_var.
21505 * tree-vect-loop.c (vect_transform_loop): Update calls to
21506 vect_do_peeling, vect_gen_vector_loop_niters and
21507 slpeel_make_loop_iterate_ntimes.
21508 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21509 (vect_gen_vector_loop_niters): Update declarations after above changes.
21510
21511 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21512
21513 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21514 128-bit round to integer instructions.
21515 (ceil<mode>2): Likewise.
21516 (btrunc<mode>2): Likewise.
21517 (round<mode>2): Likewise.
21518
21519 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21520
21521 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21522 unaligned VSX load/store on P8/P9.
21523 (expand_block_clear): Allow the use of unaligned VSX
21524 load/store on P8/P9.
21525
21526 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21527
21528 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21529 New function.
21530 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21531 swap associated with both a load and a store.
21532
21533 2018-01-02 Andrew Waterman <andrew@sifive.com>
21534
21535 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21536 * config/riscv/riscv.md (clear_cache): Use it.
21537
21538 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21539
21540 * web.c: Remove out-of-date comment.
21541
21542 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21543
21544 * expr.c (fixup_args_size_notes): Check that any existing
21545 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21546 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21547 (emit_single_push_insn): ...here.
21548
21549 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21550
21551 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21552 (const_vector_encoded_nelts): New function.
21553 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21554 (const_vector_int_elt, const_vector_elt): Declare.
21555 * emit-rtl.c (const_vector_int_elt_1): New function.
21556 (const_vector_elt): Likewise.
21557 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21558 of CONST_VECTOR_ELT.
21559
21560 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21561
21562 * expr.c: Include rtx-vector-builder.h.
21563 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21564 directly on the tree encoding.
21565 (const_vector_from_tree): Likewise.
21566 * optabs.c: Include rtx-vector-builder.h.
21567 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21568 sequence of "u" values.
21569 * vec-perm-indices.c: Include rtx-vector-builder.h.
21570 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21571 directly on the vec_perm_indices encoding.
21572
21573 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21574
21575 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21576 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21577 * rtx-vector-builder.h: New file.
21578 * rtx-vector-builder.c: Likewise.
21579 * rtl.h (rtx_def::u2): Add a const_vector field.
21580 (CONST_VECTOR_NPATTERNS): New macro.
21581 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21582 (CONST_VECTOR_DUPLICATE_P): Likewise.
21583 (CONST_VECTOR_STEPPED_P): Likewise.
21584 (CONST_VECTOR_ENCODED_ELT): Likewise.
21585 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21586 (unwrap_const_vec_duplicate): Likewise.
21587 (const_vec_series_p): Check for a non-duplicated vector encoding.
21588 Say that the function only returns true for integer vectors.
21589 * emit-rtl.c: Include rtx-vector-builder.h.
21590 (gen_const_vec_duplicate_1): Delete.
21591 (gen_const_vector): Call gen_const_vec_duplicate instead of
21592 gen_const_vec_duplicate_1.
21593 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21594 (gen_const_vec_duplicate): Use rtx_vector_builder.
21595 (gen_const_vec_series): Likewise.
21596 (gen_rtx_CONST_VECTOR): Likewise.
21597 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21598 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21599 Build a new vector rather than modifying a CONST_VECTOR in-place.
21600 (handle_special_swappables): Update call accordingly.
21601 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21602 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21603 Build a new vector rather than modifying a CONST_VECTOR in-place.
21604 (handle_special_swappables): Update call accordingly.
21605
21606 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21607
21608 * simplify-rtx.c (simplify_const_binary_operation): Use
21609 CONST_VECTOR_ELT instead of XVECEXP.
21610
21611 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21612
21613 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21614 the selector elements to be different from the data elements
21615 if the selector is a VECTOR_CST.
21616 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21617 ssizetype for the selector.
21618
21619 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21620
21621 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21622 before testing each element individually.
21623 * tree-vect-generic.c (lower_vec_perm): Likewise.
21624
21625 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21626
21627 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21628 * selftest-run-tests.c (selftest::run_tests): Call it.
21629 * vector-builder.h (vector_builder::operator ==): New function.
21630 (vector_builder::operator !=): Likewise.
21631 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21632 (vec_perm_indices::all_from_input_p): New function.
21633 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21634 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21635 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21636 instead of reading the VECTOR_CST directly. Detect whether both
21637 vector inputs are the same before constructing the vec_perm_indices,
21638 and update the number of inputs argument accordingly. Use the
21639 utility functions added above. Only construct sel2 if we need to.
21640
21641 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21642
21643 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21644 the broadcast of the low byte.
21645 (expand_mult_highpart): Use an explicit encoding for the permutes.
21646 * optabs-query.c (can_mult_highpart_p): Likewise.
21647 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21648 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21649 (vectorizable_bswap): Likewise.
21650 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21651 explicit encoding for the power-of-2 permutes.
21652 (vect_permute_store_chain): Likewise.
21653 (vect_grouped_load_supported): Likewise.
21654 (vect_permute_load_chain): Likewise.
21655
21656 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21657
21658 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21659 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21660 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21661 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21662 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21663 (vect_gen_perm_mask_any): Likewise.
21664
21665 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21666
21667 * int-vector-builder.h: New file.
21668 * vec-perm-indices.h: Include int-vector-builder.h.
21669 (vec_perm_indices): Redefine as an int_vector_builder.
21670 (auto_vec_perm_indices): Delete.
21671 (vec_perm_builder): Redefine as a stand-alone class.
21672 (vec_perm_indices::vec_perm_indices): New function.
21673 (vec_perm_indices::clamp): Likewise.
21674 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21675 (vec_perm_indices::new_vector): New function.
21676 (vec_perm_indices::new_expanded_vector): Update for new
21677 vec_perm_indices class.
21678 (vec_perm_indices::rotate_inputs): New function.
21679 (vec_perm_indices::all_in_range_p): Operate directly on the
21680 encoded form, without computing elided elements.
21681 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21682 encoding. Update for new vec_perm_indices class.
21683 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21684 the given vec_perm_builder.
21685 (expand_vec_perm_var): Update vec_perm_builder constructor.
21686 (expand_mult_highpart): Use vec_perm_builder instead of
21687 auto_vec_perm_indices.
21688 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21689 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21690 or double series encoding as appropriate.
21691 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21692 vec_perm_indices instead of auto_vec_perm_indices.
21693 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21694 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21695 (vect_permute_store_chain): Likewise.
21696 (vect_grouped_load_supported): Likewise.
21697 (vect_permute_load_chain): Likewise.
21698 (vect_shift_permute_load_chain): Likewise.
21699 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21700 (vect_transform_slp_perm_load): Likewise.
21701 (vect_schedule_slp_instance): Likewise.
21702 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21703 (vectorizable_mask_load_store): Likewise.
21704 (vectorizable_bswap): Likewise.
21705 (vectorizable_store): Likewise.
21706 (vectorizable_load): Likewise.
21707 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21708 vec_perm_indices instead of auto_vec_perm_indices. Use
21709 tree_to_vec_perm_builder to read the vector from a tree.
21710 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21711 vec_perm_builder instead of a vec_perm_indices.
21712 (have_whole_vector_shift): Use vec_perm_builder and
21713 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21714 truncation to calc_vec_perm_mask_for_shift.
21715 (vect_create_epilog_for_reduction): Likewise.
21716 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21717 from auto_vec_perm_indices to vec_perm_indices.
21718 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21719 instead of changing individual elements.
21720 (aarch64_vectorize_vec_perm_const): Use new_vector to install
21721 the vector in d.perm.
21722 * config/arm/arm.c (expand_vec_perm_d::perm): Change
21723 from auto_vec_perm_indices to vec_perm_indices.
21724 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21725 instead of changing individual elements.
21726 (arm_vectorize_vec_perm_const): Use new_vector to install
21727 the vector in d.perm.
21728 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21729 Update vec_perm_builder constructor.
21730 (rs6000_expand_interleave): Likewise.
21731 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21732 (rs6000_expand_interleave): Likewise.
21733
21734 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21735
21736 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21737 to qimode could truncate the indices.
21738 * optabs.c (expand_vec_perm_var): Likewise.
21739
21740 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21741
21742 * Makefile.in (OBJS): Add vec-perm-indices.o.
21743 * vec-perm-indices.h: New file.
21744 * vec-perm-indices.c: Likewise.
21745 * target.h (vec_perm_indices): Replace with a forward class
21746 declaration.
21747 (auto_vec_perm_indices): Move to vec-perm-indices.h.
21748 * optabs.h: Include vec-perm-indices.h.
21749 (expand_vec_perm): Delete.
21750 (selector_fits_mode_p, expand_vec_perm_var): Declare.
21751 (expand_vec_perm_const): Declare.
21752 * target.def (vec_perm_const_ok): Replace with...
21753 (vec_perm_const): ...this new hook.
21754 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21755 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21756 * doc/tm.texi: Regenerate.
21757 * optabs.def (vec_perm_const): Delete.
21758 * doc/md.texi (vec_perm_const): Likewise.
21759 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21760 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21761 expand_vec_perm for constant permutation vectors. Assert that
21762 the mode of variable permutation vectors is the integer equivalent
21763 of the mode that is being permuted.
21764 * optabs-query.h (selector_fits_mode_p): Declare.
21765 * optabs-query.c: Include vec-perm-indices.h.
21766 (selector_fits_mode_p): New function.
21767 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21768 is defined, instead of checking whether the vec_perm_const_optab
21769 exists. Use targetm.vectorize.vec_perm_const instead of
21770 targetm.vectorize.vec_perm_const_ok. Check whether the indices
21771 fit in the vector mode before using a variable permute.
21772 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21773 vec_perm_indices instead of an rtx.
21774 (expand_vec_perm): Replace with...
21775 (expand_vec_perm_const): ...this new function. Take the selector
21776 as a vec_perm_indices rather than an rtx. Also take the mode of
21777 the selector. Update call to shift_amt_for_vec_perm_mask.
21778 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21779 Use vec_perm_indices::new_expanded_vector to expand the original
21780 selector into bytes. Check whether the indices fit in the vector
21781 mode before using a variable permute.
21782 (expand_vec_perm_var): Make global.
21783 (expand_mult_highpart): Use expand_vec_perm_const.
21784 * fold-const.c: Includes vec-perm-indices.h.
21785 * tree-ssa-forwprop.c: Likewise.
21786 * tree-vect-data-refs.c: Likewise.
21787 * tree-vect-generic.c: Likewise.
21788 * tree-vect-loop.c: Likewise.
21789 * tree-vect-slp.c: Likewise.
21790 * tree-vect-stmts.c: Likewise.
21791 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21792 Delete.
21793 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21794 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21795 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21796 (aarch64_vectorize_vec_perm_const): ...this new function.
21797 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21798 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21799 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21800 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21801 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21802 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21803 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21804 into...
21805 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
21806 check for NEON modes.
21807 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21808 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21809 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21810 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21811 into...
21812 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21813 the old VEC_PERM_CONST conditions.
21814 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21815 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21816 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21817 (ia64_vectorize_vec_perm_const_ok): Merge into...
21818 (ia64_vectorize_vec_perm_const): ...this new function.
21819 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21820 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21821 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21822 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21823 * config/mips/mips.c (mips_expand_vec_perm_const)
21824 (mips_vectorize_vec_perm_const_ok): Merge into...
21825 (mips_vectorize_vec_perm_const): ...this new function.
21826 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21827 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21828 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21829 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21830 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21831 (rs6000_expand_vec_perm_const): Delete.
21832 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21833 Delete.
21834 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21835 (altivec_expand_vec_perm_const_le): Take each operand individually.
21836 Operate on constant selectors rather than rtxes.
21837 (altivec_expand_vec_perm_const): Likewise. Update call to
21838 altivec_expand_vec_perm_const_le.
21839 (rs6000_expand_vec_perm_const): Delete.
21840 (rs6000_vectorize_vec_perm_const_ok): Delete.
21841 (rs6000_vectorize_vec_perm_const): New function.
21842 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21843 an element count and rtx array.
21844 (rs6000_expand_extract_even): Update call accordingly.
21845 (rs6000_expand_interleave): Likewise.
21846 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21847 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21848 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21849 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21850 (rs6000_expand_vec_perm_const): Delete.
21851 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21852 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21853 (altivec_expand_vec_perm_const_le): Take each operand individually.
21854 Operate on constant selectors rather than rtxes.
21855 (altivec_expand_vec_perm_const): Likewise. Update call to
21856 altivec_expand_vec_perm_const_le.
21857 (rs6000_expand_vec_perm_const): Delete.
21858 (rs6000_vectorize_vec_perm_const_ok): Delete.
21859 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21860 reference to the SPE evmerge intructions.
21861 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21862 an element count and rtx array.
21863 (rs6000_expand_extract_even): Update call accordingly.
21864 (rs6000_expand_interleave): Likewise.
21865 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21866 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21867 new function.
21868 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21869
21870 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21871
21872 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21873 vector mode and that that mode matches the mode of the data
21874 being permuted.
21875 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21876 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21877 directly using expand_vec_perm_1 when forcing selectors into
21878 registers.
21879 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21880
21881 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21882
21883 * optabs-query.h (can_vec_perm_p): Delete.
21884 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21885 * optabs-query.c (can_vec_perm_p): Split into...
21886 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21887 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21888 particular selector is valid.
21889 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21890 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21891 (vect_grouped_load_supported): Likewise.
21892 (vect_shift_permute_load_chain): Likewise.
21893 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21894 (vect_transform_slp_perm_load): Likewise.
21895 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21896 (vectorizable_bswap): Likewise.
21897 (vect_gen_perm_mask_checked): Likewise.
21898 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21899 implementations of variable permutation vectors into account
21900 when deciding which selector to use.
21901 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21902 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21903 with a false third argument.
21904 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21905 to test whether the constant selector is valid and can_vec_perm_var_p
21906 to test whether a variable selector is valid.
21907
21908 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21909
21910 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21911 * optabs-query.c (can_vec_perm_p): Likewise.
21912 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21913 instead of vec_perm_indices.
21914 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21915 (vect_gen_perm_mask_checked): Likewise,
21916 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21917 (vect_gen_perm_mask_checked): Likewise,
21918
21919 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21920
21921 * optabs-query.h (qimode_for_vec_perm): Declare.
21922 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21923 (qimode_for_vec_perm): ...this new function.
21924 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21925
21926 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21927
21928 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21929 does not have a conditional at the top.
21930
21931 2018-01-02 Richard Biener <rguenther@suse.de>
21932
21933 * ipa-inline.c (big_speedup_p): Fix expression.
21934
21935 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21936
21937 PR target/81616
21938 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21939 for generic 4->6.
21940
21941 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21942
21943 PR target/81616
21944 Generic tuning.
21945 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21946 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21947 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21948 cond_taken_branch_cost 3->4.
21949
21950 2018-01-01 Jakub Jelinek <jakub@redhat.com>
21951
21952 PR tree-optimization/83581
21953 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21954 TODO_cleanup_cfg if any changes have been made.
21955
21956 PR middle-end/83608
21957 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21958 convert_modes if target mode has the right side, but different mode
21959 class.
21960
21961 PR middle-end/83609
21962 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21963 last argument when extracting from CONCAT. If either from_real or
21964 from_imag is NULL, use expansion through memory. If result is not
21965 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21966 the parts directly to inner mode, if even that fails, use expansion
21967 through memory.
21968
21969 PR middle-end/83623
21970 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21971 check for bswap in mode rather than HImode and use that in expand_unop
21972 too.
21973 \f
21974 Copyright (C) 2018 Free Software Foundation, Inc.
21975
21976 Copying and distribution of this file, with or without modification,
21977 are permitted in any medium without royalty provided the copyright
21978 notice and this notice are preserved.