1 2018-08-01 Martin Liska <mliska@suse.cz>
4 * value-prof.c (interesting_stringop_to_profile_p):
5 Simplify the code and add BUILT_IN_MEMMOVE.
6 (gimple_stringops_transform): Likewise.
8 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
10 * config/aarch64/aarch64-simd.md
11 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
12 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
13 use GPI iterator instead of SI mode.
15 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
17 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
18 rs6000_speculation_barrier.
19 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
20 new barrier pattern name.
22 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
24 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
25 (speculation_barrier): New insn.
27 2018-08-01 Richard Biener <rguenther@suse.de>
30 * graphite.h: Include isl/id.h and isl/space.h to allow build
33 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
36 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
37 mode for COFF targets.
38 * defaults.h (TARGET_COFF): Define.
39 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
41 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
42 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
43 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
45 2018-07-31 Alexandre Oliva <oliva@adacore.com>
47 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
48 * gimple-streamer-out.c (output_bb): Save it.
49 * lto-streamer-in.c (input_struct_function_base): Restore
50 instance discriminator if available. Create map on demand.
51 * lto-streamer-out.c (output_struct_function_base): Save it if
53 * final.c (decl_to_instance_map): Document LTO strategy.
55 2018-07-31 Alexandre Oliva <oliva@adacore.com>
56 Olivier Hainque <hainque@adacore.com>
58 * debug.h (decl_to_instance_map_t): New type.
59 (decl_to_instance_map): Declare.
60 (maybe_create_decl_to_instance_map): New inline function.
61 * final.c (bb_discriminator, last_bb_discriminator): New statics,
62 to track basic block discriminators.
63 (final_start_function_1): Initialize them.
64 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
66 (decl_to_instance_map): New variable.
67 (map_decl_to_instance, maybe_set_discriminator): New functions.
68 (notice_source_line): Set discriminator.
70 2018-07-31 Ian Lance Taylor <iant@golang.org>
72 * targhooks.c (default_have_speculation_safe_value): Add
75 2018-07-31 David Malcolm <dmalcolm@redhat.com>
77 * dump-context.h: Include "pretty-print.h".
78 (dump_context::refresh_dumps_are_enabled): New decl.
79 (dump_context::emit_item): New decl.
80 (class dump_context): Add fields "m_test_pp" and
82 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
83 (temp_dump_context::get_dumped_text): New decl.
84 (class temp_dump_context): Add field "m_pp".
85 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
86 (dump_context::refresh_dumps_are_enabled): ...and add a test for
88 (set_dump_file): Update for above change.
89 (set_alt_dump_file): Likewise.
90 (dump_loc): New overload, taking a pretty_printer *.
91 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
92 to any test pretty-printer.
93 (make_item_for_dump_gimple_stmt): New function, adapted from
94 optinfo::add_gimple_stmt.
95 (dump_context::dump_gimple_stmt): Call it, and use the result,
96 eliminating the direct usage of dump_file and alt_dump_file in
97 favor of indirectly using them via emit_item.
98 (make_item_for_dump_gimple_expr): New function, adapted from
99 optinfo::add_gimple_expr.
100 (dump_context::dump_gimple_expr): Call it, and use the result,
101 eliminating the direct usage of dump_file and alt_dump_file in
102 favor of indirectly using them via emit_item.
103 (make_item_for_dump_generic_expr): New function, adapted from
105 (dump_context::dump_generic_expr): Call it, and use the result,
106 eliminating the direct usage of dump_file and alt_dump_file in
107 favor of indirectly using them via emit_item.
108 (make_item_for_dump_printf_va): New function, adapted from
109 optinfo::add_printf_va.
110 (make_item_for_dump_printf): New function.
111 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
112 and use the result, eliminating the direct usage of dump_file and
113 alt_dump_file in favor of indirectly using them via emit_item.
114 (make_item_for_dump_dec): New function.
115 (dump_context::dump_dec): Call it, and use the result,
116 eliminating the direct usage of dump_file and alt_dump_file in
117 favor of indirectly using them via emit_item.
118 (make_item_for_dump_symtab_node): New function, adapted from
119 optinfo::add_symtab_node.
120 (dump_context::dump_symtab_node): Call it, and use the result,
121 eliminating the direct usage of dump_file and alt_dump_file in
122 favor of indirectly using them via emit_item.
123 (dump_context::begin_scope): Reimplement, avoiding direct usage
124 of dump_file and alt_dump_file in favor of indirectly using them
126 (dump_context::emit_item): New member function.
127 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
128 Set up test pretty-printer on the underlying context. Call
129 refresh_dumps_are_enabled.
130 (temp_dump_context::~temp_dump_context): Call
131 refresh_dumps_are_enabled.
132 (temp_dump_context::get_dumped_text): New member function.
133 (selftest::verify_dumped_text): New function.
134 (ASSERT_DUMPED_TEXT_EQ): New macro.
135 (selftest::test_capture_of_dump_calls): Run all tests twice, with
136 and then without optinfo enabled. Add uses of
137 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
138 * dumpfile.h: Update comment for the dump_* API.
139 * optinfo-emit-json.cc
140 (selftest::test_building_json_from_dump_calls): Update for new
141 param for temp_dump_context ctor.
142 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
144 (optinfo_item::~optinfo_item): Likewise.
145 (optinfo::add_item): New member function.
146 (optinfo::emit): Update comment.
147 (optinfo::add_string): Delete.
148 (optinfo::add_printf): Delete.
149 (optinfo::add_printf_va): Delete.
150 (optinfo::add_gimple_stmt): Delete.
151 (optinfo::add_gimple_expr): Delete.
152 (optinfo::add_tree): Delete.
153 (optinfo::add_symtab_node): Delete.
154 (optinfo::add_dec): Delete.
155 * optinfo.h (class dump_context): New forward decl.
156 (optinfo::add_item): New decl.
157 (optinfo::add_string): Delete.
158 (optinfo::add_printf): Delete.
159 (optinfo::add_printf_va): Delete.
160 (optinfo::add_gimple_stmt): Delete.
161 (optinfo::add_gimple_expr): Delete.
162 (optinfo::add_tree): Delete.
163 (optinfo::add_symtab_node): Delete.
164 (optinfo::add_dec): Delete.
165 (optinfo::add_poly_int): Delete.
166 (optinfo_item::optinfo_item): Remove "owned" param.
167 (class optinfo_item): Remove field "m_owned".
169 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
172 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
173 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
174 requested variable alignment.
175 (expand_one_ssa_partition): Likewise.
176 (expand_one_var): Likewise.
178 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
180 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
181 to speculation_safe_value_not_needed.
183 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
185 * targhooks.h (speculation_safe_value_not_needed): New prototype.
186 * targhooks.c (speculation_safe_value_not_needed): New function.
187 * target.def (have_speculation_safe_value): Update documentation.
188 * doc/tm.texi: Regenerated.
190 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
192 * config/aarch64/iterators.md (ALLI_TI): New iterator.
193 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
195 (despeculate_copy<ALLI:mode>_insn): New insn.
196 (despeculate_copyti_insn): New insn.
197 (despeculate_simple<ALLI:mode>): New insn
198 (despeculate_simpleti): New insn.
199 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
201 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
202 aarch64_speculation_safe_value.
203 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
205 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
207 * config/aarch64/aarch64-speculation.cc: New file.
208 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
209 before pass_reorder_blocks.
210 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
212 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
213 X14 and X15 when tracking speculation.
214 * config/aarch64/aarch64.md (register name constants): Add
215 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
216 (unspec): Add UNSPEC_SPECULATION_TRACKER.
217 (speculation_barrier): New insn attribute.
218 (cmp<mode>): Allow SP in comparisons.
219 (speculation_tracker): New insn.
220 (speculation_barrier): Add speculation_barrier attribute.
221 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
222 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
223 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
225 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
227 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
228 aarch64_track_speculation is true.
229 (tb<optab><mode>1): Likewise.
230 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
231 generate CB[N]Z when tracking speculation.
232 (aarch64_split_compare_and_swap): Likewise.
233 (aarch64_split_atomic_op): Likewise.
235 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
237 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
239 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
241 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
242 (speculation_barrier): New insn.
244 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
246 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
247 * config/arm/arm.md (speculation_barrier): New expand.
248 (speculation_barrier_insn): New pattern.
250 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
252 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
253 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
254 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
255 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
257 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
258 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
259 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
260 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
261 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
262 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
263 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
264 * builtins.c (expand_speculation_safe_value): New function.
265 (expand_builtin): Call it.
266 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
267 * doc/extend.texi: Document __builtin_speculation_safe_value.
268 * doc/md.texi: Document "speculation_barrier" pattern.
269 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
270 TARGET_HAVE_SPECULATION_SAFE_VALUE.
271 * doc/tm.texi: Regenerated.
272 * target.def (have_speculation_safe_value, speculation_safe_value): New
274 * targhooks.c (default_have_speculation_safe_value): New function.
275 (default_speculation_safe_value): New function.
276 * targhooks.h (default_have_speculation_safe_value): Add prototype.
277 (default_speculation_safe_value): Add prototype.
279 2018-07-31 David Malcolm <dmalcolm@redhat.com>
281 * dump-context.h (dump_context::dump_loc): New decl.
282 * dumpfile.c (dump_context::dump_loc): New member function.
283 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
284 and dump_gimple_stmt.
285 (dump_context::dump_gimple_expr_loc): Likewise, using
287 (dump_context::dump_generic_expr_loc): Likewise, using
289 (dump_context::dump_printf_loc_va): Likewise, using
291 (dump_context::begin_scope): Explicitly using the global function
292 "dump_loc", rather than the member function.
294 2018-07-31 Martin Sebor <msebor@redhat.com>
296 PR tree-optimization/86741
297 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
299 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
301 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
302 depend on whether prefetch instructions will be emitted or not.
303 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
304 will be emitted or not.
305 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
306 (TARGET_SETMEM_PFD): New macros.
308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
310 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
311 (NULL_STMT_VEC_INFO): Delete.
312 (stmt_vec_info::operator*): Likewise.
313 (stmt_vec_info::operator gimple *): Likewise.
314 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
315 of NULL_STMT_VEC_INFO.
316 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
317 (vect_reassociating_reduction_p): Likewise.
318 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
319 (vectorizable_store): Likewise.
320 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
321 (vec_info::free_stmt_vec_infos): Likewise.
323 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
325 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
326 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
328 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
330 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
331 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
332 (vec_info::free_stmt_vec_info): New private member functions.
333 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
334 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
335 * tree-parloops.c (gather_scalar_reductions): Remove calls to
336 set_stmt_vec_info_vec and free_stmt_vec_infos.
337 * tree-vect-loop.c (_loop_vec_info): Remove call to
338 set_stmt_vec_info_vec.
339 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
340 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
341 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
342 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
343 (vec_info::free_stmt_vec_info): ...these new functions. Remove
344 assignments in {vec_info::,}new_stmt_vec_info that are redundant
345 with the clearing in the xcalloc.
346 (stmt_vec_info_vec): Delete.
347 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
348 (vectorize_loops): Likewise.
349 (vec_info::~vec_info): Remove argument from call to
351 (vec_info::add_stmt): Remove vinfo argument from call to
354 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
356 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
357 rather than a gimple stmt.
358 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
359 information for pattern statements when passed the original
360 statement; instead wait to be passed the pattern statement itself.
361 Don't call set_vinfo_for_stmt here.
362 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
363 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
365 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
366 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
367 stmt_vec_infos entry.
369 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
371 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
372 * tree-vectorizer.c (vec_info::replace_stmt): New function.
373 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
374 * tree-vect-stmts.c (vectorizable_call): Likewise.
375 (vectorizable_simd_clone_call): Likewise.
377 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
379 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
380 * tree-vectorizer.c (vec_info::remove_stmt): New function.
381 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
382 * tree-vect-loop.c (vect_transform_loop): Likewise.
383 * tree-vect-slp.c (vect_schedule_slp): Likewise.
384 * tree-vect-stmts.c (vect_remove_stores): Likewise.
386 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
388 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
389 (vect_dr_stmt): Delete.
390 * tree-vectorizer.c (vec_info::lookup_dr): New function.
391 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
393 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
394 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
395 (vect_verify_datarefs_alignment, vect_peeling_supportable)
396 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
397 (vect_analyze_data_refs): Likewise.
398 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
400 (vect_find_same_alignment_drs): Likewise.
401 (vect_slp_analyze_node_dependences): Update calls accordingly.
402 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
403 instead of DR_VECT_AUX.
404 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
405 of a vector data references. Use vec_info::lookup_dr instead of
407 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
408 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
409 instead of DR_VECT_AUX.
411 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
413 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
415 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
417 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
418 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
419 (vect_gen_prolog_loop_niters): Likewise.
421 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
423 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
424 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
425 (vect_known_alignment_in_bytes, vect_dr_behavior)
426 (vect_get_scalar_dr_size): Take references as dr_vec_infos
427 instead of data_references. Update calls to other routines for
428 which the same change has been made.
429 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
430 dr_vec_infos instead of stmt_vec_infos.
431 (vect_analyze_data_ref_dependence): Update call accordingly.
432 (vect_slp_analyze_data_ref_dependence)
433 (vect_record_base_alignments): Use DR_VECT_AUX.
434 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
435 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
436 (vector_alignment_reachable_p, vect_get_data_access_cost)
437 (vect_peeling_supportable, vect_analyze_group_access_1)
438 (vect_analyze_group_access, vect_analyze_data_ref_access)
439 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
440 (vect_compile_time_alias, vect_small_gap_p)
441 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
442 (vect_supportable_dr_alignment): Take references as dr_vec_infos
443 instead of data_references. Update calls to other routines for
444 which the same change has been made.
445 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
446 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
447 (vect_slp_analyze_and_verify_node_alignment)
448 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
449 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
450 (vect_setup_realignment): Use dr_vec_infos. Update calls after
452 (_vect_peel_info::dr): Replace with...
453 (_vect_peel_info::dr_info): ...this new field.
454 (vect_peeling_hash_get_most_frequent)
455 (vect_peeling_hash_choose_best_peeling): Update accordingly.
456 (vect_peeling_hash_get_lowest_cost):
457 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
458 routines for which the same change has been made.
459 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
461 * tree-vect-loop-manip.c (get_misalign_in_elems)
462 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
464 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
465 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
466 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
467 (get_group_load_store_type, get_negative_load_store_type)
468 (vect_get_data_ptr_increment, vectorizable_store)
469 (vectorizable_load): Likewise.
470 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
471 Update calls to other routines for which the same change has been made.
473 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
475 * tree-vectorizer.h (vec_info::move_dr): New member function.
476 (dataref_aux): Rename to...
477 (dr_vec_info): ...this and add "dr" and "stmt" fields.
478 (_stmt_vec_info::dr_aux): Update accordingly.
479 (_stmt_vec_info::data_ref_info): Delete.
480 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
481 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
482 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
483 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
485 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
486 (STMT_VINFO_DR_INFO): New macro.
487 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
488 (set_dr_misalignment): Update after rename of dataref_aux.
489 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
490 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
491 initialization of STMT_VINFO_DATA_REF.
492 * tree-vectorizer.c (vec_info::move_dr): New function.
493 * tree-vect-patterns.c (vect_recog_bool_pattern)
494 (vect_recog_mask_conversion_pattern)
495 (vect_recog_gather_scatter_pattern): Use it.
496 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
497 the "dr" and "stmt" fields of dr_vec_info instead of
500 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
502 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
503 (is_pattern_stmt_p): Use it.
504 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
505 on pattern statements.
507 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
509 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
510 original stmt as a stmt_vec_info rather than a gimple stmt.
511 (vect_pattern_recog_1): Take the statement directly as a
512 stmt_vec_info, rather than via a gimple_stmt_iterator.
513 Update call to vect_mark_pattern_stmts.
514 (vect_pattern_recog): Update calls accordingly.
516 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
518 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
519 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
520 a vect_def_type for the first argument.
521 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
522 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
523 operand if it isn't defined by a vectorized statement.
524 (vect_build_gather_load_calls): Remove the mask_dt argument and
525 update calls to vect_get_vec_def_for_stmt_copy.
526 (vectorizable_bswap): Likewise the dt argument.
527 (vectorizable_call): Update calls to vectorizable_bswap and
528 vect_get_vec_def_for_stmt_copy.
529 (vectorizable_simd_clone_call, vectorizable_assignment)
530 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
531 (vectorizable_comparison): Update calls to
532 vect_get_vec_def_for_stmt_copy.
533 (vectorizable_store): Likewise. Remove now-unnecessary calls to
535 (vect_get_loop_based_defs): Remove dt argument and update call
536 to vect_get_vec_def_for_stmt_copy.
537 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
538 and vect_get_vec_def_for_stmt_copy.
539 (vectorizable_load): Update calls to vect_build_gather_load_calls
540 and vect_get_vec_def_for_stmt_copy.
541 * tree-vect-loop.c (vect_create_epilog_for_reduction)
542 (vectorizable_reduction, vectorizable_live_operation): Update calls
543 to vect_get_vec_def_for_stmt_copy.
545 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
547 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
548 and gimple stmt arguments with a stmt_vec_info.
549 (vect_record_base_alignments): Update calls accordingly.
550 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
551 and gimple stmt arguments with a stmt_vec_info.
552 (vect_build_slp_tree_1): Remove vinfo argument and update call
553 to vect_record_max_nunits.
554 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
555 and vect_record_max_nunits.
557 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
559 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
560 file and take a stmt_vec_info instead of a gimple stmt.
561 (supportable_widening_operation, vect_finish_replace_stmt)
562 (vect_finish_stmt_generation, vect_get_store_rhs)
563 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
564 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
565 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
566 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
567 (vect_create_data_ref_ptr, bump_vector_ptr)
568 (vect_permute_store_chain, vect_setup_realignment)
569 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
570 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
571 (vectorizable_reduction, vectorizable_induction)
572 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
573 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
574 than gimple stmts as arguments.
575 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
576 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
577 (can_group_stmts_p, vect_check_gather_scatter)
578 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
579 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
580 (vect_permute_load_chain, vect_shift_permute_load_chain)
581 (vect_transform_grouped_load)
582 (vect_record_grouped_load_vectors): Likewise.
583 * tree-vect-loop.c (vect_fixup_reduc_chain)
584 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
585 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
586 (vectorizable_reduction, vectorizable_induction)
587 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
588 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
589 (vect_get_load_store_mask): Likewise.
590 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
591 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
592 * tree-vect-stmts.c (vect_mark_relevant)
593 (is_simple_and_all_uses_invariant)
594 (exist_non_indexing_operands_for_use_p, process_use)
595 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
596 (vect_get_vec_def_for_operand, vect_get_vec_defs)
597 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
598 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
599 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
600 (get_negative_load_store_type, get_load_store_type)
601 (vect_check_load_store_mask, vect_check_store_rhs)
602 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
603 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
604 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
605 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
606 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
607 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
608 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
609 (supportable_widening_operation): Likewise.
611 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
613 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
614 a stmt_vec_info instead of a gcall.
615 (vect_check_gather_scatter): Update call accordingly.
616 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
618 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
619 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
620 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
621 instead of a gimple stmt.
622 (vect_transform_loop): Update calls accordingly.
623 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
624 stmt_vec_infos instead of gimple stmts.
625 (vect_analyze_slp_instance): Update use accordingly.
626 * tree-vect-stmts.c (read_vector_array, write_vector_array)
627 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
628 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
629 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
630 (vect_gen_widened_results_half, vect_get_loop_based_defs)
631 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
632 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
635 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
637 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
638 of the worklist from a vector of gimple stmts to a vector of
640 * tree-vect-stmts.c (vect_mark_relevant, process_use)
641 (vect_mark_stmts_to_be_vectorized): Likewise
643 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
645 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
646 statement before passing it to vect_analyze_stmt.
647 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
648 the chain of phi vector definitions. Track the exit phi via its
650 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
651 STMT_VINFO_REDUC_DEF.
652 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
653 stmt_vec_infos to handle the statement chains.
654 (vect_get_slp_defs): Record the first statement in the node
655 using a stmt_vec_info.
656 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
657 statements here and pass their stmt_vec_info down to subroutines.
658 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
659 down to vect_finish_stmt_generation.
660 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
661 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
662 stmt_vec_infos to subroutines.
663 (vect_remove_stores): Use stmt_vec_infos to handle the statement
666 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
668 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
669 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
670 (vect_permute_store_chain, vect_setup_realignment)
671 (vect_permute_load_chain, vect_shift_permute_load_chain)
672 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
673 stmts internally, and when passing values to other vectorizer routines.
674 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
675 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
676 (vect_analyze_loop_operations, get_initial_def_for_reduction)
677 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
678 (vectorizable_reduction, vectorizable_induction)
679 (vectorizable_live_operation, vect_transform_loop_stmt)
680 (vect_transform_loop): Likewise.
681 * tree-vect-patterns.c (vect_reassociating_reduction_p)
682 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
683 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
684 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
685 (vect_slp_analyze_node_operations_1): Likewise.
686 * tree-vect-stmts.c (vect_mark_relevant, process_use)
687 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
688 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
689 (vect_finish_stmt_generation_1, get_group_load_store_type)
690 (get_load_store_type, vect_build_gather_load_calls)
691 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
692 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
693 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
694 (vectorizable_store, vectorizable_load, vectorizable_condition)
695 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
696 (supportable_widening_operation): Likewise.
697 (vect_get_vector_types_for_stmt): Likewise.
698 * tree-vectorizer.h (vect_dr_behavior): Likewise.
700 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
702 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
703 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
704 (vect_permute_store_chain, vect_permute_load_chain)
705 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
706 repeated stmt_vec_info lookups.
707 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
708 (vect_update_ivs_after_vectorizer): Likewise.
709 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
710 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
711 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
712 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
713 (vect_bb_slp_scalar_cost): Likewise.
714 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
716 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
718 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
719 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
720 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
721 to get gassigns and gcalls, rather than operating on generc gimple
723 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
724 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
725 (vectorizable_load, vect_analyze_stmt): Likewise.
726 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
728 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
730 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
731 return stmt_vec_infos rather than gimple stmts. Do not accept
733 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
735 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
736 Update use of get_later_stmt.
737 (vect_get_constant_vectors): Update call accordingly.
738 (vect_schedule_slp_instance): Likewise
739 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
740 (vect_slp_analyze_instance_dependence): Likewise.
741 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
743 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
745 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
746 (stmt_info_for_cost::stmt_info): ...this new field.
747 (add_stmt_costs): Update accordingly.
748 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
749 (vect_get_known_peeling_cost): Likewise.
750 (vect_estimate_min_profitable_iters): Likewise.
751 * tree-vect-stmts.c (record_stmt_cost): Likewise.
753 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
755 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
756 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
757 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
759 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
761 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
763 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
764 a gimple stmt to a stmt_vec_info.
765 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
767 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
769 * tree-vectorizer.h (vec_info::grouped_stores): Change from
770 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
771 (_loop_vec_info::reduction_chains): Likewise.
772 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
774 * tree-vect-slp.c (vect_analyze_slp): Likewise.
776 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
778 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
779 a gimple stmt to a stmt_vec_info.
780 (_stmt_vec_info::next_element): Likewise.
781 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
782 (vect_slp_analyze_and_verify_node_alignment)
783 (vect_analyze_group_access_1, vect_analyze_group_access)
784 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
785 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
786 (vect_supportable_dr_alignment): Update accordingly.
787 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
788 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
789 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
790 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
791 * tree-vect-slp.c (vect_build_slp_tree_1)
792 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
793 (vect_split_slp_store_group, vect_analyze_slp_instance)
794 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
795 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
796 (get_group_load_store_type, get_load_store_type)
797 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
798 (vect_transform_stmt, vect_remove_stores): Likewise.
800 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
802 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
804 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
805 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
806 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
807 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
808 (vector_alignment_reachable_p, vect_get_data_access_cost)
809 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
810 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
811 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
812 (vect_analyze_group_access_1, vect_analyze_group_access)
813 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
814 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
815 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
816 result of vect_dr_stmt and use the stmt_vec_info instead of
817 the associated gimple stmt.
818 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
819 (vect_gen_prolog_loop_niters): Likewise.
820 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
822 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
824 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
825 to a vec<stmt_vec_info>.
826 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
827 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
829 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
830 to a vec<stmt_vec_info>.
831 (bst_traits::value_type, bst_traits::value_type): Likewise.
832 (bst_traits::hash): Update accordingly.
833 (vect_get_and_check_slp_defs): Change the stmts parameter from
834 a vec<gimple *> to a vec<stmt_vec_info>.
835 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
836 (vect_build_slp_tree): Likewise.
837 (vect_build_slp_tree_2): Likewise. Update uses of
838 SLP_TREE_SCALAR_STMTS.
839 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
840 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
841 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
842 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
843 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
844 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
845 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
846 (vect_get_constant_vectors, vect_get_slp_defs)
847 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
848 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
849 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
850 instead of gimple stmts.
851 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
852 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
853 (vect_slp_analyze_instance_dependence): Update uses of
854 SLP_TREE_SCALAR_STMTS.
855 (vect_slp_analyze_and_verify_node_alignment): Likewise.
856 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
857 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
858 (get_initial_defs_for_reduction): Likewise.
859 (vect_create_epilog_for_reduction): Likewise.
860 (vectorize_fold_left_reduction): Likewise.
861 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
862 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
863 (can_vectorize_live_stmts): Likewise.
865 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
867 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
868 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
869 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
871 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
873 (gather_scalar_reductions): Update after above interface changes.
874 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
875 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
877 (vect_force_simple_reduction): Likewise.
878 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
879 LOOP_VINFO_REDUCTIONS.
880 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
882 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
884 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
885 a gimple stmt to a stmt_vec_info.
886 * tree-vect-loop.c (vect_active_double_reduction_p)
887 (vect_force_simple_reduction, vectorizable_reduction): Update
890 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
892 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
893 vec<gimple *> to a vec<stmt_vec_info>.
894 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
895 the reduction_phis argument from a vec<gimple *> to a
897 (vectorizable_reduction): Likewise the phis local variable that
898 is passed to vect_create_epilog_for_reduction. Update for new type
899 of SLP_TREE_VEC_STMTS.
900 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
901 (vectorizable_live_operation): Likewise.
902 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
903 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
905 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
907 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
908 a gimple stmt to a stmt_vec_info.
909 (vectorizable_condition, vectorizable_live_operation)
910 (vectorizable_reduction, vectorizable_induction): Pass back the
911 vectorized statement as a stmt_vec_info.
912 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
913 use of STMT_VINFO_VEC_STMT.
914 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
915 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
916 as stmt_vec_infos rather than gimple stmts.
917 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
919 (vectorizable_live_operation): Likewise.
920 (vectorizable_reduction, vectorizable_induction): Likewise,
921 updating use of STMT_VINFO_VEC_STMT.
922 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
923 of STMT_VINFO_VEC_STMT.
924 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
925 (vectorizable_simd_clone_call, vectorizable_conversion)
926 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
927 (vectorizable_store, vectorizable_load, vectorizable_condition)
928 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
929 from a gimple stmt to a stmt_vec_info.
930 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
931 pointer to a stmt_vec_info to the vectorizable_* routines.
933 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
935 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
936 a gimple stmt to a stmt_vec_info.
937 (is_pattern_stmt_p): Update accordingly.
938 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
939 (vect_record_grouped_load_vectors): Likewise.
940 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
941 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
942 (vect_model_reduction_cost): Likewise.
943 (vect_create_epilog_for_reduction): Likewise.
944 (vectorizable_reduction, vectorizable_induction): Likewise.
945 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
946 Return the stmt_vec_info for the pattern statement.
947 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
948 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
949 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
950 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
951 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
952 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
953 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
954 (free_stmt_vec_info, vect_is_simple_use): Likewise.
956 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
958 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
959 (vect_finish_stmt_generation): Likewise.
960 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
961 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
962 (vect_build_gather_load_calls): Use the return value of the above
963 functions instead of a separate call to vinfo_for_stmt. Use narrow
964 scopes for the input gimple stmt and wider scopes for the associated
965 stmt_vec_info. Use vec_info::lookup_def when setting these
966 stmt_vec_infos from an SSA_NAME definition.
967 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
968 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
969 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
970 (vectorizable_store, vectorizable_load, vectorizable_condition)
971 (vectorizable_comparison): Likewise.
972 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
973 (vectorizable_reduction): Likewise.
975 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
977 * tree-vectorizer.h (vect_is_simple_use): Add an optional
978 stmt_vec_info * parameter before the optional gimple **.
979 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
980 (process_use, vect_get_vec_def_for_operand_1): Update callers.
981 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
982 * tree-vect-loop.c (vectorizable_reduction): Likewise.
983 (vectorizable_live_operation): Likewise.
984 * tree-vect-patterns.c (type_conversion_p): Likewise.
985 (vect_look_through_possible_promotion): Likewise.
986 (vect_recog_rotate_pattern): Likewise.
987 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
989 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
991 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
992 a typedef to a wrapper class.
993 (NULL_STMT_VEC_INFO): New macro.
994 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
995 (stmt_vec_info::operator*): New function.
996 (stmt_vec_info::operator gimple *): Likewise.
997 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
998 (add_stmt_costs): Likewise.
999 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1000 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1001 (vect_get_known_peeling_cost): Likewise.
1002 (vect_estimate_min_profitable_iters): Likewise.
1003 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1004 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1005 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1006 (vectorizable_store, free_stmt_vec_infos): Likewise.
1007 (new_stmt_vec_info): Change return type of xcalloc to
1010 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1012 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1013 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1014 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1015 a single_imm_use-based sequence.
1016 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1018 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1020 * tree-vectorizer.h (vec_info::lookup_def): Declare.
1021 * tree-vectorizer.c (vec_info::lookup_def): New function.
1022 * tree-vect-patterns.c (vect_get_internal_def): Use it.
1023 (vect_widened_op_tree): Likewise.
1024 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1025 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1026 (vectorizable_reduction): Likewise.
1027 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1029 (vect_is_slp_reduction): Update calls accordingly. Use
1030 vec_info::lookup_def.
1031 (vect_is_simple_reduction): Likewise
1032 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1034 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1036 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1037 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1038 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1040 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1041 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1042 (vect_update_vf_for_slp, vect_analyze_loop_operations)
1043 (vect_is_slp_reduction, vectorizable_induction)
1044 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1045 * tree-vect-patterns.c (vect_init_pattern_stmt):
1046 (vect_determine_min_output_precision_1, vect_determine_precisions)
1047 (vect_pattern_recog): Likewise.
1048 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1049 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1050 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1051 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1052 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1053 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
1054 info field from a loop to a loop_vec_info.
1056 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1058 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1059 (vec_info::add_stmt): Declare.
1060 * tree-vectorizer.c (vec_info::add_stmt): New function.
1061 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1062 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1063 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1064 (vectorizable_induction): Likewise.
1065 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1066 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1067 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1068 (vectorizable_load): Likewise.
1069 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1070 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1071 (vect_recog_gather_scatter_pattern): Likewise.
1072 (append_pattern_def_seq): Likewise. Remove a check that is
1073 performed by add_stmt itself.
1075 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1077 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1078 which make_ssa_name was called with new_stmt before new_stmt
1081 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1083 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1085 (vect_is_slp_reduction): ...here...
1086 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1087 that are already known to be false.
1089 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1091 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1092 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1093 STMT_VINFO_NUM_SLP_USES when it's true.
1094 (vect_free_slp_instance): Add a final_p parameter and pass it to
1096 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1097 (vect_analyze_slp_instance): Likewise.
1098 (vect_slp_analyze_operations): Likewise.
1099 (vect_slp_analyze_bb_1): Likewise.
1100 * tree-vectorizer.c (vec_info): Likewise.
1101 * tree-vect-loop.c (vect_transform_loop): Likewise.
1103 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1105 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1106 function is not called for second and subsequent members of
1109 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1111 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1112 cases for nested loops from here to ...
1113 (vect_create_epilog_for_reduction): ...here. Only call
1114 vect_is_simple_use for inner-loop reductions.
1116 2018-07-31 Martin Liska <mliska@suse.cz>
1118 PR gcov-profile/85338
1119 PR gcov-profile/85350
1120 PR gcov-profile/85372
1121 * profile.c (struct location_triplet): New.
1122 (struct location_triplet_hash): Likewise.
1123 (output_location): Do not output a BB that
1124 is already recorded for a line.
1125 (branch_prob): Use streamed_locations.
1127 2018-07-31 Martin Liska <mliska@suse.cz>
1129 PR gcov-profile/85370
1130 * coverage.c (coverage_begin_function): Do not mark target
1131 clones as artificial functions.
1133 2018-07-31 Martin Liska <mliska@suse.cz>
1135 PR gcov-profile/83813
1136 PR gcov-profile/84758
1137 PR gcov-profile/85217
1138 PR gcov-profile/85332
1139 * profile.c (branch_prob): Do not record GOTO expressions
1140 for GIMPLE statements which locations are already streamed.
1142 2018-07-31 Olivier Hainque <hainque@adacore.com>
1144 * gcc.c (handle_spec_function): Accept a soft_matched_part
1145 argument, as do_spec_1. Pass it down to ...
1146 (eval_spec_function): Accept a soft_matched_part argument,
1147 and pass it down to ...
1148 (do_spec_2): Accept a soft_matched_part argument, and pass
1149 it down to do_spec_1.
1150 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1151 (handle_braces): Update call to handle_spec_function.
1152 (driver::set_up_specs): Update calls to do_spec_2.
1153 (compare_debug_dump_opt_spec_function): Likewise.
1154 (compare_debug_self_opt_spec_function): Likewise.
1156 2018-07-31 Olivier Hainque <hainque@adacore.com>
1158 * common.opt (nolibc): New option.
1159 * doc/invoke.texi (Link Options): Document it.
1160 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1161 * config/alpha/linux.h: Likewise.
1162 * config/arc/elf.h: Likewise.
1163 * config/arm/uclinux-elf.h: Likewise.
1164 * config/arm/unknown-elf.h: Likewise.
1165 * config/avr/avrlibc.h: Likewise.
1166 * config/bfin/bfin.h: Likewise.
1167 * config/bfin/linux.h: Likewise.
1168 * config/bfin/uclinux.h: Likewise.
1169 * config/darwin.h: Likewise.
1170 * config/darwin10.h: Likewise.
1171 * config/darwin12.h: Likewise.
1172 * config/gnu-user.h: Likewise.
1173 * config/lm32/uclinux-elf.h: Likewise.
1174 * config/pa/pa-hpux11.h: Likewise.
1175 * config/pa/pa64-hpux.h: Likewise.
1176 * config/sparc/sparc.h: Likewise.
1178 2018-07-31 Olivier Hainque <hainque@adacore.com>
1180 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1181 undefined variables.
1183 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1186 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1189 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1191 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1192 terminated string literal.
1194 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1196 PR rtl-optimization/85160
1197 * combine.c (is_just_move): New function.
1198 (try_combine): Allow combining two instructions into two if neither of
1199 the original instructions was a move.
1201 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
1204 * doc/extend.texi (Global Register Variables): Discourage use of type
1206 (Local Register Variables): Likewise.
1208 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
1210 PR tree-optimization/86506
1211 * hwint.h (ceil_log2): Resync with hwint.c implementation.
1213 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
1216 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1217 hard_regno, make sure no insn between `from` and `to` clobbers it.
1219 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
1220 Tom de Vries <tdevries@suse.de>
1222 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1223 (PTX_DEFAULT_RUNTIME_DIM): ... this.
1224 (nvptx_goacc_validate_dims): Set default worker and gang dims to
1225 PTX_DEFAULT_RUNTIME_DIM.
1226 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1228 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
1230 * config/pa/pa.c (pa_output_addr_vec): Align address table.
1231 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1232 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1234 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
1236 * config/rs6000/constraints.md (wG constraint): Delete, no longer
1238 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1239 predicate to reflect toc fusion has been deleted.
1240 (toc_fusion_mem_raw): Delete, no longer used.
1241 (toc_fusion_mem_wrapped): Likewise.
1242 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1244 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1245 Delete, no longer used.
1246 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1247 meant to be used for toc fusion.
1248 (rs6000_debug_print_mode): Delete toc fusion debugging.
1249 (rs6000_debug_reg_global): Likewise.
1250 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1251 fusion and secondary reload support that were never used.
1252 (rs6000_option_override_internal): Delete TOC fusion, that was only
1253 partially defined, and it did not work unless you also used the
1255 (rs6000_legitimate_address_p): Delete TOC fusion support.
1256 (rs6000_opt_masks): Likewise.
1257 (fusion_wrap_memory_address): Delete function, no longer used.
1258 (fusion_split_address); Delete TOC fusion support.
1259 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1260 longer used with toc fusion being deleted.
1261 (TARGET_TOC_FUSION_FP): Likewise.
1262 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1264 (toc fusion spliter): Delete TOC fusion support.
1265 (toc_fusionload_<mode>): Likewise.
1266 (toc_fusionload_di): Likewise.
1267 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1268 longer needs to be named. Rename predicate to delete TOC fusion.
1269 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1270 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1271 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1272 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1273 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1275 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1277 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1278 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1279 __int128 in built-in function prototypes.
1280 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1281 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1283 2018-07-27 Martin Sebor <msebor@redhat.com>
1285 PR tree-optimization/86696
1286 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1287 types, including enums.
1288 (handle_char_store): Be prepared for the above function to fail.
1290 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1292 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1293 when optimization level is lower than 2 or optimize for size.
1295 2018-07-26 Martin Sebor <msebor@redhat.com>
1297 PR tree-optimization/86043
1298 PR tree-optimization/86042
1299 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1300 (get_string_cst_length): Rename...
1301 (get_min_string_length): ...to this. Add argument.
1302 (handle_char_store): Extend to handle multi-character stores by
1304 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1305 * tree.h (initializer_zerop): Add argument.
1307 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1310 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1311 declare target to variables if they have always,{to,from,tofrom} map
1314 2018-07-26 Martin Liska <mliska@suse.cz>
1317 * lto-wrapper.c: Add linker_output as prefix
1318 for ltrans_output_file.
1320 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1322 PR rtl-optimization/85805
1323 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1324 value for hard registers if that was written in the same mode.
1326 2018-07-26 Martin Liska <mliska@suse.cz>
1328 PR gcov-profile/86536
1329 * gcov.c (format_gcov): Use printf format %.*f directly
1330 and do not handle special values.
1332 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1334 * common/config/arc/arc-common.c (arc_option_optimization_table):
1335 Update default optimizations for size.
1337 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1339 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1340 * config/arc/constraints.md (CfZ): New constraint.
1341 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1342 (subsf3_fpu): Likewise.
1343 (cmpsf_fpu): Likewise.
1344 (cmpsf_fpu_uneq): Likewise.
1346 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1348 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1350 (arc_is_uncached_mem_p): uncached applies to both the variable and
1353 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1355 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1358 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1360 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1361 field "m_scopes" from vec to auto_vec.
1363 2018-07-25 Martin Liska <mliska@suse.cz>
1365 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1368 2018-07-25 Richard Biener <rguenther@suse.de>
1371 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1372 special wrt context_die late.
1373 (gen_subprogram_die): Re-use DIEs in local scope.
1375 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1377 PR tree-optimization/86644
1378 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1380 2018-07-25 Martin Liska <mliska@suse.cz>
1383 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1384 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1386 2018-07-25 Martin Liska <mliska@suse.cz>
1389 * params.def: Explain ASan abbreviation and provide
1390 a documentation link.
1392 2018-07-24 Martin Sebor <msebor@redhat.com>
1394 PR tree-optimization/86622
1395 PR tree-optimization/86532
1396 * builtins.h (string_length): Declare.
1397 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1398 (check_access): Be prepared for non-constant length ranges.
1399 (string_length): Make extern.
1400 * expr.c (string_constant): Only handle the minor non-constant
1401 array index. Use string_constant to compute the length of
1402 a generic string constant.
1404 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1406 PR tree-optimization/86618
1407 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1408 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1410 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1412 PR tree-optimization/86636
1413 * json.cc (json::object::set): Fix comment. Add assertions.
1414 (json::array::append): Move here from json.h. Add comment and an
1416 (json::string::string): Likewise.
1417 * json.h (json::array::append): Move to json.cc.
1418 (json::string::string): Likewise.
1419 * optinfo-emit-json.cc
1420 (optrecord_json_writer::impl_location_to_json): Assert that we
1421 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1422 wrapper around it. Expand the location once, rather than three
1424 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1425 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1427 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1428 places. Fix some overlong lines.
1430 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1432 * config/aarch64/aarch64-simd.md
1433 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1434 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1435 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1436 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1437 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1438 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1439 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1440 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1441 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1443 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1446 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1447 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1448 and abs_d == d, do the power of two handling if profitable.
1450 2018-07-24 Richard Biener <rguenther@suse.de>
1452 * match.pd: Add BIT_FIELD_REF canonicalizations.
1454 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1457 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1459 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1461 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1462 terminated STRING_CST object.
1464 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1466 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1468 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1470 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1471 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1472 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1473 the elements into a register.
1474 (rs6000_split_v4si_init_di_reg): Delete.
1475 (rs6000_split_v4si_init): Delete.
1476 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1477 (vsx_init_v4si): Rewrite as a define_expand.
1479 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1481 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1482 zero_extend argument from memory): New.
1484 2018-07-22 Martin Sebor <msebor@redhat.com>
1487 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1488 diagnosing calls with unknown arguments unless -Walloca-larger-than
1489 is restricted to less than PTRDIFF_MAX bytes.
1491 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1493 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1495 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1497 * pretty-print.c (text_info::set_location): Remove redundant
1498 "line_table" parameter from call to rich_location::set_range.
1500 2018-07-20 Martin Sebor <msebor@redhat.com>
1503 * builtins.c (expand_builtin_alloca): Adjust.
1504 * calls.c (alloc_max_size): Simplify.
1505 * cgraphunit.c (cgraph_node::expand): Adjust.
1506 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1508 (frame_larger_than_size): Same.
1509 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1510 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1512 * doc/invoke.texi (GCC Command Options): Document option arguments.
1513 Explain byte-size arguments and suffixes.
1514 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1515 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1516 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1517 * doc/options.texi (UInteger): Expand.
1518 (Host_Wide_Int, ByteSize): Document new properties.
1519 * final.c (final_start_function_1): Include sizes in an error message.
1520 * function.c (frame_offset_overflow): Same.
1521 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1522 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1523 Diagnose unbounded alloca calls only for limits of less than
1525 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1526 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1528 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1529 only for limits of less than PTRDIFF_MAX.
1530 * langhooks-def.h (lhd_handle_option): Change function argument
1532 * langhooks.c (lhd_handle_option): Same.
1533 * langhooks.h (handle_option): Same.
1534 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1536 (var_type, var_type_struct): Same.
1537 (var_set): Handle ByteSize flag.
1538 * optc-gen.awk: Add comments to output to ease debugging. Make
1539 use of HOST_WIDE_INT where appropriate.
1540 * opts-gen-save.awk: Use %lx to format unsigned long.
1541 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1542 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1543 arguments. Parse bytes-size suffixes.
1544 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1545 (enum_value_to_arg): Same.
1546 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1547 (handle_option): Adjust.
1548 (generate_option): Change function argument to HOST_WIDE_INT.
1549 (cmdline_handle_error): Adjust.
1550 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1551 (set_option): Change function argument to HOST_WIDE_INT.
1552 (option_enabled): Handle cl_host_wide_int.
1553 (get_option_state): Handle CLVC_SIZE.
1554 (control_warning_option): Same.
1555 * opts.c (common_handle_option): Change function argument to
1556 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1557 OPT_Wvla_larger_than_.
1558 * opts.h (enum cl_var_type): Add an enumerator.
1559 * stor-layout.c (layout_decl): Print a more meaningful warning.
1560 * toplev.c (output_stack_usage): Adjust.
1562 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1564 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1565 call to inline_expand_builtin_string_cmp.
1566 (expand_builtin_strcmp): Likewise.
1567 (expand_builtin_strncmp): Likewise.
1568 (inline_string_cmp): Delete the last parameter, change char_type_node
1569 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1571 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1572 the inlining expansion on target where the type of the call has same or
1573 narrower precision than unsigned char.
1575 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1577 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1578 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1579 * common.opt (fsave-optimization-record): New option.
1580 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1581 * doc/invoke.texi (-fsave-optimization-record): New option.
1582 * dumpfile.c: Include "optinfo-emit-json.h".
1583 (struct kv_pair): Move to coretypes.h.
1584 (optgroup_options): Make non-static.
1585 (dump_context::end_scope): Call
1586 optimization_records_maybe_pop_dump_scope.
1587 * dumpfile.h (optgroup_options): New decl.
1588 * json.cc: New file.
1590 * optinfo-emit-json.cc: New file.
1591 * optinfo-emit-json.h: New file.
1592 * optinfo.cc: Include "optinfo-emit-json.h".
1593 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1594 (optinfo_enabled_p): Check optimization_records_enabled_p.
1595 (optinfo_wants_inlining_info_p): Likewise.
1596 * optinfo.h: Update comment.
1597 * profile-count.c (profile_quality_as_string): New function.
1598 * profile-count.h (profile_quality_as_string): New decl.
1599 (profile_count::quality): New accessor.
1600 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1601 and optinfo_emit_json_cc_tests.
1602 * selftest.h (selftest::json_cc_tests): New decl.
1603 (selftest::optinfo_emit_json_cc_tests): New decl.
1604 * toplev.c: Include "optinfo-emit-json.h".
1605 (compile_file): Call optimization_records_finish.
1606 (do_compile): Call optimization_records_start.
1607 * tree-ssa-live.c: Include optinfo.h.
1608 (remove_unused_scope_block_p): Retain inlining information if
1609 optinfo_wants_inlining_info_p returns true.
1611 2018-07-20 Richard Biener <rguenther@suse.de>
1614 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1615 to cover -flto-partition=none.
1617 2018-07-20 Martin Liska <mliska@suse.cz>
1619 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1620 (get_decl_source_range): Remove unused function.
1622 2018-07-20 Richard Biener <rguenther@suse.de>
1624 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1625 (struct vn_phi_s): Likewise.
1626 (struct vn_reference_s): Likewise.
1627 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1628 for searching the slot of an entry known to be in the hash itself.
1629 (vn_phi_hasher::equal): Likewise.
1630 (vn_reference_hasher::equal): Likewise.
1631 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1633 (optimistic_info, current_info): Remove, keeping only valid_info.
1634 (vn_reference_lookup_1): Remove fallback lookup.
1635 (vn_reference_lookup_2): Likewise.
1636 (vn_nary_op_lookup_1): Likewise.
1637 (vn_phi_lookup): Likewise.
1638 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1640 (vn_reference_insert): Adjust, chain the inserted hash element
1641 at last_inserted_ref.
1642 (vn_reference_insert_pieces): Likewise.
1643 (visit_reference_op_call): Likewise.
1644 (vn_nary_op_insert_into): Chain the inserted hash element at
1646 (vn_nary_op_insert_pieces): Adjust.
1647 (vn_nary_op_insert): Likewise.
1648 (vn_nary_op_insert_stmt): Likewise.
1649 (vn_phi_insert): Adjust, chain the inserted hash element at
1651 (process_scc): Remove clearing and copying the optimistic
1652 table. Instead remove elements inserted during an optimistic
1653 iteration from the single table we maintain.
1654 (init_scc_vn): Adjust.
1655 (free_scc_vn): Likewise.
1656 (sccvn_dom_walker::record_cond): Likewise.
1657 (sccvn_dom_walker::after_dom_children): Likewise.
1659 2018-07-19 Martin Sebor <msebor@redhat.com>
1661 PR tree-optimization/84047
1662 PR tree-optimization/83776
1663 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1664 (check_array_bounds): Call it.
1666 2018-07-19 Martin Sebor <msebor@redhat.com>
1668 * align.h (align_flags): Use member initialization.
1670 2018-07-19 David Malcolm <dmalcolm@redhat.com>
1672 * Makefile.in (OBJS): Add optinfo.o.
1673 * coretypes.h (class symtab_node): New forward decl.
1674 (struct cgraph_node): New forward decl.
1675 (class varpool_node): New forward decl.
1676 * dump-context.h: New file.
1677 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1679 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1680 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1681 (set_alt_dump_file): Likewise.
1682 (dump_context::~dump_context): New dtor.
1683 (dump_gimple_stmt): Move implementation to...
1684 (dump_context::dump_gimple_stmt): ...this new member function.
1685 Add the stmt to any pending optinfo, creating one if need be.
1686 (dump_gimple_stmt_loc): Move implementation to...
1687 (dump_context::dump_gimple_stmt_loc): ...this new member function.
1688 Start a new optinfo and add the stmt to it.
1689 (dump_gimple_expr): Move implementation to...
1690 (dump_context::dump_gimple_expr): ...this new member function.
1691 Add the stmt to any pending optinfo, creating one if need be.
1692 (dump_gimple_expr_loc): Move implementation to...
1693 (dump_context::dump_gimple_expr_loc): ...this new member function.
1694 Start a new optinfo and add the stmt to it.
1695 (dump_generic_expr): Move implementation to...
1696 (dump_context::dump_generic_expr): ...this new member function.
1697 Add the tree to any pending optinfo, creating one if need be.
1698 (dump_generic_expr_loc): Move implementation to...
1699 (dump_context::dump_generic_expr_loc): ...this new member
1700 function. Add the tree to any pending optinfo, creating one if
1702 (dump_printf): Move implementation to...
1703 (dump_context::dump_printf_va): ...this new member function. Add
1704 the text to any pending optinfo, creating one if need be.
1705 (dump_printf_loc): Move implementation to...
1706 (dump_context::dump_printf_loc_va): ...this new member function.
1707 Start a new optinfo and add the stmt to it.
1708 (dump_dec): Move implementation to...
1709 (dump_context::dump_dec): ...this new member function. Add the
1710 value to any pending optinfo, creating one if need be.
1711 (dump_context::dump_symtab_node): New member function.
1712 (dump_context::get_scope_depth): New member function.
1713 (dump_context::begin_scope): New member function.
1714 (dump_context::end_scope): New member function.
1715 (dump_context::ensure_pending_optinfo): New member function.
1716 (dump_context::begin_next_optinfo): New member function.
1717 (dump_context::end_any_optinfo): New member function.
1718 (dump_context::s_current): New global.
1719 (dump_context::s_default): New global.
1720 (dump_scope_depth): Delete global.
1721 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1722 (dump_symtab_node): New function.
1723 (get_dump_scope_depth): Reimplement in terms of dump_context.
1724 (dump_begin_scope): Likewise.
1725 (dump_end_scope): Likewise.
1726 (selftest::temp_dump_context::temp_dump_context): New ctor.
1727 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1728 (selftest::verify_item): New function.
1729 (ASSERT_IS_TEXT): New macro.
1730 (ASSERT_IS_TREE): New macro.
1731 (ASSERT_IS_GIMPLE): New macro.
1732 (selftest::test_capture_of_dump_calls): New test.
1733 (selftest::dumpfile_c_tests): Call it.
1734 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1735 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1736 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1737 descriptive comment.
1738 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1739 (dump_node, dump_bb): Move these unrelated decls.
1740 (class dump_manager): Add leading comment.
1741 * optinfo.cc: New file.
1742 * optinfo.h: New file.
1744 2018-07-19 Michael Collison <michael.collison@arm.com>
1745 Richard Henderson <rth@redhat.com>
1747 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1748 (subti): Handle op1 zero.
1749 (subvti4, usub4ti4): New.
1750 (*sub<GPI>3_compare1_imm): New.
1751 (sub<GPI>3_carryinCV): New.
1752 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1753 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1755 2018-07-19 Michael Collison <michael.collison@arm.com>
1756 Richard Henderson <rth@redhat.com>
1758 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1759 (addti3): Create simpler code if low part is already known to be 0.
1760 (addvti4, uaddvti4): New.
1761 (*add<GPI>3_compareC_cconly_imm): New.
1762 (*add<GPI>3_compareC_cconly): New.
1763 (*add<GPI>3_compareC_imm): New.
1764 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1765 handle constants within this pattern..
1766 (*add<GPI>3_compareV_cconly_imm): New.
1767 (*add<GPI>3_compareV_cconly): New.
1768 (*add<GPI>3_compareV_imm): New.
1769 (add<GPI>3_compareV): New.
1770 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1771 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1772 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1773 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1774 with 'comparison' operator.
1775 (*add<GPI>3_compareV_cconly_imm): Ditto.
1776 (*add<GPI>3_compareV_cconly): Ditto.
1777 (*add<GPI>3_compareV_imm): Ditto.
1778 (add<GPI>3_compareV): Ditto.
1779 (add<mode>3_carryinC): Ditto.
1780 (*add<mode>3_carryinC_zero): Ditto.
1781 (*add<mode>3_carryinC): Ditto.
1782 (add<mode>3_carryinV): Ditto.
1783 (*add<mode>3_carryinV_zero): Ditto.
1784 (*add<mode>3_carryinV): Ditto.
1786 2018-07-19 Michael Collison <michael.collison@arm.com>
1787 Richard Henderson <rth@redhat.com>
1789 * config/aarch64/aarch64-modes.def (CC_V): New.
1790 * config/aarch64/aarch64-protos.h
1791 (aarch64_addti_scratch_regs): Declare
1792 (aarch64_subvti_scratch_regs): Declare.
1793 (aarch64_expand_subvti): Declare.
1794 (aarch64_gen_unlikely_cbranch): Declare
1795 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1796 for signed overflow using CC_Vmode.
1797 (aarch64_get_condition_code_1): Handle CC_Vmode.
1798 (aarch64_gen_unlikely_cbranch): New function.
1799 (aarch64_addti_scratch_regs): New function.
1800 (aarch64_subvti_scratch_regs): New function.
1801 (aarch64_expand_subvti): New function.
1803 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1805 * config/aarch64/aarch64-option-extensions.def: New entry for profile
1807 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1808 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1811 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1814 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1815 address check not strict.
1817 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1819 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1821 (store_pair_lanes<mode>): Likewise.
1822 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1823 enum value 'ADDR_QUERY_LDP_STP_N'.
1824 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1825 (aarch64_print_address_internal): Add declaration.
1826 (aarch64_print_ldpstp_address): Remove.
1827 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1828 (aarch64_print_operand): Change printing of 'y'.
1829 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1830 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1831 'true' rather than '1'.
1832 * config/aarch64/constraints.md (Uml): Likewise.
1833 (Uml): Rename to Umn.
1836 2018-07-19 Richard Biener <rguenther@suse.de>
1838 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1840 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1841 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1842 (vn_reference_hasher): Likewise.
1843 (struct vn_tables_s): Remove obstack and alloc-pool members.
1844 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1845 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1846 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1847 (vn_reference_insert_pieces): Likewise.
1848 (alloc_vn_nary_op_noinit): Adjust.
1849 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1850 (vn_phi_eq): Adjust.
1851 (shared_lookup_phiargs): Remove.
1852 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1853 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1854 (visit_reference_op_call): Likewise.
1855 (copy_nary, copy_phi, copy_reference): Remove.
1856 (process_scc): Rewind the obstack when iterating. Do not
1857 copy the elements to valid_info but just move them from one
1858 hashtable to the other.
1859 (allocate_vn_table): Adjust.
1860 (free_vn_table): Likewise.
1861 (init_scc_vn): Likewise.
1862 (free_scc_vn): Likewise.
1864 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1867 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1868 indirect_return as function type attribute.
1869 (ix86_attribute_table): Change indirect_return to function
1871 * doc/extend.texi: Update indirect_return attribute.
1873 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1875 * wide-int.h (widest2_int): New.
1876 * gimple-fold.c (arith_overflowed_p): Use it.
1877 * tree.h (widest2_int_cst): New.
1878 * tree-vrp.c (wide_int_binop_overflow): Rename from
1879 vrp_int_const_binop.
1880 Rewrite to work on trees.
1881 (extract_range_from_multiplicative_op_1): Abstract code to...
1882 (wide_int_range_min_max): ...here.
1883 (wide_int_range_cross_product): ...and here.
1884 (extract_range_from_binary_expr_1): Abstract overflow code to...
1885 (wide_int_range_mult_wrapping): ...here.
1886 * tree-vrp.h (wide_int_range_cross_product): New.
1887 (wide_int_range_mult_wrapping): New.
1889 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1890 Julia Koval <julia.koval@intel.com>
1892 * config/i386/x86-tune-costs.h (skylake_memcpy,
1893 skylake_memset): Replace rep_prefix with unrolling for size 512.
1895 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1898 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1901 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1903 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1904 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1905 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1906 previously known as "PowerPC AltiVec Built-in Functions". Move
1907 some material to new subsubsections "PowerPC AltiVec Built-in
1908 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1910 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1911 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1912 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1913 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1915 2018-07-18 Richard Biener <rguenther@suse.de>
1917 PR tree-optimization/86557
1918 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1921 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1923 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1925 2018-07-17 Jeff Law <law@redhat.com>
1927 * config/arm/arm.c (get_label_padding): Update for recent
1928 changes to label_to_alignment.
1930 PR tree-optimization/86010
1931 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1933 * config/mips/mips.c (vr4130_align_insns): Update for recent
1934 changes to label_to_alignment.
1936 * config/frv/frv.c (frv_label_align): Update for recent changes
1937 to label_to_alignment.
1939 * config/nios2/nios2.c (nios2_label_align): Update for recent
1940 changes which dropped ALIGN_LABELS_LOG.
1942 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1944 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1945 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1947 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1949 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1950 deprecated align_labels_log.
1952 2018-07-17 Richard Biener <rguenther@suse.de>
1955 * dwarf2out.c (init_sections_and_labels): Always generate
1956 a debug_line_str_section for early LTO debug.
1957 (dwarf2out_finish): Reset debug_line_str_hash output early.
1958 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1960 (dwarf2out_early_finish): Output debug_line_str.
1962 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1964 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1965 index register on z196 or later.
1967 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1969 * config/s390/s390.c (s390_default_align): Set default function
1971 (s390_override_options_after_change): Call s390_default align.
1972 (s390_option_override_internal): Call s390_default_align.
1973 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1975 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1978 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1979 to _looptemp_ clauses, other than the first two.
1981 2018-07-17 Martin Liska <mliska@suse.cz>
1983 * opts.c: Do not enable OPT_falign_* for -Os.
1985 2018-07-17 Martin Liska <mliska@suse.cz>
1987 * align.h (MAX_CODE_ALIGN): New.
1988 (MAX_CODE_ALIGN_VALUE): New.
1989 * common/config/i386/i386-common.c (ix86_handle_option):
1990 (MAX_CODE_ALIGN): Moved to align.h.
1991 * final.c (MAX_CODE_ALIGN): Likewise.
1992 * opts.c (parse_and_check_align_values):
1993 (MAX_CODE_ALIGN): Likewise.
1994 (MAX_CODE_ALIGN_VALUE): Likewise.
1996 2018-07-17 Martin Liska <mliska@suse.cz>
1998 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1999 in order to fulfil coding style.
2000 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2001 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2002 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2003 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2004 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2005 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2006 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2007 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2008 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2010 2018-07-17 Martin Liska <mliska@suse.cz>
2012 * align.h: New file.
2013 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2014 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2015 align_flags of label_to_alignment.
2016 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2018 * config/m68k/m68k.c: Do not use removed align_labels_value and
2020 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2021 (LOOP_ALIGN): Likewise.
2022 (LABEL_ALIGN): Likewise.
2023 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2024 Remove not used macro.
2025 (rs6000_loop_align): Change return type to align_flags.
2026 (rs6000_loop_align_max_skip): Remove.
2027 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2028 Change return type to align_flags.
2029 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2030 Remove not used macro.
2031 (rs6000_loop_align): Change return type to align_flags.
2032 (rs6000_loop_align_max_skip): Remove.
2033 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2034 * config/rx/rx-protos.h (rx_align_for_label): Make it
2036 * config/rx/rx.c (rx_align_for_label): Change return type
2038 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2040 into align_flags class.
2041 (LABEL_ALIGN): Likewise.
2042 (LOOP_ALIGN): Likewise.
2043 * config/s390/s390.c (s390_label_align): Use align_flags
2045 (s390_asm_output_function_label): Likewise.
2046 * config/sh/sh.c (sh_override_options_after_change):
2047 Use align_flags class directly without macros.
2048 (find_barrier): Likewise.
2049 (barrier_align): Likewise.
2050 (sh_loop_align): Likewise.
2051 * config/spu/spu.c (spu_option_override):
2052 Use align_flags_tuple::get_value instead of removed macros.
2053 (spu_sched_init): Likewise.
2054 * config/spu/spu.h (GTY): Likewise.
2055 * config/visium/visium.c (visium_option_override):
2056 Set "8" as default secondary alignment.
2057 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2058 in order to guarantee secondary alignment of 8.
2059 * coretypes.h: Include align.h header file.
2060 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2061 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2062 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2063 * doc/tm.texi.in: Likewise.
2064 * final.c (struct label_alignment): Remove not used structure.
2065 (LABEL_ALIGN): Change type to align_flags.
2066 (LOOP_ALIGN): Likewise.
2067 (JUMP_ALIGN): Likewise.
2068 (default_loop_align_max_skip): Remove.
2069 (default_label_align_max_skip): Likewise.
2070 (default_jump_align_max_skip): Likewise.
2071 (default_label_align_after_barrier_max_skip):
2072 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2073 (LABEL_TO_MAX_SKIP): Remove.
2074 (label_to_alignment): Return align_flags type instead of integer.
2075 (label_to_max_skip): Remove.
2076 (align_fuzz): Use align_flags type.
2077 (compute_alignments): Use align_flags type and use align_flags::max
2078 to combine multiple alignments.
2079 (grow_label_align): Grow vec instead of C array.
2080 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2081 (shorten_branches): Use align_flags type and use align_flags::max
2082 to combine multiple alignments.
2083 (final_scan_insn_1): Remove usage of secondary alignment that comes
2084 from label alignment, but instead use proper secondary alignment
2085 which is computed in grow_label_align.
2086 * flags.h (struct align_flags_tuple): Move to align.h.
2087 (struct align_flags): Likewise.
2088 (state_align_loops): Rename to align_loops.
2089 (state_align_jumps): Rename to align_jumps.
2090 (state_align_labels): Rename to align_labels.
2091 (state_align_functions): Rename to align_functions.
2092 (align_loops_log): Remove.
2093 (align_jumps_log): Remove.
2094 (align_labels_log): Remove.
2095 (align_functions_log): Remove.
2096 (align_loops_max_skip): Remove.
2097 (align_jumps_max_skip): Remove.
2098 (align_labels_max_skip): Remove.
2099 (align_functions_max_skip): Remove.
2100 (align_loops_value): Remove.
2101 (align_jumps_value): Remove.
2102 (align_labels_value): Remove.
2103 (align_functions_value): Remove.
2104 * output.h (label_to_alignment): Change return type to align_flags.
2105 (label_to_max_skip): Remove.
2106 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2107 jump_align_max_skip macros.
2108 * targhooks.h (default_loop_align_max_skip): Remove.
2109 (default_label_align_max_skip): Likewise.
2110 (default_jump_align_max_skip): Likewise.
2111 (default_label_align_after_barrier_max_skip): Remove.
2112 * toplev.c (read_log_maxskip): Use ::normalize function.
2113 (parse_N_M): Remove not used argument and also call ::normalize.
2114 (parse_alignment_opts): Do not pass unused arguments.
2115 * varasm.c (assemble_start_function): Use directly align_functions
2116 instead of removed macros.
2117 * system.h: Do not poison removed macros.
2119 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2122 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2123 and cond temporaries don't have reference type if iterator has
2124 pointer type. For init use &for_pre_body instead of pre_p if
2125 for_pre_body is non-empty.
2127 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2129 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2130 double-double modes to SFmode directly directly.
2131 (trunc<mode>sf2_fprs): Delete.
2133 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2135 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2136 for conversions between IFmode and the decimal floating point modes.
2137 (init_float128_ieee): Use the correct names for conversions between
2138 KFmode and the decimal floating point modes.
2140 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2142 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2143 for the conversions between TDmode and IFmode.
2144 (init_float128_ieee): Use more correct names for the conversions
2145 between TDmode and KFmode.
2147 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2149 PR tree-optimization/86526
2150 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2151 (inline_expand_builtin_string_cmp): Likewise.
2152 (inline_string_cmp): Likewise. Use c_readstr instead of
2153 builtin_memcpy_read_str. Add unit_mode temporary.
2155 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2158 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2159 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2161 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2163 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2164 Alphabetize prototypes of built-in functions, separating out
2165 built-in functions that are listed in this section but should be
2166 described elsewhere.
2168 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2171 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2172 conditional move when trapping comparison was split to a
2173 non-trapping one (and vice versa).
2175 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2177 * config/s390/s390.c (s390_function_profiler): Generate nops
2178 instead of profiler call sequences.
2179 * config/s390/s390.opt: Add the new option.
2181 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2183 * config/s390/s390.c (s390_function_profiler): Generate
2184 __mcount_loc section.
2185 * config/s390/s390.opt: Add the new option.
2187 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2189 * common.opt: Add the new warning.
2190 * config/s390/s390.c (s390_function_profiler): Emit "brasl
2191 %r0,__fentry__" when -mfentry is specified.
2192 (s390_option_override_internal): Disallow -mfentry for 31-bit
2194 * config/s390/s390.opt: Add the new option.
2196 2018-07-16 Richard Biener <rguenther@suse.de>
2199 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2200 for function-local FUNCTION_DECL and RESULT_DECL immediately.
2202 2018-07-16 Martin Liska <mliska@suse.cz>
2205 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2208 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2210 * config/arc/arcHS.md: Update ARCHS scheduling rules.
2212 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2214 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2216 * config/arc/arc-cpus.def (hs4x): New cpu.
2218 * config/arc/arc-tables.opt: Regenerate.
2219 * config/arc/arc.c (arc_sched_issue_rate): New function.
2220 (TARGET_SCHED_ISSUE_RATE): Define.
2221 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2222 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2224 (attr tune): Add ARCHS4x tune values.
2225 (attr tune_dspmpy): Define.
2226 (*tst): Correct instruction type.
2227 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2228 * config/arc/arcHS4x.md: New file.
2229 * config/arc/fpu.md: Update instruction type attributes.
2230 * config/arc/t-multilib: Regenerate.
2232 2018-07-16 Tom de Vries <tdevries@suse.de>
2235 * var-tracking.c (vt_initialize): Fix pre_dec handling.
2237 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2239 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2242 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
2244 PR tree-optimization/86514
2245 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2246 conversion to a boolean type from a type with greater precision.
2248 2018-07-16 Tom de Vries <tdevries@suse.de>
2250 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2251 dump_flags request TDF_SLIM.
2253 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2255 * fold-const.c (int_const_binop_1): Abstract...
2256 (wide_int_binop): ...wide int code here.
2257 (poly_int_binop): ...poly int code here.
2258 Abstract the rest of int_const_binop_1 into int_const_binop.
2259 * fold-const.h (wide_int_binop): New.
2260 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2261 Remove useless PLUS/MINUS_EXPR case.
2262 (zero_nonzero_bits_from_vr): Move wide int code...
2263 (zero_nonzero_bits_from_bounds): ...here.
2264 (extract_range_from_binary_expr_1): Move mask optimization code...
2265 (range_easy_mask_min_max): ...here.
2266 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2267 (range_easy_mask_min_max): New.
2269 2018-07-15 Jeff Law <law@redhat.com>
2272 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2275 2018-07-14 Jim Wilson <jimw@sifive.com>
2277 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2279 2018-07-14 Paul Koning <ni1d@arrl.net>
2281 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2283 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2285 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2288 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2289 Steve Munroe <munroesj52@gmail.com>
2291 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2292 (_mm_andnot_si128): Likewise.
2293 (_mm_or_si128): Likewise.
2294 (_mm_xor_si128): Likewise.
2296 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2299 * builtins.c (expand_builtin_memcmp): Inline the calls first
2300 when result_eq is false.
2301 (expand_builtin_strcmp): Inline the calls first.
2302 (expand_builtin_strncmp): Likewise.
2303 (inline_string_cmp): New routine. Expand a string compare
2304 call by using a sequence of char comparison.
2305 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2306 a call to str(n)cmp/memcmp.
2307 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2309 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2311 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2313 * config/arm/driver-arm.c: Include arm-native.h.
2314 (host_detect_local_cpu): Use auto-generated data tables.
2315 (vendors, arm_cpu_table): Delete. Move part information to ...
2316 * config/arm/arm-cpus.in: ... here.
2317 * config/arm/parsecpu.awk (gen_native): New function.
2318 (vendor, part): New CPU fields.
2319 (END): Add support for building the native CPU detection tables.
2320 * config/arm/t-arm (arm-native.h): Add build rule.
2321 (driver-arm.o): Add dependency on arm-native.h.
2323 2018-07-13 Richard Biener <rguenther@suse.de>
2326 * match.pd (addr1 - addr2): Allow either of the operand to
2329 2018-07-13 Tom de Vries <tdevries@suse.de>
2331 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2334 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2336 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2337 arrays instead of numbered variables.
2339 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2341 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2342 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2344 2018-07-13 Richard Biener <rguenther@suse.de>
2347 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2348 instead of get_context_die.
2350 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2351 Richard Biener <rguenther@suse.de>
2354 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2355 that the loop latch destination where phi is defined.
2357 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2359 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2360 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2361 (riscv_set_current_function): Extract getting interrupt type to new
2363 (riscv_get_interrupt_type): New function.
2364 (riscv_merge_decl_attributes): New function, checking interrupt type is
2366 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2368 2018-07-12 Paul Koning <ni1d@arrl.net>
2370 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2373 2018-07-12 Paul Koning <ni1d@arrl.net>
2375 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2376 zero reference, add doloop_end instead.
2377 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2378 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2379 detail for doloop_end.
2381 2018-07-12 Martin Sebor <msebor@redhat.com>
2384 * attribs.c (decl_attributes): Reject conflicting attributes before
2385 calling attribute handlers.
2387 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2389 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2391 (gcc::dump_manager::get_dump_file_name): likewise.
2392 (dump_begin): Likewise.
2393 * dumpfile.h (dump_begin): Update prototype.
2394 (gcc::dump_manager::get_dump_file_name,
2395 gcc::dump_manager::get_dump_file_name): Update prototype.
2397 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2399 * internal-fn.h (vectorizable_internal_fn_p): New function.
2400 * tree-vect-slp.c (compatible_calls_p): Likewise.
2401 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2402 to internal functions.
2403 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2405 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2407 * fold-const.h (inverse_conditions_p): Declare.
2408 * fold-const.c (inverse_conditions_p): New function.
2409 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2410 that test the inverse condition of a conditional internal function.
2411 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2412 * internal-fn.c (internal_fn_mask_index): Handle conditional
2414 (vectorized_internal_fn_supported_p): New function.
2415 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2416 (any_pred_load_store): Replace with...
2417 (need_to_predicate): ...this new variable.
2418 (redundant_ssa_names): New variable.
2419 (ifcvt_can_use_mask_load_store): Move initial checks to...
2420 (ifcvt_can_predicate): ...this new function. Handle tree codes
2421 for which a conditional internal function exists.
2422 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2423 instead of ifcvt_can_use_mask_load_store. Update after variable
2425 (predicate_load_or_store): New function, split out from
2426 predicate_mem_writes.
2427 (check_redundant_cond_expr): New function.
2428 (value_available_p): Likewise.
2429 (predicate_rhs_code): Likewise.
2430 (predicate_mem_writes): Rename to...
2431 (predicate_statements): ...this. Use predicate_load_or_store
2432 and predicate_rhs_code.
2433 (combine_blocks, tree_if_conversion): Update after above name changes.
2434 (ifcvt_local_dce): Handle redundant_ssa_names.
2435 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2436 general conditional functions.
2437 * tree-vect-stmts.c (vectorizable_call): Likewise.
2439 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2440 Alan Hayward <alan.hayward@arm.com>
2441 David Sherwood <david.sherwood@arm.com>
2443 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2444 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2445 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2446 plus and minus and convert them into IFN_COND_FMA-based sequences.
2447 (convert_mult_to_fma): Handle conditional plus and minus.
2449 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2451 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2452 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2453 (cond_fnms_optab): New optabs.
2454 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2456 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2457 * internal-fn.h (get_conditional_internal_fn): Declare.
2458 (get_unconditional_internal_fn): Likewise.
2459 * internal-fn.c (cond_ternary_direct): New macro.
2460 (expand_cond_ternary_optab_fn): Likewise.
2461 (direct_cond_ternary_optab_supported_p): Likewise.
2462 (FOR_EACH_COND_FN_PAIR): Likewise.
2463 (get_conditional_internal_fn): New function.
2464 (get_unconditional_internal_fn): Likewise.
2465 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2466 (gimple_match_op::gimple_match_op): Add a new overload for 5
2468 (gimple_match_op::set_op): Likewise.
2469 (gimple_resimplify5): Declare.
2470 * genmatch.c (decision_tree::gen): Generate simplifications for
2472 * gimple-match-head.c (gimple_simplify): Define an overload for
2473 5 operands. Handle calls with 5 arguments in the top-level overload.
2474 (convert_conditional_op): Handle conversions from unconditional
2475 internal functions to conditional ones.
2476 (gimple_resimplify5): New function.
2477 (build_call_internal): Pass a fifth operand.
2478 (maybe_push_res_to_seq): Likewise.
2479 (try_conditional_simplification): Try converting conditional
2480 internal functions to unconditional internal functions.
2481 Handle 3-operand unconditional forms.
2482 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2483 Define ternary equivalents of the current rules for binary conditional
2485 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2487 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2488 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2489 (optab): Handle them.
2490 (SVE_COND_FP_TERNARY): New int iterator.
2491 (sve_fmla_op, sve_fmad_op): New int attributes.
2492 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2493 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2494 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2496 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2498 * target.def (preferred_else_value): New target hook.
2499 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2500 * doc/tm.texi: Regenerate.
2501 * targhooks.h (default_preferred_else_value): Declare.
2502 * targhooks.c (default_preferred_else_value): New function.
2503 * internal-fn.h (conditional_internal_fn_code): Declare.
2504 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2505 (get_conditional_internal_fn): Use it.
2506 (conditional_internal_fn_code): New function.
2507 * gimple-match.h (gimple_match_cond): New struct.
2508 (gimple_match_op): Add a cond member function.
2509 (gimple_match_op::gimple_match_op): Update all forms to take a
2511 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2512 for the suboperation, but don't specify a particular else_value.
2513 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2514 (visit_nary_op, visit_reference_op_load): Pass
2515 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2516 * gimple-match-head.c: Include tree-eh.h
2517 (convert_conditional_op): New function.
2518 (maybe_resimplify_conditional_op): Likewise.
2519 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2520 (gimple_resimplify2): Likewise.
2521 (gimple_resimplify3): Likewise.
2522 (gimple_resimplify4): Likewise.
2523 (maybe_push_res_to_seq): Return null for conditional operations.
2524 (try_conditional_simplification): New function.
2525 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2527 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2529 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2531 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2533 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2535 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2537 (hash_tree): Do not hash DECL_FCONTEXT
2538 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2539 Do not stream DECL_FCONTEXT.
2540 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2541 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2543 2018-07-12 Richard Biener <rguenther@suse.de>
2546 * dwarf2out.c (gen_block_die): Only output blocks when they have
2547 at least one !DECL_IGNORED_P variable.
2549 2018-07-12 Richard Biener <rguenther@suse.de>
2552 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2553 Remove -mieee-fp handling.
2555 2018-07-12 Richard Biener <rguenther@suse.de>
2557 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2558 left-over from last patch.
2560 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2562 PR tree-optimization/86492
2563 * gimple-ssa-store-merging.c
2564 (imm_store_chain_info::coalesce_immediate_stores): Call
2565 check_no_overlap even for the merge_overlapping case. Formatting fix.
2567 2018-07-12 Richard Biener <rguenther@suse.de>
2570 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2571 move possibly trapping operations into the conditional.
2573 2018-07-12 Richard Biener <rguenther@suse.de>
2575 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2576 (vn_lookup_simplify_result): Remove recursion limit applied
2578 (vn_nary_build_or_lookup_1): Adjust.
2579 (try_to_simplify): Likewise.
2580 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2582 (gimple_resimplify2): Likewise.
2583 (gimple_resimplify3): Likewise.
2584 (gimple_resimplify4): Likewise.
2586 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2588 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2589 Use __mmask64 type instead of __mmask8 for __M argument.
2590 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2591 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2593 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2594 __mmask16 for __M argument.
2595 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2596 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2597 to __mmask16 instead of __mmask8.
2598 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2599 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2600 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2601 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2602 instead of __mmask16 for __U argument.
2603 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2604 __mmask16 instead of __mmask8 for __U argument.
2605 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2607 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2609 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2611 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2613 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2615 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2617 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2619 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2621 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2623 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2625 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2626 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2627 return type as well as __M argument type and all casts from __mmask8
2629 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2630 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2631 return type as well as __M argument type and all casts from __mmask8
2633 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2634 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2635 return type as well as __M argument type and all casts from __mmask8
2637 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2638 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2639 return type as well as __M argument type and all casts from __mmask8
2641 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2642 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2645 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2647 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2648 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2651 2018-07-11 Paul Koning <ni1d@arrl.net>
2653 * doc/md.texi (define_subst): Document how multiple occurrences of
2654 the same argument in the replacement pattern are handled.
2656 2018-07-11 Paul Koning <ni1d@arrl.net>
2658 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2660 (Common Type Attributes): Add "mode" attribute.
2662 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2664 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2665 stream DECL_ORIGINAL_TYPE.
2666 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2667 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2668 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2669 Do not walk original type.
2670 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2672 (write_ts_decl_non_common_tree_pointers): Do not stream
2674 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2675 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2677 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2679 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2680 thread twice from the same starting edge.
2682 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2684 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2685 * gimple.c (gimple_call_nonnull_result_p): ...here...
2686 (gimple_call_nonnull_arg): ...and here.
2687 * gimple.h (gimple_call_nonnull_result_p): New.
2688 (gimple_call_nonnull_arg): New.
2690 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
2692 * config/arm/arm-cpus.in: Move information from fpu field of each
2693 cpu definition to the isa field.
2694 * config/arm/parsecpu.awk (fpu): Delete match rule.
2695 (gen_comm_data): Don't add bits from the CPU's FPU entry.
2697 2018-07-11 Richard Biener <rguenther@suse.de>
2700 * dwarf2out.c (init_sections_and_labels): Use
2701 output_asm_line_debug_info consistently.
2702 (dwarf2out_early_finish): Likewise.
2703 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2706 2018-07-11 Richard Biener <rguenther@suse.de>
2708 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2709 Rework father_bb setting in a way to avoid propagating constants
2710 multiple times on a loop body.
2712 2018-07-10 Mark Wielaard <mark@klomp.org>
2715 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2717 2018-07-10 Richard Biener <rguenther@suse.de>
2719 * hash-map.h (hash_map::iterator::operator*): Return
2720 references to key and value.
2722 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2725 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2726 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2727 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2728 (gimplify_omp_for): For composite loops, move outer
2729 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2730 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2731 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2732 TREE_LIST for both the original class iterator and the "last" helper
2733 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2734 loop, remember has_decl_expr from outer composite loops for the
2735 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2737 2018-07-09 Martin Sebor <msebor@redhat.com>
2741 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2742 accessing implicitly initialized array elements.
2743 * expr.c (string_constant): Handle string initializers of
2744 character arrays within aggregates.
2745 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2746 Store element offset. As a special case, handle zero size.
2747 (fold_nonarray_ctor_reference): Same.
2748 (fold_ctor_reference): Add argument. Store subobject offset.
2749 * gimple-fold.h (fold_ctor_reference): Add argument.
2751 2018-07-09 Paul Koning <ni1d@arrl.net>
2753 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2754 (pdp11_insn_cost): New function.
2755 (pdp11_md_asm_adjust): New function.
2756 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2757 (pdp11_rtx_costs): Update to match machine better.
2758 (output_addr_const_pdp11): Correct format mismatch warnings.
2759 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2760 * config/pdp11/pdp11.md: General change to add base_cost and/or
2761 length attributes for use by new pdp11_insn_cost function.
2762 (MIN_BRANCH): Correct definition.
2764 (doloop_end): Use standard pattern name for looping pattern.
2765 (doloop_end_nocc): New.
2766 (movsf): Add another constraint alternative.
2767 (zero_extendqihi2): Add constraint alternatives for not in place
2769 (zero_extendhisi2): Remove.
2770 (shift patterns): Add CC handling variants.
2774 (define_peephole2): New peephole to recognize mov that sets CC for
2777 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2779 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2780 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2783 2018-07-09 Jakub Jelinek <jakub@redhat.com>
2786 * real.c (real_nextafter): Return true if result is denormal.
2788 2018-07-09 Martin Liska <mliska@suse.cz>
2790 * common.opt: Add back wrongly removed attribute.
2792 2018-07-09 Richard Biener <rguenther@suse.de>
2795 * dwarf2out.c (gen_block_die): For an early generated DIE
2796 always output high/low PC attributes.
2798 2018-07-09 Tom de Vries <tdevries@suse.de>
2800 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2801 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2802 onto VAR_DECL with abstract origin.
2804 2018-07-07 Jim Wilson <jimw@sifive.com>
2806 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2808 2018-07-07 Tom de Vries <tdevries@suse.de>
2810 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2812 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
2814 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2816 (combine_bound): Use wide-int overflow calculation instead of
2818 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2820 * fold-const.c (int_const_binop_2): Same.
2821 (extract_muldiv_1): Same.
2822 (fold_div_compare): Same.
2823 (fold_abs_const): Same.
2825 * poly-int.h (add): Same.
2829 * predict.c (predict_iv_comparison): Same.
2830 * profile-count.c (slow_safe_scale_64bit): Same.
2831 * simplify-rtx.c (simplify_const_binary_operation): Same.
2832 * tree-chrec.c (tree_fold_binomial): Same.
2833 * tree-data-ref.c (split_constant_offset_1): Same.
2834 * tree-if-conv.c (idx_within_array_bound): Same.
2835 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2836 * tree-ssa-phiopt.c (minmax_replacement): Same.
2837 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2838 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2839 * vr-values.c (vr_values::adjust_range_with_scev): Same.
2840 * wide-int.cc (wi::add_large): Same.
2841 (wi::mul_internal): Same.
2842 (wi::sub_large): Same.
2843 (wi::divmod_internal): Same.
2844 * wide-int.h: Change overflow type to overflow_type for neg, add,
2845 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2846 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2847 mul_internal, divmod_internal.
2848 (overflow_type): New enum.
2849 (accumulate_overflow): New.
2851 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2853 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2854 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2856 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2858 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2859 argument is checked for zero before entering loop, avoid checking again.
2861 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2863 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2864 * gimplify.h (generic_expr_could_trap_p): Likwise.
2865 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2867 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2869 PR tree-optimization/86401
2870 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2871 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2872 (fold_bit_and_mask): ... here. New helper function for match.pd.
2873 * fold-const.h (fold_bit_and_mask): Declare.
2874 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2876 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2879 * target.def (translate_mode_attribute): New hook.
2880 * targhooks.h (default_translate_mode_attribute): Declare.
2881 * targhooks.c (default_translate_mode_attribute): New function.
2882 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2883 * doc/tm.texi: Regenerate.
2884 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2885 (rs6000_translate_mode_attribute): New function.
2887 2018-07-06 Paul Koning <ni1d@arrl.net>
2889 * doc/md.texi (define_split): Document DONE and FAIL.
2890 (define_peephole2): Ditto.
2892 2018-07-05 Jeff Law <law@redhat.com>
2894 PR tree-optimization/86010
2895 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2896 both the head and tail of mem* and str* calls.
2898 2018-07-05 Jim Wilson <jimw@sifive.com>
2900 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2902 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2904 * config/aarch64/aarch64-simd.md: correct flags text for
2905 MIN_EXPR replacement.
2907 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2909 * configure: Regenerated.
2911 2018-07-05 Carl Love <cel@us.ibm.com>
2913 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2914 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2915 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2916 VSX_BUILTIN_DOUBLEL_V4SF.
2918 2018-07-05 Martin Sebor <msebor@redhat.com>
2921 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2922 than its domain to compute its the upper bound of a char array.
2924 2018-07-05 Nathan Sidwell <nathan@acm.org>
2926 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2927 * doc/cpp.texi: Update comment.
2928 * doc/tm.texi: Rebuilt.
2929 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2930 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2931 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2932 headers affected by extern "C".
2933 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2934 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2935 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2936 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2937 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2938 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2939 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2940 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2941 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2942 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2943 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2944 config/sparc/sp64-elf.h, config/spu/spu.h,
2945 config/stormy16/stormy16.h, config/v850/v850.h,
2946 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2947 define NO_IMPLICIT_EXTERN_C.
2948 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2950 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2953 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2954 instead of GET_MODE_SIZE when comparing Units.
2956 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2959 * rtlanal.c (set_noop_p): Constrain on mode change,
2960 include hard-reg-set.h
2962 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2964 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2966 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2969 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2972 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2974 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2976 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2979 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2981 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2983 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2986 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2988 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2990 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2991 neg_*_op* variables.
2993 2018-07-04 Martin Liska <mliska@suse.cz>
2995 * tree-switch-conversion.c: Define
2996 max_ratio_for_speed and max_ratio_for_size constants.
2998 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2999 Martin Liska <mliska@suse.cz>
3004 * common.opt: Rename align options with 'str_' prefix.
3005 * common/config/i386/i386-common.c (set_malign_value): New
3007 (ix86_handle_option): Use it to set -falign-* options/
3008 * config/aarch64/aarch64-protos.h (struct tune_params): Change
3009 type from int to string.
3010 * config/aarch64/aarch64.c: Update default values from int
3012 * config/alpha/alpha.c (alpha_override_options_after_change):
3014 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3015 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3016 max skip conditionally.
3017 * config/i386/freebsd.h (SUBALIGN_LOG): New.
3018 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3019 max skip conditionally.
3020 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3021 max skip conditionally.
3022 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3023 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3024 max skip conditionally.
3025 * config/i386/i386.c (struct ptt): Change type from int to
3027 (ix86_default_align): Set default values.
3028 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3029 max skip conditionally.
3030 * config/i386/iamcu.h (SUBALIGN_LOG): New.
3031 (ASM_OUTPUT_MAX_SKIP_ALIGN):
3032 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3033 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3034 max skip conditionally.
3035 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3036 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3037 * config/i386/x86-64.h (SUBALIGN_LOG): New.
3038 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3039 max skip conditionally.
3040 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3041 * config/ia64/ia64.c (ia64_option_override): Set default values
3042 for alignment options.
3043 * config/m68k/m68k.c: Handle new str_align_* options.
3044 * config/mips/mips.c (mips_set_compression_mode): Change
3046 (mips_option_override): Set default values for options.
3047 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3049 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3051 * config/rx/rx.c (rx_option_override): Likewise.
3052 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3053 (LABEL_ALIGN): Use align_labels_log.
3054 (LOOP_ALIGN): Use align_loops_align.
3055 * config/s390/s390.c (s390_asm_output_function_label): Use new
3057 * config/sh/sh.c (sh_override_options_after_change):
3058 Change type of constants.
3059 * config/spu/spu.c (spu_sched_init): Likewise.
3060 * config/sparc/sparc.c (sparc_option_override): Set default
3062 * config/visium/visium.c (visium_option_override): Likewise.
3063 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3064 emit p2align format with last argument if it's not needed.
3065 * doc/invoke.texi: Document extended format of -falign-*.
3066 * final.c: Use align_labels alignment.
3067 * flags.h (struct target_flag_state): Change type to use
3069 (struct align_flags_tuple): New.
3070 (struct align_flags): Likewise.
3071 (align_loops_log): Redefine macro to use new types.
3072 (align_loops_max_skip): Redefine macro to use new types.
3073 (align_jumps_log): Redefine macro to use new types.
3074 (align_jumps_max_skip): Redefine macro to use new types.
3075 (align_labels_log): Redefine macro to use new types.
3076 (align_labels_max_skip): Redefine macro to use new types.
3077 (align_functions_log): Redefine macro to use new types.
3078 (align_loops): Redefine macro to use new types.
3079 (align_jumps): Redefine macro to use new types.
3080 (align_labels): Redefine macro to use new types.
3081 (align_functions): Redefine macro to use new types.
3082 (align_functions_max_skip): Redefine macro to use new types.
3083 (align_loops_value): New macro.
3084 (align_jumps_value): New macro.
3085 (align_labels_value): New macro.
3086 (align_functions_value): New macro.
3087 * function.c (invoke_set_current_function_hook): Propagate
3088 alignment values from flags to global variables default in
3090 * ipa-icf.c (sem_function::equals_wpa): Use
3091 cl_optimization_option_eq instead of memcmp.
3092 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3094 (cl_optimization_stream_in): Likewise.
3095 * optc-save-gen.awk: Support strings in cl_optimization.
3096 * opth-gen.awk: Likewise.
3097 * opts.c (finish_options): Remove error checking of invalid
3099 (MAX_CODE_ALIGN): Remove.
3100 (MAX_CODE_ALIGN_VALUE): Likewise.
3101 (parse_and_check_align_values): New function.
3102 (check_alignment_argument): Likewise.
3103 (common_handle_option): Use check_alignment_argument.
3104 * opts.h (parse_and_check_align_values): Declare.
3105 * toplev.c (init_alignments): Remove.
3106 (read_log_maxskip): New.
3107 (parse_N_M): Likewise.
3108 (parse_alignment_opts): Likewise.
3109 (backend_init_target): Remove usage of init_alignments.
3110 * toplev.h (parse_alignment_opts): Declare.
3111 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3113 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3114 * tree.c (cl_option_hasher::equal): New.
3115 * varasm.c: Use new global macros.
3117 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3119 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3120 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3121 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3122 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3123 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3124 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3125 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3126 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3127 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3128 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3129 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3130 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3131 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3133 2018-07-04 Martin Liska <mliska@suse.cz>
3134 Jonathan Wakely <jwakely@redhat.com>
3136 * coverage.c: Use correct type.
3137 * doc/invoke.texi: Language correction.
3139 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3142 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3143 ENDBRANCH for non-tail call which may return via indirect branch.
3144 * doc/extend.texi: Document indirect_return attribute.
3146 2018-07-03 Martin Sebor <msebor@redhat.com>
3148 PR tree-optimization/86274
3149 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3151 (format_floating): Correct handling of infinities and NaNs.
3153 2018-07-03 Martin Sebor <msebor@redhat.com>
3155 * print-tree.c (print_real_cst): New function.
3156 (print_node_brief): Call it.
3157 (print_node): Ditto.
3159 2018-07-03 Jeff Law <law@redhat.com>
3161 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3162 into a single pattern.
3164 * config/h8300/h8300.md (ors code_iterator): New.
3165 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3166 a single pattern and single splitter.
3167 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3168 (iorqi3_1, xorqi3_1): Likewise.
3169 (iorqi3, xorqi3 expanders): Similarly.
3171 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3172 (movmd_internal) into a single pattern using the P mode iterator.
3173 (movmd splitters): Similarly.
3174 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3175 (movsd splitters): Similarly.
3177 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3178 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3179 right table based on the size of the operand.
3180 * config/h8300/h8300.md (length_table): Corresponding changes. All
3181 references to "addb", "addw" and "addl" changed to "add".
3182 (btst patterns): Merge two variants into a single pattern.
3183 (tstqi, tsthi): Likewise.
3184 (addhi3_incdec, addsi3_incdec): Likewise.
3185 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3186 (mulhi3, mulsi3): Likewise.
3187 (udivhi3, udivsi3): Likewise.
3188 (divhi3, divsi3): Likewise.
3189 (andorqi3, andorhi3, andorsi3): Likewise.
3191 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
3194 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3195 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3197 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3199 PR tree-optimization/85694
3200 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3201 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3203 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3204 (<u>avg<mode>3_ceil): New patterns.
3206 2018-07-03 David Malcolm <dmalcolm@redhat.com>
3208 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3209 scan-tree-dump directive.
3210 * gcc.dg/vect/slp-perm-2.c: Likewise.
3211 * gcc.dg/vect/slp-perm-3.c: Likewise.
3212 * gcc.dg/vect/slp-perm-5.c: Likewise.
3213 * gcc.dg/vect/slp-perm-6.c: Likewise.
3214 * gcc.dg/vect/slp-perm-7.c: Likewise.
3215 * gcc.dg/vect/slp-perm-8.c: Likewise.
3217 2018-07-03 Marek Polacek <polacek@redhat.com>
3220 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3222 2018-07-03 Richard Biener <rguenther@suse.de>
3225 * tree-ssa-structalias.c (find_func_clobbers): Properly
3226 handle indirect calls.
3228 2018-07-03 Jeff Law <law@redhat.com>
3230 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3231 (shifts): New code iterator.
3232 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3233 expander. Fix HImode handling on H8/SX.
3234 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3235 (subqi3, subhi3, subsi3 expanders): Likewise.
3236 (andqi3, andhi3, andsi3 expanders): Likewise.
3237 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3238 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3239 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3240 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3241 (zero_extendqihi2, zero_extendqisi2): Likewise.
3242 (extendqihi2, extendqisi2): Likewise.
3243 (rotlqi3, rotlhi3, rotlsi3): Likewise.
3244 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3245 (rotlqi3_1, rotlhi3_1): Likewise.
3246 (logicalhi3_sn, logicalsi3_sn): Likewise.
3247 (logicalhi3, logicalsi3): Likewise.
3249 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3251 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3252 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3253 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3254 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3255 type to append_pattern_def_seq instead of creating a stmt_vec_info
3257 (build_mask_conversion): Likewise. Remove vinfo argument.
3258 (vect_add_conversion_to_patterm): Likewise, renaming to...
3259 (vect_add_conversion_to_pattern): ...this.
3260 (vect_recog_mask_conversion_pattern): Update call to
3261 build_mask_conversion. Pass the vector type to
3262 append_pattern_def_seq here too.
3263 (vect_recog_gather_scatter_pattern): Update call to
3264 vect_add_conversion_to_pattern.
3266 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3268 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3269 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3270 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3271 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3272 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3273 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3274 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3275 append_pattern_def_seq instead of new_pattern_def_seq.
3276 (vect_recog_divmod_pattern): Do both of the above.
3277 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3280 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3282 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3283 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3284 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3285 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3286 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3287 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3288 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3289 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3290 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3291 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3292 parameter with a single stmt_vec_info.
3293 (vect_recog_func_ptr): Likewise.
3294 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3295 (vect_try_gather_scatter_pattern): ...this.
3296 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3297 the stmt_vec_info of the statement to be matched. Don't clear
3298 STMT_VINFO_RELATED_STMT.
3299 (vect_pattern_recog): Update call accordingly.
3301 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3303 PR tree-optimization/85694
3304 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3305 (uavgM3_ceil): Document new optabs.
3306 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3307 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3309 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3310 (savg_ceil_optab): New optabs.
3311 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3312 (vect_vect_recog_func_ptrs): Add it.
3313 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3314 constant directly from the associated lhs.
3316 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3318 * tree-vect-patterns.c (vect_split_statement): New function.
3319 (vect_convert_input): Use it to try to split an existing cast.
3321 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3323 * poly-int.h (print_hex): New function.
3324 * dumpfile.h (dump_dec, dump_hex): Declare.
3325 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3326 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3327 min_input_precision, operation_precision and operation_sign.
3328 * tree-vect-patterns.c (vect_get_range_info): New function.
3329 (vect_same_loop_or_bb_p, vect_single_imm_use)
3330 (vect_operation_fits_smaller_type): Delete.
3331 (vect_look_through_possible_promotion): Add an optional
3332 single_use_p parameter.
3333 (vect_recog_over_widening_pattern): Rewrite to use new
3334 stmt_vec_info infomration. Handle one operation at a time.
3335 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3336 (vect_truncatable_operation_p, vect_set_operation_type)
3337 (vect_set_min_input_precision): New functions.
3338 (vect_determine_min_output_precision_1): Likewise.
3339 (vect_determine_min_output_precision): Likewise.
3340 (vect_determine_precisions_from_range): Likewise.
3341 (vect_determine_precisions_from_users): Likewise.
3342 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3343 (vect_vect_recog_func_ptrs): Put over_widening first.
3345 (vect_pattern_recog): Call vect_determine_precisions.
3347 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3349 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3350 statements that have been replaced by further pattern statements.
3351 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3353 2018-07-03 Richard Biener <rguenther@suse.de>
3355 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3356 always set *dt. Dump vectype in vectype overload.
3357 * dumpfile.h (dump_gimple_expr): New function.
3358 (dump_gimple_expr_loc): Likewise.
3359 * dumpfile.c (dump_gimple_expr): New function.
3360 (dump_gimple_expr_loc): Likewise.
3362 2018-07-02 Jeff Law <law@redhat.com>
3364 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3365 the H8/300, H8/300H and H8/S variants into a single pattern.
3366 (movhi_h8300, movqi_h8300hs): Similarly.
3367 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3368 (QHI mode iterator): New.
3370 * config/h8300/h8300.md: Remove trailing whitespace.
3372 2018-07-02 Jim Wilson <jimw@sifive.com>
3374 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3375 instead of emit_insn for interrupt returns.
3376 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3377 (riscv_sret, riscv_uret): Likewise.
3379 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3381 * pretty-print.c (selftest::test_pp_format): Move save and restore
3382 of quotes to class auto_fix_quotes, and add an instance.
3383 * selftest.c: Include "intl.h".
3384 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3385 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3386 * selftest.h (selftest::auto_fix_quotes): New class.
3388 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3390 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3391 (aarch64_sve_prepare_conditional_op): Remove.
3392 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3393 Allow aarch64_simd_reg_or_zero as select operand; remove
3394 the aarch64_sve_prepare_conditional_op call.
3395 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3396 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3397 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3398 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3399 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3400 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3401 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3402 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3403 and a splitters to match all of the *_any patterns.
3404 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3406 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3407 (SVE_COND_FP_BINARY_REV): Remove.
3408 (sve_int_op_rev, sve_fp_op_rev): New.
3409 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3410 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3411 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3412 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3413 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3414 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3415 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3416 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3417 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3419 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3420 Remove match_dup 1 from the inner unspec.
3421 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3423 * config/aarch64/aarch64.md (movprfx): New attr.
3424 (length): Default movprfx to 8.
3425 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3426 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3427 (*<su>mul<SVE_I>3_highpart): Likewise.
3428 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3429 (*v<ASHIFT><SVE_I>3): Likewise.
3430 (*<su><MAXMIN><SVE_I>3): Likewise.
3431 (*<su><MAXMIN><SVE_F>3): Likewise.
3432 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3433 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3434 (*div<SVE_F>4): Likewise.
3436 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3438 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3441 2018-07-02 Richard Biener <rguenther@suse.de>
3443 PR tree-optimization/86363
3444 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3445 memset argument refers to a non-variable address.
3447 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3449 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3450 {PLUS,MINUS}_EXPR code to...
3451 (adjust_symbolic_bound): ...here,
3452 (combine_bound): ...here,
3453 (set_value_range_with_overflow): ...and here.
3455 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3457 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3459 (extract_range_from_abs_expr): ...here.
3461 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3463 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3464 -fno-omit-frame-pointer when not optimizing.
3466 2018-07-02 Martin Liska <mliska@suse.cz>
3469 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3470 (propagate_nothrow): Likewise.
3472 2018-07-02 Martin Liska <mliska@suse.cz>
3475 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3477 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3479 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3480 function in r262149, changing "loc" param from source_location to
3481 const dump_location_t &.
3482 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3483 declaration, as above.
3485 2018-07-01 Paul Koning <ni1d@arrl.net>
3487 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3488 -munit-asm, -mgnu-asm, -mdec-asm.
3489 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3490 (pdp11_output_labelref): New.
3491 (pdp11_output_def): New.
3492 (pdp11_output_addr_vec_elt): New.
3493 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3494 %# and %@ format codes.
3495 (pdp11_option_override): New.
3496 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3497 (pdp11_output_ident): New.
3498 (pdp11_asm_named_section): New.
3499 (pdp11_asm_init_sections): New.
3500 (pdp11_file_start): New.
3501 (pdp11_file_end): New.
3502 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3503 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3504 %o, like %c but octal.
3505 (pdp11_option_override): New.
3506 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3508 (DATA_SECTION_ASM_OP): Ditto.
3509 (READONLY_DATA_SECTION_ASM_OP): New.
3510 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3511 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3512 (ASM_OUTPUT_LABELREF): Ditto.
3513 (ASM_OUTPUT_DEF): Ditto.
3514 (ASM_OUTPUT_EXTERNAL): New.
3515 (ASM_OUTPUT_SOURCE_FILENAME): New.
3516 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3517 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3518 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3519 %# and %@ format codes.
3520 * config/pdp11/pdp11.opt (mgnu-asm): New.
3521 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3522 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3523 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3525 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3527 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3528 dereferencing path[] beyond its length.
3530 (debug_all_paths): New.
3531 (rewire_first_differing_edge): New.
3532 (adjust_paths_after_duplication): New.
3533 (duplicate_thread_path): Call adjust_paths_after_duplication.
3535 (thread_through_all_blocks): Add new argument to
3536 duplicate_thread_path.
3538 2018-06-30 Jim Wilson <jimw@sifive.com>
3540 * config/riscv/predicates.md (p2m1_shift_operand): New.
3541 (high_mask_shift_operand): New.
3542 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3543 pattern using p2m1_shift_operand.
3544 (lshsi3_zero_extend_3+2): New combiner pattern using
3545 high_mask_shift_operand.
3547 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3549 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3551 (vect_recog_rotate_pattern): ...here.
3552 (vect_convert_input): Try to insert casts of invariants in the
3554 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3555 preheader to be empty.
3557 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3559 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3560 vector type. If given, install it in the new statement's
3562 (vect_element_precision): New function.
3563 (vect_unpromoted_value): New struct.
3564 (vect_unpromoted_value::vect_unpromoted_value): New function.
3565 (vect_unpromoted_value::set_op): Likewise.
3566 (vect_look_through_possible_promotion): Likewise.
3567 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3568 (vect_widened_op_tree, vect_convert_input): Likewise.
3569 (vect_convert_inputs, vect_convert_output): Likewise.
3570 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3571 to handle the optional cast of the multiplication result and
3572 vect_widened_op_tree to detect the widened multiplication itself.
3573 Do not require the input and output of promotion casts to have
3574 the same sign, but base the signedness of the operation on the
3575 input rather than the result. If the pattern includes two
3576 promotions, check that those promotions have the same sign.
3577 Do not restrict the MULT_EXPR handling to a double-width result;
3578 handle quadruple-width results and wider. Use vect_convert_inputs
3579 to convert the inputs to the common type.
3580 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3581 to handle the optional cast of the ABS result. Also allow a sign
3582 change or a sign extension between the ABS and MINUS.
3583 Use vect_widened_op_tree to detect the widened subtraction and use
3584 vect_convert_inputs to convert the inputs to the common type.
3585 (vect_handle_widen_op_by_const): Delete.
3586 (vect_recog_widen_op_pattern): New function.
3587 (vect_recog_widen_mult_pattern): Use it.
3588 (vect_recog_widen_shift_pattern): Likewise.
3589 (vect_recog_widen_sum_pattern): Use
3590 vect_look_through_possible_promotion to handle the promoted
3593 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3595 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3596 the containing gimple_seq *.
3597 * gimple-iterator.h (gsi_for_stmt): Declare it.
3598 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3599 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3600 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3601 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3602 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3604 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3606 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3607 statement being replaced is part of an existing pattern
3608 definition sequence, inserting the new pattern statements before
3610 (vect_pattern_recog_1): Don't return a bool. If the statement
3611 is already part of a pattern, instead apply pattern matching
3612 to the pattern definition statements. Don't clear the
3613 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3614 (vect_pattern_recog): Don't break after the first match;
3615 continue processing the pattern definition statements instead.
3616 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3618 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3620 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3621 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3622 (vect_recog_widen_sum_pattern): Use it.
3624 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3626 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3627 phi is not a pattern statement and has not been replaced by
3628 a pattern statement.
3629 * tree-vect-patterns.c (type_conversion_p): Don't check
3630 STMT_VINFO_IN_PATTERN_P.
3631 (vect_recog_vector_vector_shift_pattern): Likewise.
3632 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3633 the pattern statement rather than the original statement; check
3634 directly for a WIDEN_MULT_EXPR here.
3635 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3636 vect_is_simple_use to return the pattern statement rather
3637 than the original statement; use is_pattern_stmt_p to check
3638 for such a pattern statement.
3639 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3640 to return the pattern statement rather than the original statement;
3641 don't do the same transformation here.
3642 (vect_is_simple_use): If the defining statement has been replaced
3643 by a pattern statement, return the pattern statement instead.
3644 Remove the corresponding (local) transformation from the vectype
3647 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3649 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3650 end and default to null.
3651 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3652 (vectorizable_reduction): Update calls accordingly, dropping the
3653 gimple ** argument if the passed-back statement isn't needed.
3654 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3655 (vect_recog_rotate_pattern): Likewise.
3656 (vect_recog_mask_conversion_pattern): Likewise.
3657 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3658 (vect_mask_constant_operand_p): Likewise.
3659 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3660 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3661 (get_group_load_store_type, get_load_store_type): Likewise.
3662 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3663 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3664 (vectorizable_conversion, vectorizable_assignment): Likewise.
3665 (vectorizable_shift, vectorizable_operation): Likewise.
3666 (vectorizable_store, vect_is_simple_cond): Likewise.
3667 (vectorizable_condition, vectorizable_comparison): Likewise.
3668 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3669 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3670 and move it to the end. Cope with null def_stmt_outs.
3672 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3674 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3676 2018-06-29 Jeff Law <law@redhat.com>
3678 * config/v850/v850.c (v850_legitimate_address_p): Handle large
3679 displacements for TARGET_V850E2V3 and newer.
3680 (TARGET_LRA_P): Remove. Defaults to LRA now.
3681 * config/v850/v850.md (sign23byte_load): Remove.
3682 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3683 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3685 2018-06-29 Martin Liska <mliska@suse.cz>
3688 * coverage.c (coverage_init): Mangle full path name.
3689 * doc/invoke.texi: Document the change.
3690 * gcov-io.c (mangle_path): New.
3691 * gcov-io.h (mangle_path): Likewise.
3692 * gcov.c (mangle_name): Use mangle_path for path mangling.
3694 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3696 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3697 if starting source register is not even.
3699 2018-06-29 Martin Liska <mliska@suse.cz>
3701 PR tree-optimization/86263
3702 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3703 Make edge redirection.
3705 2018-06-29 David Malcolm <dmalcolm@redhat.com>
3707 * dumpfile.c (dump_loc): Add indentation based on scope depth.
3708 (dump_scope_depth): New variable.
3709 (get_dump_scope_depth): New function.
3710 (dump_begin_scope): New function.
3711 (dump_end_scope): New function.
3712 * dumpfile.h (get_dump_scope_depth): New declaration.
3713 (dump_begin_scope): New declaration.
3714 (dump_end_scope): New declaration.
3715 (class auto_dump_scope): New class.
3716 (AUTO_DUMP_SCOPE): New macro.
3717 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3720 2018-06-29 Richard Biener <rguenther@suse.de>
3722 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3723 compute_all_dependences succeeds.
3724 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3725 exceed --param loop-max-datarefs-for-datadeps.
3727 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3729 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3731 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3734 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3735 alternative 0 in preferred_for_speed attribute.
3737 2018-06-28 Paul Koning <ni1d@arrl.net>
3739 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3740 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3741 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3742 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3743 for shift insn patterns.
3745 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3747 * cgraph.c (cgraph_node::get_body): Replace assignments to
3748 "dump_file" with calls to set_dump_file.
3749 * dumpfile.c (alt_dump_file): Make static, and group with...
3750 (alt_flags): ...this definition.
3751 (dumps_are_enabled): New variable.
3752 (refresh_dumps_are_enabled): New function.
3753 (set_dump_file): New function.
3754 (set_alt_dump_file): New function.
3755 (gcc::dump_manager::dump_start): Replace assignments to
3756 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3758 (gcc::dump_manager::dump_finish): Likewise.
3759 * dumpfile.h (alt_dump_file): Delete decl.
3760 (dumps_are_enabled): New variable decl.
3761 (set_dump_file): New function decl.
3762 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3764 * tree-nested.c (lower_nested_functions): Replace assignments to
3765 "dump_file" with calls to set_dump_file.
3767 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3769 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3770 goto_locus of each outgoing edge of each basic block.
3772 2018-06-28 Richard Biener <rguenther@suse.de>
3774 * dwarf2out.c (decl_scope_table): Remove.
3775 (push_decl_scope): Likewise.
3776 (pop_decl_scope): Likewise.
3777 (gen_type_die_for_member): Do not call push/pop_decl_scope.
3778 (gen_struct_or_union_type_die): Likewise.
3779 (gen_tagged_type_die): Likewise.
3780 (dwarf2out_init): Do not initialize decl_scope_table.
3781 (dwarf2out_c_finalize): Do not free it.
3783 2018-06-28 Richard Biener <rguenther@suse.de>
3785 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3786 deciding whether to not re-use a DIE.
3788 2018-06-28 Richard Biener <rguenther@suse.de>
3790 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3791 DW_AT_abstract_origin attribute.
3793 2018-06-28 Martin Liska <mliska@suse.cz>
3795 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3796 Use newly introduced constants.
3797 * tree-switch-conversion.h (struct jump_table_cluster):
3798 Define max_ratio_for_size and max_ratio_for_speed.
3800 2018-06-28 Martin Liska <mliska@suse.cz>
3802 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3803 Add new checking assert to catch invalid state.
3804 (jump_table_cluster::can_be_handled): Handle single case
3806 (jump_table_cluster::is_beneficial): Bail out for such case.
3807 (bit_test_cluster::find_bit_tests):
3808 Add new checking assert to catch invalid state.
3809 (bit_test_cluster::can_be_handled): Handle single case
3811 (bit_test_cluster::is_beneficial): Bail out for such case.
3812 (switch_decision_tree::analyze_switch_statement):
3815 2018-06-28 Martin Liska <mliska@suse.cz>
3817 * common.opt: Introduce -completion option.
3818 * gcc.c (driver_handle_option): Handle it.
3819 (driver::main): Print completions if completion
3821 * opt-suggestions.c (option_proposer::get_completions):
3823 (option_proposer::suggest_completion): Likewise.
3824 (option_proposer::find_param_completions): Likewise.
3825 (verify_autocompletions): Likewise.
3826 (test_completion_valid_options): Likewise.
3827 (test_completion_valid_params): Likewise.
3828 (in_completion_p): Likewise.
3829 (empty_completion_p): Likewise.
3830 (test_completion_partial_match): Likewise.
3831 (test_completion_garbage): Likewise.
3832 (opt_proposer_c_tests): Likewise.
3833 * opt-suggestions.h: Declare new functions.
3834 * opts.c (common_handle_option): Handle OPT__completion_.
3835 * selftest-run-tests.c (selftest::run_tests): Add
3836 opt_proposer_c_tests.
3837 * selftest.c (assert_str_startswith): New.
3838 * selftest.h (assert_str_startswith): Likewise.
3839 (opt_proposer_c_tests): New.
3840 (ASSERT_STR_STARTSWITH): Likewise.
3842 2018-06-28 Martin Liska <mliska@suse.cz>
3844 * Makefile.in: Add opt-suggestions.o.
3845 * gcc-main.c: Include opt-suggestions.h.
3846 * gcc.c (driver::driver): Likewise.
3847 (driver::~driver): Remove m_option_suggestions.
3848 (driver::build_option_suggestions): Moved to option_proposer.
3849 (driver::suggest_option): Likewise.
3850 (driver::handle_unrecognized_options): Use option_proposer.
3851 * gcc.h (class driver): Add new memver m_option_proposer.
3852 * opt-suggestions.c: New file.
3853 * opt-suggestions.h: New file.
3855 2018-06-28 Martin Liska <mliska@suse.cz>
3857 * vec.h (class auto_string_vec): New (moved from auto_argvec).
3858 (auto_string_vec::~auto_string_vec): Likewise.
3860 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3862 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3863 prevent_decl_creation_for_types fields up and add reset_location field.
3864 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3865 statement if id->reset_location is true.
3866 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3867 id->reset_location is true.
3868 (copy_phis_for_bb): Force input_location on the arguments if
3869 id->reset_location is true.
3870 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3871 is set on the function to be inlined.
3873 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3875 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3877 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3879 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3880 registers for Pmode.
3881 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3882 hard registers for the clobbered pseudo.
3884 2018-06-27 Paul Koning <ni1d@arrl.net>
3886 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3887 mutually exclusive options.
3888 * config/pdp11/constraints.md (h): New constraint.
3889 (O): Update definition to match shift code generation.
3890 (D): New constraint.
3891 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3893 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3895 (output_jump): Change arguments.
3896 (pdp11_fixed_cc_regs): New function.
3897 (pdp11_cc_mode): Ditto.
3898 (pdp11_expand_shift): Ditto.
3899 (pdp11_assemble_shift): Ditto.
3900 (pdp11_small_shift): Ditto.
3901 (pdp11_branch_cost): Remove.
3902 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3904 (pdp11_register_move_cost): Update for CC registers.
3905 (pdp11_rtx_costs): Add case for LSHIFTRT.
3906 (pdp11_output_jump): Add CCNZ mode conditional branches.
3907 (notice_update_cc_on_set): Remove.
3908 (pdp11_cc_mode): New function.
3909 (simple_memory_operand): Correct pre/post decrement case.
3910 (no_side_effect_operand): New function.
3911 (pdp11_regno_reg_class): Add CC_REGS class.
3912 (pdp11_fixed_cc_regs): New function.
3913 (pdp11_small_shift): New function.
3914 (pdp11_expand_shift): New function to expand shift insns.
3915 (pdp11_assemble_shift): New function to output shifts.
3916 (pdp11_branch_cost): Remove.
3917 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3918 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3919 (WCHAR_TYPE): Ditto.
3920 (PTRDIFF_TYPE): Ditto.
3921 (ADJUST_INSN_LENGTH): New macro.
3922 (FIXED_REGISTERS): Add CC registers.
3923 (CALL_USED_REGISTERS): Ditto.
3925 (REG_CLASS_NAMES): Ditto.
3926 (REG_CLASS_CONTENTS): Ditto.
3927 (SELECT_CC_MODE): Use new function.
3928 (TARGET_FLAGS_REGNUM): New macro.
3929 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3930 (cc0_reg_rtx): Remove.
3931 (CC_STATUS_MDEP): Remove.
3932 (CC_STATUS_MDEFP_INIT): Remove.
3933 (CC_IN_FPU): Remove.
3934 (NOTICE_UPDATE_CC): Remove.
3935 (REGISTER_NAMES): Add CC registers.
3936 (BRANCH_COST): Change to constant 1.
3937 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3939 * config/pdp11/pdp11.opt (mbcopy): Remove.
3940 (mbcopy-builtin): Remove.
3941 (mbranch-cheap): Remove.
3942 (mbranch-expensive): Remove.
3943 * config/pdp11/predicates.md (expand_shift_operand): Update to
3944 match shift code generation.
3945 (ccnz_operator): New predicate.
3946 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3947 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3948 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3950 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3951 description of O constraint.
3953 2018-06-27 Jeff Law <law@redhat.com>
3954 Austin Law <austinklaw@gmail.com>
3956 * config/v850/v850.md (addsi3_set_flags): New pattern.
3957 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3958 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3959 (zero_extendhisi2_v850_set_flags): Likewise.
3960 (zero_extendqisi2_v850_set_flags): Likewise.
3961 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3962 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3963 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3965 * config/v850/v850-protos.h (notice_update_cc): Remove.
3966 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3967 (v850_print_operand): Handle 'D' and "d".
3968 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3969 Add handling of arithmetic/logical operations compared against zero.
3970 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3971 Do not look at v850_compare_op, instead get mode from last argument.
3972 (v850_gen_compare): Remove
3973 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3974 after reload for prologue insns.
3975 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3977 (construct_save_jarl): Likewise.
3978 (TARGET_FLAGS_REGNUM): Define.
3979 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3980 (NOTICE_UPDATE_CC): Remove.
3981 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3982 than cc0. Conditionalize on reload_completed.
3983 (cmpsi_insn, setfcc_insn): Likewise.
3984 (tst1 splitter): Turn into define_and_split which sets the flags
3986 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3987 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3988 (cstoresf4, cstoredf4): Clobber the flags.
3989 (cmpsi, cmpsf, cmpdf): Remove expanders.
3990 (setf_insn): Remove pattern.
3991 (addsi3): Turn into define_and_split which clobbers the flags after
3992 reload and a suitable pattern (addsi3_clobber_flags) for use after
3994 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3995 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3996 (ashrsi3, ashrsi3_v850e2): Likewise.
3997 (bins): Clobber the flags.
3998 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3999 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4000 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4001 (call_value_internal_short, call_value_internal_long): Likewise.
4002 (callt_save_interrupt, callt_return_interrupt): Likewise.
4003 (save_interrupt, return_interrupt): Likewise.
4004 (callt_save_all_interrupt, save_all_interrupt): Likewise.
4005 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4006 (restore_all_interrupt, _restore_all_interrupt): Likewise.
4007 (All FP comparisons): Only allow after reload has completed.
4009 (divh, divhu): Tweak output template.
4010 (branch_z_normal, branch_z_invert): Remove
4011 (branch_nz_normal, branch_nz_invert): Likewise.
4012 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4014 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4015 * config/v850/v850.c (notice_update_cc): Remove.
4016 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
4017 (CC_NO_CARRY): Likewise.
4018 (NOTICE_UPDATE_CC): Define to nothing.
4019 * config/v850/v850.md: Remove block comment on cc0 handling
4020 Remove "cc" attribute from all patterns. Remove cc_status handling
4021 from all patterns. Minor formatting fixes.
4023 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4025 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4026 (cortex-a76.cortex-a55): Likewise.
4027 * config/aarch64/aarch64-tune.md: Regenerate.
4028 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4029 cortex-a76.cortex-a55.
4031 2018-06-27 Jeff Law <law@redhat.com>
4033 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4034 (MULTILIB_DIRNAMES): Similarly.
4036 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
4038 * gimple.h (gimple_return_retbnd): Delete.
4039 (gimple_return_set_retbnd): Likewise.
4040 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4041 gimple_return_set_retbnd.
4042 * gimple-pretty-print.c (dump_gimple_return): Remove call to
4043 gimple_return_retbnd and adjust.
4044 * tree-inline.h (struct copy_body_data): Remove retbnd field.
4045 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4046 Explicitly return NULL in a couple more cases. Move assertion
4047 on debug statements and remove unreachable code.
4048 (reset_debug_binding): Do not test id->retbnd.
4049 (expand_call_inline): Do not set it.
4051 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4053 * configure.ac: Add --disable-gcov option.
4054 * configure: Regenerate.
4055 * Makefile.in: Honour @enable_gcov@.
4056 * doc/install.texi: Document --disable-gcov.
4058 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4060 * config/arm/arm-cpus.in (cortex-a76): New entry.
4061 (cortex-a76.cortex-a55): Likewise.
4062 * config/arm/arm-tables.opt: Regenerate.
4063 * config/arm/arm-tune.md: Likewise.
4064 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4065 * doc/invoke.texi (ARM Options): Document cortex-a76 and
4066 cortex-a76.cortex-a55.
4068 2018-06-27 Tamar Christina <tamar.christina@arm.com>
4071 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4073 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4075 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4077 (EPILOGUE_USES): Likewise.
4079 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4081 * tree-inline.c (remap_location): New function extracted from...
4082 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4083 (copy_phis_for_bb): ...here. Call remap_location.
4084 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4086 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4088 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4089 unaligned vsx for 16B memset.
4091 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4094 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4095 ieee128_float_type_node to long_double_type_node unless
4096 TARGET_LONG_DOUBLE_128 is set.
4098 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4100 * cfgloop.c (get_loop_location): Convert return type from
4101 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4102 by implicit construction from rtx_insn *, and using
4103 dump_user_location_t::from_function_decl for the fallback case.
4104 * cfgloop.h (get_loop_location): Convert return type from
4105 location_t to dump_user_location_t.
4106 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4107 dump_printf_loc to pass in a dump_location_t rather than a
4108 location_t, via the gimple stmt.
4109 * coverage.c (get_coverage_counts): Update calls to
4110 dump_printf_loc to pass in dump_location_t rather than a
4112 * doc/optinfo.texi (Dump types): Convert example of
4113 dump_printf_loc from taking "locus" to taking "insn". Update
4114 description of the "_loc" calls to cover dump_location_t.
4115 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4117 (dump_user_location_t::dump_user_location_t): New constructors,
4118 from gimple *stmt and rtx_insn *.
4119 (dump_user_location_t::from_function_decl): New function.
4120 (dump_loc): Make static.
4121 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4122 const dump_location_t &.
4123 (dump_generic_expr_loc): Delete.
4124 (dump_printf_loc): Convert param "loc" from location_t to
4125 const dump_location_t &.
4126 (selftest::test_impl_location): New function.
4127 (selftest::dumpfile_c_tests): New function.
4128 * dumpfile.h: Include "profile-count.h".
4129 (class dump_user_location_t): New class.
4130 (struct dump_impl_location_t): New struct.
4131 (class dump_location_t): New class.
4132 (dump_printf_loc): Convert 2nd param from source_location to
4133 const dump_location_t &.
4134 (dump_generic_expr_loc): Delete.
4135 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4136 const dump_location_t &.
4137 * gimple-fold.c (fold_gimple_assign): Update call to
4138 dump_printf_loc to pass in a dump_location_t rather than a
4139 location_t, via the gimple stmt.
4140 (gimple_fold_call): Likewise.
4141 * gimple-loop-interchange.cc
4142 (loop_cand::analyze_iloop_reduction_var): Update for change to
4143 check_reduction_path.
4144 (tree_loop_interchange::interchange): Update for change to
4146 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4147 change in return-type of find_loop_location.
4148 (graphite_regenerate_ast_isl): Likewise.
4149 * graphite-optimize-isl.c (optimize_isl): Likewise.
4150 * graphite.c (graphite_transform_loops): Likewise.
4151 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4152 pass in a dump_location_t rather than a location_t, via the
4154 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4155 * ipa.c (walk_polymorphic_call_targets): Likewise.
4156 * loop-unroll.c (report_unroll): Convert "locus" param from
4157 location_t to dump_location_t.
4158 (decide_unrolling): Update for change to get_loop_location's
4160 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4161 location_t to dump_user_location_t.
4162 (grid_find_single_omp_among_assignments_1): Updates calls to
4163 dump_printf_loc to pass in a dump_location_t rather than a
4164 location_t, via the gimple stmt.
4165 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4166 location_t to dump_location_t. Updates calls to dump_printf_loc
4167 to pass in a dump_location_t rather than a location_t, via the
4169 (grid_inner_loop_gridifiable_p): Likewise.
4170 (grid_dist_follows_simple_pattern): Likewise.
4171 (grid_gfor_follows_tiling_pattern): Likewise.
4172 (grid_target_follows_gridifiable_pattern): Likewise.
4173 (grid_attempt_target_gridification): Convert initialization
4174 of local "grid" from memset to zero-initialization; FIXME: does
4175 this require C++11? Update call to dump_printf_loc to pass in a
4176 optinfo_location rather than a location_t, via the gimple stmt.
4177 * profile.c (read_profile_edge_counts): Updates call to
4178 dump_printf_loc to pass in a dump_location_t rather than a
4180 (compute_branch_probabilities): Likewise.
4181 * selftest-run-tests.c (selftest::run_tests): Call
4183 * selftest.h (dumpfile_c_tests): New decl.
4184 * tree-loop-distribution.c (pass_loop_distribution::execute):
4185 Update for change in return type of find_loop_location.
4186 * tree-parloops.c (parallelize_loops): Likewise.
4187 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4188 "locus" from location_t to dump_user_location_t.
4189 (canonicalize_loop_induction_variables): Likewise.
4190 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4191 for change in return type of find_loop_location.
4192 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4193 to dump_printf_loc to pass in a dump_location_t rather than a
4194 location_t, via the stmt.
4195 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4197 * tree-vect-loop-manip.c (find_loop_location): Convert return
4198 type from source_location to dump_user_location_t.
4199 (vect_do_peeling): Update for above change.
4200 (vect_loop_versioning): Update for change in type of
4202 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4203 from location_t to dump_user_location_t.
4204 (vect_estimate_min_profitable_iters): Update for change in type
4206 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4207 location_t to dump_location_t.
4208 (vect_slp_bb): Update for change in type of vect_location.
4209 * tree-vectorizer.c (vect_location): Convert from source_location
4210 to dump_user_location_t.
4211 (try_vectorize_loop_1): Update for change in vect_location's type.
4212 (vectorize_loops): Likewise.
4213 (increase_alignment): Likewise.
4214 * tree-vectorizer.h (vect_location): Convert from source_location
4215 to dump_user_location_t.
4216 (find_loop_location): Convert return type from source_location to
4217 dump_user_location_t.
4218 (check_reduction_path): Convert 1st param from location_t to
4219 dump_user_location_t.
4220 * value-prof.c (check_counter): Update call to dump_printf_loc to
4221 pass in a dump_user_location_t rather than a location_t; update
4222 call to error_at for change in type of "locus".
4223 (check_ic_target): Update call to dump_printf_loc to
4224 pass in a dump_user_location_t rather than a location_t, via the
4227 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
4229 * config/s390/s390.h (enum processor_flags): Do not use
4230 default tune parameter when -march was specified.
4232 2018-06-26 Jakub Jelinek <jakub@redhat.com>
4235 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4236 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4239 2018-06-26 Richard Biener <rguenther@suse.de>
4241 PR tree-optimization/86287
4243 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4244 (vect_analyze_loop): Initialize n_stmts.
4246 2018-06-26 Richard Biener <rguenther@suse.de>
4249 * fold-const.c (fold_convertible_p): Pointer extension
4252 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4255 * dwarf2out.c (loc_list_has_views): Adjust comments.
4256 (dw_loc_list): Split single cross-partition range with
4259 2018-06-25 Jeff Law <law@redhat.com>
4261 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4262 on -mbig-switch by default.
4264 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4266 (const_float_0_operand): Remove unused predicate.
4267 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4268 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4269 (recipsf2): New expander. Original pattern now called
4271 (recipdf2, recipdf2_insn): Similarly.
4272 (rsqrtsf2, rsqrtsf2_insn): Similarly
4273 (rsqrtdf2, rsqrtdf2_insn): Similarly
4275 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4277 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4278 Simplify logic for FreeBSD (twice).
4280 2018-06-25 Martin Sebor <msebor@redhat.com>
4282 PR tree-optimization/86204
4283 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4284 a strnlen result if it's less than the length of the string.
4286 2018-06-25 Martin Sebor <msebor@redhat.com>
4288 PR tree-optimization/85700
4289 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4290 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4291 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4293 2018-06-25 Martin Sebor <msebor@redhat.com>
4295 * doc/extend.texi (Zero-length arrays): Update and clarify.
4297 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4299 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4300 added IEEE/IBM long double multilib support on PowerPC little
4301 endian Linux systems.
4302 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4303 (MULTILIB_DEFAULTS): Likewise.
4304 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4306 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4307 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4308 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4310 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4313 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4314 (REORDER_45): Likewise.
4316 2018-06-25 Jeff Law <law@redhat.com>
4318 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4319 dividend to 32 bits. Adjust length.
4320 (udivmodhi4): Cleanup output template. Fix length.
4322 2018-06-25 Carl Love <cel@us.ibm.com>
4324 * config/rs6000/vsx.md: Change word selector to prefered location.
4326 2018-06-25 Richard Biener <rguenther@suse.de>
4328 PR tree-optimization/86304
4329 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4330 epilogue-if-converted loops as well.
4332 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4334 * lto-section-out.c (lto_begin_section): Do not print section
4335 name for noaddr and unnumbered dumps.
4337 2018-06-25 Richard Biener <rguenther@suse.de>
4339 * tree-vectorizer.h (struct vec_info_shared): New structure
4340 with parts split out from struct vec_info and loop_nest from
4341 struct _loop_vec_info.
4342 (struct vec_info): Adjust accordingly.
4343 (struct _loop_vec_info): Likewise.
4344 (LOOP_VINFO_LOOP_NEST): Adjust.
4345 (LOOP_VINFO_DATAREFS): Likewise.
4346 (LOOP_VINFO_DDRS): Likewise.
4347 (struct _bb_vec_info): Likewise.
4348 (BB_VINFO_DATAREFS): Likewise.
4349 (BB_VINFO_DDRS): Likewise.
4350 (struct _stmt_vec_info): Add dr_aux member.
4351 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4352 (DR_MISALIGNMENT_UNINITIALIZED): New.
4353 (set_dr_misalignment): Adjust.
4354 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4355 (vect_analyze_loop): Adjust prototype.
4356 (vect_analyze_loop_form): Likewise.
4357 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4358 Compute dependences lazily.
4359 (vect_record_base_alignments): Use shared datarefs/ddrs.
4360 (vect_verify_datarefs_alignment): Likewise.
4361 (vect_analyze_data_refs_alignment): Likewise.
4362 (vect_analyze_data_ref_accesses): Likewise.
4363 (vect_analyze_data_refs): Likewise.
4364 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4365 constructor parameter for shared part.
4366 (vect_analyze_loop_form): Pass in shared part and adjust.
4367 (vect_analyze_loop_2): Pass in storage for the number of
4368 stmts. Move loop nest finding to the caller. Compute
4370 (vect_analyze_loop): Pass in shared part.
4371 (vect_transform_loop): Verify shared datarefs are unchanged.
4372 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4373 constructor parameter for shared part.
4374 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4375 (vect_slp_bb): Verify shared datarefs are unchanged before
4377 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4379 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4380 DR_MISALIGNMENT_UNINITIALIZED.
4381 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4382 parameter for shared part.
4383 (vec_info::~vec_info): Adjust.
4384 (vec_info_shared::vec_info_shared): New.
4385 (vec_info_shared::~vec_info_shared): Likewise.
4386 (vec_info_shared::save_datarefs): Likewise.
4387 (vec_info_shared::check_datarefs): Likewise.
4388 (try_vectorize_loop_1): Construct shared part live for analyses
4389 of a single loop for multiple vector sizes.
4390 * tree-parloops.c (gather_scalar_reductions): Adjust.
4392 2018-06-25 Richard Biener <rguenther@suse.de>
4394 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4395 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4396 (vect_analyze_data_refs): Remove similar code from here and
4397 simplify accordingly.
4399 2018-06-25 Richard Biener <rguenther@suse.de>
4401 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4402 for reverse storage order accesses rather than asserting
4403 they cannot happen here.
4405 2018-06-25 Tom de Vries <tdevries@suse.de>
4408 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4409 Use data16 instead of .byte for insn prefix.
4411 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4414 * parser.c (make_char_string_pack): Pass this literal chars
4415 through cpp_interpret_string.
4416 (cp_parser_userdef_numeric_literal): Check the result of
4417 make_char_string_pack.
4419 2018-06-24 Maya Rashish <coypu@sdf.org>
4421 * ginclude/stddef.h: Simplify conditions around avoiding
4422 re-definition of __size_t.
4424 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4426 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4427 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4429 2018-06-22 Maya Rashish <coypu@sdf.org>
4431 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4432 made to OpenBSD and NetBSD through the years.
4434 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4436 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4437 behavior of vec_pack (vector double, vector double) to match
4438 behavior of vec_float2 (vector double, vector double).
4440 2018-06-22 Olivier Hainque <hainque@adacore.com>
4442 * gimplify.c (gimplify_function_tree): Prevent creation
4443 of a trampoline for the address of the current function
4444 passed to entry/exit instrumentation hooks.
4446 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4449 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4452 2018-06-22 Martin Liska <mliska@suse.cz>
4454 PR tree-optimization/86263
4455 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4456 Bail out if is_enabled is false.
4457 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4459 (jump_table_cluster::is_enabled): New function.
4461 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4463 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4464 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4465 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4466 (lto_input_ts_binfo_tree_pointers): Likewise.
4467 * tree-streamer-out.c (streamer_write_tree_bitfields,
4468 write_ts_binfo_tree_pointers): Likewise.
4469 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4471 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4473 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4475 2018-06-22 Martin Liska <mliska@suse.cz>
4477 * symbol-summary.h (get): Make it pure and inline move
4478 functionality from ::get function.
4479 (get): Remove and inline into ::get and ::get_create.
4480 (get_create): Move code from ::get function.
4482 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4485 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4486 -x assembler-with-cpp.
4488 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4490 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4491 _FILE_OFFSET_BITS=64 for C++.
4493 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4495 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4496 conversion insn that shows up when pr85657-3.c is compiled using
4497 IEEE 128-bit long double.
4498 (neg<mode>2_internal): Use the correct mode to check whether the
4499 mode is IBM extended.
4500 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4501 multiply and divide external functions from being created more
4504 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4506 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4508 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4509 the edge can be forwarded.
4510 (cfg_layout_merge_blocks): Likewise.
4512 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4514 * except.c (finish_eh_generation): Commit edge insertions only after
4515 the EH edges have been redirected from post-landing to landing pads.
4517 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4519 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4520 create_tmp_var_for to create the FRAME decl.
4521 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4523 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4525 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4526 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4527 debug statement when resetting its value.
4528 (expand_call_inline): Copy the locus of the call onto the assignment
4529 of the return value, if any. Use local variable in more cases.
4531 2018-06-21 Martin Liska <mliska@suse.cz>
4533 * ipa-pure-const.c (propagate_nothrow): Use
4534 funct_state_summaries->get.
4535 (dump_malloc_lattice): Likewise.
4536 (propagate_malloc): Likewise.
4538 2018-06-21 Richard Biener <rguenther@suse.de>
4540 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4541 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4542 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4544 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4545 BLOCK_ABSTRACT_ORIGIN unconditionally.
4547 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4549 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4551 * ipa-reference.c (ipa_reference_c_finalize): Delete
4552 ipa_ref_opt_sum_summaries and set it to NULL.
4554 2018-06-21 Tom de Vries <tdevries@suse.de>
4556 PR tree-optimization/85859
4557 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4558 test with comment from bb_no_side_effects_p.
4560 2018-06-21 Richard Biener <rguenther@suse.de>
4562 PR tree-optimization/86232
4563 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4564 max for constant niter.
4566 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4568 * config/aarch64/aarch64-simd.md
4569 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4571 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4573 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4574 Make opernads of the unspec commutative.
4576 2018-06-21 Richard Biener <rguenther@suse.de>
4578 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4579 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4580 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4581 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4583 (vect_record_base_alignments): Do not record base alignment
4584 for gathers or scatters.
4585 (vect_compute_data_ref_alignment): Drop return value that is always
4586 true. Bail out early for gathers or scatters.
4587 (vect_enhance_data_refs_alignment): Bail out early for gathers
4589 (vect_find_same_alignment_drs): Likewise.
4590 (vect_analyze_data_refs_alignment): Remove dead code.
4591 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4592 (vect_analyze_data_refs): For possible gathers or scatters do
4593 not create an alternate DR, just check their possible validity
4594 and mark them. Adjust DECL_NONALIASED handling to not rely
4596 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4597 update inits of gathers or scatters.
4598 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4599 Also copy gather/scatter flag to pattern vinfo.
4601 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4603 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4604 behavior of vec_packsu (vector unsigned long long, vector unsigned
4605 long long) to match behavior of vec_packs with same signature.
4607 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4608 Thomas Schwinge <thomas@codesourcery.com>
4609 Cesar Philippidis <cesar@codesourcery.com>
4611 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4612 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4613 (gimplify_adjust_omp_clauses): Likewise.
4614 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4615 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4616 (gimplify_omp_target_update): Update handling of acc update and
4618 * omp-low.c (install_var_field): Remove unused parameter
4619 base_pointers_restrict.
4620 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4621 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4623 (omp_target_base_pointers_restrict_p): Delete.
4624 (scan_omp_target): Update call to scan_sharing_clauses.
4625 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4627 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4628 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4629 (convert_local_omp_clauses): Likewise.
4630 * tree-pretty-print.c (dump_omp_clause): Likewise.
4631 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4633 (omp_clause_code_name): Likewise.
4635 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4638 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4641 PR tree-optimization/86231
4642 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4643 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4645 2018-06-20 Tom de Vries <tdevries@suse.de>
4647 PR tree-optimization/86097
4648 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4649 iv type if signedness of iv type is not the same as that of *nit.
4651 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4653 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4654 EDGE_EH edges, verify they are all EDGE_EH.
4656 2018-06-20 Maya Rashish <coypu@sdf.org>
4658 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4660 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4662 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4663 * config/aarch64/aarch64.c (xgene1_tunings): Add
4664 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4665 (aarch64_mode_valid_for_sched_fusion_p):
4666 Allow 16-byte modes.
4667 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4668 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4670 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4672 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4673 * config/aarch64/iterators.md (VQ2): New mode iterator.
4675 2018-06-20 Martin Liska <mliska@suse.cz>
4677 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4678 Change default ratio from 10 to 8.
4680 2018-06-20 Martin Liska <mliska@suse.cz>
4682 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4684 (bit_test_cluster::find_bit_tests): Likewise.
4685 (switch_decision_tree::analyze_switch_statement): Find clusters.
4686 * tree-switch-conversion.h (struct jump_table_cluster): Document
4689 2018-06-20 Martin Liska <mliska@suse.cz>
4691 * tree-switch-conversion.c (switch_conversion::collect):
4692 Record m_uniq property.
4693 (switch_conversion::expand): Bail out for special conditions.
4694 (group_cluster::~group_cluster): New.
4695 (group_cluster::group_cluster): Likewise.
4696 (group_cluster::dump): Likewise.
4697 (jump_table_cluster::emit): New.
4698 (switch_decision_tree::fix_phi_operands_for_edges): New.
4699 (struct case_node): Remove struct.
4700 (jump_table_cluster::can_be_handled): New.
4701 (case_values_threshold): Moved to header.
4702 (reset_out_edges_aux): Likewise.
4703 (jump_table_cluster::is_beneficial): New.
4704 (bit_test_cluster::can_be_handled): Likewise.
4705 (add_case_node): Remove.
4706 (bit_test_cluster::is_beneficial): New.
4707 (case_bit_test::cmp): New.
4708 (bit_test_cluster::emit): New.
4709 (expand_switch_as_decision_tree_p): Remove.
4710 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4711 (fix_phi_operands_for_edge): Likewise.
4712 (switch_decision_tree::analyze_switch_statement): New.
4713 (compute_cases_per_edge): Move ...
4714 (switch_decision_tree::compute_cases_per_edge): ... here.
4715 (try_switch_expansion): Likewise.
4716 (switch_decision_tree::try_switch_expansion): Likewise.
4717 (record_phi_operand_mapping): Likewise.
4718 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4719 (emit_case_decision_tree): Likewise.
4720 (switch_decision_tree::emit): Likewise.
4721 (balance_case_nodes): Likewise.
4722 (switch_decision_tree::balance_case_nodes): Likewise.
4723 (dump_case_nodes): Likewise.
4724 (switch_decision_tree::dump_case_nodes): Likewise.
4725 (emit_jump): Likewise.
4726 (switch_decision_tree::emit_jump): Likewise.
4727 (emit_cmp_and_jump_insns): Likewise.
4728 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4729 (emit_case_nodes): Likewise.
4730 (switch_decision_tree::emit_case_nodes): Likewise.
4731 (conditional_probability): Remove.
4732 * tree-switch-conversion.h (enum cluster_type): New.
4734 (struct cluster): Likewise.
4735 (cluster::cluster): Likewise.
4736 (struct simple_cluster): Likewise.
4737 (simple_cluster::simple_cluster): Likewise.
4738 (struct group_cluster): Likewise.
4739 (struct jump_table_cluster): Likewise.
4740 (struct bit_test_cluster): Likewise.
4741 (struct min_cluster_item): Likewise.
4742 (struct case_tree_node): Likewise.
4743 (case_tree_node::case_tree_node): Likewise.
4744 (jump_table_cluster::case_values_threshold): Likewise.
4745 (struct case_bit_test): Likewise.
4746 (struct switch_decision_tree): Likewise.
4747 (struct switch_conversion): Likewise.
4748 (switch_decision_tree::reset_out_edges_aux): Likewise.
4750 2018-06-20 Martin Liska <mliska@suse.cz>
4752 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4753 (hoist_edge_and_branch_if_true): Likewise.
4754 (expand_switch_using_bit_tests_p): Likewise.
4755 (struct case_bit_test): Likewise.
4756 (case_bit_test_cmp): Likewise.
4757 (emit_case_bit_tests): Likewise.
4758 (switch_conversion::switch_conversion): New class.
4759 (struct switch_conv_info): Remove old struct.
4760 (collect_switch_conv_info): More to ...
4761 (switch_conversion::collect): ... this.
4762 (check_range): Likewise.
4763 (switch_conversion::check_range): Likewise.
4764 (check_all_empty_except_final): Likewise.
4765 (switch_conversion::check_all_empty_except_final): Likewise.
4766 (check_final_bb): Likewise.
4767 (switch_conversion::check_final_bb): Likewise.
4768 (create_temp_arrays): Likewise.
4769 (switch_conversion::create_temp_arrays): Likewise.
4770 (free_temp_arrays): Likewise.
4771 (gather_default_values): Likewise.
4772 (switch_conversion::gather_default_values): Likewise.
4773 (build_constructors): Likewise.
4774 (switch_conversion::build_constructors): Likewise.
4775 (constructor_contains_same_values_p): Likewise.
4776 (switch_conversion::contains_same_values_p): Likewise.
4777 (array_value_type): Likewise.
4778 (switch_conversion::array_value_type): Likewise.
4779 (build_one_array): Likewise.
4780 (switch_conversion::build_one_array): Likewise.
4781 (build_arrays): Likewise.
4782 (switch_conversion::build_arrays): Likewise.
4783 (gen_def_assigns): Likewise.
4784 (switch_conversion::gen_def_assigns): Likewise.
4785 (prune_bbs): Likewise.
4786 (switch_conversion::prune_bbs): Likewise.
4787 (fix_phi_nodes): Likewise.
4788 (switch_conversion::fix_phi_nodes): Likewise.
4789 (gen_inbound_check): Likewise.
4790 (switch_conversion::gen_inbound_check): Likewise.
4791 (process_switch): Use the newly created class.
4792 (switch_conversion::expand): New.
4793 (switch_conversion::~switch_conversion): New.
4794 * tree-switch-conversion.h: New file.
4796 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4798 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4799 tree-vect-patterns.c.
4800 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4801 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
4802 (vect_recog_sad_pattern): Likewise.
4803 (vect_recog_widen_sum_pattern): Likewise.
4804 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
4805 (vect_recog_widen_shift_pattern): Remove the type_in argument.
4806 (vect_recog_rotate_pattern): Likewise.
4807 (vect_recog_mult_pattern): Likewise.
4808 (vect_recog_vector_vector_shift_pattern): Likewise.
4809 (vect_recog_divmod_pattern): Likewise.
4810 (vect_recog_mixed_size_cond_pattern): Likewise.
4811 (vect_recog_bool_pattern): Likewise.
4812 (vect_recog_mask_conversion_pattern): Likewise.
4813 (vect_try_gather_scatter_pattern): Likewise.
4814 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
4815 (vect_recog_over_widening_pattern): Likewise.
4816 (vect_recog_gather_scatter_pattern): Likewise.
4817 (vect_recog_func_ptr): Move from tree-vectorizer.h
4818 (vect_vect_recog_func_ptrs): Move further down the file.
4819 (vect_recog_func): Likewise. Remove the third argument.
4820 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4821 (vect_pattern_recog_1): Expect the pattern function to do any
4822 necessary target tests. Also expect it to provide a vector type.
4823 Remove the type_in handling.
4825 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4827 * tree-vect-patterns.c (vect_pattern_detected): New function.
4828 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4829 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4830 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4831 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4832 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4833 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4834 (vect_recog_mask_conversion_pattern)
4835 (vect_try_gather_scatter_pattern): Likewise.
4837 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4839 * tree-vect-patterns.c (vect_get_internal_def): New function.
4840 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4841 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4842 (search_type_for_mask_1): Use it.
4844 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4846 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4847 redundant WIDEN_SUM_EXPR handling.
4848 (vect_recog_sad_pattern): Likewise.
4850 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4852 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4853 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4854 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4855 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4856 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4858 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4860 * tree-vect-stmts.c (vectorizable_call): Make sure that we
4861 use the stmt_vec_info of the original bb statement for the
4862 new zero assignment, even if the call is part of a pattern.
4864 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4866 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4867 that the sequence is attached to the original statement rather
4868 than the pattern statement.
4869 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4870 PATTERN_DEF_SEQ from the original statement rather than
4871 the main pattern statement.
4872 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4873 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4874 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4876 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4878 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4879 definition statements before the early exit for statements that aren't
4881 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4883 (vect_transform_loop): ...here. Process pattern definition
4884 statements without first checking whether the main pattern
4885 statement is live or relevant.
4887 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4889 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4890 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4892 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4894 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4895 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4896 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4897 (expand_block_compare): Change select_block_compare_mode call.
4898 (expand_strncmp_align_check): Use new functions, fix comment.
4899 (emit_final_str_compare_gpr): New function.
4900 (expand_strn_compare): Refactor and clean up code.
4901 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4903 2018-06-19 Tony Reix <tony.reix@atos.com>
4904 Damien Bergamini <damien.bergamini@atos.com>
4905 David Edelsohn <dje.gcc@gmail.com>
4907 * collect2.c (static_obj): New variable.
4908 (static_libs): New variable.
4909 (is_in_list): Uncomment declaration.
4910 (main): Track AIX libraries linked statically.
4911 (is_in_list): Uncomment definition.
4912 (scan_prog_file): Don't add AIX shared libraries initializer
4913 to constructor list if linking statically.
4915 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4917 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4919 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4921 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4923 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4926 2018-06-19 Martin Liska <mliska@suse.cz>
4928 * config/i386/i386.c (ix86_can_inline_p): Do not use
4929 ipa_fn_summaries::get_create.
4930 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4932 (devirtualization_time_bonus): Likewise.
4933 (ipcp_propagate_stage): Likewise.
4934 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4935 (edge_set_predicate): Likewise.
4936 (evaluate_conditions_for_known_args): Likewise.
4937 (evaluate_properties_for_edge): Likewise.
4938 (ipa_call_summary::reset): Tranform to ...
4939 (ipa_call_summary::~ipa_call_summary): ... this.
4940 (ipa_fn_summary::reset): Transform to ...
4941 (ipa_fn_summary::~ipa_fn_summary): ... this.
4942 (ipa_fn_summary_t::remove): Rename to ...
4943 (ipa_fn_summary_t::remove_callees): ... this.
4944 (ipa_fn_summary_t::duplicate): Use placement new
4945 instead of memory copy.
4946 (ipa_call_summary_t::duplicate): Likewise.
4947 (ipa_call_summary_t::remove): Remove.
4948 (dump_ipa_call_summary): Change get_create to get.
4949 (ipa_dump_fn_summary): Dump only when summary exists.
4950 (analyze_function_body): Use symbol_summary::get instead
4952 (compute_fn_summary): Likewise.
4953 (estimate_edge_devirt_benefit): Likewise.
4954 (estimate_edge_size_and_time): Likewise.
4955 (inline_update_callee_summaries): Likewise.
4956 (remap_edge_change_prob): Likewise.
4957 (remap_edge_summaries): Likewise.
4958 (ipa_merge_fn_summary_after_inlining): Likewise.
4959 (write_ipa_call_summary): Likewise.
4960 (ipa_fn_summary_write): Likewise.
4961 (ipa_free_fn_summary): Likewise.
4962 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4963 (struct ipa_call_summary): Likewise.
4964 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4966 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4967 (estimate_size_after_inlining): Likewise.
4968 (estimate_growth): Likewise.
4969 (growth_likely_positive): Likewise.
4970 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4971 (inline_call): Likewise.
4972 * ipa-inline.c (caller_growth_limits): Likewise.
4973 (can_inline_edge_p): Likewise.
4974 (can_inline_edge_by_limits_p): Likewise.
4975 (compute_uninlined_call_time): Likewise.
4976 (compute_inlined_call_time): Likewise.
4977 (want_inline_small_function_p): Likewise.
4978 (edge_badness): Likewise.
4979 (update_caller_keys): Likewise.
4980 (update_callee_keys): Likewise.
4981 (inline_small_functions): Likewise.
4982 (inline_to_all_callers_1): Likewise.
4983 (dump_overall_stats): Likewise.
4984 (early_inline_small_functions): Likewise.
4985 (early_inliner): Likewise.
4986 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4987 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4988 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4989 * ipa-split.c (execute_split_functions): Likewise.
4990 * symbol-summary.h: Likewise.
4991 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4993 2018-06-19 Richard Biener <rguenther@suse.de>
4995 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4996 (vectorize_loops): ... here. Fix dbgcnt handling.
4997 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4999 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
5002 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5003 ieee128 argument takes up only one (vector) register, not two (floating
5006 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5008 * gimplify.c (gimplify_init_constructor): Really never clear for an
5009 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5011 2018-06-19 Richard Biener <rguenther@suse.de>
5013 PR tree-optimization/86179
5014 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5015 after failed recognition.
5017 2018-06-18 Martin Sebor <msebor@redhat.com>
5020 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5021 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5022 Handle integer subtraction.
5023 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5024 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5026 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5028 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5029 param from rtx to rtx_insn *.
5030 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5032 (frv_ifcvt_modify_insn): Likwise.
5033 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5034 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
5035 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5036 as_a <rtx_insn *> cast to local "unprotected_region" once
5037 it's been established that it's not NULL or pc_rtx.
5038 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5039 param "sethi" from rtx to rtx_insn *.
5040 (nds32_group_float_insns): Likewise for param "insn".
5041 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5043 (vax_output_int_subtract): Likewise.
5044 * config/vax/vax.c (vax_output_int_add): Likewise for param
5046 (vax_output_int_subtract): Likewise.
5047 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5048 (emit_pattern_after): Likewise for param "after".
5049 (emit_insn_after): Likewise.
5050 (emit_jump_insn_after): Likewise.
5051 (emit_call_insn_after): Likewise.
5052 (emit_debug_insn_after): Likewise.
5053 (emit_pattern_before): Likewise for param "before".
5054 (emit_insn_before): Likewise.
5055 (emit_jump_insn_before): Likewise.
5056 * final.c (get_insn_template): Likewise for param "insn", removing
5058 * output.h (get_insn_template): Likewise for 2nd param.
5059 * rtl.h (emit_insn_before): Likewise.
5060 (emit_jump_insn_before): Likewise.
5061 (emit_debug_insn_before_noloc): Likewise.
5062 (emit_insn_after): Likewise.
5063 (emit_jump_insn_after): Likewise.
5064 (emit_call_insn_after): Likewise.
5065 (emit_debug_insn_after): Likewise.
5066 (set_insn_deleted): Likewise for param.
5068 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
5071 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5072 floating point modes, so that IFmode is numerically greater than
5073 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5074 to declare the ordering. This prevents IFmode from being
5075 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5076 machine. Include rs6000-modes.h to share the fractional values
5077 between genmodes* and the rest of the compiler.
5081 * config/rs6000/rs6000-modes.h: New file.
5082 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5083 meaning of rs6000_long_double_size so that 126..128 selects an
5084 appropriate 128-bit floating point type.
5085 (rs6000_option_override_internal): Likewise.
5086 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5087 (TARGET_LONG_DOUBLE_128): Change the meaning of
5088 rs6000_long_double_size so that 126..128 selects an appropriate
5089 128-bit floating point type.
5090 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5091 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5092 source and destination to match the standard usage.
5093 (truncifkf2): Likewise.
5094 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5095 ISA 2.07 to use an explicit clobber, instead of passing in a
5097 (copysign<mode>3_soft): Likewise.
5099 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5101 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5102 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5103 (vect_slp_analyze_instance_dependence): Likewise.
5104 (vect_enhance_data_refs_alignment): Likewise.
5105 (vect_analyze_data_refs_alignment): Likewise.
5106 (vect_slp_analyze_and_verify_instance_alignment
5107 (vect_analyze_data_ref_accesses): Likewise.
5108 (vect_prune_runtime_alias_test_list): Likewise.
5109 (vect_analyze_data_refs): Likewise.
5110 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5111 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5112 (vect_analyze_scalar_cycles_1): Likewise.
5113 (vect_get_loop_niters): Likewise.
5114 (vect_analyze_loop_form_1): Likewise.
5115 (vect_update_vf_for_slp): Likewise.
5116 (vect_analyze_loop_operations): Likewise.
5117 (vect_analyze_loop): Likewise.
5118 (vectorizable_induction): Likewise.
5119 (vect_transform_loop): Likewise.
5120 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5121 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5122 (vect_make_slp_decision): Likewise.
5123 (vect_detect_hybrid_slp): Likewise.
5124 (vect_slp_analyze_operations): Likewise.
5125 (vect_slp_bb): Likewise.
5126 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5127 (vectorizable_bswap): Likewise.
5128 (vectorizable_call): Likewise.
5129 (vectorizable_simd_clone_call): Likewise.
5130 (vectorizable_conversion): Likewise.
5131 (vectorizable_assignment): Likewise.
5132 (vectorizable_shift): Likewise.
5133 (vectorizable_operation): Likewise.
5134 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5136 2018-06-18 Martin Sebor <msebor@redhat.com>
5138 PR tree-optimization/81384
5139 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5140 * builtins.c (expand_builtin_strnlen): New function.
5141 (expand_builtin): Call it.
5142 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5143 * builtins.def (BUILT_IN_STRNLEN): New.
5144 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5145 Warn for bounds in excess of maximum object size.
5146 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5147 single-value ranges. Handle strnlen.
5148 (handle_builtin_strlen): Handle strnlen.
5149 (strlen_check_and_optimize_stmt): Same.
5150 * doc/extend.texi (Other Builtins): Document strnlen.
5152 2018-06-18 Maya Rashish <coypu@sdf.org>
5154 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5155 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5156 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5158 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5160 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5162 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5164 * tree.c (escaped_string::escape): Replace cast to char * by
5165 const_cast<char *> (unescaped).
5167 2018-06-18 Nick Clifton <nickc@redhat.com>
5170 * tree.c (escaped_string): New class. Converts an unescaped
5171 string into its escaped equivalent.
5172 (warn_deprecated_use): Use the new class to convert the
5173 deprecation message, if present.
5174 (test_escaped_strings): New self test.
5175 (test_c_tests): Add test_escaped_strings.
5176 * doc/extend.texi (deprecated): Add a note that the
5177 deprecation message is affected by the -fmessage-length
5178 option, and that control characters will be escaped.
5179 (#pragma GCC error): Document this pragma.
5180 (#pragma GCC warning): Likewise.
5181 * doc/invoke.texi (-fmessage-length): Document this option's
5182 effect on the #warning and #error preprocessor directives and
5183 the deprecated attribute.
5185 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5187 * tree.c (decl_value_expr_lookup): Revert latest change.
5188 (decl_value_expr_insert): Likewise.
5190 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
5192 * gimplify.c (nonlocal_vlas): Delete.
5193 (nonlocal_vla_vars): Likewise.
5194 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5196 (gimplify_body): Do not create and destroy nonlocal_vlas.
5197 * tree-nested.c: Include diagnostic.h.
5198 (use_pointer_in_frame): Tweak.
5199 (lookup_field_for_decl): Add assertion and declare the transformation.
5200 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5201 internal error when the reference is in a wrong context. Do not
5202 create a debug decl by default.
5203 (note_nonlocal_block_vlas): Delete.
5204 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5205 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
5206 create a debug decl by default.
5207 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5208 call is in a wrong context.
5209 (fixup_vla_decls): New function.
5210 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
5211 debug variables were created.
5212 * tree.c (decl_value_expr_lookup): Add checking assertion.
5213 (decl_value_expr_insert): Likewise.
5215 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5218 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5219 * tree-scalar-evolution.c (interpret_expr): Likewise.
5220 (expression_expensive_p): Likewise.
5221 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5222 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5223 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5224 (ssa_defined_by_minus_one_stmt_p): New.
5226 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5229 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5230 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5231 * dojump.c (do_jump): Likewise.
5232 * expr.c (expand_expr_real_2): Check operand type's sign.
5233 * fold-const.c (const_unop): Handle ABSU_EXPR.
5234 (fold_abs_const): Likewise.
5235 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5236 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5237 (strip_sign_op_1): Likesise.
5238 * match.pd: Add new pattern to generate ABSU_EXPR.
5239 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5240 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5241 * tree-eh.c (operation_could_trap_helper_p): Likewise.
5242 * tree-inline.c (estimate_operator_cost): Likewise.
5243 * tree-pretty-print.c (dump_generic_node): Likewise.
5244 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5245 * tree.def (ABSU_EXPR): New.
5247 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5250 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5251 documented as preserved for backward compatibility only.
5252 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5254 PR rtl-optimization/86108
5255 * bb-reorder.c (create_forwarder_block): Renamed to ...
5256 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5257 jump from new landing pad to the second part.
5258 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5261 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5264 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5265 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5266 Only call store_expr for halves if the mode is the same.
5269 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5270 Fix up comment formatting.
5272 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5274 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5275 (typed_splay_tree::closure,
5276 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5277 (typed_splay_tree::typed_splay_tree,
5278 typed_splay_tree::operator =): Declared private.
5279 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5280 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5281 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5282 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5283 typed_splay_tree::splay_tree_splay,
5284 typed_splay_tree::splay_tree_foreach_helper,
5285 typed_splay_tree::splay_tree_insert,
5286 typed_splay_tree::splay_tree_remove,
5287 typed_splay_tree::splay_tree_lookup,
5288 typed_splay_tree::splay_tree_predecessor,
5289 typed_splay_tree::splay_tree_successor,
5290 typed_splay_tree::splay_tree_min,
5291 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5292 (typed_splay_tree::root, typed_splay_tree::comp,
5293 typed_splay_tree::delete_key,
5294 typed_splay_tree::delete_value): New data members.
5295 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5296 typed_splay_tree::remove.
5298 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5300 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5301 -mginv and -mno-ginv to the assembler.
5302 * config/mips/mips.opt (-mcrc): New option.
5304 * doc/invoke.text (-mcrc): Document.
5307 2018-06-15 Nick Clifton <nickc@redhat.com>
5310 * tree.c (escaped_string): New class. Converts an unescaped
5311 string into its escaped equivalent.
5312 (warn_deprecated_use): Use the new class to convert the
5313 deprecation message, if present.
5314 (test_escaped_strings): New self test.
5315 (test_c_tests): Add test_escaped_strings.
5316 * doc/extend.texi (deprecated): Add a note that the
5317 deprecation message is affected by the -fmessage-length
5318 option, and that control characters will be escaped.
5319 (#pragma GCC error): Document this pragma.
5320 (#pragma GCC warning): Likewise.
5321 * doc/invoke.texi (-fmessage-length): Document this option's
5322 effect on the #warning and #error preprocessor directives and
5323 the deprecated attribute.
5325 2018-06-15 Richard Biener <rguenther@suse.de>
5327 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5328 here, also noting vector size used.
5329 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5330 size used in MSG_OPTIMIZED_LOCATIONS dump.
5331 (pass_slp_vectorize::execute): Adjust.
5333 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5336 * config/arc/arc.c (arc_return_address_register): Fix
5339 2018-06-15 Richard Biener <rguenther@suse.de>
5342 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5343 leave useless conversion stripping to force_gimple_operand_gsi.
5344 (gimplify_build2): Likewise.
5345 (gimplify_build1): Likewise.
5347 2018-06-15 Richard Biener <rguenther@suse.de>
5350 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5351 before adjusting their block.
5353 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5355 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5356 multilibs for *-*-rtems*.
5357 * config/riscv/t-rtems: New file.
5359 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5362 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5363 unsigned_type_for returns NULL.
5366 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5367 subregs of multi-word pseudos unless the float mode has word size.
5369 2018-06-14 Richard Biener <rguenther@suse.de>
5372 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5373 duplicate and harmful type_hash_canon.
5374 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5376 2018-06-14 Richard Biener <rguenther@suse.de>
5379 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5382 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5384 * config/rtems.h (STDINT_LONG32): Define.
5386 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5387 Prachi Godbole <prachi.godbole@imgtec.com>
5389 * config/mips/mips-cpus.def: Define P6600.
5390 * config/mips/mips-tables.opt: Regenerate.
5391 * config/mips/mips.c (mips_ucbranch_type): New enum.
5392 (mips_rtx_cost_data): Add support for P6600.
5393 (mips_issue_rate): Likewise.
5394 (mips_multipass_dfa_lookahead): Likewise.
5395 (mips_avoid_hazard): Likewise.
5396 (mips_reorg_process_insns): Likewise.
5397 (mips_classify_branch_p6600): New function.
5398 * config/mips/mips.h (TUNE_P6600): New define.
5399 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5400 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5401 * config/mips/mips.md: Include p6600.md.
5402 (processor): Add p6600.
5403 * config/mips/p6600.md: New file.
5404 * doc/invoke.texi: Add p6600 to supported architectures.
5406 2018-06-13 Martin Sebor <msebor@redhat.com>
5408 PR tree-optimization/86114
5409 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5411 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5413 2018-06-13 Richard Biener <rguenther@suse.de>
5415 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5416 Properly set vector type of the intermediate stmt.
5417 * tree-vect-stmts.c (vectorizable_operation): The destination
5418 var always has vectype_out type.
5420 2018-06-13 Jeff Law <law@redhat.com>
5422 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5423 integer 0 for argument to print_rtl_with_bb.
5424 (rl78_reorg): Likewise.
5426 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5428 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5429 from rtx to rtx_insn *.
5430 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5432 (add_sched_insns_for_speculation): Likewise for local "target",
5433 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5434 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5435 from rtx_insn ** to rtx_code_label **.
5436 (reorg_emit_nops): Likewise.
5437 (c6x_reorg): Likewise for local "call_labels".
5438 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5440 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5441 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5442 the loops over LABEL_REFS.
5443 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5445 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5446 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5447 (split_branches): Strengthen local "olabel" from rtx to
5448 rtx_insn *, adding a safe_as_a cast.
5449 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5451 (add_insn_after): Likewise for first two params.
5452 (add_insn_before): Likewise.
5453 (remove_insn): Likewise for param.
5454 (emit_pattern_before_noloc): Likewise for second and third params.
5455 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5456 (emit_call_insn_before_noloc): Likewise.
5457 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5459 (emit_barrier_before): Likewise.
5460 (emit_label_before): Strengthen "label" param from "rtx" to
5461 "rtx_code_label *". Strengthen "before" param from "rtx" to
5463 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5465 (emit_pattern_after_noloc): Likewise.
5466 (emit_insn_after_noloc): Likewise.
5467 (emit_jump_insn_after_noloc): Likewise.
5468 (emit_call_insn_after_noloc): Likewise.
5469 (emit_debug_insn_after_noloc): Likewise.
5470 (emit_barrier_after): Likewise.
5471 (emit_label_after): Likewise for both params.
5472 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5473 "loc" param from "int" to "location_t".
5474 (emit_insn_after_setloc): Likewise.
5475 (emit_jump_insn_after_setloc): Likewise.
5476 (emit_call_insn_after_setloc): Likewise.
5477 (emit_debug_insn_after_setloc): Likewise.
5478 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5479 "loc" param from "int" to "location_t".
5480 (emit_pattern_before): Convert NULL_RTX to NULL.
5481 (emit_insn_before_setloc): Convert "loc" param from "int" to
5483 (emit_jump_insn_before_setloc): Likewise.
5484 (emit_call_insn_before_setloc): Likewise.
5485 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5486 rtx_insn *. Convert "loc" param from "int" to "location_t".
5487 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5488 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5489 Convert 3rd param from "int" to "location_t".
5490 (emit_barrier_before, emit_barrier_after, next_real_insn):
5491 Strengthen param from rtx to rtx_insn *.
5492 (emit_label_before): Strengthen 1st param from "rtx" to
5493 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5495 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5496 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5497 Strengthen 2nd param from "rtx" to "rtx_insn *".
5498 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5499 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5500 Likewise. Convert 3rd param from "int" to "location_t".
5501 (emit_label_after): Strengthen 1st param from "rtx" to
5503 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5505 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5506 from "rtx" to "rtx_insn *".
5508 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5510 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5511 bodies streamed in with -Q.
5512 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5513 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5514 * gimple-streamer-out.c: Include gimple-pretty-print.h
5515 (output_bb): Dump stmts streamed.
5516 * lto-section-out.c: Include print-tree.h
5517 (lto_begin_section): Dump sections created.
5518 (lto_output_decl_index): Dump decl encoded.
5519 * lto-streamer-out.c: Include print-tree.h
5520 (create_output_block): Dump output block created.
5521 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5522 (output_function): Dump function output.
5523 (output_constructor): Dump constructor streamed.
5524 (write_global_stream): Output indexes encoded.
5525 (produce_asm_for_decls): Dump streams encoded.
5526 * lto-streamer.c (streamer_dump_file): New global var.
5527 * lto-streamer.h (streamer_dump_file): Declare.
5528 * passes.c (ipa_write_summaries): Initialize streamer dump.
5529 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5532 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5535 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5536 offsets for register save directives. Emit a second batch of save
5537 directives, if need be, when the function accesses prior frames.
5539 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5541 * config/arc/fpu.md (fmasf4): Force operand to register.
5542 (fnmasf4): Likewise.
5544 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5546 * config/arc/arc-protos.h (arc_pad_return): Remove.
5547 * config/arc/arc.c (machine_function): Remove force_short_suffix
5549 (arc_print_operand): Adjust printing of '&'.
5550 (arc_verify_short): Remove conditional printing of short suffix.
5551 (arc_final_prescan_insn): Remove reference to size_reason.
5552 (pad_return): New function.
5553 (arc_reorg): Call pad_return.
5554 (arc_pad_return): Remove.
5555 (arc_init_machine_status): Remove reference to force_short_suffix.
5556 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5557 (attr length): When attribute iscompact is true force to 2
5558 regardless; in the case of maybe check if we want to force the
5559 instruction to have 4 bytes length.
5560 (nopv): Change it to generate 4 byte long nop as well.
5561 (blockage): New pattern.
5562 (simple_return): Remove call to arc_pad_return.
5563 (p_return_i): Likewise.
5565 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5567 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5569 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5571 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5574 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5576 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5577 for ARC700 and ARCv2.
5579 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5582 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5583 operands[2] instead of operands[1].
5586 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5588 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5589 case, check whether the outer register overlaps an unallocatable
5590 register, not just whether it fits the required class.
5592 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5594 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5596 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5597 (memrefs_conflict_p): Likewise.
5598 (init_alias_analysis): Likewise.
5599 * cfgexpand.c (expand_debug_expr): Likewise.
5600 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5601 * cse.c (fold_rtx): Likewise.
5602 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5603 * expr.c (emit_block_move_hints): Likewise.
5604 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5605 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5606 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5607 (emit_group_store): Likewise.
5608 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5609 to read the PRE/POST_MODIFY increment.
5610 * calls.c (store_one_arg): Use strip_offset.
5611 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5613 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5615 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5616 (simplify_binary_operation_1): Extend CONST_INT handling to
5618 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5619 than a HOST_WIDE_INT.
5620 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5622 (adjust_mems, add_stores): Update accodingly.
5623 (vt_canonicalize_addr): Track polynomial offsets.
5624 (emit_note_insn_var_location): Likewise.
5625 (vt_add_function_parameter): Likewise.
5626 (vt_initialize): Likewise.
5628 2018-06-12 Jeff Law <law@redhat.com>
5630 * config.gcc (alpha*-*-freebsd*): Remove.
5631 * config/alpha/freebsd.h: Remove.
5633 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5636 * spellcheck-tree.c (levenshtein_distance): Rename to...
5637 (get_edit_distance): ...this, and update for underlying renaming.
5638 * spellcheck-tree.h (levenshtein_distance): Rename to...
5639 (get_edit_distance): ...this.
5640 * spellcheck.c (levenshtein_distance): Rename to...
5641 (get_edit_distance): ...this. Convert from Levenshtein distance
5642 to Damerau-Levenshtein distance by supporting transpositions of
5643 adjacent characters. Rename "v1" to "v_next" and "v0" to
5645 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5646 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5647 update for underlying renaming.
5648 (selftest::levenshtein_distance_unit_test): Rename to...
5649 (selftest::test_get_edit_distance_unit): ...this, and update for
5650 underlying renaming.
5651 (selftest::test_find_closest_string): Add example from PR 69968
5652 where transposition helps
5653 (selftest::test_metric_conditions): Update for renaming.
5654 (selftest::test_metric_conditions): Likewise.
5655 (selftest::spellcheck_c_tests): Likewise.
5656 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5657 (get_edit_distance): ...this.
5658 (best_match::consider): Update for renaming.
5660 2018-06-12 Martin Sebor <msebor@redhat.com>
5662 PR tree-optimization/85259
5663 * builtins.c (compute_objsize): Handle constant offsets.
5664 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5665 true iff a warning has been issued.
5666 * gimple.h (gimple_nonartificial_location): New function.
5667 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5668 gimple_nonartificial_location and handle -Wno-system-headers.
5669 (handle_builtin_stxncpy): Same.
5671 2018-06-12 Martin Sebor <msebor@redhat.com>
5674 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5676 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
5678 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5679 BUILTIN_VEC_XST entries for pointer to double and long long.
5681 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
5684 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5686 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5689 2018-06-12 Martin Liska <mliska@suse.cz>
5691 * doc/options.texi: Document IntegerRange.
5693 2018-06-12 Martin Liska <mliska@suse.cz>
5695 * config/i386/i386.opt: Make MPX-related options as Deprecated.
5696 * opt-functions.awk: Handle Deprecated flag.
5697 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5699 (read_cmdline_option): Report warning for a deprecated option.
5700 * opts.h (struct cl_option): Add new field cl_deprecated.
5701 (CL_ERR_DEPRECATED): New.
5703 2018-06-12 Martin Liska <mliska@suse.cz>
5705 * doc/options.texi: Document Deprecated option flag.
5707 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5709 * config/arc/arc-arch.h (arc_extras): New enum.
5710 (arc_cpu_t):Add field extra.
5711 (arc_cpu_types): Consider the extras.
5712 * config/arc/arc-cpus.def: Add extras info.
5713 * config/arc/arc-opts.h (processor_type): Consider extra field.
5714 * config/arc/arc.c (arc_override_options): Handle extra field.
5716 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5718 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5719 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5721 * config/arc/arc.c (arc_init): Update pic warning.
5722 (irq_range): Update irq range parsing warnings.
5723 (arc_override_options): Update various warning messages.
5724 (arc_handle_aux_attribute): Likewise.
5726 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5728 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5730 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5732 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5733 compiler messages directives.
5735 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5737 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5738 * config/mips/mips-tables.opt: Regenerate.
5739 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5741 * doc/invoke.texi: Document -march=i6500.
5743 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5745 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5746 (i6400_gpmul): Add cpu_unit.
5747 (i6400_gpdiv): Likewise.
5748 (i6400_msa_add_d): Update reservations.
5749 (i6400_msa_int_add) Likewise.
5750 (i6400_msa_short_logic3) Likewise.
5751 (i6400_msa_short_logic2) Likewise.
5752 (i6400_msa_short_logic) Likewise.
5753 (i6400_msa_move) Likewise.
5754 (i6400_msa_cmp) Likewise.
5755 (i6400_msa_short_float2) Likewise.
5756 (i6400_msa_div_d) Likewise.
5757 (i6400_msa_long_logic1) Likewise.
5758 (i6400_msa_long_logic2) Likewise.
5759 (i6400_msa_mult) Likewise.
5760 (i6400_msa_long_float2) Likewise.
5761 (i6400_msa_long_float4) Likewise.
5762 (i6400_msa_long_float5) Likewise.
5763 (i6400_msa_long_float8) Likewise.
5764 (i6400_fpu_fadd): Include frint type.
5765 (i6400_fpu_store): New define_insn_reservation.
5766 (i6400_fpu_load): Likewise.
5767 (i6400_fpu_move): Likewise.
5768 (i6400_fpu_fcmp): Likewise.
5769 (i6400_fpu_fmadd): Likewise.
5770 (i6400_int_mult): Include imul3nc type and update reservation.
5771 (i6400_int_div): Include idiv3 type and update reservation.
5772 (i6400_int_load): Update to check type not move_type.
5773 (i6400_int_store): Likewise.
5774 (i6400_int_prefetch): Set zero latency.
5776 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
5778 * gcc.c: Document new %@{...} sequence.
5779 (LINK_COMMAND_SPEC): Use it for the -L switches.
5780 (cpp_unique_options): Use it for the -I switches.
5781 (at_file_argbuf): New global variable.
5782 (in_at_file): Likewise.
5783 (alloc_args): Create at_file_argbuf.
5784 (clear_args): Truncate at_file_argbuf.
5785 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5786 (open_at_file): New function.
5787 (close_at_file): Likewise.
5788 (create_at_file): Delete.
5789 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5792 (validate_switches_from_spec): Deal with %@{...} sequence.
5793 (validate_switches): Likewise.
5794 (driver::finalize): Call clear_args.
5796 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5798 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5800 2018-06-11 Martin Sebor <msebor@redhat.com>
5802 * doc/invoke.texi (-Wall): List -Wc++17-compat.
5803 (Wno-class-memaccess): Add @opindex.
5804 (Wno-templates, Wno-multiple-inheritance): Same.
5805 (Wno-virtual-inheritance, Wno-namespaces): Same.
5806 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5807 (Wno-format-overflow, Wno-format-truncation): Same.
5808 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5809 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5810 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5811 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5812 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5813 (Wno-misspelled-isr): Same.
5815 2018-06-11 Martin Sebor <msebor@redhat.com>
5817 * PR tree-optimization/86083
5818 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5820 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5822 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5824 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
5827 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5828 on the correct operand.
5829 (*movdi_internal64): Ditto.
5831 2018-06-11 Martin Liska <mliska@suse.cz>
5833 PR tree-optimization/86089
5834 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5836 2018-06-11 Julia Koval <julia.koval@intel.com>
5838 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5839 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5840 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5842 2018-06-11 Olivier Hainque <hainque@adacore.com>
5844 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5845 for Ada with strict dwarf2.
5847 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
5850 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5853 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
5855 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5857 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
5859 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5862 2018-06-08 Martin Liska <mliska@suse.cz>
5864 * tree-cfg.h (debug_function): Fix argument type to match
5867 2018-06-08 Martin Liska <mliska@suse.cz>
5869 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5870 Remove usage of MPX-related (and removed) fields.
5871 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5873 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5875 * cfg.c (debug): Use TDF_NONE rather than 0.
5876 * cfghooks.c (debug): Likewise.
5877 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5878 (struct dump_option_value_info): Convert to...
5879 (struct kv_pair): ...this template type.
5880 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5882 (optinfo_verbosity_options): Likewise.
5883 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5885 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5886 than int for "optgroup_flags" param.
5887 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5889 (dump_dec): Likewise.
5890 (dump_finish): Use TDF_NONE rather than 0.
5891 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5892 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5893 than 0. Update for change to option_ptr.
5894 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5895 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5896 0. Update for changes to optinfo_verbosity_options and
5898 (opt_info_switch_p): Convert optgroup_flags from int to
5900 (dump_basic_block): Use dump_flags_t rather than int
5901 for "dump_kind" param.
5902 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5903 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5904 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5905 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5906 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5907 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5908 TDF_NONE): Convert from macros to...
5909 (enum dump_flag): ...this new enum.
5910 (dump_flags_t): Update to use enum.
5911 (operator|, operator&, operator~, operator|=, operator&=):
5912 Implement for dump_flags_t.
5913 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5914 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5915 Convert from macros to...
5916 (enum optgroup_flag): ...this new enum.
5917 (optgroup_flags_t): New typedef.
5918 (operator|, operator|=): Implement for optgroup_flags_t.
5919 (struct dump_file_info): Convert field "alt_flags" to
5920 dump_flags_t. Convert field "optgroup_flags" to
5922 (dump_basic_block): Use dump_flags_t rather than int for param.
5923 (dump_generic_expr_loc): Likewise.
5924 (dump_dec): Likewise.
5925 (dump_register): Convert param "optgroup_flags" to
5927 (opt_info_enable_passes): Likewise.
5928 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5930 * gimple-pretty-print.c (debug): Likewise.
5931 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5932 (merged_store_group::apply_stores): Likewise.
5933 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5934 * gimple.c (verify_gimple_pp): Likewise.
5935 * graphite-poly.c (print_pbb_body): Likewise.
5936 * passes.c (pass_manager::register_one_dump_file): Convert
5937 local "optgroup_flags" to optgroup_flags_t.
5938 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5940 (debug_body): Likewise.
5941 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5942 to optgroup_flags_t.
5943 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5945 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5946 (convert_mult_to_fma): Likewise.
5947 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5948 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5949 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5950 "dump_kind" to dump_flags_t.
5952 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5954 * config/rs6000/rs6000.c (min, max): Delete.
5956 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5958 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5959 -mabi=spe and -mabi=no-spe.
5961 2018-06-08 Martin Liska <mliska@suse.cz>
5963 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5964 where we expect an existing summary.
5966 2018-06-08 Martin Liska <mliska@suse.cz>
5968 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5969 * ipa-inline.h (estimate_edge_growth): Likewise.
5971 2018-06-08 Martin Liska <mliska@suse.cz>
5973 * cgraph.c (function_version_hasher::hash): Use
5974 cgraph_node::get_uid ().
5975 (function_version_hasher::equal):
5976 * cgraph.h (cgraph_node::get_uid): New method.
5977 * ipa-inline.c (update_caller_keys): Use
5978 cgraph_node::get_uid ().
5979 (update_callee_keys): Likewise.
5980 * ipa-utils.c (searchc): Likewise.
5981 (ipa_reduced_postorder): Likewise.
5982 * lto-cgraph.c (input_node): Likewise.
5983 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5984 * symbol-summary.h (symtab_insertion): Likewise.
5985 (symtab_removal): Likewise.
5986 (symtab_duplication): Likewise.
5987 * tree-pretty-print.c (dump_function_header): Likewise.
5988 * tree-sra.c (convert_callers_for_node): Likewise.
5990 2018-06-08 Martin Liska <mliska@suse.cz>
5992 * cgraph.c (symbol_table::create_edge): Always assign a new
5994 (symbol_table::free_edge): Do not recycle numbers.
5995 * cgraph.h (cgraph_edge::get): New method.
5996 * symbol-summary.h (symtab_removal): Use it.
5997 (symtab_duplication): Likewise.
5998 (call_summary::hashable_uid): Remove.
6000 2018-06-08 Martin Liska <mliska@suse.cz>
6002 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6003 (initialize_growth_caches): Remove.
6004 (free_growth_caches): Likewise.
6005 (do_estimate_edge_time): Use edge_growth_cache.
6006 (do_estimate_edge_size): Likewise.
6007 (do_estimate_edge_hints): Likewise.
6008 * ipa-inline.c (reset_edge_caches): Likewise.
6009 (recursive_inlining): Likewise.
6010 (inline_small_functions): Likewise.
6011 * ipa-inline.h (initialize_growth_caches): Remove.
6012 (estimate_edge_size): Likewise.
6013 (estimate_edge_time): Likewise.
6014 (estimate_edge_hints): Likewise.
6015 (reset_edge_growth_cache): Likewise.
6016 * symbol-summary.h (call_summary::remove): New method.
6018 2018-06-08 Martin Liska <mliska@suse.cz>
6020 * ipa-cp.c (class edge_clone_summary): New summary.
6021 (grow_edge_clone_vectors): Remove.
6022 (ipcp_edge_duplication_hook): Remove.
6023 (class edge_clone_summary_t): New call_summary class.
6024 (ipcp_edge_removal_hook): Remove.
6025 (edge_clone_summary_t::duplicate): New function.
6026 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6027 (create_specialized_node): Likewise.
6028 (ipcp_driver): Initialize edge_clone_summaries and do not
6031 2018-06-08 Martin Liska <mliska@suse.cz>
6033 * symbol-summary.h (get): New function.
6034 (call_summary::m_initialize_when_cloning): New class member.
6036 2018-06-08 Martin Liska <mliska@suse.cz>
6038 * cgraph.c (cgraph_node::remove): Do not recycle uid.
6039 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6040 (symbol_table::allocate_cgraph_symbol): Do not set uid.
6041 * passes.c (uid_hash_t): Record removed_nodes by their uids.
6042 (remove_cgraph_node_from_order): Use the removed_nodes set.
6043 (do_per_function_toporder): Likwise.
6044 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6045 instead of summary_uid.
6046 (symtab_removal): Likewise.
6047 (symtab_duplication): Likewise.
6049 2018-06-08 Martin Liska <mliska@suse.cz>
6051 * ipa-cp.c (ipcp_store_bits_results): Use
6052 ipcp_transformation_sum.
6053 (ipcp_store_vr_results): Likewise.
6054 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6056 (ipcp_transformation_initialize): ... this.
6057 (ipa_set_node_agg_value_chain):
6058 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6059 (write_ipcp_transformation_info): Likewise.
6060 (read_ipcp_transformation_info): Likewise.
6061 (ipcp_update_bits): Likewise.
6062 (ipcp_update_vr): Likewise.
6063 (ipcp_transform_function): Likewise.
6064 * ipa-prop.h: Rename ipcp_transformation_summary to
6065 ipcp_transformation.
6066 (class ipcp_transformation_t): New function summary.
6067 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6068 (ipa_get_agg_replacements_for_node): Likewise.
6070 2018-06-08 Martin Liska <mliska@suse.cz>
6072 * ipa-pure-const.c (struct funct_state_d): Do it class instead
6074 (class funct_state_summary_t): New function_summary class.
6075 (has_function_state): Remove.
6076 (get_function_state): Likewise.
6077 (set_function_state): Likewise.
6078 (add_new_function): Likewise.
6079 (funct_state_summary_t::insert): New function.
6080 (duplicate_node_data): Remove.
6081 (remove_node_data): Remove.
6082 (funct_state_summary_t::duplicate): New function.
6083 (register_hooks): Create new funct_state_summaries.
6084 (pure_const_generate_summary): Use it.
6085 (pure_const_write_summary): Likewise.
6086 (pure_const_read_summary): Likewise.
6087 (propagate_pure_const): Likewise.
6088 (propagate_nothrow): Likewise.
6089 (dump_malloc_lattice): Likewise.
6090 (propagate_malloc): Likewise.
6091 (execute): Do not register hooks, just remove summary
6093 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6096 2018-06-08 Martin Liska <mliska@suse.cz>
6098 * ipa-reference.c (remove_node_data): Remove.
6099 (duplicate_node_data): Likewise.
6100 (class ipa_ref_var_info_summary_t): New class.
6101 (class ipa_ref_opt_summary_t): Likewise.
6102 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6103 (get_reference_optimization_summary): Use
6104 ipa_ref_opt_sum_summaries.
6105 (set_reference_vars_info): Remove.
6106 (set_reference_optimization_summary): Likewise.
6107 (ipa_init): Create summaries.
6108 (init_function_info): Use function summary.
6109 (ipa_ref_opt_summary_t::duplicate): New function.
6110 (ipa_ref_opt_summary_t::remove): New function.
6111 (get_read_write_all_from_node): Fix GNU coding style.
6112 (propagate): Use function summary.
6113 (write_node_summary_p): Fix GNU coding style.
6114 (stream_out_bitmap): Likewise.
6115 (ipa_reference_read_optimization_summary): Use function summary.
6116 (ipa_reference_c_finalize): Do not release hooks.
6118 2018-06-08 Martin Liska <mliska@suse.cz>
6120 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6121 (analyze_function_body): Extract multiple calls of get_create.
6122 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6123 * ipa-inline.c (recursive_inlining): Use ::get method.
6124 * ipa-inline.h (estimate_edge_growth): Likewise.
6126 2018-06-08 Martin Liska <mliska@suse.cz>
6128 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6130 (hsa_function_summary::hsa_function_summary): Use the new enum
6132 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6133 * hsa-gen.c (hsa_get_host_function): Likewise.
6134 (get_brig_function_name): Likewise.
6135 * ipa-hsa.c (process_hsa_functions): Likewise.
6136 (ipa_hsa_write_summary): Likewise.
6137 * symbol-summary.h (symtab_duplication): Use ::get function/
6138 (get): New function.
6140 2018-06-08 Martin Liska <mliska@suse.cz>
6142 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6144 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6145 (hsa_register_kernel): Likewise.
6146 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6147 * hsa-gen.c (hsa_get_host_function): Likewise.
6148 (get_brig_function_name): Likewise.
6149 (generate_hsa): Likewise.
6150 (pass_gen_hsail::execute): Likewise.
6151 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6152 (devirtualization_time_bonus): Likewise.
6153 (ipcp_propagate_stage): Likewise.
6154 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6155 (edge_set_predicate): Likewise.
6156 (evaluate_conditions_for_known_args): Likewise.
6157 (evaluate_properties_for_edge): Likewise.
6158 (ipa_fn_summary::reset): Likewise.
6159 (ipa_fn_summary_t::duplicate): Likewise.
6160 (dump_ipa_call_summary): Likewise.
6161 (ipa_dump_fn_summary): Likewise.
6162 (analyze_function_body): Likewise.
6163 (compute_fn_summary): Likewise.
6164 (estimate_edge_devirt_benefit): Likewise.
6165 (estimate_edge_size_and_time): Likewise.
6166 (estimate_calls_size_and_time): Likewise.
6167 (estimate_node_size_and_time): Likewise.
6168 (inline_update_callee_summaries): Likewise.
6169 (remap_edge_change_prob): Likewise.
6170 (remap_edge_summaries): Likewise.
6171 (ipa_merge_fn_summary_after_inlining): Likewise.
6172 (ipa_update_overall_fn_summary): Likewise.
6173 (read_ipa_call_summary): Likewise.
6174 (inline_read_section): Likewise.
6175 (write_ipa_call_summary): Likewise.
6176 (ipa_fn_summary_write): Likewise.
6177 (ipa_free_fn_summary): Likewise.
6178 * ipa-hsa.c (process_hsa_functions): Likewise.
6179 (ipa_hsa_write_summary): Likewise.
6180 (ipa_hsa_read_section): Likewise.
6181 * ipa-icf.c (sem_function::merge): Likewise.
6182 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6183 (do_estimate_edge_time): Likewise.
6184 (estimate_size_after_inlining): Likewise.
6185 (estimate_growth): Likewise.
6186 (growth_likely_positive): Likewise.
6187 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6188 (inline_call): Likewise.
6189 * ipa-inline.c (caller_growth_limits): Likewise.
6190 (can_inline_edge_p): Likewise.
6191 (can_inline_edge_by_limits_p): Likewise.
6192 (compute_uninlined_call_time): Likewise.
6193 (compute_inlined_call_time): Likewise.
6194 (want_inline_small_function_p): Likewise.
6195 (edge_badness): Likewise.
6196 (update_caller_keys): Likewise.
6197 (update_callee_keys): Likewise.
6198 (recursive_inlining): Likewise.
6199 (inline_small_functions): Likewise.
6200 (inline_to_all_callers_1): Likewise.
6201 (dump_overall_stats): Likewise.
6202 (early_inline_small_functions): Likewise.
6203 (early_inliner): Likewise.
6204 * ipa-inline.h (estimate_edge_growth): Likewise.
6205 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6206 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6207 * ipa-prop.h (IPA_NODE_REF): Likewise.
6208 (IPA_EDGE_REF): Likewise.
6209 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6210 (propagate_malloc): Likewise.
6211 * ipa-split.c (execute_split_functions): Likewise.
6212 * symbol-summary.h: Rename get to get_create.
6214 (get_create): Likewise.
6215 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6217 2018-06-08 Martin Liska <mliska@suse.cz>
6219 * symbol-summary.h (release): Move definition out of class
6221 (symtab_removal): Likewise.
6222 (symtab_duplication): Likewise.
6224 2018-06-08 Martin Liska <mliska@suse.cz>
6226 * symbol-summary.h (function_summary): Move constructor
6227 implementation out of class declaration.
6228 (release): Likewise.
6229 (symtab_insertion): Likewise.
6230 (symtab_removal): Likewise.
6231 (symtab_duplication): Likewise.
6234 2018-06-08 Martin Liska <mliska@suse.cz>
6236 * Makefile.in: Remove support for MPX (macros, related functions,
6237 fields in cgraph_node, ...).
6238 * builtin-types.def (BT_BND): Likewise.
6239 (BT_FN_BND_CONST_PTR): Likewise.
6240 (BT_FN_CONST_PTR_BND): Likewise.
6241 (BT_FN_VOID_PTR_BND): Likewise.
6242 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6243 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6244 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6245 (expand_builtin_mempcpy_with_bounds): Likewise.
6246 (expand_builtin_memset_with_bounds): Likewise.
6247 (expand_builtin_memset_args): Likewise.
6248 (std_expand_builtin_va_start): Likewise.
6249 (expand_builtin): Likewise.
6250 (expand_builtin_with_bounds): Likewise.
6251 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6252 (DEF_LIB_BUILTIN_CHKP): Likewise.
6253 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6254 (DEF_CHKP_BUILTIN): Likewise.
6255 (BUILT_IN_MEMCPY): Likewise.
6256 (BUILT_IN_MEMMOVE): Likewise.
6257 (BUILT_IN_MEMPCPY): Likewise.
6258 (BUILT_IN_MEMSET): Likewise.
6259 (BUILT_IN_STPCPY): Likewise.
6260 (BUILT_IN_STRCAT): Likewise.
6261 (BUILT_IN_STRCHR): Likewise.
6262 (BUILT_IN_STRCPY): Likewise.
6263 (BUILT_IN_STRLEN): Likewise.
6264 (BUILT_IN_MEMCPY_CHK): Likewise.
6265 (BUILT_IN_MEMMOVE_CHK): Likewise.
6266 (BUILT_IN_MEMPCPY_CHK): Likewise.
6267 (BUILT_IN_MEMSET_CHK): Likewise.
6268 (BUILT_IN_STPCPY_CHK): Likewise.
6269 (BUILT_IN_STRCAT_CHK): Likewise.
6270 (BUILT_IN_STRCPY_CHK): Likewise.
6271 * calls.c (store_bounds): Likewise.
6272 (emit_call_1): Likewise.
6273 (special_function_p): Likewise.
6274 (maybe_warn_nonstring_arg): Likewise.
6275 (initialize_argument_information): Likewise.
6276 (finalize_must_preallocate): Likewise.
6277 (compute_argument_addresses): Likewise.
6278 (expand_call): Likewise.
6279 * cfgexpand.c (expand_call_stmt): Likewise.
6280 (expand_return): Likewise.
6281 (expand_gimple_stmt_1): Likewise.
6282 (pass_expand::execute): Likewise.
6283 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6284 (cgraph_node::remove): Likewise.
6285 (cgraph_node::dump): Likewise.
6286 (cgraph_node::verify_node): Likewise.
6287 * cgraph.h (chkp_function_instrumented_p): Likewise.
6288 (symtab_node::get_alias_target): Likewise.
6289 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6290 (cgraph_local_p): Likewise.
6291 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6292 (cgraph_edge::rebuild_references): Likewise.
6293 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6294 (walk_polymorphic_call_targets): Likewise.
6295 (cgraph_node::expand_thunk): Likewise.
6296 (symbol_table::output_weakrefs): Likewise.
6297 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6298 (ix86_handle_option): Likewise.
6299 * config/i386/constraints.md: Likewise.
6300 * config/i386/i386-builtin-types.def (BND): Likewise.
6304 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6305 (BDESC_FIRST): Likewise.
6307 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6308 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6309 * config/i386/i386.c (enum reg_class): Likewise.
6310 (ix86_target_string): Likewise.
6311 (ix86_option_override_internal): Likewise.
6312 (ix86_conditional_register_usage): Likewise.
6313 (ix86_valid_target_attribute_inner_p): Likewise.
6314 (ix86_set_indirect_branch_type): Likewise.
6315 (ix86_set_current_function): Likewise.
6316 (ix86_function_arg_regno_p): Likewise.
6317 (init_cumulative_args): Likewise.
6318 (ix86_function_arg_advance): Likewise.
6319 (ix86_function_arg): Likewise.
6320 (ix86_pass_by_reference): Likewise.
6321 (ix86_function_value_regno_p): Likewise.
6322 (ix86_function_value_1): Likewise.
6323 (ix86_function_value_bounds): Likewise.
6324 (ix86_return_in_memory): Likewise.
6325 (ix86_setup_incoming_vararg_bounds): Likewise.
6326 (ix86_va_start): Likewise.
6327 (indirect_thunk_need_prefix): Likewise.
6328 (print_reg): Likewise.
6329 (ix86_print_operand): Likewise.
6330 (ix86_expand_call): Likewise.
6331 (ix86_output_function_return): Likewise.
6332 (reg_encoded_number): Likewise.
6333 (BDESC_VERIFYS): Likewise.
6334 (ix86_init_mpx_builtins): Likewise.
6335 (ix86_init_builtins): Likewise.
6336 (ix86_emit_cmove): Likewise.
6337 (ix86_emit_move_max): Likewise.
6338 (ix86_expand_builtin): Likewise.
6339 (ix86_builtin_mpx_function): Likewise.
6340 (ix86_get_arg_address_for_bt): Likewise.
6341 (ix86_load_bounds): Likewise.
6342 (ix86_store_bounds): Likewise.
6343 (ix86_load_returned_bounds): Likewise.
6344 (ix86_store_returned_bounds): Likewise.
6345 (ix86_class_likely_spilled_p): Likewise.
6346 (ix86_hard_regno_mode_ok): Likewise.
6347 (x86_order_regs_for_local_alloc): Likewise.
6348 (ix86_mitigate_rop): Likewise.
6349 (ix86_bnd_prefixed_insn_p): Likewise.
6350 (ix86_mpx_bound_mode): Likewise.
6351 (ix86_make_bounds_constant): Likewise.
6352 (ix86_initialize_bounds): Likewise.
6353 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6354 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6355 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6356 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6357 (TARGET_CHKP_BOUND_MODE): Likewise.
6358 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6359 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6360 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6361 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6362 * config/i386/i386.h (TARGET_MPX): Likewise.
6363 (TARGET_MPX_P): Likewise.
6364 (VALID_BND_REG_MODE): Likewise.
6365 (FIRST_BND_REG): Likewise.
6366 (LAST_BND_REG): Likewise.
6367 (enum reg_class): Likewise.
6368 (BND_REG_P): Likewise.
6369 (BND_REGNO_P): Likewise.
6370 (BNDmode): Likewise.
6371 (ADJUST_INSN_LENGTH): Likewise.
6372 * config/i386/i386.md: Likewise.
6373 * config/i386/i386.opt: Likewise.
6374 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6375 (defined): Likewise.
6376 (LINK_MPX): Likewise.
6377 (MPX_SPEC): Likewise.
6378 (LIBMPX_SPEC): Likewise.
6379 (LIBMPXWRAPPERS_SPEC): Likewise.
6380 (CHKP_SPEC): Likewise.
6381 * config/i386/predicates.md: Likewise.
6382 * dbxout.c (dbxout_type): Likewise.
6383 * doc/extend.texi: Likewise.
6384 * doc/invoke.texi: Likewise.
6385 * doc/md.texi: Likewise.
6386 * doc/tm.texi: Likewise.
6387 * doc/tm.texi.in: Likewise.
6388 * dwarf2out.c (is_base_type): Likewise.
6389 (gen_formal_types_die): Likewise.
6390 (gen_subprogram_die): Likewise.
6391 (gen_type_die_with_usage): Likewise.
6392 (gen_decl_die): Likewise.
6393 (dwarf2out_late_global_decl): Likewise.
6394 * expr.c (expand_assignment): Likewise.
6395 (emit_storent_insn): Likewise.
6396 (store_expr_with_bounds): Likewise.
6397 (store_expr): Likewise.
6398 (expand_expr_real_1): Likewise.
6399 * expr.h (store_expr_with_bounds): Likewise.
6400 * function.c (use_register_for_decl): Likewise.
6401 (struct bounds_parm_data): Likewise.
6402 (assign_parms_augmented_arg_list): Likewise.
6403 (assign_parm_find_entry_rtl): Likewise.
6404 (assign_parm_is_stack_parm): Likewise.
6405 (assign_parm_load_bounds): Likewise.
6406 (assign_bounds): Likewise.
6407 (assign_parms): Likewise.
6408 (expand_function_start): Likewise.
6409 * gcc.c (CHKP_SPEC): Likewise.
6410 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6411 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6412 (wrestrict_dom_walker::check_call): Likewise.
6413 * gimple.c (gimple_build_call_from_tree): Likewise.
6414 * gimple.h (enum gf_mask): Likewise.
6415 (gimple_call_with_bounds_p): Likewise.
6416 (gimple_call_set_with_bounds): Likewise.
6417 * gimplify.c (gimplify_init_constructor): Likewise.
6418 * ipa-cp.c (initialize_node_lattices): Likewise.
6419 (propagate_constants_across_call): Likewise.
6420 (find_more_scalar_values_for_callers_subset): Likewise.
6421 * ipa-hsa.c (process_hsa_functions): Likewise.
6422 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6423 * ipa-icf.c (sem_function::merge): Likewise.
6424 * ipa-inline.c (early_inliner): Likewise.
6425 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6426 (warn_function_cold): Likewise.
6427 (propagate_pure_const): Likewise.
6428 * ipa-ref.h (enum GTY): Likewise.
6429 * ipa-split.c (find_retbnd): Likewise.
6430 (consider_split): Likewise.
6431 (split_function): Likewise.
6432 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6433 * ipa.c (walk_polymorphic_call_targets): Likewise.
6434 (symbol_table::remove_unreachable_nodes): Likewise.
6435 (process_references): Likewise.
6436 (cgraph_build_static_cdtor_1): Likewise.
6437 * lto-cgraph.c (lto_output_node): Likewise.
6438 (output_refs): Likewise.
6439 (compute_ltrans_boundary): Likewise.
6440 (input_overwrite_node): Likewise.
6441 (input_node): Likewise.
6442 (input_cgraph_1): Likewise.
6443 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6444 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6445 (class pass_chkp_instrumentation_passes): Likewise.
6446 (make_pass_chkp_instrumentation_passes): Likewise.
6447 * passes.def: Likewise.
6448 * rtl.h (struct GTY): Likewise.
6449 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6450 * stor-layout.c (layout_type): Likewise.
6451 * symtab.c: Likewise.
6452 * target.def: Likewise.
6453 * targhooks.c (default_chkp_bound_type): Likewise.
6454 (default_chkp_bound_mode): Likewise.
6455 (default_builtin_chkp_function): Likewise.
6456 (default_chkp_function_value_bounds): Likewise.
6457 (default_chkp_make_bounds_constant): Likewise.
6458 (default_chkp_initialize_bounds): Likewise.
6459 * targhooks.h (default_chkp_bound_type): Likewise.
6460 (default_chkp_bound_mode): Likewise.
6461 (default_builtin_chkp_function): Likewise.
6462 (default_chkp_function_value_bounds): Likewise.
6463 (default_chkp_make_bounds_constant): Likewise.
6464 (default_chkp_initialize_bounds): Likewise.
6465 * toplev.c (compile_file): Likewise.
6466 (process_options): Likewise.
6467 * tree-core.h (DEF_BUILTIN): Likewise.
6468 (DEF_BUILTIN_CHKP): Likewise.
6469 * tree-inline.c (declare_return_variable): Likewise.
6470 (remap_gimple_stmt): Likewise.
6471 (copy_bb): Likewise.
6472 (initialize_inlined_parameters): Likewise.
6473 (expand_call_inline): Likewise.
6474 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6475 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6476 (make_pass_ipa_chkp_produce_thunks): Likewise.
6477 (make_pass_chkp): Likewise.
6478 (make_pass_chkp_opt): Likewise.
6479 (make_pass_chkp_instrumentation_passes): Likewise.
6480 * tree-pretty-print.c (dump_generic_node): Likewise.
6481 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6482 * tree-ssa-dce.c (propagate_necessity): Likewise.
6483 (eliminate_unnecessary_stmts): Likewise.
6484 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6485 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6486 * tree-ssa-sccvn.h: Likewise.
6487 * tree-ssa-strlen.c (get_string_length): Likewise.
6488 (valid_builtin_call): Likewise.
6489 (adjust_last_stmt): Likewise.
6490 (handle_builtin_strchr): Likewise.
6491 (handle_builtin_strcpy): Likewise.
6492 (handle_builtin_stxncpy): Likewise.
6493 (handle_builtin_memcpy): Likewise.
6494 (handle_builtin_strcat): Likewise.
6495 (strlen_check_and_optimize_stmt): Likewise.
6496 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6497 * tree-streamer-in.c: Likewise.
6498 * tree-streamer.c (record_common_node): Likewise.
6499 * tree.c (tree_code_size): Likewise.
6500 (wide_int_to_tree_1): Likewise.
6501 (type_contains_placeholder_1): Likewise.
6502 (build_common_tree_nodes): Likewise.
6503 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6504 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6505 (POINTER_BOUNDS_P): Likewise.
6506 (BOUNDED_TYPE_P): Likewise.
6507 (BOUNDED_P): Likewise.
6508 (CALL_WITH_BOUNDS_P): Likewise.
6509 (pointer_bounds_type_node): Likewise.
6510 * value-prof.c (gimple_ic): Likewise.
6511 * var-tracking.c (vt_add_function_parameters): Likewise.
6512 * varasm.c (make_decl_rtl): Likewise.
6513 (assemble_start_function): Likewise.
6514 (output_constant): Likewise.
6515 (maybe_assemble_visibility): Likewise.
6516 * varpool.c (ctor_for_folding): Likewise.
6517 * chkp-builtins.def: Remove.
6518 * ipa-chkp.c: Remove.
6519 * ipa-chkp.h: Remove.
6520 * rtl-chkp.c: Remove.
6521 * rtl-chkp.h: Remove.
6522 * tree-chkp-opt.c: Remove.
6523 * tree-chkp.c: Remove.
6524 * tree-chkp.h: Remove.
6526 2018-06-07 Carl Love <cel@us.ibm.com>
6528 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6529 vextract_fp_from_shortl): Add BE support.
6531 2018-06-07 Paul Koning <ni1d@arrl.net>
6533 * compare-elim.c (try_merge_compare): Don't merge compare if
6534 address contains a side effect.
6535 (try_eliminate_compare): Likewise.
6537 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6539 * config.gcc: Support "tremont".
6540 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6541 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6543 * config/i386/i386.c (m_TREMONT): Define.
6544 (processor_target_table): Add "tremont".
6545 (PTA_TREMONT): Define.
6546 (ix86_lea_outperforms): Add TARGET_TREMONT.
6547 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6548 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6549 and M_INTEL_GOLDMONT_PLUS.
6550 (fold_builtin_cpu): Add "tremont".
6551 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6552 (ix86_option_override_internal): Add "tremont".
6553 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6554 (processor_type): Add PROCESSOR_TREMONT.
6555 * config/i386/x86-tune.def: Add m_TREMONT.
6556 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6558 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6560 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6561 symbol defined for msp430i* devices to be lower case.
6563 2018-06-07 Richard Biener <rguenther@suse.de>
6565 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6566 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6567 Properly wrap signed arithmetic if overflow wraps.
6569 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6571 PR tree-optimization/69615
6572 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6573 of a cast from a same precision integral SSA_NAME in a bb dominated
6574 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6575 cast to utype if rhs2 has already a compatible type.
6577 2018-06-07 Richard Biener <rguenther@suse.de>
6579 PR tree-optimization/85935
6580 * graphite-scop-detection.c (find_params_in_bb): Analyze
6581 condition operands with respect to the correct loop. Assert
6582 the analysis doesn't fail.
6584 2018-06-04 Carl Love <cel@us.ibm.com>
6586 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6587 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6588 as it is slightly cheaper.
6589 (first_match_or_eos_index_<mode>):
6590 Calculate index using natural element order.
6591 (first_match_index_<mode>):
6592 Calculate index using natural element order.
6593 (first_match_or_eos_index_<mode>):
6594 Calculate index using natural order.
6595 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6596 for BE and LE modes.
6597 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6598 P9V_BUILTIN_VCLZLSBB_V16QI.
6599 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6602 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6604 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6605 indentation and line wrap for many prototypes. Add missing
6606 @smallexample directives around block of prototypes for vec_xl and
6609 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6611 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6612 track if we pass or return IEEE 128-bit floating point.
6613 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6614 C++ mangling that is compatible with GCC 8.1.
6615 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6616 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6617 floating point types.
6618 (rs6000_function_arg_advance_1): Likewise.
6619 (rs6000_mangle_type): Optionally generate mangled names that match
6620 what GCC 8.1 generated for IEEE 128-bit floating point types.
6621 (rs6000_globalize_decl_name): If we have an external function that
6622 passes or returns IEEE 128-bit types, generate a weak reference
6623 from the mangled name used in GCC 8.1 to the current mangled
6625 (rs6000_init_builtins): Make __ibm128 use the long double type if
6626 long double is IBM extended double. Make __float128 use the long
6627 double type if long double is IEEE 128-bit.
6630 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6631 macro for __ibm128 built-in functions.
6632 (PACK_IF): Add __ibm128 pack/unpack functions.
6633 (UNPACK_IF): Likewise.
6634 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6635 enable long double built-in functions if long double is IEEE
6636 128-bit floating point.
6637 (rs6000_invalid_builtin): Update long double built-in function
6639 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6640 functions, adjust the built-in function to use the long double
6641 built-in function if __ibm128 and long double are the same type.
6642 * doc/extend.texi (PowerPC builtins): Update documention for
6643 __builtin_{,un}pack_longdouble. Add documentation for
6644 __builtin_{,un}pack_ibm128.
6646 2018-06-06 Jim Wilson <jimw@sifive.com>
6648 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6649 (struct machine_function): New field interrupt_mode.
6650 (riscv_handle_type_attribute): New function. Add forward declaration.
6651 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6652 (riscv_expand_epilogue): Check interrupt_mode field.
6653 (riscv_set_current_function): Check interrupt attribute args and
6654 set interrupt_mode field.
6655 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6656 (riscv_sret, riscv_uret): New.
6657 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6658 new arguments to interrupt attribute.
6660 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6663 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6664 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6666 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6668 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6669 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6670 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6671 several redundant entries.
6673 2018-06-06 David Malcolm <dmalcolm@redhat.com>
6675 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6676 type from "rtx" to "rtx_insn *".
6677 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6678 for local "call_insn", removing cast.
6679 (ix86_expand_call): Likewise, introducing a "call_insn" local.
6681 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
6683 PR tree-optimization/86066
6684 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6685 for BIT_INSERT_EXPR stores.
6687 2018-06-06 Richard Biener <rguenther@suse.de>
6689 PR tree-optimization/86062
6690 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6691 component refs ontop
6692 of to be offsetted base.
6694 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6696 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6697 to be static and remove check on interrupt attribute name.
6699 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
6701 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6702 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6704 2018-06-05 Steve Ellcey <sellcey@cavium.com>
6707 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6709 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6710 Remove second argument, change how error is called.
6711 (aarch64_layout_arg): Remove second argument from
6712 aarch64_err_no_fpadvsimd call.
6713 (aarch64_init_cumulative_args): Ditto.
6714 (aarch64_gimplify_va_arg_expr): Ditto.
6715 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6717 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6719 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6720 (*simple_return_indirect_internal<mode>): Rename from
6721 simple_return_indirect_internal. Use W mode iterator.
6722 (rstorssp): New expander.
6723 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6724 (clrssbsy): New expander.
6725 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6727 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6729 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6731 (cmse_check_pointed_object): Likewise.
6733 2018-06-05 Martin Liska <mliska@suse.cz>
6735 PR gcov-profile/47618
6736 * doc/invoke.texi: Document how -fprofile-dir format
6739 2018-06-05 Richard Biener <rguenther@suse.de>
6741 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6742 removal pretend DOM info isn't available so we do not update
6743 it and only remove edges, not dominated blocks. Actually free
6744 DOM info in case we removed something. Remove unreachable blocks.
6745 (mfb_keep_latches): Work with either DOM info or marked backedges.
6746 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6747 first. Mark backedges if DOM info isn't available.
6748 (Re-)compute DOM info after cleanup_control_flow_pre.
6750 2018-06-05 Richard Biener <rguenther@suse.de>
6752 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6753 (locus_discrim_hasher::hash): Adjust.
6754 (locus_discrim_hasher::equal): Likewise.
6755 (next_discriminator_for_locus): Work on line directly.
6756 (same_line_p): Pass in expanded locus1 as well.
6757 (assign_discriminators): Avoid redundant location expansions.
6759 2018-06-05 Richard Biener <rguenther@suse.de>
6761 PR tree-optimization/86046
6762 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6763 if required after clearing TREE_ADDRESSABLE.
6765 2018-06-05 Richard Biener <rguenther@suse.de>
6767 PR tree-optimization/86047
6768 * tree-ssa-loop.c (for_each_index): Glob handling of all
6769 decls and constants and really handle all of them.
6771 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6774 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6775 qualifier_void_pointer and qualifier_const_void_pointer.
6776 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6777 (arm_init_builtins): Handle the above.
6778 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6779 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6780 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6783 2018-06-05 Martin Liska <mliska@suse.cz>
6785 * auto-profile.c (read_autofdo_file): Do not use
6786 gcov_ctr_summary struct.
6787 (afdo_callsite_hot_enough_for_early_inline): Likewise.
6788 * coverage.c (struct counts_entry): Likewise.
6789 (read_counts_file): Read just single summary entry.
6790 (get_coverage_counts): Use gcov_summary struct.
6791 * coverage.h (get_coverage_counts): Likewise.
6792 * gcov-dump.c (dump_working_sets): Likewise.
6793 (tag_summary): Dump just single summary.
6794 * gcov-io.c (gcov_write_summary): Write just histogram
6796 (gcov_read_summary): Read just single summary.
6797 (compute_working_sets): Use gcov_summary struct.
6798 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6799 of GCOV_COUNTERS_SUMMABLE.
6800 (GCOV_COUNTERS_SUMMABLE): Remove.
6801 (GCOV_FIRST_VALUE_COUNTER): Replace with
6802 GCOV_COUNTER_V_INTERVAL.
6803 (struct gcov_ctr_summary): Remove.
6804 (struct gcov_summary): Directly use fields of former
6806 (compute_working_sets): Use gcov_summary struct.
6807 * gcov.c (read_count_file): Do not use ctrs fields.
6808 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6810 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6812 * profile.c: Likewise.
6813 * profile.h: Likewise.
6815 2018-06-05 Martin Liska <mliska@suse.cz>
6817 PR gcov-profile/84846
6818 * gcov.c (output_lines): Print working directory only
6819 in intermediate format.
6821 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
6823 * config/s390/s390-builtin-types.def: Add void function type.
6824 * config/s390/s390-builtins.def: Use the function type for the
6827 2018-06-04 Jim Wilson <jimw@sifive.com>
6829 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6831 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6832 and maybe_eh_return. Change regno to unsigned int. Use new args to
6833 handle EH_RETURN_DATA_REGNO registers properly.
6834 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6835 (riscv_expand_epilogue): Update comment. Change argument name and
6836 type. Update code to use new name and type. Pass new args to
6837 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
6839 * config/riscv/riscv.md (NORMAL_RETURN): New.
6840 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6841 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6842 (eh_return): Call gen_eh_return_internal and emit barrier.
6843 (eh_return_internal): Call riscv_expand_epilogue.
6845 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
6847 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6848 bit_insertion field and declare can_be_merged_into method.
6849 (merged_store_group::can_be_merged_into): New method.
6850 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6851 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
6852 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6854 2018-06-04 Richard Biener <rguenther@suse.de>
6856 PR tree-optimization/85955
6857 * builtins.c (fold_builtin_sincos): Convert pointers to
6858 destination to appropriate type before dereferencing.
6860 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
6862 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6864 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6866 * expr.c (expand_expr_real_1): Force the operand into memory if
6867 its TYPE_MODE is BLKmode and if there is no integer mode for
6868 the number of bits being extracted.
6870 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6874 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6875 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6877 2018-06-04 Richard Biener <rguenther@suse.de>
6879 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6880 (cleanup_tree_cfg_noloop): ... single caller. Do
6881 start_recording_case_labels later.
6883 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6885 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6886 to _IMMINTRIN_H_INCLUDED.
6887 * config/i386/pconfigintrin.h: Ditto.
6888 * config/i386/waitpkgintrin.h: Ditto.
6889 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6890 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6891 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6892 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6893 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6894 waitpkgintrin.h and cldemoteintrin.h.
6896 2018-06-04 Richard Biener <rguenther@suse.de>
6898 PR tree-optimization/86038
6899 * tracer.c (find_best_successor): Check probability for
6900 being initialized, bail out if not.
6902 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6905 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6906 of bits to ignore when comparing architectures.
6908 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6910 PR tree-optimization/69615
6911 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6912 maximum or minimum of the type, try to merge it also as if
6913 range1 is + [-, x - 1] or + [x + 1, -].
6916 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6918 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6920 PR tree-optimization/86034
6921 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6922 the unsigned bitfield type in a bit insertion sequence if it does not
6923 have a larger precision than the bitfield size.
6924 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6926 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6928 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6930 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6932 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6933 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6934 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6935 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6937 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6939 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6940 Disable -fdelete-null-pointer-checks for ELF toolchain.
6942 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6943 Kito Cheng <kito.cheng@gmail.com>
6945 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6946 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6947 (nds32*-*-*): Add glibc and uclibc conditions.
6948 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6949 (TARGET_EXCEPT_UNWIND_INFO): Define.
6950 * config/nds32/elf.h: New file.
6951 * config/nds32/linux.h: New file.
6952 * config/nds32/nds32-elf.opt: New file.
6953 * config/nds32/nds32-linux.opt: New file.
6954 * config/nds32/nds32-fp-as-gp.c
6955 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6956 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6958 (nds32_asm_file_end): Ditto.
6959 (nds32_print_operand): Ditto.
6960 (nds32_insert_attributes): Ditto.
6961 (nds32_init_libfuncs): New function.
6962 (TARGET_HAVE_TLS): Define.
6963 (TARGET_INIT_LIBFUNCS): Define.
6964 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6966 (TARGET_ELF): Apply different mcmodel setting.
6967 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6968 been migrated into elf.h and linux.h files.
6969 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6970 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6971 (mcmodel): The content has been migrated into nds32-elf.opt and
6972 nds32-linux.opt files.
6973 * config/nds32/t-elf: New file.
6974 * config/nds32/t-linux: New file.
6976 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6977 Shiva Chen <shiva0217@gmail.com>
6979 * config/nds32/constants.md (unspec_volatile_element): Add
6980 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6981 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6983 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6984 (make_pass_nds32_fp_as_gp): Declare.
6985 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6987 (nds32_asm_function_end_prologue): Remove unused asm output.
6988 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6989 (nds32_asm_file_start): Output necessary fp_as_gp information.
6990 (nds32_option_override): Adjust register usage.
6991 (nds32_expand_prologue): Consider fp_as_gp situation.
6992 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6993 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6996 (simple_return): Ditto.
6997 (omit_fp_begin): Output special directive for fp_as_gp.
6998 (omit_fp_end): Output special directive for fp_as_gp.
6999 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7000 mforbid-fp-as-gp): New options.
7002 2018-06-01 Mark Wielaard <mark@klomp.org>
7004 * dwarf2out.c (dwarf2out_finish): Remove generation of
7005 DW_AT_loclists_base.
7007 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
7009 * gimple-ssa-store-merging.c: Include gimple-fold.h.
7010 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7011 (struct merged_store_group): Add bit_insertion field.
7012 (dump_char_array): Use standard hexadecimal format.
7013 (merged_store_group::merged_store_group): Set bit_insertion to false.
7014 (merged_store_group::apply_stores): Use optimal buffer size. Deal
7015 with BIT_INSERT_EXPR stores. Move up code updating the mask and
7016 also print the mask in the dump file.
7017 (pass_store_merging::gate): Minor tweak.
7018 (imm_store_chain_info::coalesce_immediate): Fix wrong association
7019 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
7020 stores with INTEGER_CST stores.
7021 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7022 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7023 and use it throughout. Generate bit insertion sequences if need be.
7024 (pass_store_merging::process_store): Remove redundant condition.
7025 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7027 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
7029 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7030 the 128-bit floating point types. Fix function comment.
7032 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7034 * config/aarch64/aarch64-simd.md
7035 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7037 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7040 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7042 PR tree-optimization/85989
7043 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7045 (backprop::intersect_uses): Check it when deciding whether this
7046 is a backedge reference.
7047 (backprop::process_block): Add each phi to m_visited_phis
7048 after visiting it, then clear it at the end.
7050 2018-06-01 Richard Biener <rguenther@suse.de>
7052 * tree-vectorizer.h (vect_dr_stmt): New function.
7053 (vect_get_load_cost): Adjust.
7054 (vect_get_store_cost): Likewise.
7055 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7056 Use vect_dr_stmt instead of DR_SMTT.
7057 (vect_record_base_alignments): Likewise.
7058 (vect_calculate_target_alignment): Likewise.
7059 (vect_compute_data_ref_alignment): Likewise and make static.
7060 (vect_update_misalignment_for_peel): Likewise.
7061 (vect_verify_datarefs_alignment): Likewise.
7062 (vector_alignment_reachable_p): Likewise.
7063 (vect_get_data_access_cost): Likewise. Pass down
7064 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7065 (vect_get_peeling_costs_all_drs): Likewise.
7066 (vect_peeling_hash_get_lowest_cost): Likewise.
7067 (vect_enhance_data_refs_alignment): Likewise.
7068 (vect_find_same_alignment_drs): Likewise.
7069 (vect_analyze_data_refs_alignment): Likewise.
7070 (vect_analyze_group_access_1): Likewise.
7071 (vect_analyze_group_access): Likewise.
7072 (vect_analyze_data_ref_access): Likewise.
7073 (vect_analyze_data_ref_accesses): Likewise.
7074 (vect_vfa_segment_size): Likewise.
7075 (vect_small_gap_p): Likewise.
7076 (vectorizable_with_step_bound_p): Likewise.
7077 (vect_prune_runtime_alias_test_list): Likewise.
7078 (vect_analyze_data_refs): Likewise.
7079 (vect_supportable_dr_alignment): Likewise.
7080 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7081 (vect_gen_prolog_loop_niters): Likewise.
7082 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7083 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7085 (vect_recog_mask_conversion_pattern): Likewise.
7086 (vect_try_gather_scatter_pattern): Likewise.
7087 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7088 to vect_get_store_cost.
7089 (vect_get_store_cost): Get stmt_info instead of DR.
7090 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7091 (vect_get_load_cost): Get stmt_info instead of DR.
7093 2018-06-01 Richard Biener <rguenther@suse.de>
7096 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7097 vars wrapped in MEM_REFs.
7099 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7101 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7102 Fix subreg tests so that we only return a choice between
7103 GENERAL_REGS and FP_REGS if the original classes included both.
7105 2018-06-01 Richard Biener <rguenther@suse.de>
7108 * tree-ssa-structalias.c (get_function_part_constraint):
7109 Handle NULL fi->decl.
7110 (find_func_aliases_for_call): Properly handle indirect
7111 fi from direct call.
7112 (find_func_clobbers): Likewise.
7113 (ipa_pta_execute): Likewise.
7114 (create_variable_info_for): For functions that are ifunc_resolver
7115 resolve to a varinfo that contains the result of the resolver call.
7116 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7119 2018-05-31 Michael Collison <michael.collison@arm.com>
7121 * config/aarch64/aarch64.md:
7122 (*fix_to_zero_extenddfdi2): New pattern.
7123 * gcc.target/aarch64/fix_extend1.c: New testcase.
7125 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7129 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7130 and BUILT_IN_STRNCMP_EQ.
7131 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7132 BUILT_IN_STRNCMP_EQ.
7133 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7134 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7135 (gimple_fold_builtin): Likewise.
7136 * tree-ssa-strlen.c (compute_string_length): New function.
7137 (determine_min_obsize): New function.
7138 (handle_builtin_string_cmp): New function to handle calls to
7139 string compare functions.
7140 (strlen_optimize_stmt): Add handling to builtin string compare
7142 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7143 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7144 * tree.c (build_common_builtin_nodes): Add new defines of
7145 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7147 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7150 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7151 functions with naked attribute.
7153 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7155 * config/i386/sse.md (avx_vec_concat<mode>):
7156 Substitute concat_tg_mode mode attribute with xtg_mode.
7157 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7158 (concat_tg_mode): Remove mode attribute.
7160 2018-05-31 Martin Sebor <msebor@redhat.com>
7163 * calls.c (alloc_max_size): Correct a logic error/typo.
7164 Treat excessive arguments as infinite. Warn for invalid arguments.
7165 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7167 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7170 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7171 and movx for Haswell.
7173 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7174 Cesar Philippidis <cesar@codesourcery.com>
7177 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7178 when emitting error on private/firstprivate reductions.
7179 * omp-low.c (lower_omp_target): Avoid reference-type processing
7180 on pointers for firstprivate clause.
7182 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7184 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7187 * config/aarch64/aarch64-simd.md
7188 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7189 (aarch64_ld1_x3_<mode>): Likewise
7190 (aarch64_st1x2<VALLDIF:mode>): Likewise
7191 (aarch64_st1_x2_<mode>): Likewise
7192 (aarch64_st1x3<VALLDIF:mode>): Likewise
7193 (aarch64_st1_x3_<mode>): Likewise
7194 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7195 (vld1_s8_x3): Likewise.
7196 (vld1_u16_x3): Likewise.
7197 (vld1_s16_x3): Likewise.
7198 (vld1_u32_x3): Likewise.
7199 (vld1_s32_x3): Likewise.
7200 (vld1_u64_x3): Likewise.
7201 (vld1_s64_x3): Likewise.
7202 (vld1_f16_x3): Likewise.
7203 (vld1_f32_x3): Likewise.
7204 (vld1_f64_x3): Likewise.
7205 (vld1_p8_x3): Likewise.
7206 (vld1_p16_x3): Likewise.
7207 (vld1_p64_x3): Likewise.
7208 (vld1q_u8_x3): Likewise.
7209 (vld1q_s8_x3): Likewise.
7210 (vld1q_u16_x3): Likewise.
7211 (vld1q_s16_x3): Likewise.
7212 (vld1q_u32_x3): Likewise.
7213 (vld1q_s32_x3): Likewise.
7214 (vld1q_u64_x3): Likewise.
7215 (vld1q_s64_x3): Likewise.
7216 (vld1q_f16_x3): Likewise.
7217 (vld1q_f32_x3): Likewise.
7218 (vld1q_f64_x3): Likewise.
7219 (vld1q_p8_x3): Likewise.
7220 (vld1q_p16_x3): Likewise.
7221 (vld1q_p64_x3): Likewise.
7222 (vst1_s64_x2): Likewise.
7223 (vst1_u64_x2): Likewise.
7224 (vst1_f64_x2): Likewise.
7225 (vst1_s8_x2): Likewise.
7226 (vst1_p8_x2): Likewise.
7227 (vst1_s16_x2): Likewise.
7228 (vst1_p16_x2): Likewise.
7229 (vst1_s32_x2): Likewise.
7230 (vst1_u8_x2): Likewise.
7231 (vst1_u16_x2): Likewise.
7232 (vst1_u32_x2): Likewise.
7233 (vst1_f16_x2): Likewise.
7234 (vst1_f32_x2): Likewise.
7235 (vst1_p64_x2): Likewise.
7236 (vst1q_s8_x2): Likewise.
7237 (vst1q_p8_x2): Likewise.
7238 (vst1q_s16_x2): Likewise.
7239 (vst1q_p16_x2): Likewise.
7240 (vst1q_s32_x2): Likewise.
7241 (vst1q_s64_x2): Likewise.
7242 (vst1q_u8_x2): Likewise.
7243 (vst1q_u16_x2): Likewise.
7244 (vst1q_u32_x2): Likewise.
7245 (vst1q_u64_x2): Likewise.
7246 (vst1q_f16_x2): Likewise.
7247 (vst1q_f32_x2): Likewise.
7248 (vst1q_f64_x2): Likewise.
7249 (vst1q_p64_x2): Likewise.
7250 (vst1_s64_x3): Likewise.
7251 (vst1_u64_x3): Likewise.
7252 (vst1_f64_x3): Likewise.
7253 (vst1_s8_x3): Likewise.
7254 (vst1_p8_x3): Likewise.
7255 (vst1_s16_x3): Likewise.
7256 (vst1_p16_x3): Likewise.
7257 (vst1_s32_x3): Likewise.
7258 (vst1_u8_x3): Likewise.
7259 (vst1_u16_x3): Likewise.
7260 (vst1_u32_x3): Likewise.
7261 (vst1_f16_x3): Likewise.
7262 (vst1_f32_x3): Likewise.
7263 (vst1_p64_x3): Likewise.
7264 (vst1q_s8_x3): Likewise.
7265 (vst1q_p8_x3): Likewise.
7266 (vst1q_s16_x3): Likewise.
7267 (vst1q_p16_x3): Likewise.
7268 (vst1q_s32_x3): Likewise.
7269 (vst1q_s64_x3): Likewise.
7270 (vst1q_u8_x3): Likewise.
7271 (vst1q_u16_x3): Likewise.
7272 (vst1q_u32_x3): Likewise.
7273 (vst1q_u64_x3): Likewise.
7274 (vst1q_f16_x3): Likewise.
7275 (vst1q_f32_x3): Likewise.
7276 (vst1q_f64_x3): Likewise.
7277 (vst1q_p64_x3): Likewise.
7279 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7281 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7282 user_label_prefix to name.
7284 * tree-core.h: Update comment about the format of NAME string
7285 passed to handler in attribute_spec.
7287 * config/msp430/msp430.md: Remove erroneous subreg expression from
7288 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7289 zero_extend{q,h}isi2.
7291 2018-05-30 Borislav Petkov <bp@suse.de>
7293 * doc/extend.texi: Document some architecture specific
7294 constraints and sort entries.
7296 2018-05-30 Martin Sebor <msebor@redhat.com>
7299 * builtins.c (expand_builtin_stpcpy_1): New function.
7300 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7301 only if the former succeeds.
7303 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7305 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7308 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7310 * doc/invoke.texi (-flinker-output): Document
7312 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7314 * passes.c (ipa_write_summaries): Only modify statements if body
7316 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7317 incrementally linking.
7318 (ipa_passes): Likewise.
7319 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7320 pass down resolution info.
7321 * common.opt (flag_incremental_link): Update info.
7322 * gcc.c (plugin specs): Turn flinker-output=* to
7323 -plugin-opt=-linker-output-known
7324 * toplev.c (compile_file): Also cut compilation when doing incremental
7326 * flag-types. (enum lto_partition_model): Add
7327 LTO_LINKER_OUTPUT_NOLTOREL.
7328 (invoke.texi): Add -flinker-output docs.
7329 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7330 link same way as WPA; do not stream in dead initializers.
7332 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7333 darf2out_register_external_decl): Support incremental link.
7335 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7337 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7339 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7341 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7342 it down to simple_object_copy_lto_debug_sections.
7343 (run_gcc): Determine incremental LTO link time and configure
7344 lto1 into non-wpa mode, disable renaming of debug sections.
7346 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7348 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7349 descriptions of various incorrectly documented functions.
7351 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7354 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7355 address check not strict.
7357 2018-05-30 Richard Biener <rguenther@suse.de>
7359 PR tree-optimization/85964
7360 * tracer.c (better_p): Drop initialized count check, we only
7361 call the function with initialized counts now.
7362 (find_best_successor): Do find a best edge if one
7363 has uninitialized count.
7364 (find_best_predecessor): Likewise. Do BB frequency check only
7365 if count is initialized.
7367 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7369 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7370 (aarch64_ldrstr_offset_compare): New.
7371 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7372 load/store orderings.
7373 (aarch64_gen_adjusted_ldpstp): Likewise.
7375 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7377 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7378 Check for subset of GENERAL_REGS and FP_REGS.
7379 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7382 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7384 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7385 and wi::to_poly_offset. Add the current offset and then check
7386 whether the sum fits, rather than using an unchecked addition of
7387 a checked term. Check for a shwi rather than a uhwi.
7388 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7389 (store_constructor): Use poly_int_tree_p.
7390 (expand_expr_real_1): Likewise.
7391 * function.c (assign_temp): Likewise.
7392 * fold-const.c (const_binop): Use poly_int_tree_p and
7394 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7396 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7397 to_poly_offset for MEM offsets.
7398 * ipa-icf.c (sem_variable::equals): Likewise.
7399 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7400 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7401 wi::to_poly_offset for BIT_FIELD_REF offsets.
7402 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7404 * var-tracking.c (emit_note_insn_var_location): Use
7405 tree_to_poly_uint64.
7407 2018-05-29 Jim Wilson <jimw@sifive.com>
7409 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7411 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7414 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7415 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7417 (sse4_1_round<mode>2): Use nonimmediate_operand
7418 for operand 1 predicate.
7420 2018-05-29 Martin Sebor <msebor@redhat.com>
7421 Richard Biener <rguenther@suse.de>
7424 * calls.c (get_size_range): Call determine_value_range instead
7425 of get_value_range..
7426 * tree-vrp.h (determine_value_range): Declared new function.
7427 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7429 2018-05-29 Richard Biener <rguenther@suse.de>
7431 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7432 sure to use non-pattern stmts for get_earlier_stmt arguments.
7433 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7434 called on pattern stmts.
7435 (get_later_stmt): Likewise.
7437 2018-05-29 Martin Liska <mliska@suse.cz>
7439 PR gcov-profile/85759
7440 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7443 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7445 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7447 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7451 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7452 VEC_PACK_FLOAT_EXPR): New tree codes.
7453 * tree-pretty-print.c (op_code_prio): Handle
7454 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7455 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7456 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7457 * tree-inline.c (estimate_operator_cost): Likewise.
7458 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7459 * fold-const.c (const_binop): Likewise.
7460 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7461 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7462 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7463 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7464 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7465 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7466 * expr.c (expand_expr_real_2): Likewise.
7467 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7468 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7469 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7471 * optabs.c (expand_widen_pattern_expr): For
7472 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7473 sign from result type rather than operand's type.
7474 (expand_binop_directly): For vec_packu_float_optab and
7475 vec_packs_float_optab allow result type to be different from operand's
7477 * optabs-tree.c (optab_for_tree_code): Handle
7478 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7479 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7480 * tree-vect-generic.c (expand_vector_operations_1): Handle
7481 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7482 VEC_PACK_FLOAT_EXPR.
7483 * tree-vect-stmts.c (supportable_widening_operation): Handle
7485 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7486 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7487 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7488 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7489 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7491 (vec_pack<floatprefix>_float_<mode>): New expander.
7492 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7494 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7495 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7496 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7497 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7498 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7500 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7501 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7502 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7503 VEC_PACK_FLOAT_EXPR): Document.
7505 2018-05-29 Richard Biener <rguenther@suse.de>
7507 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7509 (stmt_vec_info_vec): Make pointer.
7510 (init_stmt_vec_info_vec): Remove.
7511 (free_stmt_vec_info_vec): Likewise.
7512 (set_stmt_vec_info_vec): New function.
7513 (free_stmt_vec_infos): Likewise.
7514 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7515 (set_vinfo_for_stmt): Likewise.
7516 (get_earlier_stmt): Likewise.
7517 (get_later_stmt): Likewise.
7518 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7519 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7520 (vec_info::~vec_info): Free stmt_vec_infos.
7521 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7522 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7523 (pass_slp_vectorize::execute): Likewise.
7524 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7525 (free_stmt_vec_info_vec): Likewise.
7526 (set_stmt_vec_info_vec): New function.
7527 (free_stmt_vec_infos): Likewise.
7528 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7529 the global stmt_vec_info_vec.
7530 * tree-parloops.c (gather_scalar_reductions): Use
7531 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7534 2018-05-29 Richard Biener <rguenther@suse.de>
7536 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7538 2018-05-29 Martin Liska <mliska@suse.cz>
7539 David Malcolm <dmalcolm@redhat.com>
7541 * vec.c (test_reverse): New.
7542 (vec_c_tests): Add new test.
7543 * vec.h (vl_ptr>::reverse): New function.
7545 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7547 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7549 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7552 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7554 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7556 2018-05-28 Richard Biener <rguenther@suse.de>
7558 PR tree-optimization/85933
7559 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7560 look at stmts marked as vectorizable.
7562 2018-05-28 Richard Biener <rguenther@suse.de>
7564 PR tree-optimization/85934
7565 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7566 vector boolean check before scalar optimization.
7568 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7570 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7573 2018-05-28 Mark Wielaard <mark@klomp.org>
7575 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7576 if it is an expression containing a minus sign.
7578 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7580 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7582 2018-05-27 Paul Koning <ni1d@arrl.net>
7584 * config/pdp11/pdp11.md (truncsihi2): Remove.
7586 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7587 Chung-Ju Wu <jasonwucj@gmail.com>
7589 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7591 (unaligned_store_dw): Ditto.
7592 * config/nds32/nds32-memory-manipulation.c
7593 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7594 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7595 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7596 (emit_setmem_word_loop): Rename to ...
7597 (emit_setmem_doubleword_loop): ... this.
7598 (nds32_gen_dup_4_byte_to_word_value): New function.
7599 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7600 (nds32_expand_setmem_loop): Refine implementation.
7601 (nds32_expand_setmem_loop_v3m): Ditto.
7602 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7605 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7607 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7609 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7611 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7612 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7613 machine->attr_no_prologue_p.
7614 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7615 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7616 (nds32_expand_epilogue): Consider attr_naked_p.
7617 (nds32_expand_epilogue_v3pop): Likewise.
7618 (nds32_can_use_return_insn): Likewise.
7619 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7620 attr_no_prologue_p fields.
7621 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7623 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7626 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7628 * config/i386/sse.md
7629 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7631 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7633 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7635 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7637 (*<floatsuffix>floatv2div2sf2): Rename to ...
7638 (*float<floatunssuffix>v2div2sf2): ... this.
7639 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7640 (float<floatunssuffix>v2div2sf2_mask): ... this.
7641 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7642 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7643 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7645 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7647 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7649 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7651 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7653 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7655 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7656 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7657 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7658 gen_ufix_truncv8dfv8si2.
7659 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7660 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7661 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7662 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7663 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7664 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7665 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7666 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7668 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7672 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7674 2018-05-25 Jim Wilson <jimw@sifive.com>
7676 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7677 * config/riscv/riscv.c (struct machine_function): Add
7678 interrupt_handler_p and attribute_checked_p fields.
7679 (riscv_attribute_table): Add interrupt.
7680 (riscv_interrupt_type_p): New.
7681 (riscv_save_reg_p): Save extra regs for interrupt handler.
7682 (riscv_use_save_libcall): Return false for interrupt handler.
7683 (riscv_first_stack_step): Add forward declaration.
7684 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
7685 for interrupt handler with large frame. Use it for saved reg list.
7686 (riscv_expand_prologue): Move flag_stack_usage_info support to
7687 eliminate duplication.
7688 (riscv_expand_epilogue): Generate mret for interrupt handler.
7689 (riscv_epilogue_uses): New.
7690 (riscv_can_use_return_insn): Return false for interrupt handler.
7691 (riscv_function_ok_for_sibcall): Likewise.
7692 (riscv_set_current_function): Add interrupt handler support.
7693 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7694 * config/riscv/riscv.md (UNSPECV_MRET): New.
7696 (riscv_frflags, riscv_fsflags): Use tab after opcode.
7698 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7700 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
7702 PR tree-optimization/85712
7703 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7704 this candidate has already been replaced in-situ by a copy.
7706 2018-05-25 Jason Merrill <jason@redhat.com>
7708 PR c++/80485 - inline function non-zero address.
7709 * symtab.c (nonzero_address): Check DECL_COMDAT.
7711 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
7714 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7715 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7716 extension of SImode operation. Use const123_operand predicate.
7717 (*saddsi_1): Remove.
7718 (*saddl_se_1): Ditto.
7720 (*ssubl_se_1): Ditto.
7721 * config/alpha/predicates.md (const123_operand): New predicate.
7722 * config/alpha/constraints.md (P): Use IN_RANGE.
7724 2018-05-25 Richard Biener <rguenther@suse.de>
7726 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7728 (ref_maybe_used_by_stmt_p): Likewise.
7729 (stmt_may_clobber_ref_p): Likewise.
7730 (stmt_may_clobber_ref_p_1): Likewise.
7731 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7733 (ref_maybe_used_by_stmt_p): Likewise.
7734 (stmt_may_clobber_ref_p): Likewise.
7735 (stmt_may_clobber_ref_p_1): Likewise.
7736 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7737 the alias oracle to disambiguate DRs with stmts DR analysis
7739 (vect_analyze_data_refs): Do not give up on not analyzable
7740 DRs for BB vectorization. Remove code truncating the dataref
7743 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7746 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7747 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7748 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7750 2018-05-25 Richard Biener <rguenther@suse.de>
7752 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7753 function, combining stmt data ref gathering and fatal analysis
7755 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7756 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7757 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7758 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7759 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7761 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7763 PR tree-optimization/85720
7764 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7765 SCC if all partitions are builtins.
7766 (version_loop_by_alias_check): New parameter. Generate cancelable
7767 runtime alias check if all partitions are builtins.
7768 (distribute_loop): Update call to above function.
7770 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7772 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7773 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7774 (parm_default_def_partition_arg): Ditto.
7775 (set_parm_default_def_partition): Ditto.
7776 (get_parm_default_def_partitions): Ditto and make it static.
7777 (get_undefined_value_partitions): Ditto and make it static.
7778 (remove_ssa_form): Refactor call to init_var_map here.
7779 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7780 computation for loop region.
7781 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7782 (register_default_def): Delete.
7783 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7784 (parm_default_def_partition_arg): Ditto.
7785 (set_parm_default_def_partition): Ditto.
7786 (get_parm_default_def_partitions): Ditto and make it static.
7787 (get_undefined_value_partitions): Ditto and make it static.
7788 (coalesce_with_default, coalesce_with_default): Update comment.
7789 (create_coalesce_list_for_region): New func factored out from
7790 create_outofssa_var_map.
7791 (populate_coalesce_list_for_outofssa): New func factored out from
7792 create_outofssa_var_map and coalesce_ssa_name.
7793 (create_outofssa_var_map): Delete.
7794 (coalesce_ssa_name): Refactor to support live range computation.
7795 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7796 (get_parm_default_def_partitions): Delete.
7797 (get_undefined_value_partitions): Ditto.
7798 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7799 computation for loop region.
7800 (new_tree_live_info, loe_visit_block): Ditto.
7801 (live_worklist, set_var_live_on_entry): Ditto.
7802 (calculate_live_on_exit, verify_live_on_entry): Ditto.
7803 * tree-ssa-live.h (struct _var_map): New fields.
7804 (init_var_map): Change decl.
7805 (region_contains_p): New.
7807 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7809 * tree-ssa-live.h (live_merge_and_clear): Delete.
7811 2018-05-25 Richard Biener <rguenther@suse.de>
7814 * tree-dump.c (dequeue_and_dump): Remove access to removed
7815 operand 2 of a SWITCH_EXPR.
7817 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7819 * doc/sourcebuild.texi (vect_double_cond_arith): Include
7820 multiplication and division.
7821 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7822 (cond_udiv@var{m}, cond_umod@var{m}): Document.
7823 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7824 (cond_udiv_optab, cond_umod_optab): New optabs.
7825 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7826 (IFN_COND_RDIV): New internal functions.
7827 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7828 TRUNC_MOD_EXPR and RDIV_EXPR.
7829 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7830 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7832 (SVE_INT_BINARY): Include mult.
7833 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7834 (optab, sve_int_op): Handle mult.
7835 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7837 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7838 for SVE_INT_BINARY_SD.
7840 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7842 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7843 (optab, sve_int_op): Handle div and udiv.
7844 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7845 for SVE_INT_BINARY_SD.
7846 (*<optab><mode>3): New insn for the same.
7848 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7850 * tree-vect-patterns.c: Include predict.h.
7851 (vect_recog_divmod_pattern): Restrict check for division support
7852 to when optimizing for size.
7854 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7856 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7857 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7858 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7859 (gimple_match_op::set_op): Likewise.
7860 (gimple_resimplify4): Declare.
7861 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7862 (expr::gen_transform): Likewise.
7863 (decision_tree::gen): Generate a simplification routine for 4 operands.
7864 * gimple-match-head.c (gimple_simplify): Add an overload for
7865 4 operands. In the top-level function, handle up to 4 call
7866 arguments and call gimple_resimplify4.
7867 (gimple_resimplify4): New function.
7868 (build_call_internal): Pass a fourth operand.
7869 (maybe_push_to_seq): Likewise.
7870 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7871 Fold VEC_COND_EXPRs of an operation and a default value into
7872 an IFN_COND_* function if possible.
7873 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7875 (SVE_COND_FP_BINARY): Include them.
7876 (optab, sve_fp_op): Handle them.
7877 (SVE_INT_BINARY_REV): New code iterator.
7878 (SVE_COND_FP_BINARY_REV): New int iterator.
7879 (commutative): New int attribute.
7880 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7882 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7884 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7885 (*cond_<optab><mode>): New patterns for reversed operands.
7887 2018-05-25 Richard Biener <rguenther@suse.de>
7889 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7890 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7891 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7892 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7893 * tree-vect-data-refs.c (everywhere): Adjust users.
7894 * tree-vect-loop.c (everywhere): Likewise.
7895 * tree-vect-slp.c (everywhere): Likewise.
7896 * tree-vect-stmts.c (everywhere): Likewise.
7897 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7899 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7901 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7903 (gcc_cv_as_section_exclude): ... this.
7904 Try Solaris as #exclude syntax.
7905 * configure: Regenerate.
7906 * config.in: Regenerate.
7907 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7909 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7910 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7912 * varasm.c (default_elf_asm_named_section): Don't check if
7913 HAVE_GAS_SECTION_EXCLUDE is defined.
7915 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7917 * doc/md.texi: Update the documentation of the cond_* optabs
7918 to mention the new final operand. Fix GET_MODE_NUNITS call.
7919 Describe the scalar case too.
7920 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7921 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7923 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7924 (get_conditional_internal_fn): Update comment.
7925 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7926 accumulator value as a final argument to conditional functions.
7927 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7928 a define_expand and add an "else" operand. Assert for now that
7929 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7930 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7931 (*cond_<optab><mode>): New patterns.
7932 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7933 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7934 (UNSPEC_COND_EOR): Delete.
7935 (optab): Remove associated mappings.
7936 (SVE_INT_BINARY): New code iterator.
7937 (sve_int_op): Remove int attribute and add "minus" to the code
7939 (SVE_COND_INT_OP): Delete.
7940 (SVE_COND_FP_OP): Rename to...
7941 (SVE_COND_FP_BINARY): ...this.
7943 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7945 * optabs.c (can_reuse_operands_p): New function.
7946 (maybe_legitimize_operands): Try to reuse the results for
7949 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7951 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7952 Add {q} suffix to insn mnemonic.
7954 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7956 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7957 (msp430_warn_func_return): New.
7959 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7961 * fold-const.c (tree_nonzero_bits): New function.
7962 * fold-const.h (tree_nonzero_bits): Likewise.
7963 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7964 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7966 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7970 * varasm.c (assemble_alias): Check ifunc_resolver only on
7973 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7976 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7977 when memory input operand is handled.
7979 2018-05-24 Luis Machado <luis.machado@linaro.org>
7981 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7983 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7985 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7987 * match.pd: Delay FMA folds until after vectorization.
7989 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7992 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7993 address check not strict.
7995 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7997 * gimple-match.h (gimple_match_op): New class.
7998 (mprts_hook): Replace parameters with a gimple_match_op *.
7999 (maybe_build_generic_op): Likewise.
8000 (gimple_simplified_result_is_gimple_val): Replace parameters with
8001 a const gimple_match_op *.
8002 (gimple_simplify): Replace code_helper * and tree * parameters with
8003 a gimple_match_op * parameter.
8004 (gimple_resimplify1): Replace code_helper *, tree and tree *
8005 parameters with a gimple_match_op * parameter.
8006 (gimple_resimplify2): Likewise.
8007 (gimple_resimplify3): Likewise.
8008 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8009 parameters with a gimple_match_op * parameter.
8010 * gimple-match-head.c (gimple_simplify): Change prototypes of
8011 auto-generated functions to take a gimple_match_op * instead of
8012 separate code_helper * and tree * parameters. Make the same
8013 change in the top-level overload and update calls to the
8014 gimple_resimplify routines. Update calls to the auto-generated
8015 functions and to maybe_push_res_to_seq in the publicly-facing
8016 operation-specific gimple_simplify overloads.
8017 (gimple_match_op::MAX_NUM_OPS): Define.
8018 (gimple_resimplify1): Replace rcode and ops with a single res_op
8019 parameter. Update call to gimple_simplify.
8020 (gimple_resimplify2): Likewise.
8021 (gimple_resimplify3): Likewise.
8022 (mprts_hook): Replace parameters with a gimple_match_op *.
8023 (maybe_build_generic_op): Likewise.
8024 (build_call_internal): Replace type, nargs and ops with
8025 a gimple_match_op *.
8026 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8027 with a single gimple_match_op *. Update calls to mprts_hook,
8028 build_call_internal and gimple_simplified_result_is_gimple_val.
8029 Factor out code that is common to the tree_code and combined_fn cases.
8030 * genmatch.c (expr::gen_transform): Replace tem_code and
8031 tem_ops with a gimple_match_op called tem_op. Update calls
8032 to the gimple_resimplify functions and maybe_push_res_to_seq.
8033 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8034 res_ops. Update call to the gimple_resimplify functions.
8035 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8036 (decision_tree::gen): Make the functions take a gimple_match_op *
8037 called res_op instead of separate res_code and res_ops parameters.
8038 Update call accordingly.
8039 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8040 and ops with a single res_op parameter. Update calls to
8041 maybe_build_generic_op and maybe_push_res_to_seq.
8042 (fold_stmt_1): Update calls to gimple_simplify and
8043 replace_stmt_with_simplification.
8044 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8045 and gimple_simplified_result_is_gimple_val.
8046 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8048 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8049 with a gimple_match_op *.
8050 (vn_nary_build_or_lookup): Likewise. Update call to
8051 vn_nary_build_or_lookup_1.
8052 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8053 gimple_match_op *. Update calls to the gimple_resimplify routines
8054 and to gimple_simplified_result_is_gimple_val.
8055 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8056 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8057 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8058 (visit_nary_op): Likewise.
8059 (visit_reference_op_load): Likewise.
8061 2018-05-23 Luis Machado <luis.machado@linaro.org>
8063 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8064 modifier for printing the step amount.
8066 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
8069 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8072 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
8074 * doc/sourcebuild.texi (Endianness): New subsubsection.
8076 2018-05-23 Luis Machado <luis.machado@linaro.org>
8078 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8079 <prefetch_dynamic_strides>: New const bool field.
8080 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8081 prefetch_dynamic_strides.
8082 (exynosm1_prefetch_tune): Likewise.
8083 (thunderxt88_prefetch_tune): Likewise.
8084 (thunderx_prefetch_tune): Likewise.
8085 (thunderx2t99_prefetch_tune): Likewise.
8086 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8088 (aarch64_override_options_internal): Update to set
8089 PARAM_PREFETCH_DYNAMIC_STRIDES.
8090 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8091 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8092 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8093 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8094 prefetch-dynamic-strides setting.
8096 2018-05-23 Luis Machado <luis.machado@linaro.org>
8098 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8099 <minimum_stride>: New const int field.
8100 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8101 minimum_stride field defaulting to -1.
8102 (exynosm1_prefetch_tune): Likewise.
8103 (thunderxt88_prefetch_tune): Likewise.
8104 (thunderx_prefetch_tune): Likewise.
8105 (thunderx2t99_prefetch_tune): Likewise.
8106 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8107 <default_opt_level>: Set to 3.
8108 (aarch64_override_options_internal): Update to set
8109 PARAM_PREFETCH_MINIMUM_STRIDE.
8110 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8111 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8112 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8113 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8114 stride is constant and is below the minimum stride threshold.
8116 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8118 * config/arm/arm-cpus.in (mode26): Delete.
8119 (armv4): Delete mode26 reference.
8120 * config/arm/arm.c (arm_configure_build_target): Delete use of
8123 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8125 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8127 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8128 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8130 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8131 (floatunsdidf2): Ditto.
8133 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8135 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8136 (fixuns_trunc<mode>si2_avx512f): Ditto.
8137 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8138 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8139 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8141 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8143 PR rtl-optimization/79985
8144 * df-scan.c (df_insn_refs_collect): Remove special case for
8145 global registers and asm statements.
8147 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8149 * extend.texi (Global Register Variables): Rewrite the bullet list.
8150 Note that the register is available for allocation. Note that access
8151 via inline asm must use constraints. Add note about async-signal
8152 handlers. Remove paragraph about automagic register selection.
8154 2018-05-23 Richard Biener <rguenther@suse.de>
8156 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8157 of fixed offset from memset VN.
8159 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8161 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8163 (alloc_cand_and_find_basis): Initialize first_interp field.
8164 (slsr_process_mul): Modify first_interp field.
8165 (slsr_process_add): Likewise.
8166 (slsr_process_cast): Modify first_interp field for each new
8168 (slsr_process_copy): Likewise.
8169 (dump_candidate): Dump first_interp field.
8170 (replace_mult_candidate): Process all interpretations, not just
8172 (replace_rhs_if_not_dup): Likewise.
8173 (replace_one_candidate): Likewise.
8175 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8177 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8179 (aarch64_needs_frame_chain): New function.
8180 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8182 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8185 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8186 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8187 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8188 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8189 as true for strict-align.
8190 (aarch64_can_inline_p): Perform checks even when callee has no
8191 attributes to check for strict alignment.
8192 * doc/extend.texi (AArch64 Function Attributes): Document
8194 * doc/invoke.texi: (AArch64 Options): Likewise.
8196 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
8198 PR tree-optimization/85853
8199 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8200 the handling of the root of the node to...
8201 (vect_slp_analyze_node_operations_1): ...this new function,
8202 and run the whole thing with the child nodes' def types
8203 set according to their SLP node's def type.
8205 2018-05-23 Richard Biener <rguenther@suse.de>
8208 * tree-data-ref.c (create_runtime_alias_checks): Defer
8209 and ignore overflow warnings.
8211 2018-05-23 Yury Gribov <tetra2005@gmail.com>
8213 PR tree-optimization/85822
8214 * tree-vrp.c (is_masked_range_test): Fix handling of negative
8217 2018-05-23 Richard Biener <rguenther@suse.de>
8219 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8220 memset constants via native_interpret_expr.
8222 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
8225 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8227 (cgraph_node::create_alias): Likewise.
8228 (cgraph_node::get_availability): Check ifunc_resolver instead
8229 of looking up ifunc attribute.
8230 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8231 * varasm.c (do_assemble_alias): Likewise.
8232 (assemble_alias): Likewise.
8233 (default_binds_local_p_3): Likewise.
8234 * cgraph.h (cgraph_node): Add ifunc_resolver.
8235 (cgraph_node::only_called_directly_or_aliased_p): Return false
8237 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8239 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8240 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8241 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8242 instead of looking up ifunc attribute.
8244 2018-05-22 Luis Machado <luis.machado@linaro.org>
8246 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8248 2018-05-22 Martin Sebor <msebor@redhat.com>
8251 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8252 only when expasion succeeds.
8253 (expand_builtin_strcmp): Same.
8254 (expand_builtin_strncmp): Same.
8256 2018-05-22 Martin Sebor <msebor@redhat.com>
8258 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8260 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8261 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8263 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8264 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8266 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8267 Add check for legitimate_address.
8268 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8269 (aarch64_swap_ldrstr_operands): New.
8270 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8273 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8274 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8276 * config/aarch64/aarch64.md: New patterns to generate stp
8278 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8279 single words and double words.
8280 (load_pair_sw, load_pair_dw): Likewise.
8281 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8283 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8285 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8286 for different mode ldpstp and add peephole for merged zero stores.
8288 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8290 (aarch64_gen_store_pair): Rename calls to match new patterns.
8291 (aarch64_gen_load_pair): Rename calls to match new patterns.
8292 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8293 (load_pair<DREG:mode><DREG2:mode>): ... This.
8294 (store_pair<mode>): Rename to...
8295 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8296 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8298 (V_INT_EQUIV): Handle SImode.
8299 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8302 2018-05-22 Martin Sebor <msebor@redhat.com>
8305 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8306 or ajust the presumed bound on an operation to avoid unnecessary
8309 2018-05-22 Martin Sebor <msebor@redhat.com>
8311 PR tree-optimization/85826
8312 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8313 assuming that a DECL necesarily has a constant size.
8315 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8318 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8320 2018-05-22 Richard Biener <rguenther@suse.de>
8322 PR tree-optimization/85834
8323 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8324 non-constant and non-zero memset arguments.
8326 2018-05-22 Martin Liska <mliska@suse.cz>
8329 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8331 2018-05-22 Richard Biener <rguenther@suse.de>
8333 PR tree-optimization/85863
8334 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8335 comparisons when vectype is specified.
8336 (vectorizable_condition): Do not specify vectype for
8337 vect_is_simple_cond when SLP vectorizing.
8339 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8342 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8343 define __ibm128 as long double.
8344 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8345 as a distinct type when IEEE 128-bit support is enabled.
8346 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8347 128-bit types to use the correct functions.
8348 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8349 convert between 128-bit floating point types that have different
8350 modes but the same representation, instead of using gen_lowpart to
8352 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8354 (IFKF_reg): New attributes to give the register constraints for
8356 (extend<mode>tf2_internal): New insns to mark an explicit
8357 conversion between 128-bit floating point types that have a
8358 different mode but share the same representation.
8360 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8362 PR tree-optimization/85814
8363 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8364 a null return from get_strinfo when unsharing the next
8365 strinfo in the chain.
8367 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8370 * varasm.c (weak_finish): Clean up weak_decls.
8372 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8374 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8375 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8376 UNSPEC_UADALP values.
8377 * config/aarch64/iterators.md (ABAL): New int iterator.
8380 (sur): Add mappings for the above.
8381 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8383 (aarch64_<sur>abal<mode>_4): Likewise.
8384 (aarch64_<sur>adalp<mode>_3): Likewise.
8385 (<sur>sadv16qi): New define_expand.
8387 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8389 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8390 (*movdf_internal): Ditto.
8391 (*rcpsf2_sse): Ditto.
8392 (*rsqrtsf2_sse): Ditto.
8393 (*sqrt<mode>2_sse): Ditto.
8395 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8397 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8399 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8400 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8401 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8402 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8404 * config/aarch64/arm_neon.h: Likewise.
8405 * config/aarch64/iterators.md (VQ_I): New.
8407 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8409 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8411 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8414 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8416 * config/nds32/constraints.md (S): New constraint.
8417 * config/nds32/nds32.md (call_internal): Use constraint S.
8418 (call_value_internal): Likewise.
8419 (sibcall_internal): Likewise.
8420 (sibcall_value_internal): Likewise.
8422 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8423 Chung-Ju Wu <jasonwucj@gmail.com>
8425 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8428 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8429 Chung-Ju Wu <jasonwucj@gmail.com>
8431 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8432 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8433 (nds32_rtx_costs_impl): Simplify.
8434 (nds32_address_cost_impl): Simplify.
8435 (nds32_init_rtx_costs): New function.
8436 (nds32_rtx_costs_speed_prefer): Likewise.
8437 (nds32_rtx_costs_size_prefer): Likewise.
8438 (nds32_address_cost_speed_prefer): Likewise.
8439 (nds32_address_cost_speed_fwprop): Likewise.
8440 (nds32_address_cost_size_prefer): Likewise.
8441 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8442 * config/nds32/nds32.c (nds32_option_override): Use
8443 nds32_init_rtx_costs function.
8445 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8447 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8448 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8449 (TARGET_PIPELINE_N8): Likewise.
8450 (TARGET_PIPELINE_N10): Likewise.
8451 (TARGET_PIPELINE_N13): Likewise.
8452 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8454 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8456 * config/nds32/nds32-fpu.md: Update copyright year.
8458 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8460 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8462 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8464 * config/nds32/nds32.c
8465 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8466 * config/nds32/nds32.opt (minline-asm-r15): New option.
8468 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8470 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8472 * config/nds32/nds32.md (abssi2): New pattern.
8474 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8476 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8477 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8478 Merge insn pattern from sse_cvtsi2ss<round_name> and
8479 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8480 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8481 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8482 using SWI48 mode iterator.
8483 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8484 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8485 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8486 pattern from sse_cvttss2si<round_saeonly_name>
8487 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8488 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8489 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8490 using SWI48 mode iterator.
8491 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8492 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8493 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8494 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8495 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8496 using SWI48 mode iterator.
8497 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8498 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8499 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8500 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8501 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8502 SWI48 mode iterator.
8503 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8504 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8505 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8506 pattern from sse_cvttsd2si<round_saeonly_name>
8507 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8509 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8511 * config/nds32/nds32-md-auxiliary.c
8512 (nds32_valid_smw_lwm_base_p): Refine.
8513 (nds32_output_smw_single_word): Refine.
8514 (nds32_output_smw_double_word): New.
8515 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8517 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8519 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8520 (nds32_output_stack_pop): Refine.
8521 (nds32_expand_unaligned_load): Refine.
8522 (nds32_expand_unaligned_store): Refine.
8524 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8525 Chung-Ju Wu <jasonwucj@gmail.com>
8527 * config/nds32/constants.md: Add TP_REGNUM constant.
8528 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8529 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8531 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8532 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8533 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8534 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8535 and PIC code generation.
8536 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8538 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8540 * config/nds32/nds32.md: Support TLS and PIC.
8541 * config/nds32/nds32.c: Support TLS and PIC.
8542 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8543 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8546 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8548 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8549 mode with E_ prefix.
8551 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8552 Chung-Ju Wu <jasonwucj@gmail.com>
8554 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8555 * config/nds32/nds32-md-auxiliary.c
8556 (symbolic_reference_mentioned_p): New.
8557 (nds32_legitimize_ict_address): New.
8558 (nds32_expand_ict_move): New.
8559 (nds32_indirect_call_referenced_p): New.
8560 (nds32_symbol_binds_local_p): Delete.
8561 (nds32_long_call_p): Modify.
8562 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8563 * config/nds32/nds32-protos.h
8564 (symbolic_reference_mentioned_p): Declare.
8565 (nds32_legitimize_ict_address): Declare.
8566 (nds32_expand_ict_move): Declare.
8567 (nds32_indirect_call_referenced_p): Declare.
8568 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8569 (nds32_relax_group): Use nds32_ict_const_p as condition.
8570 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8571 (nds32_asm_file_start): Output ict_model directive in asm code.
8572 (nds32_legitimate_address_p): Consider indirect call.
8573 (nds32_print_operand): Consider indirect call.
8574 (nds32_print_operand_address): Consider indirect call.
8575 (nds32_insert_attributes): Handle "indirect_call" attribute.
8576 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8577 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8578 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8579 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8580 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8581 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8582 (TARGET_ICT_MODEL_SMALL): Define.
8583 (TARGET_ICT_MODEL_LARGE): Define.
8584 * config/nds32/nds32.md (movsi): Consider ict model.
8585 (call, call_value): Consider ict model.
8586 (sibcall, sibcall_value): Consider ict model.
8587 * config/nds32/nds32.opt (mict-model): New option.
8588 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8591 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8592 Monk Chiang <sh.chiang04@gmail.com>
8593 Jim Wilson <jimw@sifive.com>
8595 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8596 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8597 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8598 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8599 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8600 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8601 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8602 compute save_libcall_adjustment properly.
8603 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8604 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8605 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8606 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8607 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8608 (ABI_SPEC): Handle mabi=ilp32e.
8609 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8610 (RVE): Add RVE mask.
8611 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8612 <-march>: Add rv32e as an example.
8614 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8617 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8618 (intra_create_variable_infos): Handle C++ constructors.
8620 2018-05-18 Martin Liska <mliska@suse.cz>
8622 * passes.def: Remove a redundant pass.
8624 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8627 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8629 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8631 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8633 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8635 (armv2, armv2a, armv3, armv3m): Delete architectures.
8636 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8637 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8638 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8640 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8641 (*mulsidi3adddi): Likewise.
8642 (mulsidi3): Likewise.
8643 (*mulsidi3_nov6): Likewise.
8644 (umulsidi3): Likewise.
8645 (umulsidi3_nov6): Likewise.
8646 (umaddsidi4): Likewise.
8647 (*umulsidi3adddi): Likewise.
8648 (smulsi3_highpart): Likewise.
8649 (*smulsi3_highpart_nov6): Likewise.
8650 (umulsi3_highpart): Likewise.
8651 (*umulsi3_highpart_nov6): Likewise.
8652 * config/arm/arm.h (arm_arch3m): Delete.
8653 * config/arm/arm.c (arm_arch3m): Delete.
8654 (arm_option_override_internal): Update armv3-related comment.
8655 (arm_configure_build_target): Delete use of isa_bit_mode32.
8656 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8657 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8658 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8660 (mulusa3): Likewise.
8661 * config/arm/arm-protos.h (arm_arch3m): Delete.
8662 * config/arm/arm-tables.opt: Regenerate.
8663 * config/arm/arm-tune.md: Likewise.
8664 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8665 deleted architectures.
8667 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8669 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8670 (armv5t, armv5te): New features.
8671 (ARMv5, ARMv5e): Delete fgroups.
8672 (ARMv5t, ARMv5te): Adjust for above changes.
8674 (armv5, armv5e): Delete arches.
8675 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8677 (*call_reg_arm): Likewise.
8678 (*call_value_reg_armv5): Likewise.
8679 (*call_value_reg_arm): Likewise.
8680 (*call_symbol): Likewise.
8681 (*call_value_symbol): Likewise.
8682 (*sibcall_insn): Likewise.
8683 (*sibcall_value_insn): Likewise.
8685 (prefetch): Likewise.
8686 (define_split and define_peephole2 dependent on arm_arch5):
8688 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8690 (TARGET_ARM_QBIT): Likewise.
8691 (TARGET_DSP_MULTIPLY): Likewise.
8692 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8693 (arm_arch5, arm_arch5e): Delete.
8694 (arm_arch5t, arm_arch5te): Declare.
8695 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8696 (arm_arch5t): Declare.
8697 (arm_option_reconfigure_globals): Update for the above.
8698 (arm_options_perform_arch_sanity_checks): Update comment, replace
8699 use of arm_arch5 with arm_arch5t.
8700 (use_return_insn): Likewise.
8701 (arm_emit_call_insn): Likewise.
8702 (output_return_instruction): Likewise.
8703 (arm_final_prescan_insn): Likewise.
8704 (arm_coproc_builtin_available): Likewise.
8705 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8706 arm_arch5e with arm_arch5t and arm_arch5te.
8707 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8708 (arm_arch5t, arm_arch5te): Declare.
8709 * config/arm/arm-tables.opt: Regenerate.
8710 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8711 * config/arm/t-multilib: Likewise.
8712 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8713 instead of arm_arch5.
8714 (*call_reg_thumb1): Likewise.
8715 (*call_value_reg_thumb1_v5): Likewise.
8716 (*call_value_reg_thumb1): Likewise.
8717 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8719 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8721 2018-05-18 Martin Liska <mliska@suse.cz>
8723 PR gcov-profile/84846
8724 * doc/gcov.texi: Document -t option of gcov tool.
8726 2018-05-18 Martin Liska <mliska@suse.cz>
8728 PR gcov-profile/84846
8729 * gcov.c (print_usage): Add new -t option.
8730 (process_args): Handle the option.
8731 (generate_results): Use stdout as output when requested by
8734 2018-05-18 Martin Liska <mliska@suse.cz>
8736 PR gcov-profile/84846
8737 * coverage.c (coverage_init): Write PWD to .gcno file.
8738 * doc/gcov.texi: Document how working directory is printed.
8739 * gcov-dump.c (dump_gcov_file): Print PWD.
8740 * gcov.c (output_intermediate_file): Likewise.
8741 (read_graph_file): Read PWD string.
8742 (output_lines): Print PWD.
8744 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8747 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8748 for retval and return false if all args to phi are zero.
8750 2018-05-18 Richard Biener <rguenther@suse.de>
8752 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8754 (evrp_dom_walker::before_dom_children): Call it.
8756 2018-05-18 Richard Biener <rguenther@suse.de>
8758 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8759 results when processing array refs with variable index.
8761 2018-05-18 Toon Moene <toon@moene.org>
8763 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8764 directly after that of -floop-interchange. Indicate that both
8765 options are enabled by default when specifying -O3.
8767 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8769 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8770 iterator. Delete separate integer-mode vec_set<mode> expander.
8771 (aarch64_simd_vec_setv2di): Delete.
8772 (vec_setv2di): Delete.
8773 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8774 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
8775 the "w, r" alternative.
8777 2018-05-18 Martin Liska <mliska@suse.cz>
8779 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8780 * tree-pass.h (make_pass_lower_switch_O0): New function.
8781 * tree-switch-conversion.c (node_has_low_bound): Remove.
8782 (node_has_high_bound): Likewise.
8783 (node_is_bounded): Likewise.
8784 (class pass_lower_switch): Make it a template type and create
8786 (pass_lower_switch::execute): Add template argument.
8787 (make_pass_lower_switch): New function.
8788 (make_pass_lower_switch_O0): New function.
8789 (do_jump_if_equal): Remove.
8790 (emit_case_nodes): Simplify to just handle all 3 cases and leave
8791 all the hard work to tree optimization passes.
8793 2018-05-18 Martin Liska <mliska@suse.cz>
8795 * dbgcnt.c (limit_low): Renamed from limit.
8796 (limit_high): New variable.
8797 (dbg_cnt_is_enabled): Check for upper limit.
8798 (dbg_cnt): Adjust dumping.
8799 (dbg_cnt_set_limit_by_index): Add new argument for high
8801 (dbg_cnt_set_limit_by_name): Likewise.
8802 (dbg_cnt_process_single_pair): Parse new format.
8803 (dbg_cnt_process_opt): Use strtok.
8804 (dbg_cnt_list_all_counters): Remove 'value' and add
8806 * doc/invoke.texi: Document changes.
8808 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
8810 * doc/sourcebuild.texi (scalar_all_fma): Document.
8811 * tree.def (FMA_EXPR): Delete.
8812 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8813 * internal-fn.c (ternary_direct): New macro.
8814 (expand_ternary_optab_fn): Likewise.
8815 (direct_ternary_optab_supported_p): Likewise.
8816 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8817 * builtins.c (fold_builtin_fma): Delete.
8818 (fold_builtin_3): Don't call it.
8819 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8820 * expr.c (expand_expr_real_2): Likewise.
8821 * fold-const.c (operand_equal_p): Likewise.
8822 (fold_ternary_loc): Likewise.
8823 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8824 * gimple.c (DEFTREECODE): Likewise.
8825 * gimplify.c (gimplify_expr): Likewise.
8826 * optabs-tree.c (optab_for_tree_code): Likewise.
8827 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8828 * tree-eh.c (operation_could_trap_p): Likewise.
8829 (stmt_could_throw_1_p): Likewise.
8830 * tree-inline.c (estimate_operator_cost): Likewise.
8831 * tree-pretty-print.c (dump_generic_node): Likewise.
8832 (op_code_prio): Likewise.
8833 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8834 * tree-ssa-operands.c (get_expr_operands): Likewise.
8835 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8836 * fold-const-call.h (fold_fma): Delete.
8837 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8838 CFN_FNMA and CFN_FNMS.
8840 * genmatch.c (combined_fn): New enum.
8841 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8842 (commutative_op): New function.
8843 (commutate): Use it. Handle more than 2 operands.
8844 (dt_operand::gen_gimple_expr): Use commutative_op.
8845 (parser::parse_expr): Allow :c to be used with non-binary
8846 operators if the commutative operand is known.
8847 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8848 CFN_FMS, CFN_FNMA and CFN_FNMS.
8849 (backprop::process_assign_use): Remove FMA_EXPR handling.
8850 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8851 (gen_hsa_fma): New function.
8852 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8853 IFN_FNMA and IFN_FNMS.
8854 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8855 * gimple-fold.h (follow_all_ssa_edges): Declare.
8856 * gimple-fold.c (follow_all_ssa_edges): New function.
8857 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8858 gimple_build interface and use follow_all_ssa_edges to fold the result.
8859 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8860 instead of checking for optabs directly.
8861 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8862 rather than FMA_EXPRs.
8863 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8864 call to IFN_FMA instead of an FMA_EXPR.
8866 2018-05-17 Jim Wilson <jimw@sifive.com>
8868 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8869 sign extended promoted subreg, and the range does not have the sign bit
8870 set, then do a sign extend.
8872 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8873 test, check for sign extended subreg and/or constant operands, and
8874 do a sign extend in that case.
8876 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8878 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8879 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8881 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8882 Change logics_shift_reg to logics_shift_imm.
8883 (thunderx2t99_fp_loadpair_basic): Delete.
8884 (thunderx2t99_fp_storepair_basic): Delete.
8885 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8886 (thunderx2t99_asimd_polynomial): Delete.
8887 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8888 and neon_fp_mul_d_scalar_q.
8889 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8890 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8891 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8892 (thunderx2t99_asimd_lut): Add missing tbl types.
8893 (thunderx2t99_asimd_ext): Delete.
8894 (thunderx2t99_asimd_load1_1_mult): Delete.
8895 (thunderx2t99_asimd_load1_2_mult): Delete.
8896 (thunderx2t99_asimd_load1_ldp): New.
8897 (thunderx2t99_asimd_load1): New.
8898 (thunderx2t99_asimd_load2): Add missing *load2* types.
8899 (thunderx2t99_asimd_load3): New.
8900 (thunderx2t99_asimd_load4): New.
8901 (thunderx2t99_asimd_store1_1_mult): Delete.
8902 (thunderx2t99_asimd_store1_2_mult): Delete.
8903 (thunderx2t99_asimd_store2_mult): Delete.
8904 (thunderx2t99_asimd_store2_onelane): Delete.
8905 (thunderx2t99_asimd_store_stp): New.
8906 (thunderx2t99_asimd_store1): New.
8907 (thunderx2t99_asimd_store2): New.
8908 (thunderx2t99_asimd_store3): New.
8909 (thunderx2t99_asimd_store4): New.
8911 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8913 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8914 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8916 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8917 Segher Boessenkool <segher@kernel.crashing.org>
8920 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8923 2018-05-17 Richard Biener <rguenther@suse.de>
8925 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8926 for pruning loop and prune defs feeding only already visited PHIs.
8928 2018-05-17 Richard Biener <rguenther@suse.de>
8930 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8932 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8933 Richard Biener <rguenther@suse.de>
8935 PR tree-optimization/85793
8936 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8937 for VMAT_ELEMENTWISE.
8939 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8941 * internal-fn.h (lookup_internal_fn): Declare
8942 * internal-fn.c (lookup_internal_fn): New function.
8943 * gimple.c (gimple_build_call_from_tree): Handle calls to
8945 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8946 internal function names.
8947 * tree-pretty-print.c (dump_generic_node): Likewise.
8948 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8950 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8952 * gimple-fold.h (gimple_build): Make the function forms take
8953 combined_fn rather than built_in_function.
8954 (gimple_simplify): Likewise.
8955 * gimple-match-head.c (gimple_simplify): Likewise.
8956 * gimple-fold.c (gimple_build): Likewise.
8957 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8958 rather than gimple_build_call_internal.
8959 (get_initial_defs_for_reduction): Likewise.
8960 (vect_create_epilog_for_reduction): Likewise.
8961 (vectorizable_live_operation): Likewise.
8963 2018-05-17 Martin Liska <mliska@suse.cz>
8965 * gimple-ssa-sprintf.c (format_directive): Do not use
8966 space in between 'G_' and '('.
8968 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8971 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8972 even if the mask is not all ones.
8975 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8977 (ix86_gimple_fold_builtin): Likewise.
8980 * config/i386/i386.c: Include tree-vector-builder.h.
8981 (ix86_vector_shift_count): New function.
8982 (ix86_fold_builtin): Fold shift builtins by scalar count.
8983 (ix86_gimple_fold_builtin): Likewise.
8985 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8986 _mm512_setzero): New intrinsics.
8988 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8989 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8991 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8992 code generation for cases where splatting a value is not useful.
8993 * simplify-rtx.c (simplify_ternary_operation): Simplify
8994 vec_merge across a vec_duplicate and a paradoxical subreg forming
8995 a vector mode to a vec_concat.
8997 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8999 * config.gcc: Support "goldmont-plus".
9000 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9002 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9003 PROCESSOR_GOLDMONT_PLUS.
9004 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9005 (processor_target_table): Add "goldmont-plus".
9006 (PTA_GOLDMONT_PLUS): Define.
9007 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9008 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9009 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9010 (fold_builtin_cpu): Add "goldmont-plus".
9011 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9012 (ix86_option_override_internal): Add "goldmont-plus".
9013 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9014 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9015 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9016 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9018 2018-05-17 Richard Biener <rguenther@suse.de>
9020 PR tree-optimization/85757
9021 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9022 remove defs that only feed that PHI from further processing.
9024 2018-05-16 Jim Wilson <jimw@sifive.com>
9026 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9028 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9030 2018-05-16 Mark Wielaard <mark@klomp.org>
9032 * dwarf2out.c (count_index_strings): New function.
9033 (output_indirect_strings): Call count_index_strings and generate
9034 header for dwarf_version >= 5.
9036 2018-05-16 Mark Wielaard <mark@klomp.org>
9038 * dwarf2out.c (dwarf_FORM): New function.
9039 (set_indirect_string): Use dwarf_FORM.
9040 (reset_indirect_string): Likewise.
9041 (size_of_die): Likewise.
9042 (value_format): Likewise.
9043 (output_die): Likewise.
9044 (add_skeleton_AT_string): Likewise.
9045 (output_macinfo_op): Likewise.
9046 (index_string): Likewise.
9047 (output_index_string_offset): Likewise.
9048 (output_index_string): Likewise.
9049 (count_index_strings): Likewise.
9051 2018-05-16 Carl Love <cel@us.ibm.com>
9053 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9054 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9056 2018-05-16 Martin Jambor <mjambor@suse.cz>
9058 * ipa-prop.c (ipa_free_all_edge_args): Remove.
9059 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9061 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
9063 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9064 (fnma<mode>4): Likewise.
9065 (fms<mode>4): Likewise.
9066 (fnms<mode>4): Likewise.
9067 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9068 (aarch64_fnma<mode>4): Likewise.
9069 (aarch64_fms<mode>4): Likewise.
9070 (aarch64_fnms<mode>4): Likewise.
9071 (aarch64_fnmadd<mode>4): Likewise.
9073 2018-05-16 Jason Merrill <jason@redhat.com>
9075 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9077 2018-05-16 Richard Biener <rguenther@suse.de>
9079 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9080 (dump_stmt_cost): Declare.
9081 (add_stmt_cost): Dump cost we add.
9082 (add_stmt_costs): New function.
9083 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9085 (vect_analyze_stmt): Adjust prototype.
9086 (vectorizable_condition): Likewise.
9087 (vectorizable_live_operation): Likewise.
9088 (vectorizable_reduction): Likewise.
9089 (vectorizable_induction): Likewise.
9090 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9091 cost vector to pass to vectorizable_ and record afterwards.
9092 (vect_model_reduction_cost): Take cost vector argument and adjust.
9093 (vect_model_induction_cost): Likewise.
9094 (vectorizable_reduction): Likewise.
9095 (vectorizable_induction): Likewise.
9096 (vectorizable_live_operation): Likewise.
9097 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9098 SLP_TREE_NUMBER_OF_VEC_STMTS.
9099 (vect_analyze_slp_cost_1): Remove.
9100 (vect_analyze_slp_cost): Likewise.
9101 (vect_slp_analyze_node_operations): Take visited args and
9102 a target cost vector. Avoid processing already visited stmt sets.
9103 (vect_slp_analyze_operations): Use a local cost vector to gather
9104 costs and register those of non-discarded instances.
9105 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9106 (vect_schedule_slp_instance): Remove copying of
9107 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9109 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9110 adding cost. Record cost entry location.
9111 (vect_prologue_cost_for_slp_op): Function to compute cost of
9112 a constant or invariant generated for SLP vect in the prologue,
9113 split out from vect_analyze_slp_cost_1.
9114 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9115 (vect_model_promotion_demotion_cost): Likewise.
9116 (vect_model_store_cost): Likewise, make static.
9117 (vect_model_load_cost): Likewise.
9118 (vectorizable_bswap): Add cost vector arg and adjust.
9119 (vectorizable_call): Likewise.
9120 (vectorizable_simd_clone_call): Likewise.
9121 (vectorizable_conversion): Likewise.
9122 (vectorizable_assignment): Likewise.
9123 (vectorizable_shift): Likewise.
9124 (vectorizable_operation): Likewise.
9125 (vectorizable_store): Likewise.
9126 (vectorizable_load): Likewise.
9127 (vectorizable_condition): Likewise.
9128 (vectorizable_comparison): Likewise.
9129 (can_vectorize_live_stmts): Likewise.
9130 (vect_analyze_stmt): Likewise.
9131 (vect_transform_stmt): Adjust calls to vectorizable_*.
9132 * tree-vectorizer.c: Include gimple-pretty-print.h.
9133 (dump_stmt_cost): New function.
9135 2018-05-16 Richard Biener <rguenther@suse.de>
9137 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9138 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9139 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9140 (check_name): New callback.
9141 (dse_classify_store): Track cycles via a visited bitmap of PHI
9142 defs and simplify handling of in-loop and across loop dead stores
9143 and properly fail for loop-variant refs. Handle byte-tracking with
9144 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9147 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9149 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9150 (vect_get_mask_type_for_stmt): Likewise.
9151 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9153 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9154 to determine the statement's vector type and the vector type that
9155 should be used for calculating nunits. Deal with cases in which
9156 the type has to be deferred.
9157 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9158 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9159 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9160 (vect_determine_vf_for_stmt): New functions, split out from...
9161 (vect_determine_vectorization_factor): ...here.
9162 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9163 (vect_get_mask_type_for_stmt): New functions, split out from
9164 vect_determine_vectorization_factor.
9166 2018-05-16 Richard Biener <rguenther@suse.de>
9168 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9169 verify the [VEC_]COND_EXPR embedded comparison.
9171 2018-05-15 Martin Sebor <msebor@redhat.com>
9173 PR tree-optimization/85753
9174 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9175 RECORD_TYPE in addition to ARRAY_TYPE.
9177 2018-05-15 Martin Sebor <msebor@redhat.com>
9180 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9182 2018-05-15 Richard Biener <rguenther@suse.de>
9184 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9185 add by_clobber_p one. Change algorithm to collect all defs
9186 representing uses we need to walk and try reducing them to
9187 a single one before failing.
9188 (dse_dom_walker::dse_optimize_stmt): Adjust.
9190 2018-05-13 Mark Wielaard <mark@klomp.org>
9192 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9193 (size_of_loc_descr): Likewise.
9194 (output_loc_operands): Likewise.
9195 (output_loc_operands_raw): Likewise.
9196 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9197 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9198 (hash_loc_operands): Likewise.
9199 (compare_loc_operands): Likewise.
9201 2018-05-14 Mark Wielaard <mark@klomp.org>
9203 * dwarf2out.c (count_index_addrs): New function.
9204 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9206 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9208 PR tree-optimization/83648
9209 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9210 return value as malloc candidate.
9212 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9215 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9216 param as true in call to suggest_attribute.
9218 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
9220 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9221 -mreadonly-in-sdata.
9223 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9225 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9227 (aarch64_crypto_aesd_fused): Likewise.
9229 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
9231 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9232 (movsi_aarch64): Likewise.
9233 (load_pairsi): Likewise.
9234 (load_pairdi): Likewise.
9235 (store_pairsi): Likewise.
9236 (store_pairdi): Likewise.
9237 (load_pairsf): Likewise.
9238 (load_pairdf): Likewise.
9239 (store_pairsf): Likewise.
9240 (store_pairdf): Likewise.
9241 (zero_extend): Likewise.
9242 (trunc): Swap alternatives.
9243 (fcvt_target): Add '?' to prefer w over r.
9245 2018-05-14 Jakub Jelinek <jakub@redhat.com>
9248 * config/i386/i386.md: Disallow non-commutative arithmetics in
9249 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9250 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9251 in the peephole2 before it.
9253 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9255 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9256 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9257 (ix86_handle_option): Handle -mcldemote.
9258 * config.gcc: New header.
9259 * config/i386/cldemoteintrin.h: New file.
9260 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9261 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9263 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9264 OPTION_MASK_ISA_CLDEMOTE.
9265 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9266 (ix86_valid_target_attribute_inner_p): Ditto.
9267 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9268 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9269 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9270 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9271 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9273 * config/i386/i386.opt: Add -mcldemote.
9274 * config/i386/x86intrin.h: New header.
9275 * doc/invoke.texi: Add -mcldemote.
9277 2018-05-14 Richard Biener <rguenther@suse.de>
9279 * doc/match-and-simplify.texi: Adjust :s documentation.
9281 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9283 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9284 intended memcpy size.
9285 (REORDER_45): Likewise.
9287 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9289 * sort.cc: New file.
9290 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9291 * vec.c (qsort_chk): Use gcc_qsort.
9292 * Makefile.in (OBJS-libcommon): Add sort.o.
9293 (build/sort.o): New target. Use it...
9294 (BUILD_RTL): ... here, and...
9295 (build/gencfn-macros): ... here, and...
9296 (build/genmatch): ... here.
9298 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9299 Chung-Ju Wu <jasonwucj@gmail.com>
9301 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9302 * config/nds32/nds32-graywolf.md: New file.
9303 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9304 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9306 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9307 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9308 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9309 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9310 * config/nds32/pipelines.md: Include n15 settings.
9312 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9313 Chung-Ju Wu <jasonwucj@gmail.com>
9315 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9316 * config/nds32/nds32-n13.md: New file.
9317 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9318 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9320 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9321 * config/nds32/nds32.md (pipeline_model): Add n13.
9322 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9323 * config/nds32/pipelines.md: Include n13 settings.
9325 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9326 Chung-Ju Wu <jasonwucj@gmail.com>
9328 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9329 * config/nds32/nds32-n10.md: New file.
9330 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9331 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9333 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9334 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9335 * config/nds32/nds32.md (pipeline_model): Add n10.
9336 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9337 * config/nds32/pipelines.md: Include n10 settings.
9339 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9340 Kito Cheng <kito.cheng@gmail.com>
9341 Chung-Ju Wu <jasonwucj@gmail.com>
9343 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9344 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9345 Add enum values for DSP extension instructions.
9346 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9348 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9349 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9351 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9352 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9353 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9354 * config/nds32/nds32-intrinsic.md: Likewise.
9355 * config/nds32/nds32_intrinsic.h: Likewise.
9356 * config/nds32/nds32-md-auxiliary.c: Likewise.
9357 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9358 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9359 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9360 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9361 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9362 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9363 TYPE_DMAC in switch statement.
9364 * config/nds32/nds32.c: New checking and implementation for DSP
9365 extension instructions.
9366 * config/nds32/nds32.h: Likewise.
9367 * config/nds32/nds32.md: Likewise.
9368 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9369 * config/nds32/predicates.md: Implement new predicates for DSP
9372 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9374 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9375 Reformat alternatives and attributes so it is easier to identify
9376 which constraints/attributes go with which instruction.
9377 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9378 (mov<mode>_softfloat32, FMOVE64): Likewise.
9379 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9380 (mov<mode>_softfloat64, FMOVE64): Likewise.
9382 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9384 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9386 (Basic PowerPC Built-in Functions): The new name of the
9387 subsection previously known as "PowerPC Built-in Functions".
9388 (Basic PowerPC Built-in Functions Available on all Configurations):
9390 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9391 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9392 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9393 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9395 2018-05-11 Martin Jambor <mjambor@suse.cz>
9398 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9401 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9404 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9406 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9408 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9409 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9410 (ix86_handle_option): Handle -mwaitpkg.
9411 * config.gcc: New header.
9412 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9413 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9414 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9416 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9417 OPTION_MASK_ISA_WAITPKG.
9418 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9419 (ix86_option_override_internal): Add PTA_WAITPKG.
9420 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9421 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9422 IX86_BUILTIN_TPAUSE.
9423 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9424 __builtin_ia32_umwait and __builtin_ia32_tpause.
9425 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9426 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9427 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9428 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9429 UNSPECV_TPAUSE): New.
9430 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9431 * config/i386/i386.opt: Add -mwaitpkg.
9432 * config/i386/waitpkgintrin.h: New file.
9433 * config/i386/x86intrin.h: New header.
9434 * doc/invoke.texi: Add -mwaitpkg.
9436 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9439 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9441 (cortex-m0): Use armv6s-m isa.
9442 (cortex-m0plus): Likewise.
9443 (cortex-m1): Likewise.
9444 (cortex-m0.small-multiply): Likewise.
9445 (cortex-m0plus.small-multiply): Likewise.
9446 (cortex-m1.small-multiply): Likewise.
9448 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9449 Jakub Jelinek <jakub@redhat.com>
9451 PR tree-optimization/85692
9452 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9453 source permute as well.
9455 2018-05-11 Martin Liska <mliska@suse.cz>
9458 * doc/extend.texi: Document LLVM style format for no_sanitize
9461 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9463 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9464 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9465 (mode_supports_vsx_dform_quad): Likewise.
9466 (mode_supports_vmx_dform): Move these functions to be next to the
9467 other mode_supports functions.
9468 (mode_supports_dq_form): Likewise.
9469 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9470 mode_supports_dq_form.
9471 (reg_offset_addressing_ok_p): Likewise.
9472 (offsettable_ok_by_alignment): Likewise.
9473 (rs6000_legitimate_offset_address_p): Likewise.
9474 (legitimate_lo_sum_address_p): Likewise.
9475 (rs6000_legitimize_address): Likewise.
9476 (rs6000_legitimize_reload_address): Likewise.
9477 (rs6000_secondary_reload_inner): Likewise.
9478 (rs6000_preferred_reload_class): Likewise.
9479 (rs6000_output_move_128bit): Likewise.
9481 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9483 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9484 Generate SImode target register for null target.
9485 <case IX86_BUILTIN_XGETBV>: Ditto.
9486 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9487 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9489 2018-05-10 Carl Love <cel@us.ibm.com>
9491 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9492 dcbtt and dcbtstt if operands[2] is 0.
9494 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9497 * config/i386/sse.md (usadv64qi): New expander.
9499 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9501 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9502 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9503 -maltivec=be support.
9504 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9505 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9506 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9507 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9508 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9509 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9510 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9511 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9512 altivec_vsumsws): Adjust.
9513 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9514 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9515 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9517 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9518 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9519 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9520 (altivec_lve<VI_char>x): Delete expand.
9521 (*altivec_lve<VI_char>x_internal): Rename to...
9522 (altivec_lve<VI_char>x): ... this.
9523 (altivec_lvxl_<mode>): Delete expand.
9524 (*altivec_lvxl_<mode>_internal): Rename to ...
9525 (altivec_lvxl_<mode>): ... this.
9526 (altivec_stvxl_<mode>): Delete expand.
9527 (*altivec_stvxl_<mode>_internal): Rename to ...
9528 (altivec_stvxl_<mode>): ... this.
9529 (altivec_stve<VI_char>x): Delete expand.
9530 (*altivec_stve<VI_char>x_internal): Rename to ...
9531 (altivec_stve<VI_char>x): ... this.
9532 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9533 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9534 reduc_plus_scal_<mode>): Adjust.
9535 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9537 (rs6000_cpu_cpp_builtins): Adjust.
9538 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9539 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9540 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9541 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9542 -maltivec=be support.
9543 (rs6000_split_vec_extract_var): Adjust.
9544 (rs6000_split_v4si_init): Adjust.
9545 (swap_selector_for_mode): Delete.
9546 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9547 altivec_expand_stvex_be): Delete.
9548 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9549 -maltivec=be support.
9550 (rs6000_gimple_fold_builtin): Ditto.
9551 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9553 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9554 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9555 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9556 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9557 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9558 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9559 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9560 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9561 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9562 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9563 anonymous split): Adjust.
9564 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9565 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9567 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9569 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9570 when --with-gxx-include-dir is also specified.
9571 * configure: Regenerate.
9573 2018-05-09 Jim Wilson <jimw@sifive.com>
9576 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9577 * config/riscv/t-withmultilib: New.
9578 * config/riscv/withmultilib.h: New.
9579 * doc/install.texi: Document RISC-V --with-multilib-list support.
9581 2018-05-09 Richard Biener <rguenther@suse.de>
9583 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9585 (vect_bb_vectorization_profitable_p): Adjust. Compute
9586 actual scalar cost using the cost vector and the add_stmt_cost
9589 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9591 PR rtl-optimization/85645
9592 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9593 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9595 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9597 PR rtl-optimization/85645
9598 * shrink-wrap.c (spread_components): Return a boolean saying if
9599 anything was changed.
9600 (try_shrink_wrapping_separate): Iterate spread_components until
9601 nothing changes anymore.
9603 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9605 PR rtl-optimization/85645
9606 * regrename.c (build_def_use): Also kill the chains that include the
9607 destination of a REG_CFA_REGISTER note.
9609 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9611 PR rtl-optimization/85645
9612 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9613 insn that has a REG_CFA_REGISTER note.
9615 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9617 * cfgexpand.c (expand_clobber): New function.
9618 (expand_gimple_stmt_1): Use it.
9619 * tree-vect-stmts.c (vect_clobber_variable): New function,
9621 (vectorizable_simd_clone_call): ...here.
9622 (vectorizable_store): Emit a clobber either side of an
9623 IFN_STORE_LANES sequence.
9624 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9626 2018-05-09 Tom de Vries <tom@codesourcery.com>
9629 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9630 (define_insn "trap_if_false"): Add exit after trap.
9632 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9634 PR rtl-optimization/85638
9635 * bb-reorder.c: Include common/common-target.h.
9636 (create_forwarder_block): New function extracted from...
9637 (fix_up_crossing_landing_pad): ...here. Rename into...
9638 (dw2_fix_up_crossing_landing_pad): ...this.
9639 (sjlj_fix_up_crossing_landing_pad): New function.
9640 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9641 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9642 from both partitions and exit the loop after one iteration.
9644 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9647 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9649 (Basic PowerPC Built-in Functions): The new name of the
9650 subsection previously known as "PowerPC Built-in Functions".
9651 (Basic PowerPC Built-in Functions Available on all Configurations):
9653 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9655 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9657 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9659 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9662 2018-05-08 Jim Wilson <jimw@sifive.com>
9664 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9665 (LD_EMUL_SUFFIX): New.
9666 (LINK_SPEC): Use it.
9668 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9670 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9672 (Basic PowerPC Built-in Functions): The new name of the
9673 subsection previously known as "PowerPC Built-in Functions".
9674 (Basic PowerPC Built-in Functions Available on all Configurations):
9676 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9678 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9680 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9682 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9685 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9688 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9689 after cmpelim optimization.
9691 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
9693 * config.gcc: Support "goldmont".
9694 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9695 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9697 * config/i386/i386.c (m_GOLDMONT): Define.
9698 (processor_target_table): Add "goldmont".
9699 (PTA_GOLDMONT): Define.
9700 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9701 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9702 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9703 (fold_builtin_cpu): Add "goldmont".
9704 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9705 (ix86_option_override_internal): Add "goldmont".
9706 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9707 (processor_type): Add PROCESSOR_GOLDMONT.
9708 * config/i386/i386.md: Add CPU "glm".
9709 * config/i386/glm.md: New file.
9710 * config/i386/x86-tune.def: Add m_GOLDMONT.
9711 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9713 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9716 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9718 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9719 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9720 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9723 * config/i386/i386.c (ix86_fold_builtin): Handle
9724 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9727 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9728 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9730 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9733 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9734 (check_arch): Likewise.
9735 (check_fpu): Return the result rather than printing it.
9736 (end arch): Fix operator precedence.
9737 (end cpu): Likewise.
9738 (END): Print the result from check_fpu.
9740 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9741 Alan Hayward <alan.hayward@arm.com>
9742 David Sherwood <david.sherwood@arm.com>
9744 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9745 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9746 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9747 (*fcmuo<mode>_and): New patterns.
9749 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9751 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9752 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9753 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9754 (cmp_op, sve_imm_con): New code attributes.
9755 (SVE_COND_INT_CMP, imm_con): Delete.
9756 (cmp_op): Remove above unspecs from int attribute.
9757 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9759 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9760 comparison-specific unspecs.
9761 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9762 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9763 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9764 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9765 (*vec_fcm<cmp_op><mode>): Rename to...
9766 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9767 (*vec_fcmuo<mode>): Rename to...
9768 (*fcmuo<mode>): ...this and adjust likewise.
9769 (*pred_fcm<cmp_op><mode>): New pattern.
9770 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9771 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9773 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9775 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9776 (aarch64_emit_sve_predicated_cond): New function.
9777 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9778 (aarch64_emit_unspec_cond_or): Replace with...
9779 (aarch64_emit_sve_or_conds): ...this new function. Use
9780 aarch64_emit_sve_ptrue_op for the individual comparisons and
9781 aarch64_emit_binop to OR them together.
9782 (aarch64_emit_inverted_unspec_cond): Replace with...
9783 (aarch64_emit_sve_inverted_cond): ...this new function. Use
9784 aarch64_emit_sve_ptrue_op for the comparison and
9785 aarch64_emit_unop to invert the result.
9786 (aarch64_expand_sve_vec_cmp_float): Update after the above
9787 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
9789 2018-05-07 Nathan Sidwell <nathan@acm.org>
9791 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9792 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9793 (Backwards Compatibility): Likewise.
9795 2018-05-07 Luis Machado <luis.machado@linaro.org>
9799 2018-05-07 Luis Machado <luis.machado@linaro.org>
9801 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9802 <prefetch_dynamic_strides>: New const bool field.
9803 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9804 prefetch_dynamic_strides.
9805 (exynosm1_prefetch_tune): Likewise.
9806 (thunderxt88_prefetch_tune): Likewise.
9807 (thunderx_prefetch_tune): Likewise.
9808 (thunderx2t99_prefetch_tune): Likewise.
9809 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9811 (aarch64_override_options_internal): Update to set
9812 PARAM_PREFETCH_DYNAMIC_STRIDES.
9813 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9814 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9815 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9816 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9817 prefetch-dynamic-strides setting.
9819 2018-05-07 Luis Machado <luis.machado@linaro.org>
9821 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9822 <minimum_stride>: New const int field.
9823 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9824 minimum_stride field.
9825 (exynosm1_prefetch_tune): Likewise.
9826 (thunderxt88_prefetch_tune): Likewise.
9827 (thunderx_prefetch_tune): Likewise.
9828 (thunderx2t99_prefetch_tune): Likewise.
9829 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9830 (aarch64_override_options_internal): Update to set
9831 PARAM_PREFETCH_MINIMUM_STRIDE.
9832 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9833 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9834 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9835 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9836 stride is constant and is below the minimum stride threshold.
9838 2018-05-07 Luis Machado <luis.machado@linaro.org>
9840 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9843 2018-05-07 Luis Machado <luis.machado@linaro.org>
9845 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9846 <prefetch_dynamic_strides>: New const bool field.
9847 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9848 prefetch_dynamic_strides.
9849 (exynosm1_prefetch_tune): Likewise.
9850 (thunderxt88_prefetch_tune): Likewise.
9851 (thunderx_prefetch_tune): Likewise.
9852 (thunderx2t99_prefetch_tune): Likewise.
9853 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9855 (aarch64_override_options_internal): Update to set
9856 PARAM_PREFETCH_DYNAMIC_STRIDES.
9857 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9858 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9859 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9860 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9861 prefetch-dynamic-strides setting.
9863 2018-05-07 Luis Machado <luis.machado@linaro.org>
9865 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9866 <minimum_stride>: New const int field.
9867 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9868 minimum_stride field.
9869 (exynosm1_prefetch_tune): Likewise.
9870 (thunderxt88_prefetch_tune): Likewise.
9871 (thunderx_prefetch_tune): Likewise.
9872 (thunderx2t99_prefetch_tune): Likewise.
9873 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9874 (aarch64_override_options_internal): Update to set
9875 PARAM_PREFETCH_MINIMUM_STRIDE.
9876 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9877 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9878 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9879 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9880 stride is constant and is below the minimum stride threshold.
9882 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9885 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9886 the type is addressable. Don't force op into register if it has
9889 2018-05-05 Roland McGrath <mcgrathr@google.com>
9892 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9893 any section for which we don't know a specific type it should have,
9894 regardless of name. Previously this was done only for the exact
9895 names ".init_array", ".fini_array", and ".preinit_array".
9896 (default_elf_asm_named_section): Add comment about
9897 relationship with default_section_type_flags and SECTION_NOTYPE.
9898 (get_section): Don't consider it a type conflict if one side has
9899 SECTION_NOTYPE and the other doesn't, as long as neither has the
9900 SECTION_BSS et al used in the default_section_type_flags logic.
9902 2018-05-05 Tom de Vries <tom@codesourcery.com>
9905 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9906 (workaround_barsyncs): New function.
9907 (nvptx_reorg): Use workaround_barsyncs.
9908 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9909 (define_expand "nvptx_membar_cta"): New define_expand.
9910 (define_insn "*nvptx_membar_cta"): New insn.
9912 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9914 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9915 To improve optimization opportunities.
9916 * builtin-types.def: The new needed builtin types for the above.
9918 2018-05-04 Richard Biener <rguenther@suse.de>
9920 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9921 * gimple-ssa-store-merging.c
9922 (imm_store_chain_info::output_merged_store): Remove redundant create,
9923 release split_store vector contents on failure.
9924 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9925 scalar stmt vector on cache hit.
9927 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9929 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9931 * config.gcc (powerpc-xilinx-eabi*): Remove.
9932 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9934 (fusion_addis_mem_combo_load): Ditto.
9935 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9937 (rs6000_cpu_cpp_builtins): Ditto.
9938 * config/rs6000/rs6000-linux.c
9939 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9940 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9941 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9943 (rs6000_setup_reg_addr_masks): Ditto.
9944 (rs6000_init_hard_regno_mode_ok): Ditto.
9945 (rs6000_option_override_internal): Ditto.
9946 (legitimate_lo_sum_address_p): Ditto.
9947 (rs6000_legitimize_address): Ditto.
9948 (rs6000_legitimize_reload_address): Ditto.
9949 (rs6000_legitimate_address_p): Ditto.
9950 (abi_v4_pass_in_fpr): Ditto.
9951 (setup_incoming_varargs): Ditto.
9952 (rs6000_gimplify_va_arg): Ditto.
9953 (rs6000_split_multireg_move): Ditto.
9954 (rs6000_savres_strategy): Ditto.
9955 (rs6000_emit_prologue_components): Ditto.
9956 (rs6000_emit_epilogue_components): Ditto.
9957 (rs6000_emit_prologue): Ditto.
9958 (rs6000_emit_epilogue): Ditto.
9959 (rs6000_elf_file_end): Ditto.
9960 (rs6000_function_value): Ditto.
9961 (rs6000_libcall_value): Ditto.
9962 * config/rs6000/rs6000.h: Ditto.
9963 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9964 (TARGET_MINMAX): ... this. New.
9965 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9966 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9967 (*movsi_internal1_single): Delete.
9968 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9969 mfpu=, mxilinx-fpu): Delete.
9970 * config/rs6000/singlefp.h: Delete.
9971 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9972 * config/rs6000/t-rs6000: Ditto.
9973 * config/rs6000/t-xilinx: Delete.
9974 * config/rs6000/titan.md: Adjust for fp_type removal.
9975 * config/rs6000/vsx.md: Remove Xilinx FP support.
9976 (VStype_simple): Delete.
9977 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9978 * config/rs6000/xfpu.h: Delete.
9979 * config/rs6000/xfpu.md: Delete.
9980 * config/rs6000/xilinx.h: Delete.
9981 * config/rs6000/xilinx.opt: Delete.
9982 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9983 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9985 2018-05-04 Tom de Vries <tom@codesourcery.com>
9988 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9991 2018-05-04 Richard Biener <rguenther@suse.de>
9994 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9995 (expand_complex_div_wide): Likewise.
9996 (expand_complex_operations_1): Likewise.
9997 (expand_complex_libcall): Preserve EH info of the original stmt.
9998 (tree_lower_complex): Handle removed blocks.
9999 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10000 on complex multiplication and division libcall builtins.
10002 2018-05-04 Richard Biener <rguenther@suse.de>
10004 PR middle-end/85574
10005 * fold-const.c (negate_expr_p): Restrict negation of operand
10006 zero of a division to when we know that can happen without
10008 (fold_negate_expr_1): Likewise.
10010 2018-05-04 Jakub Jelinek <jakub@redhat.com>
10013 * real.h (real_nextafter): Declare.
10014 * real.c (real_nextafter): New function.
10015 * fold-const-call.c (fold_const_nextafter): New function.
10016 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10017 CASE_CFN_NEXTTOWARD.
10018 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10019 even when arg1_mode is different from arg0_mode.
10021 2018-05-03 Nathan Sidwell <nathan@acm.org>
10023 * doc/extend.texi (Deprecated Features): Remove
10024 -ffriend-injection.
10025 (Backwards Compatibility): Likewise.
10026 * doc/invoke.texi (C++ Language Options): Likewise.
10027 (C++ Dialect Options): Likewise.
10029 2018-05-03 Jakub Jelinek <jakub@redhat.com>
10032 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10033 _mm512_mask_mullox_epi64): New intrinsics.
10035 2018-05-03 Tom de Vries <tom@codesourcery.com>
10038 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10039 dump files): Add offload-tree.
10041 2018-05-03 Richard Biener <rguenther@suse.de>
10043 PR tree-optimization/85615
10044 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10045 to loops not nested in BBs loop father to avoid creating multi-entry
10048 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10050 PR tree-optimization/70291
10051 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10052 arguments. Change return type to tree. Emit libcall as a new
10053 statement rather than replacing existing one when inplace_p is true.
10054 (expand_complex_multiplication_components): New function.
10055 (expand_complex_multiplication): Expand floating-point complex
10056 multiplication using the above.
10057 (expand_complex_division): Rename inner_type parameter to type.
10058 Update expand_complex_libcall call-site.
10059 (expand_complex_operations_1): Update expand_complex_multiplication
10060 and expand_complex_division call-sites.
10062 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10065 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10066 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10067 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10068 the highest significant bit of the shift count mask is clear. In
10069 check whether and[sq]i3 is needed verify that all significant bits
10070 of the shift count other than the highest are set.
10072 2018-05-02 Tom de Vries <tom@codesourcery.com>
10075 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10076 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10077 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10078 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10079 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10080 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10081 __builtin_goacc_parlevel_size.
10083 2018-05-02 Richard Biener <rguenther@suse.de>
10085 PR tree-optimization/85597
10086 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10087 do not use split vect_get_vec_defs call but call vect_get_slp_defs
10090 2018-05-02 Tom de Vries <tom@codesourcery.com>
10093 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10094 dump files): Add ltrans-tree.
10096 2018-05-02 Tom de Vries <tom@codesourcery.com>
10099 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10100 dump files): Add wpa-ipa.
10102 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10104 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10105 powerpc*-*-linux*paired* target.
10106 * config/rs6000/750cl.h: Delete.
10107 * config/rs6000/paired.h: Delete.
10108 * config/rs6000/paired.md: Delete.
10109 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10111 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10112 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10113 comment. Remove paired float support.
10114 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10115 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10117 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10118 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10120 * config/rs6000/rs6000.c: Remove paired float support.
10121 (paired_expand_vector_init, paired_expand_vector_move,
10122 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10123 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10124 paired_expand_builtin, paired_expand_predicate_builtin,
10125 paired_init_builtins): Delete.
10126 * config/rs6000/rs6000.h: Remove paired float support.
10127 * config/rs6000/rs6000.md: Remove paired float support.
10128 (move_from_CR_ov_bit): Delete.
10129 * config/rs6000/rs6000.opt (mpaired): Delete.
10130 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10131 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10133 2018-05-02 Richard Biener <rguenther@suse.de>
10135 PR middle-end/85567
10136 * gimplify.c (gimplify_save_expr): When in SSA form allow
10137 SAVE_EXPRs to compute to SSA vars.
10139 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10142 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10143 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10144 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10145 clobber operands[2], instead use a new pseudo. Formatting fixes.
10147 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10149 PR tree-optimization/85586
10150 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10151 exit early for statements in the same group if the accesses are
10154 2018-05-02 Tom de Vries <tom@codesourcery.com>
10157 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10160 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10162 PR tree-optimization/85143
10163 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10165 2018-05-01 Tom de Vries <tom@codesourcery.com>
10168 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10169 not found" error message.
10171 2018-05-01 Tom de Vries <tom@codesourcery.com>
10174 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10175 * vec.c (test_ordered_remove_if): New function.
10176 (vec_c_tests): Call test_ordered_remove_if.
10177 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10178 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10179 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10180 VEC_ORDERED_REMOVE_IF.
10182 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10184 PR tree-optimization/82665
10185 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10186 pointer subtraction where arguments come from a memchr call.
10188 2018-05-01 Jakub Jelinek <jakub@redhat.com>
10190 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10191 --push-state --as-needed and --pop-state instead of --as-needed and
10192 --no-as-needed if ld supports it.
10193 * configure: Regenerated.
10196 * doc/install.texi2html: Replace _002d with - and _002a with * in
10197 generated html files using sed.
10199 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10202 * gcc-rich-location.c (blank_line_before_p): New function.
10203 (use_new_line): New function.
10204 (gcc_rich_location::add_fixit_insert_formatted): New function.
10205 * gcc-rich-location.h
10206 (gcc_rich_location::add_fixit_insert_formatted): New function.
10208 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10210 * selftest.c (assert_streq): Rename "expected" and "actual" to
10211 "val1" and "val2". Extend NULL-handling to cover both inputs
10212 symmetrically, while still requiring both to be non-NULL for a pass.
10213 * selftest.h (assert_streq): Rename "expected" and "actual" to
10215 (ASSERT_EQ): Likewise.
10216 (ASSERT_EQ_AT): Likewise.
10217 (ASSERT_KNOWN_EQ): Likewise.
10218 (ASSERT_KNOWN_EQ_AT): Likewise.
10219 (ASSERT_NE): Likewise.
10220 (ASSERT_MAYBE_NE): Likewise.
10221 (ASSERT_MAYBE_NE_AT): Likewise.
10222 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
10223 the assertion to pass.
10224 (ASSERT_STREQ_AT): Likewise.
10226 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10228 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10229 interaction with -pie.
10231 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10233 * selftest.h: Fix alphabetization of per-source-file selftest
10236 2018-04-30 Jason Merrill <jason@redhat.com>
10238 PR c++/61982 - dead stores to destroyed objects.
10239 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10242 2018-04-30 Jason Merrill <jason@redhat.com>
10244 * tree.c (build_clobber): New.
10245 * tree.h: Declare it.
10246 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10248 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10250 * diagnostic-show-locus.c (layout::layout): Update for
10251 location_get_source_line returning a char_span.
10252 (struct char_span): Move to input.h.
10253 (struct correction): Update for fields in char_span becoming
10255 (struct source_line): Update for location_get_source_line
10256 returning a char_span.
10257 (layout::print_line): Likewise.
10258 * edit-context.c (edited_file::print_content): Likewise.
10259 (edited_file::print_diff_hunk): Likewise.
10260 (edited_file::print_run_of_changed_lines): Likewise.
10261 (edited_file::get_num_lines): Likewise.
10262 (edited_line::edited_line): Likewise.
10263 * final.c (asm_show_source): Likewise.
10264 * input.c (location_get_source_line): Convert return type
10265 from const char * to char_span, losing the final "line_len"
10267 (dump_location_info): Update for the above.
10268 (get_substring_ranges_for_loc): Likewise. Use a char_span
10269 when handling the literal within the line.
10270 (test_reading_source_line): Update for location_get_source_line
10271 returning a char_span.
10272 * input.h (class char_span): Move here from
10273 diagnostic-show-locus.c, converting from a struct to a class.
10274 Make data members private.
10275 (char_span::operator bool): New.
10276 (char_span::length): New.
10277 (char_span::get_buffer): New.
10278 (char_span::operator[]): New.
10279 (char_span::subspan): Make const.
10280 (char_span::xstrdup): New.
10281 (location_get_source_line): Convert return type from const char *
10282 to char_span, losing the final "line_size" param.
10284 2018-04-30 Jan Hubicka <jh@suse.cz>
10286 * lto-wrapper.c (ltrans_priorities): New static var.
10287 (cmp_priority): New.
10288 (run_gcc): Read priorities and if doing parallel build order
10289 the Makefile by them.
10291 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10293 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10295 2018-04-30 Richard Biener <rguenther@suse.de>
10297 * tree-cfg.c (verify_address): Remove base argument, add
10298 flag whether to check TREE_ADDRESSABLE and do that.
10299 (verify_expr): Remove.
10300 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10301 (verify_gimple_assign_single): Likewise.
10302 (verify_gimple_switch): Likewise.
10303 (verify_expr_location_1): Dereference tp once. Add (disabled)
10304 piece from verify_expr.
10305 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10307 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10309 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10311 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10313 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10314 (small_data_pattern): Likewise.
10315 (arc_rewrite_small_data): Likewise.
10316 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10317 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10318 (get_symbol_alignment): New function.
10319 (legitimate_small_data_address_p): Likewise.
10320 (legitimate_scaled_address): Update, call
10321 legitimate_small_data_address_p.
10322 (output_sdata): New static variable.
10323 (arc_print_operand): Update how we handle small data operands.
10324 (arc_print_operand_address): Likewise.
10325 (arc_legitimate_address_p): Update, use
10326 legitimate_small_data_address_p.
10327 (arc_rewrite_small_data_p): Remove.
10328 (arc_rewrite_small_data_1): Likewise.
10329 (arc_rewrite_small_data): Likewise.
10330 (small_data_pattern): Likewise.
10331 (compact_sda_memory_operand): Update to use
10332 legitimate_small_data_address_p and get_symbol_alignment.
10333 (prepare_move_operands): Don't rewite sdata pattern.
10334 (prepare_extend_operands): Remove.
10335 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10337 (zero_extendqisi2): Likewise.
10338 (zero_extendhisi2): Likewise.
10339 (extendqihi2): Likewise.
10340 (extendqisi2): Likewise.
10341 (extendhisi2): Likewise.
10342 (addsi3): Likewise.
10343 (subsi3): Likewise.
10344 (andsi3): Likewise.
10345 * config/arc/constraints.md (Usd): Change it to memory constraint.
10347 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10349 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10350 as source of std instructions.
10351 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10352 allow 6-bit constants as source for store instructions.
10353 (movdi_insn): Update instruction pattern to allow 6-bit constants
10354 as source for store instructions.
10356 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10358 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10360 2018-04-30 Nathan Sidwell <nathan@acm.org>
10361 Sandra Loosemore <sandra@codesourcery.com>
10363 * dumpfile.c (dump_open): Allow '-' for stdout.
10364 * doc/invoke.texi (Developer Options): Document dump filename
10365 determination early. Document stdin/stdout selection.
10367 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10369 Microblaze Target: PIC data text relative
10371 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10372 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10374 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10375 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10376 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10377 New addressing mode for data-text relative position indepenedent code.
10378 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10379 'ADDRESS_SYMBOLIC_TXT_REL'.
10380 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10381 (microblaze_legitimate_pic_operand): Exclude function calls from
10382 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10383 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10385 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10386 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10387 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10388 for 'address + offset'.
10389 (microblaze_expand_prologue): Add new function prologue call for
10391 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10392 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10393 table in case of TARGET_PIC_DATA_TEXT_REL.
10394 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10395 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10396 Add new macros 'UNSPEC_TEXT',
10397 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10398 + exclude function calls from 'UNSPEC_PLT' in case of data text
10400 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10401 new target hook for generating address diff vector tables in case of
10403 * doc/tm.texi : Regenerate.
10404 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10405 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10406 of addr diff vector generation.
10407 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10408 target hook definition.
10409 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10410 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10411 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10412 option for data text relative.
10414 2018-04-30 Richard Biener <rguenther@suse.de>
10416 * tree-chrec.h (evolution_function_is_constant_p): Remove
10418 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10420 2018-04-30 Richard Biener <rguenther@suse.de>
10423 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10425 2018-04-30 Richard Biener <rguenther@suse.de>
10427 PR tree-optimization/28364
10428 PR tree-optimization/85275
10429 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10430 copying first exit test.
10432 2018-04-28 Mark Wielaard <mark@klomp.org>
10434 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10435 dwarf_version >= 5.
10436 (dwarf_AT): Handle DW_AT_addr_base.
10437 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10439 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10442 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10443 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10444 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10445 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10447 2018-04-28 Richard Biener <rguenther@suse.de>
10449 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10450 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10451 to reflect use. Only add interesting stmts.
10453 2018-04-27 Martin Jambor <mjambor@suse.cz>
10456 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10457 the jump function allows for passing through aggregate values.
10459 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10461 * input.h (in_system_header_at): Convert from macro to inline
10463 (from_macro_expansion_at): Likewise.
10464 (from_macro_definition_at): Likewise.
10466 2018-04-27 Jeff Law <law@redhat.com>
10468 * config.gcc: Mark tile* targets as deprecated/obsolete.
10470 2018-04-27 Richard Biener <rguenther@suse.de>
10472 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10475 2018-04-27 Richard Biener <rguenther@suse.de>
10477 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10479 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10481 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10482 with Yd constraint. Set "preferred_for_speed" attribute from
10483 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10484 with Yd constraint.
10485 (*movdi_internal): Ditto.
10486 (movti_interunit splitters): Remove
10487 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10488 (movdi_interunit splitters): Ditto.
10489 * config/i386/constraints.md (Ye): Remove.
10490 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10492 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10495 * config/aarch64/constraints.md (Usg): Limit to 31.
10496 (Usj): Limit to 63.
10498 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10500 PR tree-optimization/85529
10501 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10502 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10503 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10504 zero extension or masking of the MSB bit.
10505 (optimize_range_tests): Add FIRST_BB argument, pass it through
10506 to optimize_range_tests_var_bound.
10507 (maybe_optimize_range_tests, reassociate_bb): Adjust
10508 optimize_range_tests callers.
10510 2018-04-26 Richard Biener <rguenther@suse.de>
10511 Jakub Jelinek <jakub@redhat.com>
10513 * cgraph.h (symbol_table): Just declare debug method here.
10514 * symtab.c (symbol_table::debug): Define.
10516 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10518 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10520 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10522 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10523 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10524 (*movdi_internal): Substitute Yi and Yj constraint with x
10525 and Ym and Yn constraint with y constraint. Update "isa"
10526 attribute and set "preferred_for_speed" attribute from
10527 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10528 (*movsi_internal): Ditto.
10529 (*movdf_internal): Ditto.
10530 (*movsf_internal): Ditto.
10531 (*zero_extendsidi2): Ditto.
10532 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10533 (sse2_loadld): Ditto.
10534 (*vec_extract<ssevecmodelower>_0): Ditto.
10535 (*vec_extractv4si_0_zext_sse4): Ditto.
10536 (vec_concatv2di): Ditto.
10537 (*vec_dup<mode>): Ditto.
10538 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10539 * config/i386/constraints.md (Yi): Remove.
10544 2018-04-26 Nathan Sidwell <nathan@acm.org>
10546 * dumpfile.c (dump_open): New.
10547 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10548 (dump_finish): Detect stdio/stderr by value not name.
10550 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10552 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10554 2018-04-26 Tom de Vries <tom@codesourcery.com>
10557 * config/nvptx/nvptx.c (verify_neutering_jumps)
10558 (verify_neutering_labels): New function
10559 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10561 2018-04-26 Tom de Vries <tom@codesourcery.com>
10564 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10565 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10568 2018-04-26 Richard Biener <rguenther@suse.de>
10569 Tom de Vries <tom@codesourcery.com>
10572 * lto-streamer-out.c (output_function): Fixup loops if required to match
10573 discovery done in the reader.
10575 2018-04-26 Richard Biener <rguenther@suse.de>
10577 PR tree-optimization/85116
10578 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10579 have a loop exit from the single latch predecessor. Remove
10580 case of header with just condition.
10581 (ch_base::copy_headers): Exclude infinite loops from any
10583 (pass_ch::execute): Record exits.
10585 2018-04-26 Richard Biener <rguenther@suse.de>
10587 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10588 prologue cost vector and pass it to vect_get_load_cost.
10589 (vect_get_peeling_costs_all_drs): Likewise.
10590 (vect_peeling_hash_get_lowest_cost): Likewise.
10591 (vect_enhance_data_refs_alignment): Likewise.
10593 2018-04-26 Richard Biener <rguenther@suse.de>
10595 PR middle-end/85450
10596 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10597 checking of integer<->pointer conversions.
10598 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10599 sign-/zero-extending pointer types.
10600 (expand_omp_for_static_chunk): Likewise.
10602 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10603 Jean Lee <xiaoyur347@gmail.com>
10605 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10606 (TARGET_ASAN_SHADOW_OFFSET): Define.
10607 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10608 true for -fsanitize=address.
10610 2018-04-25 Mark Wielaard <mark@klomp.org>
10612 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10615 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10617 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10618 than "alu", remove explicit "memory" and "imm_disp" attributes.
10619 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10621 PR middle-end/85414
10622 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10623 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10624 gen_lowpart_no_emit.
10626 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10629 * config/i386/i386.c (ix86_expand_builtin): Change memory
10630 operand to XI, extend p0 to Pmode.
10631 * config/i386/i386.md: Change unspec volatile and operand
10632 1 mode to XI, change operand 0 mode to P.
10634 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10636 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10637 GET_MODE_MASK before any checking.
10638 (nds32_can_use_bset_p): Likewise.
10639 (nds32_can_use_btgl_p): Likewise.
10641 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10643 * config/nds32/nds32-doubleword.md: New define_split pattern for
10644 illegal register number.
10646 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10648 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10650 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10652 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10654 2018-04-25 Richard Biener <rguenther@suse.de>
10656 * lto-streamer.h (LTO_major_version): Bump to 8.
10658 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10660 * BASE-VER: Set to 9.0.0.
10662 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10664 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10665 in __abskf2 and __powikf2.
10667 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10670 * config/aarch64/constraints.md (Usg, Usj): New constraints.
10671 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10672 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10673 Use the above on operand 2. Reindent.
10674 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10676 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10679 * common/config/i386/i386-common.c (ix86_handle_option): Don't
10681 * config/i386/i386.opt (mcet): Removed.
10682 * doc/install.texi: Remove -mcet documentation.
10683 * doc/invoke.texi: Likewise.
10685 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10688 * doc/install.texi: Remove -mcet from bootstrap-cet.
10690 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10693 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10694 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10698 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10699 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10700 containing a CONST_VECTOR.
10702 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
10704 * doc/install.texi: Update newlib dependency for nvptx.
10706 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10709 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10710 instead of INTVAL when shifting x left.
10712 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
10714 PR tree-optimization/85478
10715 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10716 vect_grouped_store_supported for single element vectors.
10718 2018-04-24 Richard Biener <rguenther@suse.de>
10721 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10722 load cost increase to the case of non-constant step.
10724 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10727 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10728 destination if any_malformed_asm.
10730 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10732 PR middle-end/85496
10733 * expr.c (store_field): In the bitfield case, if the value comes from
10734 a function call and is returned in registers by means of a PARALLEL,
10735 do not change the mode of the temporary unless BLKmode and VOIDmode.
10737 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10739 PR rtl-optimization/85423
10740 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10741 dependencies to debug insns when the previous insn is non-debug.
10743 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10745 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10746 enums into a single definition.
10747 (fls): Fix predicates and printing.
10750 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10752 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10753 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10754 and short u6 immediate.
10755 (check_if_valid_sleep_operand): Remove.
10756 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10758 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10760 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10761 flag_always_save_lp condition.
10762 * config/nds32/nds32.opt (malways-save-lp): New option.
10764 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10766 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10767 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10768 * config/nds32/nds32.h
10769 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10770 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10772 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10774 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10775 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10777 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10778 Chung-Ju Wu <jasonwucj@gmail.com>
10780 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10782 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10783 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10785 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10787 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10789 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10791 * config/nds32/nds32-protos.h (nds32_data_alignment,
10792 nds32_local_alignment): Declare.
10793 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10794 nds32_local_alignment): New functions.
10795 (TARGET_CONSTANT_ALIGNMENT): Define.
10796 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10798 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10800 * config/nds32/nds32.c
10801 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10802 (TARGET_MODES_TIEABLE_P): Likewise.
10804 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10806 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10807 level Ofast and Og.
10809 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
10810 Chung-Ju Wu <jasonwucj@gmail.com>
10812 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10813 for unaligned access.
10814 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10816 * config/nds32/nds32-intrinsic.md: Likewise.
10817 * config/nds32/nds32_intrinsic.h: Likewise.
10818 * config/nds32/nds32.h (nds32_builtins): Likewise.
10819 * config/nds32/nds32.opt (munaligned-access): New option.
10820 * config/nds32/nds32.c (nds32_asm_file_start): Display
10821 flag_unaligned_access status.
10823 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10825 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10826 -mno-relax is present.
10827 * config/riscv/linux.h (LINK_SPEC): Ditto.
10829 2018-04-20 Martin Sebor <msebor@redhat.com>
10832 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10834 (gimple_fold_builtin_stxcpy_chk): Same.
10835 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10837 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
10840 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10841 __powikf2 when long double is IEEE 128-bit.
10843 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10845 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10846 step to make sure stack always aligned.
10848 2018-04-20 Carl Love <cel@us.ibm.com>
10851 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10852 size check for arg0.
10854 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
10855 Tom de Vries <tom@codesourcery.com>
10858 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10859 Emit insns for calls too.
10860 (nvptx_find_par): Always look for worker-level predecessor insn.
10861 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
10863 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10864 (nvptx_process_pars): Propagate frames for calls.
10866 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10869 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10871 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10872 (ix86_handle_option): Don't handle OPT_mibt.
10873 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10875 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10877 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10878 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10879 (ix86_target_macros): Define __CET__ with flag_cf_protection
10880 for -fcf-protection.
10881 * config/i386/i386.c (isa2_opts): Remove -mibt.
10882 * config/i386/i386.h (TARGET_IBT): Removed.
10883 (TARGET_IBT_P): Likewise.
10884 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10885 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10886 * config/i386/i386.opt (mcet): Update help message.
10887 (mshstk): Likewise.
10889 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10890 -mcet as an alias for -mshstk.
10892 2018-04-20 Richard Biener <rguenther@suse.de>
10894 PR middle-end/85475
10895 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10896 complexity by forcing a single use of the multiply operand.
10898 2018-04-20 Martin Jambor <mjambor@suse.cz>
10901 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10902 recursion dependency to only apply to non-clones.
10904 2018-04-20 Martin Jambor <mjambor@suse.cz>
10907 * ipa-cp.c (create_specialized_node): Check that clones of
10908 self-recursive edges exist during IPA-CP.
10910 2018-04-19 Toon Moene <toon@moene.org>
10912 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10915 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10917 PR tree-optimization/85467
10918 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10919 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10920 VECTOR_CST element to type.
10922 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10925 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10926 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10927 (builtin_longjmp): Likewise.
10928 (save_stack_nonlocal): New pattern.
10929 (restore_stack_nonlocal): Likewise.
10931 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10934 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10935 Replace ASM_OUTPUT_LABEL with fprintf.
10937 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10940 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10941 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10942 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10943 define __IBT__ and __SHSTK__ for -fcf-protection.
10944 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10946 (ix86_trampoline_init): Likewise.
10947 (x86_output_mi_thunk): Likewise.
10948 (ix86_notrack_prefixed_insn_p): Likewise.
10949 (ix86_option_override_internal): Don't disallow -fcf-protection.
10950 * config/i386/i386.md (rdssp<mode>): Also enable for
10952 (incssp<mode>): Likewise.
10953 (nop_endbr): Likewise.
10954 * config/i386/i386.opt (mcet): Change help message to built-in
10957 (mshstk): Likewise.
10958 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10959 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10960 enable CET built-in functions.
10962 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10964 * common/config/i386/i386-common.c
10965 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10966 OPTION_MASK_ISA_MOVDIRI_UNSET,
10967 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10968 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10969 * config.gcc (movdirintrin.h): New header.
10970 * config/i386/cpuid.h (bit_MOVDIRI,
10971 bit_MOVDIR64B): New bits.
10972 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10974 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10975 (VOID, PVOID, PCVOID)): New function types.
10976 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10977 __builtin_ia32_directstoreu_u64,
10978 __builtin_ia32_movdir64b): New builtins.
10979 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10980 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10982 (ix86_valid_target_attribute_inner_p): Ditto.
10983 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10984 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10985 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10986 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10987 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10988 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10989 (movdiri<mode>, movdir64b_<mode>): New.
10990 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10991 * config/i386/immintrin.h: Include movdirintrin.h.
10992 * config/i386/movdirintrin.h: New file.
10993 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10995 2018-04-19 Richard Biener <rguenther@suse.de>
10997 PR middle-end/85455
10998 * cfg.c (clear_bb_flags): When loop state says we have
10999 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11001 2018-04-19 Richard Biener <rguenther@suse.de>
11003 PR tree-optimization/84737
11004 * tree-vect-data-refs.c (vect_copy_ref_info): New function
11005 copying restrict info.
11006 (vect_setup_realignment): Use it.
11007 * tree-vectorizer.h (vect_copy_ref_info): Declare.
11008 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11009 the first DR to all generated stores.
11010 (vectorizable_load): Likewise for loads.
11012 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11014 PR tree-optimization/85446
11015 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11016 the integral and pointer types to have the same precision.
11018 * doc/install.texi: Document --disable-cet being the default and
11021 2018-04-18 Martin Liska <mliska@suse.cz>
11023 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11026 2018-04-18 Martin Liska <mliska@suse.cz>
11029 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11032 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11033 arguments if they are comparable.
11035 2018-04-18 Martin Liska <mliska@suse.cz>
11038 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11041 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11044 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
11047 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11048 ENDBR after calling __morestack.
11050 2018-04-18 David Malcolm <dmalcolm@redhat.com>
11053 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11054 by using gcc_base_ver to generate a gcc_driver_version, and use
11055 it when generating GCC_DRIVER_NAME.
11056 * configure: Regenerate.
11058 2018-04-18 Jakub Jelinek <jakub@redhat.com>
11061 * config.gcc: Obsolete powerpc*-*-*spe*.
11063 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11066 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11067 (stabstr_D): Change type of unum from unsigned int to
11068 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
11071 2018-04-17 Jim Wilson <jimw@sifive.com>
11074 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11075 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11076 Set arg_pointer_offset after using pretend_args_size.
11078 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11080 PR rtl-optimization/85431
11081 * dse.c (record_store): Ignore zero width stores.
11084 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11085 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11086 __builtin_stack_restore rather than after it.
11087 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11088 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11089 argument instead of virtual_dynamic_stack_rtx.
11091 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11093 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11095 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11096 Add note to error message to explain internal mapping of overloaded
11097 built-in function name to non-overloaded built-in function name.
11098 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11101 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11104 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11105 where the inputs overlap with the output.
11107 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11109 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11110 (=v, v) alternative and explicit "memory" attribute.
11111 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11112 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11114 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11115 "sselog1" type instead of "sselog".
11116 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11117 "sselog". Remove explicit "memory" attribute.
11118 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11119 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11121 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11122 "sselog1" type instead of "sselog". Remove explicit "memory"
11124 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11125 use "sselog1" type instead of "sselog". Remove explicit "memory"
11127 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11128 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11130 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11131 "sselog1" type instead of "sselog". Remove explicit "memory"
11133 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11134 use "sselog1" type instead of "sselog". Remove explicit "memory"
11138 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11140 PR middle-end/85414
11141 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11144 2018-04-17 Martin Jambor <mjambor@suse.cz>
11147 * ipa-cp.c (create_specialized_node): Call
11148 expand_all_artificial_thunks if necessary.
11150 2018-04-17 Martin Liska <mliska@suse.cz>
11153 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11154 in message, remote space in between '_G' and '('.
11156 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11159 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11160 avx512f_vmcmp<mode>3<round_saeonly_name>,
11161 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11162 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11163 avx512f_rndscale<mode><round_saeonly_name>,
11164 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11165 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11166 Use %<iptr>2 instead of %2 for -masm=intel.
11167 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11168 avx512f_vcvttss2usi<round_saeonly_name>,
11169 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11171 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11172 avx512f_vcvttsd2usi<round_saeonly_name>,
11173 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11174 Use %q1 instead of %1 for -masm=intel.
11175 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11176 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11177 of %3 for -masm=intel.
11178 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11180 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11182 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11184 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11185 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11187 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11189 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11190 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11191 %g1 and one with %0 and %1.
11192 (avx512er_vmrcp28<mode><round_saeonly_name>,
11193 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11194 %1 for -masm=intel.
11195 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11196 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11197 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11198 of %0 and %{%4%} for -masm=intel.
11199 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11200 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11201 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11202 order of %0 and %{%5%}%{z%} for -masm=intel.
11204 2018-04-17 Jan Hubicka <jh@suse.cz>
11207 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11209 2018-04-17 Martin Liska <mliska@suse.cz>
11212 * multiple_target.c (create_dispatcher_calls): Set apostrophes
11213 for target_clone error message. Make default implementation
11214 clone to be a local declaration.
11215 (separate_attrs): Add new argument and check for an empty
11217 (expand_target_clones): Handle it.
11218 (ipa_target_clone): Make redirection just for target_clones
11221 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
11222 Tom de Vries <tom@codesourcery.com>
11224 PR middle-end/84955
11225 * omp-expand.c (expand_oacc_for): Add dummy false branch for
11226 tiled basic blocks without omp continue statements.
11228 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
11231 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11232 vec_extract expression as having side effects to make sure it gets
11235 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
11238 * config/i386/i386.c (get_builtin_code_for_version): Check
11241 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
11244 * config.gcc: Support "skylake".
11245 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11247 * config/i386/i386.c (m_SKYLAKE): Define.
11248 (processor_target_table): Add "skylake".
11249 (ix86_option_override_internal): Add "skylake".
11250 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11251 PROCESSOR_CANNONLAKE.
11252 (get_builtin_code_for_version): Fix priority for
11253 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11254 PROCESSOR_SKYLAKE-AVX512.
11255 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11256 (processor_type): Add PROCESSOR_SKYLAKE.
11258 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11259 Jason Merrill <jason@redhat.com>
11262 * convert.c (convert_to_integer_1): Use direct recursion for
11263 enumeral types and types with a precision less than the number
11264 of bits in their mode.
11266 2018-04-16 Julia Koval <julia.koval@intel.com>
11269 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11270 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11272 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11275 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11276 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11277 and -mno-direct-move.
11279 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11282 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11283 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11284 Ensure negative shifts result in {0}.
11286 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11288 PR rtl-optimization/79916
11289 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11290 regs (if any) to define how to gnerate SD moves when LRA is in
11293 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11295 PR rtl-optimization/85393
11296 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11297 * except.c (expand_dw2_landing_pad_for_region): Make static.
11298 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11299 a label and unconditional jump to old_bb, rather than
11300 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11303 PR rtl-optimization/85376
11304 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11305 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11306 instead of a specific value.
11308 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11309 Bin Cheng <bin.cheng@arm.com>
11311 PR tree-optimization/82965
11312 PR tree-optimization/83991
11313 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11314 by_profile_only parameter.
11315 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11316 information if the loop was predicted to iterate too many times.
11317 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11319 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11322 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11325 2018-04-13 Martin Liska <mliska@suse.cz>
11326 Jakub Jelinek <jakub@redhat.com>
11328 PR middle-end/81657
11329 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11330 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11331 * builtins.c (expand_builtin_memory_copy_args): Use
11332 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11333 handle dest_addr == pc_rtx.
11335 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11338 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11339 asked to not generate direct moves.
11340 (fix_trunc<mode>si2_stfiwx): Similar.
11341 (fix_trunc<mode>si2_internal): Similar.
11343 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11346 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11347 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11348 lookup if dest in some wider mode is known to be const0_rtx and
11349 if so, record permanent equivalence for it to be ZERO_EXTEND of
11350 the narrower mode destination.
11352 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11354 * lto-streamer-out.c (output_function): Revert 259346.
11355 * omp-expand.c (expand_oacc_for): Likewise.
11357 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11359 PR rtl-optimization/85354
11360 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11361 * sel-sched.c (sel_global_init): ... here.
11363 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11366 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11367 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11368 mode for PE-COFF targets.
11369 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11370 (i386_pe_asm_lto_end): Likewise.
11371 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11372 (TARGET_ASM_LTO_END): Likewise.
11373 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11374 (i386_pe_asm_lto_start): New function.
11375 (i386_pe_asm_lto_end): Likewise.
11377 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11378 Richard Biener <rguenther@suse.de>
11380 PR middle-end/84955
11381 * lto-streamer-out.c (output_function): Fix CFG loop state before
11383 * omp-expand.c (expand_oacc_for): Handle calls to internal
11384 functions like regular functions.
11386 2018-04-12 Richard Biener <rguenther@suse.de>
11389 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11390 for the early LTO debug to properly generate references to it
11391 during DIE emission. Do not re-use that for the skeleton for
11393 (dwarf2out_early_finish): Likewise.
11395 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11398 * config/i386/sse.md
11399 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11400 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11401 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11402 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11403 and output is a reg, avoid creating invalid lowpart subreg, but
11404 instead split into a 512-bit move. Don't split if not AVX512VL,
11405 input is xmm16+ reg and output is a mem.
11406 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11407 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11408 xmm16+ reg and output is a mem.
11410 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11412 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11413 also for flag_dwarf2_cfi_asm.
11415 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11417 PR rtl-optimization/85342
11418 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11419 a bool scalar var inside of the loop instead. Don't try to update
11420 recog_data.operand after failed apply_change_group.
11422 2018-04-12 Tom de Vries <tom@codesourcery.com>
11425 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11426 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11427 array with flexible array member as array without given dimension.
11428 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11429 argument for undefined param to true.
11431 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11434 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11435 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11436 from PowerPC section.
11437 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11438 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11439 help text that is too long.
11440 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11441 help text that is too long.
11442 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11443 help text that is too long.
11445 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11447 * config/alpha/alpha.md (stack_probe_internal): Rename
11448 from "probe_stack". Update all callers.
11450 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11452 PR rtl-optimization/84566
11453 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11454 sched_macro_fuse_insns.
11456 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11459 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11460 (compute_block_dependences): ... from here.
11462 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11464 PR tree-optimization/85331
11465 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11466 from int to HOST_WIDE_INT.
11468 2018-04-11 Martin Jambor <mjambor@suse.cz>
11471 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11472 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11473 not the same as the source val.
11474 (cgraph_edge_brings_value_p): New parameter.
11475 (gather_edges_for_value): Pass destination value to
11476 cgraph_edge_brings_value_p.
11477 (perhaps_add_new_callers): Likewise.
11478 (get_info_about_necessary_edges): Likewise and exclude values brought
11479 only by self-recursive edges.
11480 (create_specialized_node): Redirect only clones of self-calling edges.
11481 (+self_recursive_pass_through_p): New function.
11482 (find_more_scalar_values_for_callers_subset): Use it.
11483 (find_aggregate_values_for_callers_subset): Likewise.
11484 (known_aggs_to_agg_replacement_list): Removed.
11485 (decide_whether_version_node): Re-calculate known constants for all
11486 remaining context clones.
11488 2018-04-11 Richard Biener <rguenther@suse.de>
11491 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11492 from early DWARF output.
11493 (dwarf2out_early_finish): Output line info unconditionally into
11494 early DWARF and add reference to it.
11496 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11499 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11500 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11501 other than V2DFmode using iptr mode attribute.
11502 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11504 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11506 PR rtl-optimization/84659
11507 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11509 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11512 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11514 (output_loc_list): Pass address of a dummy size variable even in the
11515 locview handling loop.
11516 (index_location_lists): Add comment on why skip_loc_list_entry can't
11519 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11522 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11525 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11528 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11529 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11530 and -mstring-compare-inline-limit.
11532 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11535 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11536 for stack clash protection in a register whenever we need it to be in
11539 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11541 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11542 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11544 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11547 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11549 (mlong-double-): Ditto.
11550 * config/rs6000/sysv4.opt (msdata=): Ditto.
11551 (mtls-size=): Ditto.
11553 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11555 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11556 erroneous entries for
11557 "vector int vec_ldl (int, long int *)", and
11558 "vector unsigned int vec_ldl (int, unsigned long int *)".
11559 Add comments and entries for
11560 "vector bool char vec_ldl (int, bool char *)",
11561 "vector bool short vec_ldl (int, bool short *)",
11562 "vector bool int vec_ldl (int, bool int *)",
11563 "vector bool long long vec_ldl (int, bool long long *)",
11564 "vector pixel vec_ldl (int, pixel *)",
11565 "vector long long vec_ldl (int, long long *)",
11566 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11567 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11568 type tree bool_long_long_type_node and correct definition of
11569 bool_V2DI_type_node to make reference to this new type tree.
11570 (rs6000_mangle_type): Replace erroneous reference to
11571 bool_long_type_node with bool_long_long_type_node.
11572 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11573 comments to emphasize sign distinctions for char and int types and
11574 replace RS6000_BTI_bool_long constant with
11575 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11576 use of RS6000_BTI_pixel.
11577 (bool_long_type_node): Remove this macro definition.
11578 (bool_long_long_type_node): New macro definition
11580 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11582 PR rtl-optimization/85300
11583 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11584 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11585 simplify_unary_operation fails.
11587 2018-04-10 Martin Liska <mliska@suse.cz>
11589 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11590 cgraph_edge and ipa_ref.
11592 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11596 * config/i386/sse.md
11597 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11598 computation of the VEC_MERGE selector from mask.
11599 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11600 Fix decoding of the VEC_MERGE selector into mask.
11602 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11604 PR tree-optimization/85286
11605 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11607 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11609 * final.c (final_1): Set insn_last_address as well as
11610 insn_current_address.
11612 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11615 * explow.c (emit_stack_probe): Call validize_mem on memory location
11616 before passing it to gen_probe_stack. Create address operand and
11617 legitimize it for the probe_stack_address case.
11619 2018-04-09 Jan Hubicka <jh@suse.cz>
11622 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11623 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11624 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11626 (free_lang_data): Rebuild type inheritance graph.
11628 2018-04-09 Martin Sebor <msebor@redhat.com>
11630 * invoke.texi (-finline-small-functions): Mention other optimization
11632 (-findirect-inlining, -fpartial-inlining): Same.
11633 (-finline-functions-called-once): Same.
11634 (-freorder-blocks-and-partition): Same.
11636 2018-04-09 Jan Hubicka <jh@suse.cz>
11639 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11640 jumps; choose last target that matches the criteria (i.e.
11641 no partition changes for non-crossing jumps).
11642 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11643 support for redirecting crossing jumps to non-crossing.
11645 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11647 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11648 also for naked functions.
11650 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11652 * config/arc/arc.md (add_shift): New pattern.
11653 (add_shift2): Likewise.
11654 (sub_shift): Likewise.
11655 (sub_shift_cmp0_noout): Likewise.
11656 (compare_si_ashiftsi): Likewise.
11657 (xbfu_cmp0_noout): New combine pattern.
11658 (xbfu_cmp0"): Likewise.
11659 (movsi_set_cc_insn): Place the predicable variant first.
11660 (commutative_binary_cmp0_noout): Remove clobber.
11661 (commutative_binary_cmp0): New pattern.
11662 (noncommutative_binary_cmp0): Likewise.
11663 (noncommutative_binary_cmp0_noout): Likewise.
11664 (noncommutative_binary_comparison_result_used): Removed.
11665 (rsub_cmp0): New pattern.
11666 (rsub_cmp0_noout): Likewise.
11667 (extzvsi): Changed, keep only meaningful variants.
11668 (SQH, SEZ): New iterators.
11669 (SQH_postfix): New mode attribute.
11670 (SEZ_prefix): New code attribute.
11671 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11672 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11673 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11674 of numerical value.
11675 (noncommutative_operator): Check the availability of barrel
11678 2018-04-09 Richard Biener <rguenther@suse.de>
11680 PR tree-optimization/85284
11681 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11682 Only use the niter constraining form of simple_iv when the exit
11683 is always executed.
11685 2018-04-09 Tom de Vries <tom@codesourcery.com>
11688 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11689 (define_expand "*memory_barrier"): New define_expand.
11690 (define_insn "memory_barrier"): New insn.
11692 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11694 PR rtl-optimization/80463
11695 PR rtl-optimization/83972
11696 PR rtl-optimization/83480
11698 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11699 correct producer for the insn.
11700 (tidy_control_flow): Fixup seqnos in case of debug insns.
11702 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11704 PR rtl-optimization/83913
11706 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11707 different sched-times when merging exprs.
11709 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11711 PR rtl-optimization/83962
11713 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11714 tidy_fallthru_edge and tidy_control_flow.
11716 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11718 PR rtl-optimization/83530
11720 * sel-sched.c (force_next_insn): New global variable.
11721 (remove_insn_for_debug): When force_next_insn is true, also leave only
11722 next insn in the ready list.
11723 (sel_sched_region): When the region wasn't scheduled, make another pass
11724 over it with force_next_insn set to 1.
11726 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11728 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11730 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11731 for interrupt control.
11732 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11733 functions for interrupt control.
11734 * config/nds32/nds32-intrinsic.md: Likewise.
11735 * config/nds32/nds32_intrinsic.h: Likewise.
11736 * config/nds32/nds32.h (nds32_builtins): Likewise.
11738 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11740 * config/nds32/nds32.c (nds32_init_machine_status,
11741 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11742 strict_aligned_p field.
11743 (nds32_expand_to_rtl_hook): New function.
11744 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11745 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11747 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11748 Chung-Ju Wu <jasonwucj@gmail.com>
11750 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11751 * config/nds32/nds32-n7.md: New file.
11752 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11753 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11755 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11756 * config/nds32/nds32.md (pipeline_model): Add n7.
11757 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11758 * config/nds32/pipelines.md: Include n7 settings.
11760 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11761 Chung-Ju Wu <jasonwucj@gmail.com>
11763 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11764 * config/nds32/nds32-e8.md: New file.
11765 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11766 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11768 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11769 * config/nds32/nds32.md (pipeline_model): Add e8.
11770 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11771 * config/nds32/pipelines.md: Include e8 settings.
11773 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11774 Chung-Ju Wu <jasonwucj@gmail.com>
11776 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11777 * config/nds32/nds32-n8.md: New file.
11778 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11779 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11781 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11782 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11783 * config/nds32/nds32.md (pipeline_model): Add n8.
11784 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11785 * config/nds32/pipelines.md: Include n8 settings.
11787 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11788 Chung-Ju Wu <jasonwucj@gmail.com>
11790 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11791 * config/nds32/nds32-n9-2r1w.md: New file.
11792 * config/nds32/nds32-n9-3r2w.md: New file.
11793 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11794 nds32_register_ports): New or modify for cpu n9.
11795 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11797 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11798 * config/nds32/nds32-utils.c: New file.
11799 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11800 TARGET_MUL_SLOW): Define.
11801 * config/nds32/nds32.md (pipeline_model): New attribute.
11802 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11803 New options that support cpu n9.
11804 * config/nds32/pipelines.md: Include n9 settings.
11805 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11807 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11809 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11810 information if necessary.
11811 (output_cond_branch_compare_zero): Likewise.
11812 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11813 (nds32_target_alignment): Refine for alignment.
11814 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11815 (FUNCTION_BOUNDARY): Modify.
11816 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11818 * config/nds32/nds32.opt (malways-align, malign-functions): New.
11820 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11822 * config/nds32/constants.md (unspec_volatile_element): Add values for
11823 TLB operation and data prefetch.
11824 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11825 functions for TLB operation and data prefetch.
11826 * config/nds32/nds32-intrinsic.md: Likewise.
11827 * config/nds32/nds32_intrinsic.h: Likewise.
11828 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11829 (nds32_print_operand): Likewise.
11830 * config/nds32/nds32.h (nds32_builtins): Likewise.
11832 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
11833 Andrew Pinski <pinsika@gcc.gnu.org>
11835 PR middle-end/82976
11836 * match.pd: Use constant_boolean_node of correct type instead of
11837 boolean_true_node or boolean_false_node for simplifying
11838 pointer comparisons to zero.
11840 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11842 PR tree-optimization/80021
11843 * tree.c (verify_type_variant): Make error call in verify_variant_match
11844 translatable and remove final full stop.
11846 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11848 * config/nds32/constants.md (unspec_volatile_element): Add
11849 UNSPEC_VOLATILE_EH_RETURN.
11850 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11851 nds32_output_stack_pop): Support dwarf exception handling process.
11852 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11853 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11854 exception handling process.
11855 (nds32_compute_stack_frame): Likewise.
11856 (nds32_return_addr_rtx): Likewise.
11857 (nds32_initial_elimination_offset): Likewise.
11858 (nds32_expand_prologue): Likewise.
11859 (nds32_expand_epilogue): Likewise.
11860 (nds32_dynamic_chain_address): New function.
11861 * config/nds32/nds32.h (machine_function): Add fields for dwarf
11862 exception handling.
11863 (DYNAMIC_CHAIN_ADDRESS): Define.
11864 (EH_RETURN_DATA_REGNO): Define.
11865 (EH_RETURN_STACKADJ_RTX): Define.
11866 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11867 patterns for dwarf exception handling.
11869 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11871 * config/nds32/nds32.h: Clean up obsolete macros.
11873 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11875 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11876 Add enum values for particular instructions.
11877 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11878 particular intrinsic functions.
11879 * config/nds32/nds32-intrinsic.md: Likewise.
11880 * config/nds32/nds32_intrinsic.h: Likewise.
11881 * config/nds32/nds32.h (nds32_builtins): Likewise.
11882 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11883 (btst, ave): New patterns for particular instructions.
11885 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11887 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11888 Add enum values for atomic load/store and memory sync.
11889 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11891 * config/nds32/nds32-intrinsic.md: Likewise.
11892 * config/nds32/nds32_intrinsic.h: Likewise.
11893 * config/nds32/nds32.h (nds32_builtins): Likewise.
11895 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11897 PR tree-optimization/85257
11898 * fold-const.c (native_encode_vector): If not all elts could fit
11899 and off is -1, return 0 rather than offset.
11900 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11901 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11902 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11903 adjust buffer in native_interpret_expr call.
11905 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11907 * config/nds32/constants.md (unspec_volatile_element): Add cache
11908 control enum values.
11909 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11910 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11911 * config/nds32/nds32.c (nds32_cctl_names): New.
11912 (nds32_print_operand): Handle cache control register names.
11913 * config/nds32/nds32.h (nds32_builtins): New enum values.
11914 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11916 * config/nds32/nds32.md (type): Add mmu.
11917 * config/nds32/pipelines.md (simple_insn): Add mmu.
11919 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11921 * config/nds32/nds32.md (type): Remove call.
11922 * config/nds32/pipelines.md (simple_insn): Likewise.
11924 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11926 * config/nds32/constants.md (unspec_volatile_element): Add
11927 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11928 UNSPEC_VOLATILE_FMFCFG.
11929 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11930 description for fmfcfg and fmfcsr.
11931 (bdesc_1arg): Add fmtcsr.
11932 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11933 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11934 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11935 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11936 unspec_fmfcfg): New patterns.
11937 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11938 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11939 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11940 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11941 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11942 __nds32__fmfcfg): Define.
11944 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11946 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11947 intrinsic register names.
11948 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11949 intrinsic register enum values and macros.
11951 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11953 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11954 for load/store addressing form.
11955 (nds32_print_operand_address): Likewise.
11957 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11960 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11961 based on LABEL_REF. Remove useless assertion.
11962 (pic_address_needs_scratch): Fix formatting.
11963 (sparc_legitimize_pic_address): Minor tweaks.
11964 (sparc_delegitimize_address): Adjust assertion accordingly.
11965 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11966 into symbolic_operand.
11967 (movsi_high_pic_label_ref): Likewise.
11968 (movsi_lo_sum_pic_label_ref): Likewise.
11969 (movdi_pic_label_ref): Likewise.
11970 (movdi_high_pic_label_ref): Likewise.
11971 (movdi_lo_sum_pic_label_ref): Likewise.
11973 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11975 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11976 custom LIB_SPEC setup.
11978 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11979 Kito Cheng <kito.cheng@gmail.com>
11981 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11982 * config/riscv/freebsd.h: New.
11984 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11986 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11987 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11990 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11991 Kito Cheng <kito.cheng@gmail.com>
11993 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11994 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11995 * config/nds32/nds32-protos.h (nds32_output_call,
11996 nds32_output_return): Declare.
11997 * config/nds32/nds32.md: Refine all the call and return patterns.
11999 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12002 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12003 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12005 PR rtl-optimization/84872
12006 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12007 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12008 EDGE_CROSSING edge.
12010 2018-04-06 Tamar Christina <tamar.christina@arm.com>
12012 * expr.c (copy_blkmode_to_reg): Revert 254862.
12013 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12015 2018-04-06 Richard Biener <rguenther@suse.de>
12017 PR middle-end/85244
12018 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12019 after seeing a component reference with an adjacent field. Treat
12020 refs to arrays at struct end of external decls similar to
12021 refs to unconstrained commons.
12023 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12026 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12027 look through SAVE_EXPRs with non-side-effects argument. Adjust
12029 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12032 2018-04-06 Richard Biener <rguenther@suse.de>
12034 PR middle-end/85180
12035 * alias.c (find_base_term): New wrapper around find_base_term
12036 unwinding CSELIB_VAL_PTR changes.
12037 (find_base_term): Do not restore CSELIB_VAL_PTR during the
12040 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12042 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12044 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12045 constant definitions.
12046 ("nop"): lr 0,0 -> nopr r0
12047 ("nop_lr0", "nop_lr1"): New insn definitions.
12049 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12051 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12052 NDS32_V3PUSH_AVAILABLE_P macro.
12054 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
12055 Chung-Ju Wu <jasonwucj@gmail.com>
12057 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12058 (nds32*-*-*): Add float and fpu_config into supported_defaults.
12059 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12060 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12061 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12062 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12063 * config/nds32/constraints.md: New constraints and checking for hard
12064 float configuration.
12065 * config/nds32/iterators.md: New mode iterator and attribute for hard
12066 float configuration.
12067 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12069 * config/nds32/nds32-fpu.md: New file.
12070 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12071 deal with hard float code generation.
12072 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12074 (abi_type, float_reg_number): New enum type.
12075 * config/nds32/nds32-predicates.c: New predicates for hard float.
12076 * config/nds32/nds32-protos.h: Declare functions for hard float.
12077 * config/nds32/nds32.c: Implementation for hard float configuration.
12078 * config/nds32/nds32.h: Definitions for hard float configuration.
12079 * config/nds32/nds32.md: Include hard float machine description and
12080 modify patterns for hard float configuration.
12081 * config/nds32/nds32.opt: New options for hard float configuration.
12082 * config/nds32/predicates.md: New predicates for hard float
12085 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12087 * common/config/nds32/nds32-common.c
12088 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12090 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12092 PR middle-end/85195
12093 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12094 CONSTRUCTOR_ELT (ctor, ...)->value.
12096 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12099 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12101 2018-04-05 Tom de Vries <tom@codesourcery.com>
12104 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12107 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12108 Kito Cheng <kito.cheng@gmail.com>
12110 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12111 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12112 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12113 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12115 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12116 Kito Cheng <kito.cheng@gmail.com>
12118 * config/nds32/constraints.md (Ufe): New memory constraint.
12119 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12120 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12121 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12123 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12124 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12126 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12128 * config/nds32/nds32.md: Use optimize_size in the condition for
12129 alu-shift instructions.
12131 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12133 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12135 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12137 * config/nds32/nds32.md (negsi2): Refine pattern.
12139 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12140 Chung-Ju Wu <jasonwucj@gmail.com>
12142 * config/nds32/iterators.md (shift_rotate): New code iterator.
12143 (shift): New code attribute.
12144 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12145 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12146 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12147 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12148 bit-wise operations.
12149 (andsi3, *andsi3): Ditto.
12150 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12151 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12152 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12153 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12154 nds32_ior_operand, nds32_xor_operand): New predicates.
12156 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12158 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12159 (addsi3, subsi3): ... this.
12161 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12163 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12165 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12167 * config/nds32/nds32.md: Adjust indention.
12169 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12171 * config/nds32/nds32.md (feature): New attribute.
12173 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12175 * config/nds32/nds32.md (subtype): New attribute.
12177 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12180 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12181 expansion to perform a bitwise AND of the argument followed by a
12182 boolean negation of the result.
12184 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12186 PR rtl-optimization/84878
12187 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12188 the basic block. Assert the use reference is not artificial and that
12189 it has an associated insn.
12191 2018-04-04 Michael Matz <matz@suse.de>
12193 * builtins.c (compute_objsize): Pass correct operand
12194 to array_at_struct_end_p.
12196 2018-04-04 Richard Biener <rguenther@suse.de>
12199 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12200 from contexts for DINFO_LEVEL_TERSE and below.
12202 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12204 * config/nds32/nds32-doubleword.md (move_<mode>): Require
12205 resiter_operand condition.
12206 * config/nds32/nds32.md (*move<mode>): Ditto.
12208 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12209 Monk Chiang <sh.chiang04@gmail.com>
12211 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12213 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12215 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12217 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12218 Kito Cheng <kito.cheng@gmail.com>
12220 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12221 nds32_cond_code_str, output_cond_branch,
12222 output_cond_branch_compare_zero, nds32_expand_cbranch,
12223 nds32_expand_cstore, nds32_expand_movcc,
12224 nds32_output_cbranchsi4_equality_zero,
12225 nds32_output_cbranchsi4_equality_reg,
12226 nds32_output_cbranchsi4_equality_reg_or_const_int,
12227 nds32_output_cbranchsi4_greater_less_zero: New functions.
12228 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12229 nds32_expand_cstore, nds32_expand_movcc,
12230 nds32_output_cbranchsi4_equality_zero,
12231 nds32_output_cbranchsi4_equality_reg,
12232 nds32_output_cbranchsi4_equality_reg_or_const_int,
12233 nds32_output_cbranchsi4_greater_less_zero): Declare.
12234 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12235 nds32_rimm11s_operand): New predicates.
12236 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12237 * config/nds32/nds32.md: Rewrite all the branch and conditional move
12240 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12242 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12243 * config/nds32/nds32.md: Ditto.
12244 * config/nds32/pipelines.md: Ditto.
12246 2018-04-04 Richard Biener <rguenther@suse.de>
12248 PR tree-optimization/85168
12249 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12250 propagating abnormals.
12252 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12254 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12256 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12257 Kito Cheng <kito.cheng@gmail.com>
12259 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12260 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12261 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12262 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12263 * config/nds32/nds32.md (sibcall_internal): New.
12264 (sibcall_register): Remove.
12265 (sibcall_immediate): Remove.
12266 (sibcall_value_internal): New.
12267 (sibcall_value_register): Remove.
12268 (sibcall_value_immediate): Remove.
12269 * config/nds32/predicates.md (nds32_general_register_operand): New.
12270 (nds32_call_address_operand): New.
12272 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12274 PR rtl-optimization/85167
12275 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12276 bb_defs if *split_p, instead preinitialize it to NULL.
12278 PR tree-optimization/85156
12279 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12280 evaluating the argument multiple times.
12282 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12284 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12286 (_mm_cvtpd_ps): Likewise.
12287 (_mm_cvttpd_epi32): Likewise.
12288 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12289 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12290 vector, pixel, and bool following altivec.h include.
12292 2018-04-03 Martin Sebor <msebor@redhat.com>
12294 * doc/extend.texi (Common Function Attributes): Clarify.
12295 (const attribute): Likewise.
12296 (pure attribute): Likewise.
12298 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12301 * config/i386/i386.c (ix86_expand_vector_set): Use
12302 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12304 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12306 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12307 instructions when changing rounding bits to preserve precision bits
12308 in the x87 control word.
12310 2018-04-03 Martin Liska <mliska@suse.cz>
12312 PR tree-optimization/82491
12313 * rtl.h (strip_offset_and_add): Replace += suboffset with
12314 poly_uint64 () + suboffset.
12316 2018-03-29 Martin Liska <mliska@suse.cz>
12317 Martin Jambor <mjambor@suse.cz>
12320 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12321 param_type is not an integral or pointer type.
12323 2018-04-03 Richard Biener <rguenther@suse.de>
12325 * sese.h (recompute_all_dominators): Remove.
12327 2018-04-02 Martin Sebor <msebor@redhat.com>
12329 * doc/invoke.texi (-Wrestrict): Fix typos.
12331 2018-04-02 Jim Wilson <jimw@sifive.com>
12333 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12334 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12335 (<optab>di3, <optab>si3_extend): Likewise.
12336 (<optab>si3_mask, <optab>si3_mask_1): New.
12337 (<optab>di3_mask, <optab>di3_mask_1): New.
12338 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12339 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12340 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12342 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12344 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12347 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12349 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12350 (nds32_canonicalize_comparison): New function.
12352 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12353 Kito Cheng <kito.cheng@gmail.com>
12354 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12356 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12357 * config/nds32/constants.md (unspec_volatile_element): Add
12358 UNSPEC_VOLATILE_RELAX_GROUP.
12359 * config/nds32/nds32-relax-opt.c: New file.
12360 * config/nds32/nds32-predicates.c
12361 (nds32_symbol_load_store_p): New function.
12362 * config/nds32/nds32-protos.h
12363 (nds32_symbol_load_store_p): Declare function.
12364 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12365 * config/nds32/nds32.c
12366 (nds32_register_pass): New function to register pass.
12367 (nds32_register_passes): New function to register passes.
12368 * config/nds32/nds32.md (relax_group): New pattern.
12369 * config/nds32/nds32.opt (mrelax-hint): New option.
12370 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12372 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12374 * config/nds32/t-nds32: Modify files dependency.
12376 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12378 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12379 (PROFILE_HOOK): Define its implementation.
12381 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12383 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12384 type and 32-bit size.
12386 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12388 PR middle-end/85090
12389 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12390 (V_128_256): New mode iterator.
12391 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12392 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12393 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12395 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12396 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12398 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12401 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12402 NaN inputs correctly.
12404 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12407 * config/rs6000/vsx.md (??r): New mode attribute.
12408 (*vsx_mov<mode>_64bit): Use it.
12409 (*vsx_mov<mode>_32bit): Likewise.
12411 2018-03-30 Martin Sebor <msebor@redhat.com>
12413 PR tree-optimization/84818
12414 * builtins.c (check_access): Use warning_n.
12416 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12419 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12421 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12424 2018-03-30 Julia Koval <julia.koval@intel.com>
12427 * x86-tune.def (movx, partial_reg_dependency): Enable for
12430 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12432 PR inline-asm/84985
12433 * lra-constraints.c (process_alt_operands): Move setting
12434 this_alternative_matches below.
12436 2018-03-29 Martin Liska <mliska@suse.cz>
12439 * doc/invoke.texi: Document how LTO works with debug info.
12440 Describe auto-load support of binutils. Mention 'x86-64'
12441 as valid option value of -march option.
12443 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12445 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12448 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12449 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12450 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12453 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12456 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12457 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12458 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12459 for RS6000_BTM_POWERPC64.
12460 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12461 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12462 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12465 (DIVDEU): Likewise.
12467 2018-03-28 Carl Love <cel@us.ibm.com>
12470 2017-09-27 Carl Love <cel@us.ibm.com>
12472 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12473 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12474 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12477 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12479 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12480 instead of __vector bool.
12481 (_mm_max_pu8): Likewise.
12482 (_mm_min_pi16): Likewise.
12484 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12487 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12488 (DIVWEUO): Likewise.
12489 (DIVDEO): Likewise.
12490 (DIVDEUO): Likewise.
12491 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12492 DIVWEUO and DIVDEUO.
12493 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12494 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12495 (div_extend): Likewise.
12496 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12498 (__builtin_divweuo): Likewise.
12499 (__builtin_divdeo): Likewise.
12500 (__builtin_divdeuo): Likewise.
12502 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12505 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12506 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12508 PR tree-optimization/82004
12509 * gimple-match-head.c (optimize_pow_to_exp): New function.
12510 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12511 Don't fold to exp if optimize_pow_to_exp is false.
12513 2018-03-28 Martin Liska <mliska@suse.cz>
12516 * calls.c (initialize_argument_information): Fix trailing space.
12517 * common.opt: Fix typo and provide better explanation for
12518 -fsanitize-coverage option.
12519 * config/i386/i386.opt: Fix typo.
12521 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12522 Martin Liska <mliska@suse.cz>
12525 * gimplify.c (asan_poison_variable): Don't do the check for
12526 gimplify_omp_ctxp here.
12527 (gimplify_decl_expr): Do it here.
12528 (gimplify_target_expr): Likewise.
12530 2018-03-28 Martin Liska <mliska@suse.cz>
12533 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12534 chkp_type_bounds_count if MPX is not enabled.
12536 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12538 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12540 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12543 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12544 function to create the function decl for complex long double
12545 multiply and divide for -mabi=ieeelongdouble.
12546 (init_float128_ieee): Call it.
12548 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12551 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12552 -fcf-protection=branch -mibt.
12553 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12555 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12558 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12559 arm_word_relocations.
12561 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12564 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12565 extern array declarations.
12567 2018-03-27 Richard Biener <rguenther@suse.de>
12569 PR middle-end/84067
12570 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12571 explicit single_use checks.
12573 2018-03-27 Richard Biener <rguenther@suse.de>
12575 PR tree-optimization/85082
12576 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12579 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12581 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12582 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12583 Turn on fasynchronous-unwind-tables and funwind-tables.
12585 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12588 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12589 (*bmi_blsr_<mode>_ccz): Ditto.
12591 2018-03-26 Tom de Vries <tom@codesourcery.com>
12593 PR tree-optimization/85063
12594 * omp-general.c (offloading_function_p): New function. Factor out
12596 * omp-offload.c (pass_omp_target_link::gate): ... here.
12597 * omp-general.h (offloading_function_p): Declare.
12598 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12599 with attribute omp declare target for offloading functions.
12601 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12603 PR tree-optimization/84005
12604 * tree-data-ref.h (get_base_for_alignment): Declare.
12605 * tree-data-ref.c (get_base_for_alignment_1): New function.
12606 (get_base_for_alignment): Likewise.
12607 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12608 get_base_for_alignment to find a suitable base object, instead
12609 of always using drb->base_address.
12611 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12613 PR inline-asm/85022
12614 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12615 known size by default.
12617 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12619 PR inline-asm/85030
12620 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12621 and non BLKmode operands.
12623 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12626 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12627 Clean up attributes.
12629 2018-03-23 Richard Biener <rguenther@suse.de>
12632 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12633 we are going to emit early debug for LTO.
12635 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12637 PR inline-asm/85034
12638 * function.c (match_asm_constraints_1): Don't optimize if input
12639 doesn't satisfy general_operand predicate for output's mode.
12641 PR inline-asm/85022
12642 * alias.c (write_dependence_p): Don't require for x_canonicalized
12643 non-VOIDmode if x has VOIDmode.
12646 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12647 just don't try to optimize it rather than assert it never happens.
12649 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12651 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12652 macro expansions for definition of ST_INTERNAL_<mode> and
12653 LD_INTERNAL_<mode> builtins.
12654 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12656 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12658 (altivec_expand_st_builtin): Likewise.
12659 (altivec_expand_builtin): Remove calls to deleted functions.
12660 (rs6000_address_for_altivec): Delete this function.
12661 * config/rs6000/vector.md: Remove expands for
12662 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12664 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12667 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12668 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12669 re-computing once computed.
12670 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12671 (arm_init_machine_status): Initialize
12672 machine->static_chain_stack_bytes.
12674 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12677 * doc/extend.texi: Add four new prototypes for vec_ld.
12678 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12679 definitions for more logical presentation.
12680 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12681 entries for V1TI variants of __builtin_altivec_ld builtin.
12682 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12683 handling of V1TI variant of LVX icode pattern.
12684 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12685 (rs6000_gimple_fold_builtin): Likewise.
12686 (altivec_init_builtins): Add code to define
12687 __builtin_altivec_lvx_v1ti function.
12689 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12691 PR inline-asm/84941
12692 * function.c (match_asm_constraints_1): Don't do the optimization
12693 if input isn't a REG, SUBREG, MEM or constant.
12695 2018-03-22 Tom de Vries <tom@codesourcery.com>
12697 PR tree-optimization/84956
12698 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12699 bb_has_abnormal_pred.
12701 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12704 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12705 DECL_INITIAL (decl) to decl at the end.
12706 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12707 adjust the comment.
12709 2018-03-21 Joseph Myers <joseph@codesourcery.com>
12711 * doc/extend.texi (__builtin_tgmath): Document when complex
12712 integer types are treated as _Complex _Float64.
12714 2018-03-21 Tom de Vries <tom@codesourcery.com>
12716 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12718 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12720 PR tree-optimization/84960
12721 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12722 if it is ENTRY block, move them into single succ of ENTRY in that case.
12724 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12726 PR tree-optimization/84811
12727 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12728 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12729 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12730 (known_subrange_p): Update accordingly. Cast each value involved
12731 in the size comparison, rather than casting the result of the
12734 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12736 PR tree-optimization/84982
12737 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12738 by flipping the least significant bit rather than all bits from
12739 bitpos to bitpos + bitsize - 1.
12741 2018-03-21 Nathan Sidwell <nathan@acm.org>
12743 * doc/extend.texi (Deprecated Features): Remove mention of
12744 long-deleted deprecations.
12746 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12749 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12750 * configure: Regenerate.
12752 2018-03-21 Tom de Vries <tom@codesourcery.com>
12754 PR tree-optimization/83126
12755 * tree-parloops.c (num_phis): New function.
12756 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12758 2018-03-21 Nathan Sidwell <nathan@acm.org>
12760 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12761 mention anon-struct/union members and trailing attributes.
12763 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12765 PR tree-optimization/84969
12766 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12767 builtin memset partitions if they set different rhs values.
12769 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12771 PR rtl-optimization/84989
12772 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12773 VEC_DUPLICATE with scalar result mode.
12775 2018-03-21 Martin Liska <mliska@suse.cz>
12778 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12779 not intended return statement.
12781 2018-03-21 Martin Liska <mliska@suse.cz>
12784 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12785 (chkp_find_bound_slots_1): Limit number of iterations.
12787 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
12790 * Minor grammar fixes for x86 options.
12792 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12795 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12796 holding REG_CFA_RESTORE notes, instead turn them into a USE.
12798 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
12801 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12802 (altivec_lvx_<mode>_1op): Likewise.
12803 (altivec_stvx_<mode>_2op): Likewise.
12804 (altivec_stvx_<mode>_1op): Likewise.
12805 (altivec_lvx_<VM2:mode>): New define_expand.
12806 (altivec_stvx_<VM2:mode>): Likewise.
12807 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12808 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12809 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12810 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12811 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12812 (rs6000_gen_lvx): Likewise.
12813 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12814 (altivec_expand_stv_builtin): Likewise.
12815 (altivec_expand_builtin): Likewise.
12816 * config/rs6000/vector.md: Likewise.
12818 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12821 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12824 2018-03-20 Richard Biener <rguenther@suse.de>
12827 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12828 sign-conversions as zero, fall back to standard scalar_stmt
12831 2018-03-20 Martin Liska <mliska@suse.cz>
12834 * predict.c (rebuild_frequencies): Handle case when we have
12835 PROFILE_ABSENT, but flag_guess_branch_prob is false.
12837 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12840 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12841 flag_section_anchors.
12842 * varasm.c (use_blocks_for_decl_p): Remove hack for
12843 dw2_force_const_mem.
12846 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12848 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
12849 be created, use lowpart_subreg of operands[0] rather than operands[0]
12851 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12852 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12853 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12854 and n constraint instead of aarch64_shift_imm_di and Usd.
12855 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12856 (*aarch64_<optab>_reg_minus<mode>3): ... this.
12858 2018-03-20 Sudakshina Das <sudi.das@arm.com>
12861 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12862 to favor GPR over NEON registers.
12863 (<shift>di3_neon): Likewise.
12865 2018-03-20 Tom de Vries <tom@codesourcery.com>
12868 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12869 (nvptx_process_pars): Emit bar.sync asap and alap.
12871 2018-03-20 Tom de Vries <tom@codesourcery.com>
12874 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12875 seen_label if seen_label is already set.
12877 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12880 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12881 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12882 Use 1U instead of 1. Formatting fixes.
12885 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12886 instead of TREE_TYPE (s1) for the return value.
12888 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12890 PR tree-optimization/84946
12891 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12892 bitsize + bitsize in poly_uint64 rather than poly_int64.
12895 * dwarf2asm.c: Include fold-const.c.
12896 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12897 of decl rather than decl itself.
12899 PR rtl-optimization/84643
12900 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12902 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12905 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12906 calling assemble_variable.
12908 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12911 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12912 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12914 2018-03-19 Jim Wilson <jimw@sifive.com>
12917 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12918 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12919 (riscv_first_stack_step): Likewise.
12920 (riscv_option_override): Use STACK_BOUNDARY instead of
12921 MIN_STACK_BOUNDARY.
12922 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12923 MIN_STACK_BOUNDARY.
12924 (BIGGEST_ALIGNMENT): Set to 128.
12925 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12926 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12929 2018-03-19 Richard Biener <rguenther@suse.de>
12931 PR tree-optimization/84933
12932 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12933 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12935 2018-03-19 Richard Biener <rguenther@suse.de>
12937 PR tree-optimization/84859
12938 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12939 (cond_if_else_store_replacement): Perform sinking operation on
12940 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12941 Generalize what a BB with a single eligible store is.
12943 2018-03-19 Richard Biener <rguenther@suse.de>
12945 PR tree-optimization/84929
12946 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12947 chrec_is_positive against non-chrec arg.
12949 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12952 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12954 2018-03-18 Martin Liska <mliska@suse.cz>
12956 PR rtl-optimization/84635
12957 * regrename.c (build_def_use): Use matches_mode only when
12960 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12962 PR tree-optimization/84913
12963 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12964 vectorize chains of COND_EXPRs.
12966 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12968 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12970 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12972 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12974 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12976 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12978 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12979 Kito Cheng <kito.cheng@gmail.com>
12981 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12982 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12983 (nds32_adjust_reg_alloc_order): New function.
12984 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12986 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12988 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12989 nds32_print_operand, nds32_print_operand_address): Use
12990 HOST_WIDE_INT_PRINT_DEC instead.
12992 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12994 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12996 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12999 * config/i386/i386.c (initial_ix86_tune_features,
13000 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13001 unsigned long long.
13002 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13003 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13004 rather than 1u << ix86_tune. Formatting fix.
13005 (ix86_option_override_internal): Change ix86_arch_mask from
13006 unsigned int to unsigned HOST_WIDE_INT, initialize to
13007 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13008 (ix86_function_specific_restore): Likewise.
13010 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13013 * postreload.c (reload_combine_recognize_pattern): Perform
13014 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13015 truncate_int_for_mode the result for the destination's mode.
13018 * hsa-gen.c (mem_type_for_type): Fix comment typo.
13019 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13021 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13024 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
13027 * lra-assigns.c (lra_split_hard_reg_for): Don't use
13028 regno_allocno_class_array and sorted_pseudos.
13029 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13030 insns where regno is used.
13032 2018-03-16 Martin Liska <mliska@suse.cz>
13035 * multiple_target.c (create_dispatcher_calls): Redirect
13036 reference in the symbol table.
13038 2018-03-16 Martin Liska <mliska@suse.cz>
13041 * multiple_target.c (create_dispatcher_calls): Redirect also
13044 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13048 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13049 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13050 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13052 2018-03-16 Julia Koval <julia.koval@intel.com>
13054 * doc/invoke.texi (Skylake Server): Add CLWB.
13055 Cannonlake): Remove CLWB.
13057 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13059 PR tree-optimization/84841
13060 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13062 (FLOAT_ONE_CONST_TYPE): Define.
13063 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13064 (sort_by_operand_rank): Put entries with higher constant_type last
13065 rather than first to match comments.
13067 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
13069 * config/nios2/nios2.md (movsi_internal): Fix thinko in
13072 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13075 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13076 check and use address of target always.
13078 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13081 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13082 (indirect_thunk_bnd_needed): Likewise.
13083 (indirect_thunks_used): Likewise.
13084 (indirect_thunks_bnd_used): Likewise.
13085 (indirect_return_needed): New.
13086 (indirect_return_bnd_needed): Likewise.
13087 (output_indirect_thunk_function): Add a bool argument for
13089 (output_indirect_thunk_function): Don't generate alias for
13090 function return thunk.
13091 (ix86_code_end): Call output_indirect_thunk_function to generate
13092 function return thunks.
13093 (ix86_output_function_return): Set indirect_return_bnd_needed
13094 and indirect_return_needed instead of indirect_thunk_bnd_needed
13095 and indirect_thunk_needed.
13097 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13099 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13100 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13101 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13103 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13104 Paul Hua <paul.hua.gm@gmail.com>
13107 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13109 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13111 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13112 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13113 resp. SFmode cases.
13115 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13118 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13119 instead of GET_MODE_SIZE when comparing Units.
13121 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13124 * varasm.c (hash_section): Return an unchangeble hash value
13125 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13126 Return !aarch64_can_use_per_function_literal_pools_p ().
13128 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13131 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13132 rather than address of cmode as last argument to prepare_cmp_insn.
13134 2018-03-15 Julia Koval <julia.koval@intel.com>
13136 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13137 F_AVX512VNNI, F_AVX512BITALG): New.
13139 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13142 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13143 insn for floating-point loads and stores.
13145 2018-03-14 Carl Love <cel@us.ibm.com>
13147 * config/rs6000/rs6000-c.c: Add macro definitions for
13148 ALTIVEC_BUILTIN_VEC_PERMXOR.
13149 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13150 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13151 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13152 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13154 * config/doc/extend.texi: Add prototypes for vec_permxor.
13156 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13159 * diagnostic-show-locus.c (class layout_point): Convert m_line
13160 from int to linenum_type.
13161 (line_span::comparator): Use linenum "compare" function when
13162 comparing line numbers.
13163 (test_line_span): New function.
13164 (layout_range::contains_point): Convert param "row" from int to
13166 (layout_range::intersects_line_p): Likewise.
13167 (layout::will_show_line_p): Likewise.
13168 (layout::print_source_line): Likewise.
13169 (layout::should_print_annotation_line_p): Likewise.
13170 (layout::print_annotation_line): Likewise.
13171 (layout::print_leading_fixits): Likewise.
13172 (layout::annotation_line_showed_range_p): Likewise.
13173 (struct line_corrections): Likewise for field m_row.
13174 (line_corrections::line_corrections): Likewise for param "row".
13175 (layout::print_trailing_fixits): Likewise.
13176 (layout::get_state_at_point): Likewise.
13177 (layout::get_x_bound_for_row): Likewise.
13178 (layout::print_line): Likewise.
13179 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13180 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13181 * input.c (selftest::test_linenum_comparisons): New function.
13182 (selftest::input_c_tests): Call it.
13183 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13184 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13185 * selftest.h (ASSERT_GT): New macro.
13186 (ASSERT_GT_AT): New macro.
13187 (ASSERT_LT): New macro.
13188 (ASSERT_LT_AT): New macro.
13190 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
13192 PR rtl-optimization/84780
13193 * combine.c (distribute_links): Don't make a link based on pc_rtx.
13195 2018-03-14 Martin Liska <mliska@suse.cz>
13197 * tree.c (record_node_allocation_statistics): Use
13198 get_stats_node_kind.
13199 (get_stats_node_kind): New function extracted from
13200 record_node_allocation_statistics.
13201 (free_node): Use get_stats_node_kind.
13203 2018-03-14 Richard Biener <rguenther@suse.de>
13205 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13206 that the value-set of ANTIC_IN doesn't grow.
13209 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13211 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13212 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13214 2018-03-14 Julia Koval <julia.koval@intel.com>
13216 * config.gcc (icelake-client, icelake-server): New.
13218 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13219 (initial_ix86_arch_features): Ditto.
13220 (PTA_SKYLAKE): Add SGX.
13221 (PTA_ICELAKE): Remove.
13222 (PTA_ICELAKE_CLIENT): New.
13223 (PTA_ICELAKE_SERVER): New.
13224 (ix86_option_override_internal): Split up icelake on icelake client and
13226 (get_builtin_code_for_version): Ditto.
13227 (fold_builtin_cpu): Ditto.
13228 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13229 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13230 * config/i386/i386.h (processor_type): Ditto.
13231 * doc/invoke.texi: Ditto.
13233 2018-03-14 Jakub Jelinek <jakub@redhat.com>
13236 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13237 INTEGER_CST offset, add it together with bitpos / 8 and
13238 sign extend based on POINTER_SIZE.
13242 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
13245 * config/i386/constraints.md (Yc): New register constraint.
13246 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13247 Use Yc constraint for alternative 2 of operand 0. Remove
13248 preferred_for_speed attribute.
13250 2018-03-14 Richard Biener <rguenther@suse.de>
13252 PR tree-optimization/84830
13253 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13254 with the old one to avoid oscillations.
13256 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13259 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13261 (assign_by_spills): Return a flag of reload assignment failure.
13262 Do not process the reload assignment failures. Do not spill other
13263 reload pseudos if they has the same reg class. Update n if
13265 (lra_assign): Add a return arg. Set up from the result of
13266 assign_by_spills call.
13267 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13268 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13269 usage_insns if it is not NULL.
13270 (spill_hard_reg_in_range): New function.
13271 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13272 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13273 function prototypes.
13274 (lra_assign): Change prototype.
13275 * lra.c (lra): Add code to deal with fails by splitting hard reg
13278 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13280 * config/riscv/riscv.opt (mrelax): New option.
13281 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13282 "norelax" when riscv_mrelax is disabled.
13283 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13285 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13288 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13289 reassociation for int modes.
13291 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13293 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13294 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13296 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13297 * config/aarch64/aarch64-sve.md
13298 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13299 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13300 (*extend<mode><Vwide>2): Rename to...
13301 (aarch64_sve_extend<mode><Vwide>2): ...this.
13302 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13303 renaming the old pattern to...
13304 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13306 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13307 define_expand, renaming the old pattern to...
13308 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13309 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13310 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13311 account when deciding which SVE instruction the optab should use.
13312 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13314 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13316 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13317 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13318 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13319 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13320 (tlsdesc_small_<mode>): Turn a define_expand and use
13321 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13322 (tlsdesc_small_advsimd_<mode>): ...this.
13323 (tlsdesc_small_sve_<mode>): New pattern.
13325 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13327 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13328 (UNSPEC_UMUL_HIGHPART): New constants.
13329 (MUL_HIGHPART): New int iteraor.
13330 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13331 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13333 (*<su>mul<mode>3_highpart): New define_insn.
13335 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13338 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13341 2018-03-13 Martin Liska <mliska@suse.cz>
13344 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13346 (sem_item_optimizer::~sem_item_optimizer): Release it.
13347 (sem_item_optimizer::merge_classes): Register variable aliases.
13348 (sem_item_optimizer::fixup_pt_set): New function.
13349 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13350 * ipa-icf.h: Declare new variables and functions.
13352 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13354 PR middle-end/84834
13355 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13356 integer_pow2p@2 and test integer_pow2p in condition.
13357 (A < 0 ? C : 0): Similarly for @1.
13359 PR middle-end/84831
13360 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13361 characters starting at p contain '\0' character, don't look beyond
13365 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13366 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13369 * reg-stack.c (change_stack): Change update_end var from int to
13370 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13371 also call set_block_for_insn on the newly added insns and rescan.
13374 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13375 on the last operand.
13378 * tree.c (stabilize_reference_1): Return save_expr (e) for
13379 STATEMENT_LIST even if it doesn't have side-effects.
13381 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13383 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13385 2018-03-12 Renlin Li <renlin.li@arm.com>
13387 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13388 aarch64_output_scalar_simd_mov_immediate.
13390 2018-03-12 Martin Sebor <msebor@redhat.com>
13392 PR tree-optimization/83456
13393 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13394 for perfectly overlapping calls to memcpy.
13395 (gimple_fold_builtin_memory_chk): Same.
13396 (gimple_fold_builtin_strcpy): Handle no-warning.
13397 (gimple_fold_builtin_stxcpy_chk): Same.
13398 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13400 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13402 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13403 parameter. Use it for SFmode.
13404 (rs6000_function_arg_advance_1): Adjust.
13405 (rs6000_function_arg): Adjust.
13406 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13408 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13410 PR rtl-optimization/84169
13411 PR rtl-optimization/84780
13412 * combine.c (can_combine_p): Check for a 2-insn combination whether
13413 the destination register is used between the two insns, too.
13415 2018-03-12 Richard Biener <rguenther@suse.de>
13417 PR tree-optimization/84803
13418 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13419 for refs DR analysis didn't process.
13421 2018-03-12 Richard Biener <rguenther@suse.de>
13423 PR tree-optimization/84777
13424 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13425 force-vectorize loops ignore whether we are optimizing for size.
13427 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13429 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13430 (TARGET_MD_ASM_ADJUST): Define.
13432 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13433 Kito Cheng <kito.cheng@gmail.com>
13434 Chung-Ju Wu <jasonwucj@gmail.com>
13436 * config/nds32/nds32.c (nds32_compute_stack_frame,
13437 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13438 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13439 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13440 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13441 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13442 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13443 * config/nds32/nds32.md (prologue, epilogue): Use macro
13444 NDS32_V3PUSH_AVAILABLE_P to do checking.
13446 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13449 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13450 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13451 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13452 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13453 addition of most attributes on !orig_type_die or the attribute not
13454 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13456 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13457 Chung-Ju Wu <jasonwucj@gmail.com>
13459 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13460 __NDS32_VH__ macro.
13461 * config/nds32/nds32.opt (mvh): New option.
13463 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13464 Chung-Ju Wu <jasonwucj@gmail.com>
13466 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13468 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13469 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13472 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13473 Chung-Ju Wu <jasonwucj@gmail.com>
13475 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13477 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13478 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13480 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13481 Kito Cheng <kito.cheng@gmail.com>
13482 Chung-Ju Wu <jasonwucj@gmail.com>
13484 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13485 UNSPEC_FFMISM and UNSPEC_FLMISM.
13486 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13487 for ffb, ffmism and flmism.
13488 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13489 (unspec_ffmism): Ditto.
13490 (unspec_flmism): Ditto.
13491 (nds32_expand_builtin_impl): Check if string extension is available.
13492 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13493 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13495 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13498 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13501 * lra-assigns.c (assign_by_spills): Return a flag of reload
13502 assignment failure. Do not process the reload assignment
13503 failures. Do not spill other reload pseudos if they has the same
13505 (lra_assign): Add a return arg. Set up from the result of
13506 assign_by_spills call.
13507 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13508 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13509 usage_insns if it is not NULL.
13510 (spill_hard_reg_in_range): New function.
13511 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13512 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13513 function prototypes.
13514 (lra_assign): Change prototype.
13515 * lra.c (lra): Add code to deal with fails by splitting hard reg
13518 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13521 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13523 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13526 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13527 (dw_val_node): Add val_symbolic_view.
13528 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13529 (symview_upper_bound): New.
13530 (new_line_info_table): Initialize symviews_since_reset.
13531 (dwarf2out_source_line): Count symviews_since_reset and set
13532 symview_upper_bound.
13533 (dw_val_equal_p): Handle symview.
13534 (add_AT_symview): New.
13535 (print_dw_val): Handle symview.
13536 (attr_checksum, attr_checksum_ordered): Likewise.
13537 (same_dw_val_p, size_of_die): Likewise.
13538 (value_format, output_die): Likewise.
13539 (add_high_low_attributes): Use add_AT_symview for entry_view.
13540 (dwarf2out_finish): Reset symview_upper_bound, clear
13543 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13546 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13547 Add strict argument and use it.
13548 (rs6000_split_multireg_move): Update for new strict argument.
13549 (mem_operand_gpr): Disallow all non-offsettable addresses.
13550 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13552 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13555 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13556 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13557 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13560 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13561 decl, use remap_type if we want to use the type.
13563 2018-03-09 Martin Sebor <msebor@redhat.com>
13565 PR tree-optimization/84526
13566 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13568 (builtin_access::generic_overlap): Be prepared to handle non-array
13571 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13573 PR rtl-optimization/84682
13574 * lra-constraints.c (process_address_1): Check is_address flag
13575 for address constraints.
13576 (process_alt_operands): Likewise.
13577 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13578 preprocess_constraints.
13579 * recog.h (preprocess_constraints): Add oploc parameter.
13581 * recog.c (preprocess_constraints): Test address_operand for
13582 CT_ADDRESS constraints.
13584 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13587 * lra-assigns.c (assign_by_spills): Return a flag of reload
13588 assignment failure. Do not process the reload assignment
13589 failures. Do not spill other reload pseudos if they has the same
13591 (lra_assign): Add a return arg. Set up from the result of
13592 assign_by_spills call.
13593 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13594 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13595 usage_insns if it is not NULL.
13596 (spill_hard_reg_in_range): New function.
13597 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13598 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13599 function prototypes.
13600 (lra_assign): Change prototype.
13601 * lra.c (lra): Add code to deal with fails by splitting hard reg
13604 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13607 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13608 Accept complain bool parameter. Only emit errors if it is true.
13609 (arm_parse_cpu_option_name): Likewise.
13610 (arm_target_thumb_only): Adjust callers of the above.
13611 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13612 prototype to take a default true bool parameter.
13613 (arm_parse_arch_option_name): Likewise.
13615 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13616 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13620 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13621 * configure: Regenerate.
13622 * configure.ac ("linker --version-script option"): New.
13623 ("linker soname option"): New.
13625 2018-03-09 Richard Biener <rguenther@suse.de>
13627 PR tree-optimization/84775
13628 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13629 immediate uses of predicate stmts and mark them modified.
13632 PR tree-optimization/84178
13633 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13635 (version_loop_for_if_conversion): Delay update_ssa call.
13636 (tree_if_conversion): Delay update_ssa until after predicate
13639 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13642 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13643 when the function accesses prior frames.
13645 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13648 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13649 gen_llsym, otherwise call maybe_gen_llsym.
13651 PR inline-asm/84742
13652 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13653 has ',' character inside of it.
13655 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13658 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13659 as clobbering CC_REGNUM.
13661 2018-03-08 Richard Biener <rguenther@suse.de>
13663 PR middle-end/84552
13664 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13665 (follow_copies_to_constant): Do not follow SSA names registered
13668 2018-03-08 Richard Biener <rguenther@suse.de>
13670 PR tree-optimization/84178
13671 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13673 (version_loop_for_if_conversion): Delay update_ssa call.
13674 (tree_if_conversion): Delay update_ssa until after predicate
13677 2018-03-08 David Malcolm <dmalcolm@redhat.com>
13679 PR tree-optimization/84178
13680 * tree-if-conv.c (release_bb_predicate): Remove the
13681 the assertion that the stmts have NULL use_ops.
13682 Discard the statements, asserting that they haven't
13683 yet been added to a BB.
13685 2018-03-08 Richard Biener <rguenther@suse.de>
13687 PR tree-optimization/84746
13688 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13689 (phi_translate): Pass in destination ANTIC_OUT set.
13690 (phi_translate_1): Likewise. For a simplified result lookup
13691 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13692 (phi_translate_set): Adjust.
13693 (do_pre_regular_insertion): Likewise.
13694 (do_pre_partial_partial_insertion): Likewise.
13696 2018-03-08 Martin Liska <mliska@suse.cz>
13698 PR gcov-profile/84735
13699 * doc/gcov.texi: Document usage of profile files.
13700 * gcov-io.h: Document changes in the format.
13702 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
13706 * dwarf2out.c (struct dw_line_info_table): Update comments for
13708 (FORCE_RESET_NEXT_VIEW): New.
13709 (FORCE_RESETTING_VIEW_P): New.
13710 (RESETTING_VIEW_P): Check for -1 too.
13711 (ZERO_VIEW_P): Likewise.
13712 (new_line_info_table): Force-reset next view.
13713 (dwarf2out_begin_function): Likewise.
13714 (dwarf2out_source_line): Simplify zero_view_p initialization.
13715 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13716 view directly. Omit view when omitting .loc at line 0.
13718 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13720 PR tree-optimization/84740
13721 * tree-switch-conversion.c (process_switch): Call build_constructors
13722 only if info.phi_count is non-zero.
13724 PR tree-optimization/84739
13725 * tree-tailcall.c (find_tail_calls): Check call arguments against
13726 DECL_ARGUMENTS (current_function_decl) rather than
13727 DECL_ARGUMENTS (func) when checking for tail recursion.
13729 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13731 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13732 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13733 Volker Reichelt's entry and add entries for people that perform
13734 GCC fuzzy testing and report numerous bugs.
13736 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13739 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13740 readonly data in sdata, if that is disabled.
13741 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13742 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13743 -mreadonly-in-sdata option.
13745 2018-03-07 Martin Sebor <msebor@redhat.com>
13747 PR tree-optimization/84468
13748 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13749 basic block when looking for nul assignment.
13751 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13754 * except.h (output_function_exception_table): Adjust prototype.
13755 * except.c (output_function_exception_table): Remove FNNAME parameter
13756 and add SECTION parameter. Ouput one part of the table at a time.
13757 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13758 the first part of the exception table and emit unwind directives.
13759 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13760 (i386_pe_seh_cold_init): Likewise.
13761 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13762 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13763 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13764 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13765 * config/i386/winnt.c: Include except.h.
13766 (struct seh_frame_state): Add reg_offset, after_prologue and
13767 in_cold_section fields.
13768 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13769 (i386_pe_seh_cold_init): New function.
13770 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13771 to seh->in_cold_section.
13772 (seh_emit_push): Record the offset of the push.
13773 (seh_emit_save): Record the offet of the save.
13774 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13775 Test seh->after_prologue to disregard the epilogue.
13776 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13777 (i386_pe_end_cold_function): New function.
13779 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13782 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13783 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13786 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13788 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13789 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13791 PR middle-end/84723
13792 * multiple_target.c: Include tree-inline.h and intl.h.
13793 (expand_target_clones): Diagnose and fail if node->definition and
13794 !tree_versionable_function_p (node->decl).
13796 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
13798 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13800 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13801 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13802 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13804 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13807 * combine.c (try_combine): Use reg_or_subregno instead of handling
13808 just paradoxical SUBREGs and REGs.
13810 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
13812 * config/arc/arc.c (arc_finalize_pic): Remove function.
13813 (arc_must_save_register): We use single base PIC register, remove
13814 checks to save/restore the PIC register.
13815 (arc_expand_prologue): Likewise.
13816 * config/arc/arc-protos.h (arc_set_default_type_attributes):
13818 (arc_verify_short): Likewise.
13819 (arc_attr_type): Likewise.
13820 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13821 (walk_stores): Likewise.
13822 (arc_address_cost): Make it static.
13823 (arc_verify_short): Likewise.
13824 (branch_dest): Likewise.
13825 (arc_attr_type): Likewise.
13826 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13827 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13828 (arc_final_prescan_insn): Remove inserting the nops due to
13829 hardware hazards. It is done in reorg step.
13830 (insn_length_variant_t): Remove.
13831 (insn_length_parameters_t): Likewise.
13832 (arc_insn_length_parameters): Likewise.
13833 (arc_get_insn_variants): Likewise.
13834 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13836 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13838 PR inline-asm/84683
13839 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13842 PR tree-optimization/84687
13843 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13845 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13847 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13849 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13850 Rename to ppc_speculation_barrier.
13851 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13852 __builtin_ppc_speculation_barrier.
13854 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13857 * combine.c (combine_simplify_rtx): Don't try to simplify if
13858 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13861 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
13863 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13864 to 32 bytes when compiling for POWER9.
13866 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13869 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13870 regparm >= 3 with no arg reg available also for calls with
13871 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13874 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13876 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13878 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13881 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13883 2018-03-05 Richard Biener <rguenther@suse.de>
13885 PR tree-optimization/84486
13886 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13887 When inserting a __builtin_assume_aligned call set the LHS
13888 SSA name alignment info accordingly.
13890 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13892 PR tree-optimization/84114
13893 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13894 Avoid reassociation of FLOAT_MODE addition.
13896 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13898 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13899 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13900 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13901 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13902 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13903 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13904 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13906 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13907 __builtin_ia32_wbinvd): New builtins.
13908 (SPECIAL_ARGS2): New.
13909 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13910 (SPECIAL_ARGS2): New.
13911 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13912 (ix86_valid_target_attribute_inner_p): Ditto.
13913 (ix86_init_mmx_sse_builtins): Add special_args2.
13914 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13915 TARGET_WBNOINVD_P): New.
13916 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13917 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13918 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13919 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13920 * config/i386/pconfigintrin.h: New file.
13921 * config/i386/wbnoinvdintrin.h: Ditto.
13922 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13924 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13926 2018-03-05 Richard Biener <rguenther@suse.de>
13928 PR tree-optimization/84670
13929 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13931 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13932 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13933 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13934 doesn't grow if all successors (recursively) were visited at least
13937 2018-03-05 Richard Biener <rguenther@suse.de>
13939 PR tree-optimization/84650
13940 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13941 if executed in the loop pipeline.
13943 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13945 * doc/configfiles.texi (Configuration Files): Move info about
13946 conditionalizing $target-protos.h to...
13947 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13948 differs from $target-protos.h.
13950 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13951 Chung-Ju Wu <jasonwucj@gmail.com>
13953 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13954 * config/nds32/nds32-multiple.md (setmemsi): Define.
13955 * config/nds32/nds32-memory-manipulation.c
13956 (nds32_gen_dup_4_byte_to_word_value): New.
13957 (emit_setmem_word_loop): New.
13958 (emit_setmem_byte_loop): New.
13959 (nds32_expand_setmem_loop): New.
13960 (nds32_expand_setmem_loop_v3m): New.
13961 (nds32_expand_setmem_unroll): New.
13962 (nds32_expand_setmem): New.
13964 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13965 Chung-Ju Wu <jasonwucj@gmail.com>
13967 * config/nds32/nds32-memory-manipulation.c
13968 (nds32_emit_load_store): New.
13969 (nds32_emit_post_inc_load_store): New.
13970 (nds32_emit_mem_move): New.
13971 (nds32_emit_mem_move_block): New.
13972 (nds32_expand_movmemsi_loop_unknown_size): New.
13973 (nds32_expand_movmemsi_loop_known_size): New.
13974 (nds32_expand_movmemsi_loop): New.
13975 (nds32_expand_movmemsi_unroll): New.
13976 (nds32_expand_movmemqi): Rename ...
13977 (nds32_expand_movmemsi): ... to this.
13978 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13979 (movmemsi): ... to this.
13980 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13981 (nds32_expand_movmemsi): ... to this.
13983 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13984 Monk Chiang <sh.chiang04@gmail.com>
13985 Chung-Ju Wu <jasonwucj@gmail.com>
13987 * config/nds32/nds32-protos.h
13988 (nds32_expand_load_multiple): New arguments.
13989 (nds32_expand_store_multiple): Ditto.
13990 (nds32_valid_multiple_load_store): Rename ...
13991 (nds32_valid_multiple_load_store_p): ... to this.
13992 * config/nds32/nds32-memory-manipulation.c
13993 (nds32_expand_load_multiple): Refine implementation.
13994 (nds32_expand_store_multiple): Ditto.
13995 * config/nds32/nds32-multiple.md
13996 (load_multiple): Update nds32_expand_load_multiple interface.
13997 (store_multiple): Update nds32_expand_store_multiple interface.
13998 * config/nds32/nds32-predicates.c
13999 (nds32_valid_multiple_load_store): Rename ...
14000 (nds32_valid_multiple_load_store_p): ... to this and refine
14002 * config/nds32/predicates.md
14003 (nds32_load_multiple_and_update_address_operation): New predicate.
14004 (nds32_store_multiple_and_update_address_operation): New predicate.
14006 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14007 Chung-Ju Wu <jasonwucj@gmail.com>
14009 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14010 (combo): New attribute.
14011 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14013 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
14015 * config/nds32/nds32.opt: Change -mcmodel= default value.
14017 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
14018 Monk Chiang <sh.chiang04@gmail.com>
14019 Chung-Ju Wu <jasonwucj@gmail.com>
14021 * config/nds32/constants.md (unspec_element): New enum.
14022 * config/nds32/constraints.md (Umw): New constraint.
14023 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14024 * config/nds32/nds32-intrinsic.md: Likewise.
14025 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14026 (nds32_valid_smw_lwm_base_p): New.
14027 (nds32_output_smw_single_word): New.
14028 (nds32_output_lmw_single_word): New.
14029 (nds32_expand_unaligned_load): New.
14030 (nds32_expand_unaligned_store): New.
14031 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14032 (nds32_output_smw_single_word): Declare.
14033 (nds32_output_lmw_single_word): Declare.
14034 (nds32_expand_unaligned_load): Declare.
14035 (nds32_expand_unaligned_store): Declare.
14036 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14037 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14038 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14039 NDS32_BUILTIN_UASTORE_DW.
14040 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14043 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
14044 Kito Cheng <kito.cheng@gmail.com>
14045 Chung-Ju Wu <jasonwucj@gmail.com>
14047 * config/nds32/nds32-intrinsic.c
14048 (nds32_expand_builtin_null_ftype_reg): Delete.
14049 (nds32_expand_builtin_reg_ftype_imm): Ditto.
14050 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14051 (nds32_read_argument): New.
14052 (nds32_legitimize_target): Ditto.
14053 (nds32_legitimize_argument): Ditto.
14054 (nds32_check_constant_argument): Ditto.
14055 (nds32_expand_unop_builtin): Ditto.
14056 (nds32_expand_unopimm_builtin): Ditto.
14057 (nds32_expand_binop_builtin): Ditto.
14058 (nds32_builtin_decl_impl): Ditto.
14059 (builtin_description): Ditto.
14060 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14061 (nds32_init_builtins_impl): Ditto.
14062 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14063 (nds32_builtin_decl): New.
14064 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14065 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14067 2018-03-02 Jeff Law <law@redhat.com>
14069 * reorg.c (stop_search_p): Handle DEBUG_INSN.
14070 (redundant_insn, fill_simple_delay_slots): Likewise.
14071 (fill_slots_from_thread): Likewise.
14072 * resource.c (mark_referenced_resources): Likewise.
14073 (mark_set_resources, find_dead_or_set_registers): Likewise.
14075 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14077 * substring-locations.h (format_warning_va): Formatting fix for
14078 ATTRIBUTE_GCC_DIAG.
14079 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14081 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14082 * substring-locations.c: Include intl.h.
14083 (format_warning_va): Turned into small wrapper around
14084 format_warning_n_va, renamed to ...
14085 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14086 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14088 (format_warning_at_substring_n): New function.
14089 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14090 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14091 format_warning_at_substring with just a shorter name instead of
14092 const function pointer.
14093 (fmtwarn_n): New function.
14094 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14095 appropriate, get rid of all the fmtstr temporaries, move conditionals
14096 with G_() wrapped string literals directly into fmtwarn arguments,
14097 cast dir.len to (int), formatting fixes.
14099 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14101 * doc/invoke.texi: Remove "Cilk Plus" references.
14103 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14104 Richard Biener <rguenther@suse.de>
14107 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14108 for error or warning attributes if CALL_FROM_THUNK_P is set.
14111 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14114 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14115 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14118 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14119 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14121 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14122 instead of -1U in last predictors element's probability member.
14124 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14127 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14128 arguments if they are comparable.
14130 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14132 PR tree-optimization/84634
14133 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14134 masks and masked_loop_p with a single loop_masks, making sure it's
14135 null for bb vectorization.
14137 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14139 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14140 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14141 loop->force_vectorize to check whether there is no alias.
14143 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14146 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14148 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14150 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14151 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14152 instead of a loop around prev_real_insn.
14153 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14156 PR inline-asm/84625
14157 * config/i386/i386.c (ix86_print_operand): Use conditional
14158 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14161 2018-03-02 Richard Biener <rguenther@suse.de>
14163 PR tree-optimization/84427
14164 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14165 (bitmap_set_subtract_values): Rewrite to handle multiple
14168 (prune_clobbered_mems): Likewise.
14169 (phi_translate): Take edge instead of pred/phiblock.
14170 (phi_translate_1): Likewise.
14171 (phi_translate_set): Likewise. Insert all translated
14172 exprs for a value into the set, keeping possibly multiple
14173 expressions per value.
14174 (compute_antic_aux): Adjust for phi_translate changes.
14175 When intersecting union the expressions and prune those
14176 not in the final value set, keeping possibly multiple
14177 expressions per value. Do not use value-insertion
14178 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14179 all expressions. Add verification that the value-sets
14180 only shrink during iteration.
14181 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14182 (do_pre_regular_insertion): Likewise.
14183 (do_pre_partial_partial_insertion): Likewise.
14185 2018-03-02 Richard Biener <rguenther@suse.de>
14188 * config/darwin.c (saved_debug_info_level): New static global.
14189 (darwin_asm_lto_start): Disable debug info generation for LTO out.
14190 (darwin_asm_lto_end): Restore debug info generation settings.
14192 2018-03-01 Martin Liska <mliska@suse.cz>
14195 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14196 volatile arguments.
14198 2018-03-01 Richard Biener <rguenther@suse.de>
14201 * dwarf2out.c (gen_variable_die): Properly handle late VLA
14202 type annotation with LTO when debug was disabled at compile-time.
14204 2018-03-01 Matthew Fortune <mfortune@gmail.com>
14206 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14208 (mips_final_postscan_insn): Likewise.
14210 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
14212 PR rtl-optimization/84528
14213 * alias.c (init_alias_target): Add commentary.
14214 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14215 a unique base value if the frame pointer is not eliminated
14216 to the stack pointer.
14218 2018-03-01 Tom de Vries <tom@codesourcery.com>
14220 PR rtl-optimization/83327
14221 * lra-int.h (hard_regs_spilled_into): Declare.
14222 * lra.c (hard_regs_spilled_into): Define.
14223 (init_reg_info): Init hard_regs_spilled_into.
14224 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14225 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14226 (process_bb_lives): Handle hard_regs_spilled_into.
14227 (lra_create_live_ranges_1): Before doing liveness propagation, clear
14228 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14230 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
14232 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14233 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14234 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14235 * config/rs6000/aix72.h: New file.
14237 2018-02-28 Jakub Jelinek <jakub@redhat.com>
14239 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14240 instead of warning_at with conditional singular and plural messages
14244 * stor-layout.c (update_alignment_for_field): For
14245 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14246 && !DECL_PACKED (field), do the alignment update, just use
14247 only desired_align instead of MAX (type_align, desired_align)
14249 (place_field): Don't do known_align < desired_align handling
14250 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14251 is non-NULL, instead do it after rli->prev_field handling and
14252 only if not within a bitfield word. For DECL_PACKED (field)
14253 use type_align of BITS_PER_UNIT.
14255 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14257 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14258 superfluous parentheses and trailing spaces.
14260 2018-02-28 Richard Biener <rguenther@suse.de>
14262 PR tree-optimization/84584
14263 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14264 SCoPs with fake exit edge.
14266 2018-02-28 Martin Liska <mliska@suse.cz>
14269 * timevar.c (timer::print): Fix format to properly print 100%
14272 2018-02-28 Richard Biener <rguenther@suse.de>
14274 PR middle-end/84607
14275 * genmatch.c (capture_info::walk_match): Do not mark
14276 captured expressions without operands as expr_p given
14277 they act more like predicates and should be subject to
14278 "lost tail" side-effect preserving.
14280 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14282 PR rtl-optimization/81611
14283 * auto-inc-dec.c (attempt_change): Move dead note from
14284 mem_insn if it's the next use of regno
14285 (find_address): Take address use of reg holding
14286 non-incremented value. Add parm to limit search to the named
14288 (merge_in_block): Attempt to use a mem insn that is the next
14289 use of the original regno.
14291 2018-02-27 Martin Sebor <msebor@redhat.com>
14294 * doc/invoke.texi (-Wmissing-attributes): New option.
14295 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14297 2018-02-27 Martin Sebor <msebor@redhat.com>
14299 PR translation/84207
14300 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14301 n argument to unsigned HOST_WIDE_INT.
14302 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14303 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14304 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14305 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14307 2018-02-27 Richard Biener <rguenther@suse.de>
14309 PR tree-optimization/84512
14310 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14311 Do not use the estimate returned from record_stmt_cost for
14312 the scalar iteration cost but sum properly using add_stmt_cost.
14314 2018-02-27 Richard Biener <rguenther@suse.de>
14316 PR tree-optimization/84466
14317 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14318 Adjust last change to less strictly validate use operands.
14320 2018-02-27 Martin Liska <mliska@suse.cz>
14322 PR gcov-profile/84548
14323 * gcov.c (process_file): Allow partial overlap and consider it
14324 also as group functions.
14325 (output_lines): Properly calculate range of lines for a group.
14327 2018-02-27 Martin Liska <mliska@suse.cz>
14329 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14330 'ggc' suffixes. Change first column width.
14331 (timer::print): Fix formatting of the column.
14333 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14335 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14336 preserve inline entry blocks for the sake of debug inline
14337 entry point markers alone.
14338 (remove_unused_locals): Suggest in comments a better place to
14339 force the preservation of inline entry blocks that are
14340 otherwise unused, but do not preserve them.
14342 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14344 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14346 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14349 * config/i386/constraints.md (Bs): Replace
14350 ix86_indirect_branch_register with
14351 TARGET_INDIRECT_BRANCH_REGISTER.
14353 * config/i386/i386.md (indirect_jump): Likewise.
14354 (tablejump): Likewise.
14355 (*sibcall_memory): Likewise.
14356 (*sibcall_value_memory): Likewise.
14357 Peepholes of indirect call and jump via memory: Likewise.
14358 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14359 (*sibcall_value_GOT_32): Likewise.
14360 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14361 (GOT_memory_operand): Likewise.
14362 (call_insn_operand): Likewise.
14363 (sibcall_insn_operand): Likewise.
14364 (GOT32_symbol_operand): Likewise.
14365 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14367 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14369 PR rtl-optimization/83496
14370 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14371 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14372 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14373 redundant insn, if any.
14374 (relax_delay_slots): Likewise.
14375 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14377 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14379 PR tree-optimization/83965
14380 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14381 that grouped statements are part of a reduction chain. Return
14382 true if the statement is not marked as a reduction itself but
14383 is part of a group.
14384 (vect_recog_dot_prod_pattern): Don't check whether the statement
14385 is part of a group here.
14386 (vect_recog_sad_pattern): Likewise.
14387 (vect_recog_widen_sum_pattern): Likewise.
14389 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14392 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14394 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14397 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14399 (ix86_output_indirect_function_return): New prototype.
14400 (ix86_split_simple_return_pop_internal): Likewise.
14401 * config/i386/i386.c (indirect_return_via_cx): New.
14402 (indirect_return_via_cx_bnd): Likewise.
14403 (indirect_thunk_name): Handle return va CX_REG.
14404 (output_indirect_thunk_function): Create alias for
14405 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14406 (ix86_output_indirect_jmp): Remove the bool argument.
14407 (ix86_output_indirect_function_return): New function.
14408 (ix86_split_simple_return_pop_internal): Likewise.
14409 * config/i386/i386.md (*indirect_jump): Don't pass false
14410 to ix86_output_indirect_jmp.
14411 (*tablejump_1): Likewise.
14412 (simple_return_pop_internal): Change it to define_insn_and_split.
14413 Call ix86_split_simple_return_pop_internal to split it for
14414 -mfunction-return=.
14415 (simple_return_indirect_internal): Call
14416 ix86_output_indirect_function_return instead of
14417 ix86_output_indirect_jmp.
14419 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14422 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14423 memset and value initialization afterwards.
14425 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14427 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14429 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14432 * common/config/aarch64/aarch64-common.c
14433 (aarch_option_optimization_table[]): Switch
14434 off fomit-frame-pointer
14436 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14437 Chung-Ju Wu <jasonwucj@gmail.com>
14439 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14441 (store_multiple): Ditto.
14443 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14445 * config.gcc: Add --with-cpu support for nds32 target.
14446 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14447 * config/nds32/nds32.opt: Add -mcpu= option.
14449 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14451 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14452 isel=yes): Warn for these deprecated options.
14454 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14456 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14457 ISA_2_5_MASKS_EMBEDDED.
14459 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14461 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14462 p->max as pointers rather than using iterative_hash_expr.
14464 2018-02-23 Carl Love <cel@us.ibm.com>
14466 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14467 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14469 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14470 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14471 P8V_BUILTIN_VEC_VUNSIGNED2.
14473 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14476 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14477 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14479 * lra-constraints.c (curr_insn_transform): Set up
14480 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14482 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14483 * lra-eliminations.c (spill_pseudos): Ditto.
14484 (process_insn_for_elimination): Ditto.
14485 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14486 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14487 LRA_NON_CLOBBERED_ALT.
14489 2018-02-22 Martin Sebor <msebor@redhat.com>
14491 PR tree-optimization/84480
14492 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14493 to maybe_diag_stxncpy_trunc. Call it.
14494 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14495 from gimple_fold_builtin_strcpy. Print inlining stack.
14496 (handle_builtin_stxncpy): Print inlining stack.
14497 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14499 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14502 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14503 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14504 and -fcheck-pointer-bounds are used together.
14505 (indirect_thunk_prefix): New enum.
14506 (indirect_thunk_need_prefix): New function.
14507 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14508 "_nt" instead of "_bnd" for NOTRACK prefix.
14509 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14510 (output_indirect_thunk_function): Likewise.
14512 (ix86_code_end): Update output_indirect_thunk_function calls.
14513 (ix86_output_indirect_branch_via_reg): Replace
14514 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14515 (ix86_output_indirect_branch_via_push): Likewise.
14516 (ix86_output_function_return): Likewise.
14517 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14518 incompatible with -fcf-protection=branch and
14519 -fcheck-pointer-bounds.
14521 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14524 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14525 Change gcc_assert call to output_operand_lossage.
14527 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14529 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14531 2018-02-22 DJ Delorie <dj@redhat.com>
14532 Sebastian Perta <sebastian.perta@renesas.com>
14533 Oleg Endo <olegendo@gcc.gnu.org>
14535 * config/rx/rx.c (rx_rtx_costs): New function.
14536 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14538 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14540 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14542 2018-02-22 Martin Liska <mliska@suse.cz>
14545 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14546 Add "native" as a possible value.
14548 2018-02-22 Martin Liska <mliska@suse.cz>
14551 * config/i386/i386.c (ix86_option_override_internal):
14552 Add "native" as a possible value for -march and -mtune.
14554 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14557 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14558 to all type variants.
14560 PR tree-optimization/84503
14561 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14562 width as info->bitpos + info->bitsize - start.
14563 (merged_store_group::merge_overlapping): Simplify width computation.
14564 (check_no_overlap): New function.
14565 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14566 start + width and last_order of the group, fail if check_no_overlap
14568 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14569 to group if check_no_overlap fails.
14571 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14573 * config/rs6000/altivec.md: Delete contraint arguments to
14574 define_expand, define_split, and define_peephole2, and in
14575 define_insn_and_split if always unused.
14576 * config/rs6000/darwin.md: Ditto.
14577 * config/rs6000/dfp.md: Ditto.
14578 * config/rs6000/rs6000.md: Ditto.
14579 * config/rs6000/sync.md: Ditto.
14580 * config/rs6000/vector.md: Ditto.
14581 * config/rs6000/vsx.md: Ditto.
14583 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14585 * config/rs6000/altivec.md: Write output control strings as braced
14586 blocks instead of double-quoted strings.
14587 * config/rs6000/darwin.md: Ditto.
14588 * config/rs6000/rs6000.md: Ditto.
14589 * config/rs6000/vector.md: Ditto.
14590 * config/rs6000/vsx.md: Ditto.
14592 2018-02-21 Jason Merrill <jason@redhat.com>
14594 PR c++/84314 - ICE with templates and fastcall attribute.
14595 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14597 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14599 * ipa-cp.c (determine_versionability): Fix comment typos.
14601 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14604 * ipa-cp.c (determine_versionability): Do not version functions caling
14607 2018-02-21 Martin Liska <mliska@suse.cz>
14610 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14611 Add "native" as a possible value.
14612 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14613 the macro when native cpu detection is available.
14615 2018-02-21 Martin Liska <mliska@suse.cz>
14618 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14619 Add "native" as a possible value.
14620 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14621 when native cpu detection is available.
14623 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14624 Martin Sebor <msebor@redhat.com>
14626 PR tree-optimization/84478
14627 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14629 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14630 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14631 support which is conservatively correct, for 2 only stay conservative
14632 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14633 argument to the 2 argument get_range_strlen, adjust 6 arg
14634 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14636 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14637 (gimple_fold_builtin_strlen): Pass true as last argument to
14640 2018-02-20 Martin Sebor <msebor@redhat.com>
14642 PR middle-end/84095
14643 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14644 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14645 (builtin_memref::builtin_memref): Factor out parts into
14646 set_base_and_offset and call it.
14648 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14650 PR middle-end/84406
14651 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14652 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14653 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14654 search at the associated MODE_INT.
14656 2018-02-20 Jeff Law <law@redhat.com>
14658 PR middle-end/82123
14659 PR tree-optimization/81592
14660 PR middle-end/79257
14661 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14662 for range data rather than using global data.
14663 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14664 range data rather than using global data.
14665 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14666 pass it to children as needed.
14667 (struct directive::fmtresult): Similarly.
14668 (struct directive::set_width): Similarly.
14669 (struct directive::set_precision): Similarly.
14670 (format_integer, format_directive, parse_directive): Similarly.
14671 (format_none): Accept unnamed vr_values parameter.
14672 (format_percent, format_floating, format_character): Similarly.
14673 (format_string, format_plain): Similarly.
14674 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14675 the EVRP range analyzer for range data rather than using global data.
14676 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14677 gimple-ssa-evrp-analyze.h
14678 (class sprintf_dom_walker): Add after_dom_children member function.
14679 Add evrp_range_analyzer member.
14680 (sprintf_dom_walker::before_dom_children): Call into the EVRP
14681 range analyzer as needed.
14682 (sprintf_dom_walker::after_dom_children): New member function.
14683 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14685 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14686 (evrp_range_analyzer::pop_to_marker): Likewise.
14688 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14690 PR tree-optimization/84419
14691 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14692 with the required type if its current type is compatible but
14695 2018-02-20 Jakub Jelinek <jakub@redhat.com>
14697 PR middle-end/82004
14698 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14699 after vectorization.
14701 2018-02-20 Martin Liska <mliska@suse.cz>
14704 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14705 possible values if we don't have a hint.
14707 2018-02-20 Martin Liska <mliska@suse.cz>
14711 * final.c (shorten_branches): Build align_tab array with one
14713 * opts.c (finish_options): Add alignment option limit check.
14714 (MAX_CODE_ALIGN): Likewise.
14715 (MAX_CODE_ALIGN_VALUE): Likewise.
14716 * doc/invoke.texi: Document maximum allowed option value for
14717 all -falign-* options.
14719 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14722 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14723 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14724 * var-tracking.c (emit_note_insn_var_location): Remove all references
14725 to NOTE_INSN_CALL_ARG_LOCATION.
14726 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14727 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14728 Use copy_rtx_if_shared.
14729 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14730 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14731 (dwarf2out_var_location): Remove handling of
14732 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14734 * final.c (final_scan_insn): Remove all references to
14735 NOTE_INSN_CALL_ARG_LOCATION.
14736 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14737 before dumping final insns.
14738 * except.c (emit_note_eh_region_end): Remove all references to
14739 NOTE_INSN_CALL_ARG_LOCATION.
14740 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14741 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14742 * config/arc/arc.c (hwloop_optimize): Likewise.
14743 * config/arm/arm.c (create_fix_barrier): Likewise.
14744 * config/s390/s390.c (s390_chunkify_start): Likewise.
14745 * config/sh/sh.c (find_barrier): Likewise.
14746 * config/i386/i386.c (rest_of_insert_endbranch,
14747 ix86_seh_fixup_eh_fallthru): Likewise.
14748 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14749 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14750 * config/frv/frv.c (frv_function_prologue): Likewise.
14751 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14753 (note_outside_basic_block_p): Remove all references to
14754 NOTE_INSN_CALL_ARG_LOCATION.
14755 * gengtype.c (adjust_field_rtx_def): Likewise.
14756 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14758 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14759 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14762 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14765 PR tree-optimization/84452
14766 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14767 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14770 2018-02-19 Martin Liska <mliska@suse.cz>
14773 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14775 2018-02-19 Martin Liska <mliska@suse.cz>
14776 Richard Sandiford <richard.sandiford@linaro.org>
14778 PR tree-optimization/82491
14779 * gimple-fold.c (get_base_constructor): Make earlier bail out
14782 2018-02-19 Carl Love <cel@us.ibm.com>
14784 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14785 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14787 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14788 P8V_BUILTIN_VEC_NEG.
14790 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
14792 * config/rl78/rl78.md (movdf): New define expand.
14794 2018-02-19 Martin Liska <mliska@suse.cz>
14797 * doc/invoke.texi: Fix typo.
14798 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14800 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
14802 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14803 handle rs6000_single_float and rs6000_double_float specially for
14806 2018-02-16 Jeff Law <law@redhat.com>
14808 * config/rx/rx.c (add_pop_cfi_notes): New function.;
14809 (pop_regs): Use it.
14811 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14814 * ipa-inline.c (inline_small_functions): Fix a typo.
14816 2018-02-16 Nathan Sidwell <nathan@acm.org>
14818 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14820 2018-02-16 Carl Love <cel@us.ibm.com>
14822 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14823 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14824 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14825 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14826 expansion to P8V_BUILTIN_VEC_FLOAT2.
14828 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
14830 PR rtl-optimization/70023
14831 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14832 src_regno into account.
14834 2018-02-16 Carl Love <cel@us.ibm.com>
14836 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14837 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14838 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14839 * config/rs6000/rs6000.c: Remove case statements for
14840 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14841 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14842 and P9V_BUILTIN_VEC_VINSERT4B.
14843 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14844 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14845 * config/rs6000/vsx.md:
14846 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14849 2018-02-16 Carl Love <cel@us.ibm.com>
14851 * config/rs6000/altivec.h: Add builtin names vec_extract4b
14853 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14855 * config/rs6000/rs6000-c.c: Add the definitions for
14856 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14857 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14858 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14859 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
14860 definition for insert4b and define insn *insert3b_internal.
14861 * doc/extend.texi: Add documentation for vec_extract4b.
14863 2018-02-16 Nathan Sidwell <nathan@acm.org>
14865 * doc/extend.texi (Backwards Compatibility): Mention friend
14866 injection. Note for-scope is deprecated.
14867 * doc/invoke.texi (-ffriend-injection): Deprecate.
14869 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14871 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14872 that moved to I2, also allow destinations that are a paradoxical
14873 subreg (instead of a normal reg).
14875 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14878 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14881 2018-02-16 Richard Biener <rguenther@suse.de>
14883 PR tree-optimization/84037
14884 PR tree-optimization/84016
14886 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14887 Adjust vec_construct for the fact we need additional higher latency
14888 128bit inserts for AVX256 and AVX512 vector builds.
14889 (ix86_add_stmt_cost): Scale vector construction cost for
14892 2018-02-16 Richard Biener <rguenther@suse.de>
14894 PR tree-optimization/84417
14895 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14896 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14897 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14899 2018-02-16 Martin Liska <mliska@suse.cz>
14902 * internal-fn.def (ASAN_CHECK): Set proper flags.
14903 (ASAN_MARK): Likewise.
14905 2018-02-16 Julia Koval <julia.koval@intel.com>
14907 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14908 from PTA_CANNONLAKE.
14910 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14913 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14914 Use ++iter rather than iter++ for std::list iterators.
14915 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14916 defer deleting them until all nodes in the forest are processed. Do
14917 free even leaf nodes. Change to_process into auto_vec.
14920 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14921 * vec.h (vec_default_construct): Use memset instead of placement new
14922 if BROKEN_VALUE_INITIALIZATION is defined.
14923 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14924 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14927 PR rtl-optimization/83723
14928 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14929 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14930 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14932 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14934 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14936 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14938 PR rtl-optimization/81443
14939 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14940 from inner REGs to paradoxical SUBREGs.
14942 2018-02-16 Richard Biener <rguenther@suse.de>
14944 PR tree-optimization/84399
14945 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14946 For operands we can analyze at their definition make sure we can
14947 analyze them at each use as well.
14949 2018-02-16 Richard Biener <rguenther@suse.de>
14951 PR tree-optimization/84190
14952 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14953 volatile accesses if the decl isn't volatile.
14955 2018-02-15 Jason Merrill <jason@redhat.com>
14957 PR c++/84314 - ICE with templates and fastcall attribute.
14958 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14959 TYPE_CANONICAL on an existing type.
14961 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14963 PR tree-optimization/84383
14964 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14965 dstoff nor call operand_equal_p if dstbase is NULL.
14967 PR tree-optimization/84334
14968 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14969 also a CONSTANT_CLASS_P, punt.
14971 2018-02-14 Jim Wilson <jimw@sifive.com>
14973 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14974 first SMALL_OPERAND check. New local min_second_step. Move assert
14975 to where locals are set. Add TARGET_RVC support.
14976 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14978 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14980 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14982 2018-02-14 Martin Sebor <msebor@redhat.com>
14984 PR tree-optimization/83698
14985 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14986 arrays constrain the offset range to their bounds.
14987 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14988 (builtin_access::overlap): Avoid setting the size of overlap if it's
14990 (maybe_diag_overlap): Also consider arrays when deciding what values
14991 of offsets to include in diagnostics.
14993 2018-02-14 Martin Sebor <msebor@redhat.com>
14996 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14997 that correspond to the kind of a declaration.
14999 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
15002 * config/pa/pa.md: Load address of PIC label using the linkage table
15003 if the label is nonlocal.
15005 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
15007 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15008 warning message if user requests -maltivec=be.
15009 * doc/invoke.texi: Document deprecation of -maltivec=be.
15011 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
15014 * config/rs6000/rs6000-c.c: Update definitions for
15015 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15016 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15018 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15021 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15022 add _get_ssp intrinsics. Remove argument from
15023 __builtin_ia32_rdssp[d|q].
15024 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15025 * config/i386/i386-builtin.def: Remove argument from
15026 __builtin_ia32_rdssp[d|q].
15027 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15028 ix86_expand_special_args_builtin for _rdssp[d|q].
15029 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15030 Clear register before usage.
15031 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15032 Add documentation for new _get_ssp and _inc_ssp intrinsics.
15034 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
15036 PR tree-optimization/84357
15037 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15038 operand 1 of an ARRAY_REF too.
15040 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
15043 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15044 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15046 (set_of_reg): New struct.
15047 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15048 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15049 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15051 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15052 Split into bitclr, bitset, bitinvert patterns if appropriate.
15053 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15054 use rx_fuse_in_memory_bitop.
15055 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15056 to named insn, correct maximum insn length.
15058 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
15061 * machmode.def: Define a complex mode for PARTIAL_INT.
15062 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15064 * doc/rtl.texi: Document CSPImode.
15065 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15067 (msp430_hard_regno_nregs_with_padding): Likewise.
15069 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
15072 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15074 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15076 PR rtl-optimization/84169
15077 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15078 we generated a parallel as new i3 and we split that to new i2 and i3
15079 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15080 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15081 those to i2, not i1. Partially rewrite this scan code.
15083 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15086 * stor-layout.c (place_field): For variable length fields, adjust
15087 offset_align afterwards not just based on the field's alignment,
15088 but also on the size.
15090 PR middle-end/84309
15091 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15092 of exps and logs in the use_exp2 case.
15094 2018-02-13 Jeff Law <law@redhat.com>
15096 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15097 entry for "vector".
15099 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15102 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15106 * common.opt (gas-loc-support, gas-locview-support): New.
15107 (ginline-points, ginternal-reset-location-views): New.
15108 * doc/invoke.texi: Document them. Use @itemx where intended.
15109 (gvariable-location-views): Adjust.
15110 * target.def (reset_location_view): New.
15111 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15112 (TARGET_RESET_LOCATION_VIEW): New.
15113 * doc/tm.texi: Rebuilt.
15114 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15115 (dwarf2out_default_as_locview_support): New.
15116 (output_asm_line_debug_info): Use option variables.
15117 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15118 (output_loc_list): Likewise.
15119 (add_high_low_attributes): Check option variables.
15120 Don't output entry view attribute in strict mode.
15121 (gen_inlined_subroutine_die): Check option variables.
15122 (dwarf2out_inline_entry): Likewise.
15123 (init_sections_and_labels): Likewise.
15124 (dwarf2out_early_finish): Likewise.
15125 (maybe_reset_location_view): New, from...
15126 (dwarf2out_var_location): ... here. Call it.
15127 * debug.h (dwarf2out_default_as_loc_support): Declare.
15128 (dwarf2out_default_as_locview_support): Declare.
15129 * hooks.c (hook_int_rtx_insn_0): New.
15130 * hooks.h (hook_int_rtx_insn_0): Declare.
15131 * toplev.c (process_options): Take -gas-loc-support and
15132 -gas-locview-support from dwarf2out. Enable
15133 -gvariable-location-views by default only with locview
15134 assembler support. Enable -ginternal-reset-location-views by
15135 default only if the target defines the corresponding hook.
15136 Enable -ginline-points by default if location views are
15137 enabled; force it disabled if statement frontiers are
15139 * tree-inline.c (expand_call_inline): Check option variables.
15140 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15142 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15144 PR tree-optimization/84321
15145 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15146 handling. Also check whether the anti-range contains any values
15147 that satisfy the mask; switch to a VR_RANGE if not.
15149 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15152 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15154 2018-02-13 Martin Jambor <mjambor@suse.cz>
15157 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15158 of call statements, also set location of a load to a temporary.
15160 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15162 * config/rl78/rl78.c (add_vector_labels): New function.
15163 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15164 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15165 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15166 which checks that no arguments are passed.
15167 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15168 * doc/extend.texi: Documentation for the new attribute.
15170 2018-02-13 Andreas Schwab <schwab@suse.de>
15172 * config/riscv/linux.h (CPP_SPEC): Define.
15174 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15177 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15178 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15179 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15180 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15181 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15182 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15183 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15184 temporarily for AES and PCLMUL builtins.
15186 PR tree-optimization/84339
15187 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15188 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15191 PR middle-end/84309
15192 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15193 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15194 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15196 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15198 * omp-simd-clone.h: New file.
15199 * omp-simd-clone.c: Include omp-simd-clone.h.
15200 (expand_simd_clones): No longer static.
15201 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15202 cgraph.h and omp-simd-clone.h.
15203 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15204 (vect_recog_widen_shift_pattern): Formatting fix.
15205 (vect_pattern_recog_1): Don't check optab for calls.
15208 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15209 operands[2] into a REG before using gen_lowpart on it.
15211 2018-02-12 Jeff Law <law@redhat.com>
15214 * config/sh/sh.c (find_barrier): Consider a sibling call
15217 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15218 successfully back substituting a reg.
15220 2018-02-12 Richard Biener <rguenther@suse.de>
15222 PR tree-optimization/84037
15223 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15224 parameter, move visited init to caller.
15225 (vect_slp_analyze_operations): Separate cost from validity
15226 check, initialize visited once for all instances.
15227 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15229 * tree-vect-stmts.c (vect_model_simple_cost): Make early
15231 (vect_model_promotion_demotion_cost): Likewise.
15232 (vectorizable_bswap): Guard cost modeling with !slp_node
15233 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15235 (vectorizable_call): Likewise.
15236 (vectorizable_conversion): Likewise.
15237 (vectorizable_assignment): Likewise.
15238 (vectorizable_shift): Likewise.
15239 (vectorizable_operation): Likewise.
15240 (vectorizable_store): Likewise.
15241 (vectorizable_load): Likewise.
15242 (vectorizable_condition): Likewise.
15243 (vectorizable_comparison): Likewise.
15245 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
15248 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15249 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15250 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15252 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15254 PR middle-end/83665
15255 * params.def (inline-min-speedup): Increase from 8 to 15.
15256 (max-inline-insns-auto): Decrease from 40 to 30.
15257 * ipa-split.c (consider_split): Add some buffer for function to
15258 be considered inlining candidate.
15259 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15262 2018-02-12 Richard Biener <rguenther@suse.de>
15264 PR tree-optimization/84037
15265 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15266 matched stmts if we cannot swap the non-matched ones.
15268 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15270 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15271 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15272 _mm_maskz_scalef_round_ss): New intrinsics.
15273 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15274 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15275 __builtin_ia32_scalefss_round): Remove.
15276 (__builtin_ia32_scalefsd_mask_round,
15277 __builtin_ia32_scalefss_mask_round): New intrinsics.
15278 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15279 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15280 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15281 "<round_constraint>")): Changed to ...
15282 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15283 "<round_scalar_constraint>")): ... this.
15284 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15285 %0, %1, %2<round_op3>}"): Changed to ...
15286 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15287 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15288 %2<round_scalar_mask_op3>}"): ... this.
15289 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15291 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15293 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15294 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15295 (_mm_maskz_sqrt_round_ss): New intrinsics.
15296 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15297 (__builtin_ia32_sqrtsd_mask_round)
15298 (__builtin_ia32_sqrtss_mask_round): New builtins.
15299 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15300 (__builtin_ia32_sqrtss_round): Remove.
15301 (__builtin_ia32_sqrtsd_mask_round)
15302 (__builtin_ia32_sqrtss_mask_round): New builtins.
15303 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15304 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15305 ((match_operand:VF_128 1 "vector_operand"
15306 "xBm,<round_constraint>")): Changed to ...
15307 ((match_operand:VF_128 1 "vector_operand"
15308 "xBm,<round_scalar_constraint>")): ... this.
15309 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15310 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15311 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15312 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15313 %<iptr>1<round_scalar_mask_op3>}): ... this.
15314 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15315 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15317 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15320 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15321 Cast vec_cmpeq result to correct type.
15322 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15323 Cast vec_cmpgt result to correct type.
15325 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15327 * final.c (final_scan_insn_1): Renamed from...
15328 (final_scan_insn): ... this. New wrapper, to recover
15329 seen from the outermost call in recursive ones.
15330 * config/sparc/sparc.c (output_return): Drop seen from call.
15331 (output_sibcall): Likewise.
15332 * config/visium/visium.c (output_branch): Likewise.
15334 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15336 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15339 2018-02-10 Alan Modra <amodra@gmail.com>
15342 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15343 Specify LR as an input.
15345 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15348 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15349 remove_member_access_dummy_vars): New functions.
15350 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15351 lower_omp_1, execute_lower_omp): Use them.
15353 PR rtl-optimization/84308
15354 * shrink-wrap.c (spread_components): Release todo vector.
15356 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15358 PR rtl-optimization/57193
15359 * ira-color.c (struct allocno_color_data): Add member
15360 conflict_allocno_hard_prefs.
15361 (update_conflict_allocno_hard_prefs): New.
15362 (bucket_allocno_compare_func): Add a preference based on
15363 conflict_allocno_hard_prefs.
15364 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15365 (color_allocnos): Remove a dead code. Initiate
15366 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15368 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15371 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15372 constraint from =wa to wa. Avoid a subreg on the output operand,
15373 instead use a pseudo and subreg it in a move.
15374 (p9_xxbrd_<mode>): Changed to ...
15375 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15376 (p9_xxbrd_v2df): New expander.
15377 (p9_xxbrw_<mode>): Changed to ...
15378 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15379 (p9_xxbrw_v4sf): New expander.
15381 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15383 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15385 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15388 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15389 multiply in 32-bit mode.
15390 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15391 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15394 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15396 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15397 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15398 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15399 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15401 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15404 * dwarf2out.c (is_trivial_indirect_ref): New function.
15405 (dwarf2out_late_global_decl): Do not generate a location
15406 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15407 and that are not defined in the current unit.
15409 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15411 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15412 instead of a libcall for UNORDERED.
15414 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15417 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15418 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15420 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15423 * config/s390/s390.c (s390_set_current_function): Invoke
15424 s390_indirect_branch_settings also if fndecl didn't change.
15426 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15428 * config/rs6000/rs6000.md (blockage): Set length to zero.
15430 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15432 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15434 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15437 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15438 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15442 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15443 PARALLEL incoming that failed vt_get_decl_and_offset check.
15445 PR middle-end/84237
15446 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15447 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15449 (get_variable_section): For decls in named .bss* sections pass true as
15450 second argument to bss_initializer_p.
15452 2018-02-09 Marek Polacek <polacek@redhat.com>
15453 Jakub Jelinek <jakub@redhat.com>
15456 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15457 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15458 Sync some changes from cxx_fold_indirect_ref.
15460 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15462 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15464 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15465 (BLOCK_INLINE_ENTRY_LABEL): New.
15466 (dwarf2out_var_location): Disregard inline entry markers.
15467 (inline_entry_data): New struct.
15468 (inline_entry_data_hasher): New hashtable type.
15469 (inline_entry_data_hasher::hash): New.
15470 (inline_entry_data_hasher::equal): New.
15471 (inline_entry_data_table): New variable.
15472 (add_high_low_attributes): Add DW_AT_entry_pc and
15473 DW_AT_GNU_entry_view attributes if a pending entry is found
15474 in inline_entry_data_table. Add old entry_pc attribute only
15475 if debug nonbinding markers are disabled.
15476 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15477 markers are enabled.
15478 (block_within_block_p, dwarf2out_inline_entry): New.
15479 (dwarf2out_finish): Check that no entries remained in
15480 inline_entry_data_table.
15481 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15482 (final_scan_insn, notice_source_line): Likewise.
15483 (rest_of_clean_state): Skip inline entry markers.
15484 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15486 * gimple.c (gimple_build_debug_inline_entry): New.
15487 * gimple.h (enum gimple_debug_subcode): Add
15488 GIMPLE_DEBUG_INLINE_ENTRY.
15489 (gimple_build_debug_inline_entry): Declare.
15490 (gimple_debug_inline_entry_p): New.
15491 (gimple_debug_nonbind_marker_p): Adjust.
15492 * insn-notes.def (INLINE_ENTRY): New.
15493 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15494 inline entry marker notes.
15495 (print_insn): Likewise.
15496 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15497 (INSN_DEBUG_MARKER_KIND): Likewise.
15498 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15499 * tree-inline.c (expand_call_inline): Build and insert
15500 debug_inline_entry stmt.
15501 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15502 inline entry blocks early, if nonbind markers are enabled.
15503 (dump_scope_block): Dump fragment info.
15504 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15505 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15506 (gimple_build_debug_inline_entry): New.
15507 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15508 Enable/disable inline entry points too.
15509 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15510 (DEBUG_INSN): Describe inline entry markers.
15512 * common.opt (gvariable-location-views): New.
15513 (gvariable-location-views=incompat5): New.
15514 * config.in: Rebuilt.
15515 * configure: Rebuilt.
15516 * configure.ac: Test assembler for view support.
15517 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15518 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15519 * dwarf2out.c (var_loc_view): New typedef.
15520 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15521 (dwarf2out_locviews_in_attribute): New.
15522 (dwarf2out_locviews_in_loclist): New.
15523 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15524 (enum dw_line_info_opcode): Add LI_adv_address.
15525 (struct dw_line_info_table): Add view.
15526 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15527 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15528 (zero_view_p): New variable.
15529 (ZERO_VIEW_P): New macro.
15530 (output_asm_line_debug_info): New.
15531 (struct var_loc_node): Add view.
15532 (add_AT_view_list, AT_loc_list): New.
15533 (add_var_loc_to_decl): Add view param. Test it against last.
15534 (new_loc_list): Add view params. Record them.
15535 (AT_loc_list_ptr): Handle loc and view lists.
15536 (view_list_to_loc_list_val_node): New.
15537 (print_dw_val): Handle dw_val_class_view_list.
15538 (size_of_die): Likewise.
15539 (value_format): Likewise.
15540 (loc_list_has_views): New.
15541 (gen_llsym): Set vl_symbol too.
15542 (maybe_gen_llsym, skip_loc_list_entry): New.
15543 (dwarf2out_maybe_output_loclist_view_pair): New.
15544 (output_loc_list): Output view list or entries too.
15545 (output_view_list_offset): New.
15546 (output_die): Handle dw_val_class_view_list.
15547 (output_dwarf_version): New.
15548 (output_compilation_unit_header): Use it.
15549 (output_skeleton_debug_sections): Likewise.
15550 (output_rnglists, output_line_info): Likewise.
15551 (output_pubnames, output_aranges): Update version comments.
15552 (output_one_line_info_table): Output view numbers in asm comments.
15553 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15554 Call maybe_gen_llsym.
15555 (loc_list_from_tree_1): Adjust.
15556 (add_AT_location_description): Create view list attribute if
15557 needed, check it's absent otherwise.
15558 (convert_cfa_to_fb_loc_list): Adjust.
15559 (maybe_emit_file): Call output_asm_line_debug_info for test.
15560 (dwarf2out_var_location): Reset views as needed. Precompute
15561 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15562 attribute. Set view.
15563 (new_line_info_table): Reset next view.
15564 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15565 (dwarf2out_source_line): Likewise. Output view resets and labels to
15566 the assembler, or select appropriate line info opcodes.
15567 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15568 (optimize_string_length): Catch it. Adjust.
15569 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15570 dw_val_class_view_list, and remove it if no longer needed.
15571 (hash_loc_list): Hash view numbers.
15572 (loc_list_hasher::equal): Compare them.
15573 (optimize_location_lists): Check whether a view list symbol is
15574 needed, and whether the locview attribute is present, and
15575 whether they match. Remove the locview attribute if no longer
15577 (index_location_lists): Call skip_loc_list_entry for test.
15578 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15579 Use output_dwarf_version.
15580 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15581 (struct dw_val_node): Add val_view_list.
15582 * final.c (SEEN_NEXT_VIEW): New.
15583 (set_next_view_needed): New.
15584 (clear_next_view_needed): New.
15585 (maybe_output_next_view): New.
15586 (final_start_function): Rename to...
15587 (final_start_function_1): ... this. Take pointer to FIRST,
15588 add SEEN parameter. Emit param bindings in the initial view.
15589 (final_start_function): Reintroduce SEEN-less interface.
15590 (final): Rename to...
15591 (final_1): ... this. Take SEEN parameter. Output final pending
15592 next view at the end.
15593 (final): Reintroduce seen-less interface.
15594 (final_scan_insn): Output pending next view before switching
15595 sections or ending a block. Mark the next view as needed when
15596 outputting variable locations. Notify debug backend of section
15597 changes, and of location view changes.
15598 (rest_of_handle_final): Adjust.
15599 * toplev.c (process_options): Autodetect value for debug variable
15600 location views option. Warn on incompat5 without -gdwarf-5.
15601 * doc/invoke.texi (gvariable-location-views): New.
15602 (gvariable-location-views=incompat5): New.
15603 (gno-variable-location-views): New.
15605 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15607 PR tree-optimization/84136
15608 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15609 that the result of find_edge is non-NULL.
15611 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15614 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15615 storing integer register in SImode. Fix cost of 256 and 512
15616 byte aligned SSE register store.
15618 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15620 * config/i386/i386.c (ix86_multiplication_cost): Fix
15621 multiplication cost for TARGET_AVX512DQ.
15623 2018-02-08 Marek Polacek <polacek@redhat.com>
15625 PR tree-optimization/84238
15626 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15629 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15631 PR tree-optimization/84265
15632 * tree-vect-stmts.c (vectorizable_store): Don't treat
15633 VMAT_CONTIGUOUS accesses as grouped.
15634 (vectorizable_load): Likewise.
15636 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15638 PR tree-optimization/81635
15639 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15640 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15641 (test_round_for_mask): New functions.
15642 (wide_int_cc_tests): Call test_round_for_mask.
15643 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15644 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15645 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15646 range returned by get_range_info.
15648 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15651 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15652 * symtab.c: Include builtins.h
15653 (symtab_node::output_to_lto_symbol_table_p): Move here
15654 from lto-streamer-out.c:output_symbol_p.
15655 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15656 (output_symbol_p): Move all logic to symtab.c
15657 (produce_symtab): Update.
15659 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15661 * config/s390/s390-opts.h (enum indirect_branch): Define.
15662 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15663 (s390_indirect_branch_via_thunk)
15664 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15665 (enum s390_indirect_branch_type): Define.
15666 * config/s390/s390.c (struct s390_frame_layout, struct
15667 machine_function): Remove.
15668 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15669 (indirect_branch_table_label_no, indirect_branch_table_name):
15671 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15672 (enum s390_indirect_branch_option): Define.
15673 (s390_return_addr_from_memory): New function.
15674 (s390_handle_string_attribute): New function.
15675 (s390_attribute_table): Add new attribute handler.
15676 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15677 (s390_indirect_branch_via_thunk): New function.
15678 (s390_indirect_branch_via_inline_thunk): New function.
15679 (s390_function_ok_for_sibcall): When jumping via thunk disallow
15680 sibling call optimization for non z10 compiles.
15681 (s390_emit_call): Force indirect branch target to be a single
15682 register. Add r1 clobber for non-z10 compiles.
15683 (s390_emit_epilogue): Emit return jump via return_use expander.
15684 (s390_reorg): Handle JUMP_INSNs as execute targets.
15685 (s390_option_override_internal): Perform validity checks for the
15686 new command line options.
15687 (s390_indirect_branch_attrvalue): New function.
15688 (s390_indirect_branch_settings): New function.
15689 (s390_set_current_function): Invoke s390_indirect_branch_settings.
15690 (s390_output_indirect_thunk_function): New function.
15691 (s390_code_end): Implement target hook.
15692 (s390_case_values_threshold): Implement target hook.
15693 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15695 * config/s390/s390.h (struct s390_frame_layout)
15696 (struct machine_function): Move here from s390.c.
15697 (TARGET_INDIRECT_BRANCH_NOBP_RET)
15698 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15699 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15700 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15701 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15702 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15703 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15704 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15705 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15706 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15707 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15708 (mnemonic attribute): Add values which aren't recognized
15710 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15711 pattern for branch conversion. Fix mnemonic attribute.
15712 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15713 indirect branch via thunk if requested.
15714 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15715 ("*indirect_jump"): Disable for branch conversion using out of
15717 ("indirect_jump_via_thunk<mode>_z10")
15718 ("indirect_jump_via_thunk<mode>")
15719 ("indirect_jump_via_inlinethunk<mode>_z10")
15720 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15721 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15722 ("casesi_jump_via_inlinethunk<mode>_z10")
15723 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15724 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15725 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15726 ("*indirect2_jump"): Disable for branch conversion.
15727 ("casesi_jump"): Turn into expander and expand patterns for branch
15729 ("return_use"): New expander.
15730 ("*return"): Emit return via thunk and rename it to ...
15731 ("*return<mode>"): ... this one.
15732 * config/s390/s390.opt: Add new options and and enum for the
15735 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15737 * lra-constraints.c (match_reload): Unconditionally use
15738 gen_lowpart_SUBREG, rather than selecting between that
15739 and equivalent gen_rtx_SUBREG code.
15741 2018-02-08 Richard Biener <rguenther@suse.de>
15743 PR tree-optimization/84233
15744 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15745 changed flag instead of boguously re-using phi_inserted.
15747 2018-02-08 Martin Jambor <mjambor@suse.cz>
15749 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15750 static local variables.
15752 2018-02-08 Richard Biener <rguenther@suse.de>
15754 PR tree-optimization/84278
15755 * tree-vect-stmts.c (vectorizable_store): When looking for
15756 smaller vector types to perform grouped strided loads/stores
15757 make sure the mode is supported by the target.
15758 (vectorizable_load): Likewise.
15760 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15762 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15763 Increase LDP/STP opportunities by adding adjacent callee-saves.
15765 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15767 PR rtl-optimization/84068
15768 PR rtl-optimization/83459
15769 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15771 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
15773 PR tree-optimization/84224
15774 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15775 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15776 non-zero arguments.
15778 2018-02-07 Iain Sandoe <iain@codesourcery.com>
15781 * config/rs6000/altivec.md (*restore_world): Remove LR use.
15782 * config/rs6000/predicates.md (restore_world_operation): Adjust op
15783 count, remove one USE.
15785 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
15787 * doc/install.texi (Configuration): Document the
15788 --with-long-double-format={ibm,ieee} PowerPC configuration
15792 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15793 Convert from define_expand to be define_insn_and_split. Rework
15794 float/double/_Float128 conversions to QI/HI/SImode to work with
15795 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
15796 conversions to QI/HImode types did a store and then a load to
15797 truncate the value. For conversions to VSX registers, don't split
15798 the insn, instead emit the code directly. Use the code iterator
15799 any_fix to combine signed and unsigned conversions.
15800 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15801 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15802 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15803 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15804 (fix_<mode>di2_hw): Likewise.
15805 (fixuns_<mode>di2_hw): Likewise.
15806 (fix_<mode>si2_hw): Likewise.
15807 (fixuns_<mode>si2_hw): Likewise.
15808 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15809 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15810 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15811 fix<uns>_trunc<SFDF:mode>si2_p8.
15812 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15813 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15814 (fix<uns>_<mode>_mem): Likewise.
15815 (fctiw<u>z_<mode>_mem): Likewise.
15816 (fix<uns>_<mode>_mem): Likewise.
15817 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15818 the register allocator from doing a direct move to the GPRs to do
15819 a store, and instead use the ISA 3.0 store byte/half-word from
15820 vector register instruction. For IEEE 128-bit floating point,
15821 also optimize stores of 32-bit ints.
15822 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15824 2018-02-07 Alan Hayward <alan.hayward@arm.com>
15826 * genextract.c (push_pathstr_operand): New function to support
15828 (walk_rtx): Call push_pathstr_operand.
15829 (print_path): Support [a-zA-Z].
15831 2018-02-07 Richard Biener <rguenther@suse.de>
15833 PR tree-optimization/84037
15834 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15835 (cse_and_gimplify_to_preheader): Declare.
15836 (vect_get_place_in_interleaving_chain): Likewise.
15837 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15839 (_loop_vec_info::~_loop_vec_info): Delete it.
15840 (cse_and_gimplify_to_preheader): New function.
15841 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15842 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15843 (vectorizable_load): Likewise. For grouped stores always base
15844 the IV on the first element.
15845 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15846 condition before gimplifying.
15848 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15850 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15851 *DIV_EXPR and *MOD_EXPR.
15853 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
15856 * config/i386/i386.c (ix86_option_override_internal): Mask out
15857 the CF_SET bit when checking -fcf-protection.
15859 2018-02-07 Tom de Vries <tom@codesourcery.com>
15862 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15865 2018-02-07 Richard Biener <rguenther@suse.de>
15867 PR tree-optimization/84204
15868 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15871 PR tree-optimization/84205
15872 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15873 special-case isl_ast_op_zdiv_r.
15875 PR tree-optimization/84223
15876 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15877 Only add conditions from within the region.
15878 (gather_bbs::after_dom_children): Adjust.
15880 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15883 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15884 * config/avr/avr.md: Only post-reload split REG-REG moves if
15885 either register is GENERAL_REG_P.
15887 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15889 PR tree-optimization/84235
15890 * tree-ssa-scopedtables.c
15891 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15892 if the subtraction is performed in floating point type where NaNs are
15893 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15894 build 1. Formatting fix.
15896 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15899 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15900 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15901 and skip it regardless of bb boundaries. Use CALL_P macro,
15902 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15903 unnecessarily, formatting fix.
15905 2018-02-06 Michael Collison <michael.collison@arm.com>
15907 * config/arm/thumb2.md:
15908 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15909 (*thumb_mov_notscc): Ditto.
15911 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15914 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15915 unsigned_fix, not "s".
15917 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15919 * configure.ac (gcc_fn_eh_frame_ro): New function.
15920 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15921 correct .eh_frame permissions.
15922 * configure: Regenerate.
15924 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15926 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15927 irrelevant options.
15929 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15931 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15932 Display warning message for -mno-speculate-indirect-jumps.
15934 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15936 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15938 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15940 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15942 PR tree-optimization/84225
15943 * tree-eh.c (find_trapping_overflow): Only call
15944 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15946 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15949 * config/i386/i386.c: Reimplement the check of possible options
15950 -mibt/-mshstk conbination. Change error messages.
15951 * doc/invoke.texi: Fix a typo: remove extra '='.
15953 2018-02-06 Marek Polacek <polacek@redhat.com>
15955 PR tree-optimization/84228
15956 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15958 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15961 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15962 emitted arch directives.
15963 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15964 __ARM_FEATURE_COPROC before changing architectures.
15966 2018-02-06 Richard Biener <rguenther@suse.de>
15968 * config/i386/i386.c (print_reg): Fix typo.
15969 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15971 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15973 * configure: Regenerate.
15975 2018-02-05 Martin Sebor <msebor@redhat.com>
15977 PR tree-optimization/83369
15978 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15981 2018-02-05 Martin Liska <mliska@suse.cz>
15983 * doc/invoke.texi: Cherry-pick upstream r323995.
15985 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15987 * ira.c (ira_init_register_move_cost): Adjust comment.
15989 2018-02-05 Martin Liska <mliska@suse.cz>
15991 PR gcov-profile/84137
15992 * doc/gcov.texi: Fix typo in documentation.
15994 2018-02-05 Martin Liska <mliska@suse.cz>
15996 PR gcov-profile/83879
15997 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15998 using dlopen functionality.
16000 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
16002 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16003 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16004 _mm_maskz_range_ss, _mm_mask_range_round_ss,
16005 _mm_maskz_range_round_ss): New intrinsics.
16006 (__builtin_ia32_rangesd128_round)
16007 (__builtin_ia32_rangess128_round): Remove.
16008 (__builtin_ia32_rangesd128_mask_round,
16009 __builtin_ia32_rangess128_mask_round): New builtins.
16010 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16011 __builtin_ia32_rangess128_round): Remove.
16012 (__builtin_ia32_rangesd128_mask_round,
16013 __builtin_ia32_rangess128_mask_round): New builtins.
16014 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16015 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16016 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16017 "<round_saeonly_constraint>")): Changed to ...
16018 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16019 "<round_saeonly_scalar_constraint>")): ... this.
16020 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16021 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16022 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16023 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16024 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16026 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
16028 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16030 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16031 Remove all values except native, 8540 and 8548.
16033 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
16035 * config/i386/i386.c (ix86_output_function_return): Pass
16036 INVALID_REGNUM, instead of -1, as invalid register number to
16037 indirect_thunk_name and output_indirect_thunk.
16039 2018-02-02 Julia Koval <julia.koval@intel.com>
16041 * config.gcc: Add -march=icelake.
16042 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16043 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16044 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16045 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16046 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16047 (processor_target_table): Add icelake.
16048 (ix86_option_override_internal): Handle new PTAs.
16049 (get_builtin_code_for_version): Handle icelake.
16050 (M_INTEL_COREI7_ICELAKE): New.
16051 (fold_builtin_cpu): Handle icelake.
16052 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16053 * doc/invoke.texi: Add -march=icelake.
16055 2018-02-02 Julia Koval <julia.koval@intel.com>
16057 * config/i386/i386.c (ix86_option_override_internal): Change flags type
16058 to wide_int_bitmask.
16059 * wide-int-bitmask.h: New.
16061 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16064 * config/i386/i386.md: Replace Pmode with word_mode in
16065 builtin_setjmp_setup and builtin_longjmp to support x32.
16067 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
16071 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16073 (rs6000_supported_cpu_names): New static variable.
16074 (linux_cpu_translation_table): Likewise.
16075 (elf_platform) <cpu>: Define new static variable and use it.
16076 Translate kernel AT_PLATFORM name to canonical name if needed.
16077 Error if platform name is unknown.
16079 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16082 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16084 2018-02-01 Jeff Law <law@redhat.com>
16087 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16088 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16089 the scratch if RELEASE_VIA_POP is false.
16090 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16091 If we have to save a temporary register, decrement SIZE appropriately.
16092 Pass new arguments to release_scratch_register_on_entry.
16093 (ix86_adjust_stack_and_probe): Likewise.
16094 (ix86_emit_probe_stack_range): Pass new arguments to
16095 release_scratch_register_on_entry.
16097 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16099 PR rtl-optimization/84157
16100 * combine.c (change_zero_ext): Use REG_P predicate in
16101 front of HARD_REGISTER_P predicate.
16103 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16105 * config/avr/avr.c (avr_option_override): Move disabling of
16106 -fdelete-null-pointer-checks to...
16107 * common/config/avr/avr-common.c (avr_option_optimization_table):
16110 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16112 PR tree-optimization/81635
16113 * tree-data-ref.c (split_constant_offset_1): For types that
16114 wrap on overflow, try to use range info to prove that wrapping
16117 2018-02-01 Renlin Li <renlin.li@arm.com>
16120 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16121 TAILCALL_ADDR_REGS.
16122 (aarch64_register_move_cost): Likewise.
16123 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16124 TAILCALL_ADDR_REGS.
16125 (REG_CLASS_NAMES): Likewise.
16126 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16127 TAILCALL_ADDR_REGS. Remove IP registers.
16128 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16130 2018-02-01 Richard Biener <rguenther@suse.de>
16132 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16133 for specifying RPO order and allow NULL for that.
16134 * domwalk.c (dom_walker::dom_walker): Likewise.
16135 (dom_walker::walk): Handle NULL RPO order.
16136 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16138 (rewrite_update_dom_walker): Likewise.
16139 (mark_def_dom_walker): Likewise.
16141 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16143 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16144 (aarch64_maybe_expand_sve_subreg_move): Declare.
16145 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16146 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16148 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16149 that are semantically a reverse operation.
16150 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16151 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16152 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16154 (aarch64_can_change_mode_class): For big-endian, forbid changes
16155 between two SVE modes if they have different element sizes.
16157 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16159 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16160 the TImode handling for big-endian targets.
16162 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16164 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16165 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16167 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16168 Remove BSWAP handing for big-endian targets and use the form of
16169 LD1RQ appropariate for the mode.
16171 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16173 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16174 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16175 duplicated element.
16177 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16180 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16181 check for operands that need to go through aarch64_sve_reload_be.
16183 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16185 PR tree-optimization/81661
16186 PR tree-optimization/84117
16187 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16188 * tree-eh.c: Include gimplify.h.
16189 (find_trapping_overflow, replace_trapping_overflow,
16190 rewrite_to_non_trapping_overflow): New functions.
16191 * tree-vect-loop.c: Include tree-eh.h.
16192 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16193 * tree-data-ref.c: Include tree-eh.h.
16194 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16196 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
16198 PR rtl-optimization/84123
16199 * combine.c (change_zero_ext): Check if hard register satisfies
16200 can_change_dest_mode before calling gen_lowpart_SUBREG.
16202 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
16205 * ira.c (ira_init_register_move_cost): Remove assert.
16207 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16209 PR rtl-optimization/84071
16210 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16211 * doc/tm.texi: Regenerate.
16213 2018-01-31 Richard Biener <rguenther@suse.de>
16215 PR tree-optimization/84132
16216 * tree-data-ref.c (analyze_miv_subscript): Properly
16217 check whether evolution_function_is_affine_multivariate_p
16218 before calling gcd_of_steps_may_divide_p.
16220 2018-01-31 Julia Koval <julia.koval@intel.com>
16223 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16224 * config/i386/i386.md (rdpid_rex64) New.
16225 (rdpid): Make 32bit only.
16227 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
16230 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16231 an IDENTIFIER_NODE for FUNCTION_TYPE's.
16233 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16236 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16238 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16240 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16242 PR rtl-optimization/84071
16243 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16244 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16246 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16248 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16249 (arc_attribute_table): Add 'aux' attribute.
16250 (arc_in_small_data_p): Consider aux like variables.
16251 (arc_is_aux_reg_p): New function.
16252 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16253 (arc_get_aux_arg): New function.
16254 (prepare_move_operands): Handle aux-register access.
16255 (arc_handle_aux_attribute): New function.
16256 * doc/extend.texi (ARC Variable attributes): Add subsection.
16258 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16260 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16261 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16262 (arc_attribute_table): Add 'uncached' attribute.
16263 (arc_print_operand): Print '.di' flag for uncached memory
16265 (arc_in_small_data_p): Do not consider for small data the uncached
16267 (arc_is_uncached_mem_p): New function.
16268 * config/arc/predicates.md (compact_store_memory_operand): Check
16269 for uncached memory accesses.
16270 (nonvol_nonimm_operand): Likewise.
16271 * doc/extend.texi (ARC Type Attribute): New subsection.
16273 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16276 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16277 falign-loops=): Add Optimization flag.
16279 2018-01-30 Jeff Law <law@redhat.com>
16282 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16283 INT_REGISTERS_SAVED. Check it prior to calling
16284 get_scratch_register_on_entry.
16285 (ix86_adjust_stack_and_probe): Similarly.
16286 (ix86_emit_probe_stack_range): Similarly.
16287 (ix86_expand_prologue): Corresponding changes.
16289 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16292 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16293 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16295 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16298 * lra-constraints.c (curr_insn_transform): Process AND in the
16301 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16303 PR rtl-optimization/83986
16304 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16305 dependence against last_pending_memory_flush in addition to
16306 pending_jump_insns.
16308 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16310 PR tree-optimization/81611
16311 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16314 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16317 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16320 2018-01-30 Richard Biener <rguenther@suse.de>
16321 Jakub Jelinek <jakub@redhat.com>
16323 PR tree-optimization/84111
16324 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16325 inner loops added during recursion, as they don't have up-to-date
16328 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16331 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16332 (can_inline_edge_by_limits_p): ... here.
16333 (can_early_inline_edge_p, check_callers,
16334 update_caller_keys, update_callee_keys, recursive_inlining,
16335 add_new_edges_to_heap, speculation_useful_p,
16336 inline_small_functions,
16337 inline_small_functions, flatten_function,
16338 inline_to_all_callers_1): Update.
16340 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16342 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16345 2018-01-30 Richard Biener <rguenther@suse.de>
16347 PR tree-optimization/83008
16348 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16349 invariant and constant vector uses in stmts when they need
16350 more than one stmt.
16352 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16355 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16356 * configure: Regenerate.
16358 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16360 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16362 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16363 Use gen_rtx_REG rather than gen_lowpart.
16365 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16367 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16368 rather than 0 when creating partial subregs.
16370 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16372 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16375 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16378 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16379 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16380 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16381 flags. This restores the settings used before the 2017-07-24.
16382 Turning off pre increment/decrement/modify allows IVOPTS to
16383 optimize DF/SF loops where the index is an int.
16385 2018-01-29 Richard Biener <rguenther@suse.de>
16386 Kelvin Nilsen <kelvin@gcc.gnu.org>
16389 * tree-vect-stmts.c (vectorizable_call): Don't call
16390 targetm.vectorize_builtin_md_vectorized_function if callee is
16393 2018-01-22 Carl Love <cel@us.ibm.com>
16395 * doc/extend.tex: Fix typo in second arg in
16396 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16398 2018-01-29 Richard Biener <rguenther@suse.de>
16400 PR tree-optimization/84086
16401 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16402 (flush_ssaname_freelist): When SSA names were released reset
16403 the SCEV hash table.
16405 2018-01-29 Richard Biener <rguenther@suse.de>
16407 PR tree-optimization/84057
16408 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16409 removed paths when removing edges.
16411 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16413 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16414 -mfunction-return=@var{choice}.
16416 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16418 PR diagnostic/84034
16419 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16420 Handle CR like TAB.
16421 (layout::print_source_line): Likewise.
16422 (test_get_line_width_without_trailing_whitespace): Add test cases.
16424 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16426 PR middle-end/84040
16427 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16430 2018-01-26 Jim Wilson <jimw@sifive.com>
16432 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16434 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16437 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16439 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16440 and CMP + SUB-immediate -> SUBS.
16442 2018-01-26 Martin Sebor <msebor@redhat.com>
16444 PR tree-optimization/83896
16445 * tree-ssa-strlen.c (get_string_len): Rename...
16446 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16447 Avoid assuming length is constant.
16448 (handle_char_store): Use HOST_WIDE_INT for string length.
16450 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16453 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16454 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16456 2018-01-26 Richard Biener <rguenther@suse.de>
16458 PR rtl-optimization/84003
16459 * dse.c (record_store): Only record redundant stores when
16460 the earlier store aliases at least all accesses the later one does.
16462 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16464 PR rtl-optimization/83985
16465 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16466 REG_CFA_RESTORE insns.
16467 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16468 REG_CFA_RESTORE insns here.
16471 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16472 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16474 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16476 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16477 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16478 (arc_init): Likewise.
16479 (arc_override_options): Likewise.
16480 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16482 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16484 * config/arc/arc.h (TARGET_DBNZ): Define.
16485 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16486 properly set the tune attribute.
16487 (dbnz): Use TARGET_DBNZ guard.
16488 * config/arc/arc.opt (mtune): Add core3 option.
16490 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16492 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16493 recognize new pic like addresses.
16494 (arc_delegitimize_address): Clean up.
16496 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16498 * config/arc/arc-arches.def: Option mrf16 valid for all
16500 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16501 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16502 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16503 * config/arc/arc-tables.opt: Regenerate.
16504 * config/arc/arc.c (arc_conditional_register_usage): Handle
16505 reduced register file case.
16506 (arc_file_start): Set must have build attributes.
16507 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16508 mrf16 option value.
16509 * config/arc/arc.opt (mrf16): Add new option.
16510 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16511 * config/arc/genmultilib.awk: Handle new mrf16 option.
16512 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16513 * config/arc/t-multilib: Regenerate.
16514 * doc/invoke.texi (ARC Options): Document mrf16 option.
16516 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16518 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16519 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16520 (arc_attribute_table): Add 'secure_call' attribute.
16521 (arc_print_operand): Print secure call operand.
16522 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16524 (arc_is_secure_call_p): New function. * config/arc/arc.md
16525 (call_i): Add support for sjli instruction.
16526 (call_value_i): Likewise.
16527 * config/arc/constraints.md (Csc): New constraint.
16529 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16530 John Eric Martin <John.Martin@emmicro-us.com>
16532 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16533 * config/arc/arc.c (_arc_jli_section): New struct.
16534 (arc_jli_section): New type.
16535 (rc_jli_sections): New static variable.
16536 (arc_handle_jli_attribute): New function.
16537 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16538 (arc_file_end): New function.
16539 (TARGET_ASM_FILE_END): Define.
16540 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16541 (arc_add_jli_section): New function.
16542 (jli_call_scan): Likewise.
16543 (arc_reorg): Call jli_call_scan.
16544 (arc_output_addsi): Remove 'S' from printing asm operand.
16545 (arc_is_jli_call_p): New function.
16546 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16548 (movhi_insn): Likewise.
16549 (movsi_insn): Likewise.
16550 (movsi_set_cc_insn): Likewise.
16551 (loadqi_update): Likewise.
16552 (load_zeroextendqisi_update): Likewise.
16553 (load_signextendqisi_update): Likewise.
16554 (loadhi_update): Likewise.
16555 (load_zeroextendhisi_update): Likewise.
16556 (load_signextendhisi_update): Likewise.
16557 (loadsi_update): Likewise.
16558 (loadsf_update): Likewise.
16559 (movsicc_insn): Likewise.
16560 (bset_insn): Likewise.
16561 (bxor_insn): Likewise.
16562 (bclr_insn): Likewise.
16563 (bmsk_insn): Likewise.
16564 (bicsi3_insn): Likewise.
16565 (cmpsi_cc_c_insn): Likewise.
16566 (movsi_ne): Likewise.
16567 (movsi_cond_exec): Likewise.
16568 (clrsbsi2): Likewise.
16569 (norm_f): Likewise.
16579 (call_i): Remove 'S' asm letter, add jli instruction.
16580 (call_value_i): Likewise.
16581 * config/arc/arc.op (mjli-always): New option.
16582 * config/arc/constraints.md (Cji): New constraint.
16583 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16585 (subsf3_fpx): Likewise.
16586 (mulsf3_fpx): Likewise.
16587 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16589 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16590 function attrbutes.
16591 * doc/invoke.texi (ARC): Document mjli-always option.
16593 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16595 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16596 avoid addition with 0 and use incw and decw where possible.
16598 2018-01-26 Richard Biener <rguenther@suse.de>
16600 PR tree-optimization/81082
16601 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16602 association if it requires casting to unsigned.
16603 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16604 from fold_plusminus_mult_expr to catch important cases late when
16605 range info is available.
16607 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16609 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16610 * configure.ac (hidden_linkonce): New test.
16611 * configure: Regenerate.
16612 * config.in: Regenerate.
16614 2018-01-26 Julia Koval <julia.koval@intel.com>
16616 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16617 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16618 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16619 _mm_mask_bitshuffle_epi64_mask): Fix type.
16620 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16621 USI_FTYPE_V4DI_V4DI_USI): Remove.
16622 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16623 __builtin_ia32_vpshufbitqmb256_mask,
16624 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16625 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16626 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16628 2018-01-26 Alan Modra <amodra@gmail.com>
16631 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16632 UNSPEC_VBPERMQ. Sort other unspecs.
16634 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16636 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16638 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16640 PR middle-end/83055
16641 * predict.c (drop_profile): Do not push/pop cfun; update also
16643 (handle_missing_profiles): Fix logic looking for zero profiles.
16645 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16647 PR middle-end/83977
16648 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16649 on functions with #pragma omp declare simd or functions with simd
16651 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16652 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16653 Remove trailing \n from warning_at calls.
16655 2018-01-25 Tom de Vries <tom@codesourcery.com>
16658 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16659 for neutered workers.
16661 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16664 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16665 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16667 2018-01-24 Jeff Law <law@redhat.com>
16670 * i386.c (get_probe_interval): Move to earlier point.
16671 (ix86_compute_frame_layout): If -fstack-clash-protection and
16672 the frame is larger than the probe interval, then use pushes
16673 to save registers rather than reg->mem moves.
16674 (ix86_expand_prologue): Remove conditional for int_registers_saved
16677 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
16680 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16681 min/max for never referenced object.
16683 2018-01-24 Jakub Jelinek <jakub@redhat.com>
16685 PR middle-end/83977
16686 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16688 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16689 attributes from DECL_ATTRIBUTES (decl) without affecting
16690 DECL_ATTRIBUTES (current_function_decl).
16691 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16692 functions with non-NULL DECL_ABSTRACT_ORIGIN.
16694 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
16696 PR tree-optimization/83979
16697 * fold-const.c (fold_comparison): Use constant_boolean_node
16698 instead of boolean_{true,false}_node.
16700 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
16702 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16705 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16707 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16708 Simplify the clause that sets the length attribute.
16709 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16710 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16711 clause that sets the length attribute.
16712 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16714 2018-01-24 Tom de Vries <tom@codesourcery.com>
16717 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16718 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16719 Add strict parameter.
16720 (prevent_branch_around_nothing): Insert dummy insn between branch to
16721 label and label with no ptx insn inbetween.
16722 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16724 2018-01-24 Tom de Vries <tom@codesourcery.com>
16727 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16728 for neutered threads in warp.
16729 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16731 2018-01-24 Richard Biener <rguenther@suse.de>
16733 PR tree-optimization/83176
16734 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16737 2018-01-24 Richard Biener <rguenther@suse.de>
16739 PR tree-optimization/82819
16740 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16741 code generating pluses that are no-ops in the target precision.
16743 2018-01-24 Richard Biener <rguenther@suse.de>
16745 PR middle-end/84000
16746 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16748 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16750 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16751 to merge probabilities.
16752 * predict.c (probably_never_executed): Also mark as cold functions
16753 with global 0 profile and guessed local profile.
16754 * profile-count.c (profile_probability::combine_with_count): New
16756 * profile-count.h (profile_probability::operator*,
16757 profile_probability::operator*=, profile_probability::operator/,
16758 profile_probability::operator/=): Reduce precision to adjusted
16759 and set value to guessed on contradictory divisions.
16760 (profile_probability::combine_with_freq): Remove.
16761 (profile_probability::combine_wiht_count): Declare.
16762 (profile_count::force_nonzero):: Set to adjusted.
16763 (profile_count::probability_in):: Set quality to adjusted.
16764 * tree-ssa-tail-merge.c (replace_block_by): Use
16765 combine_with_count.
16767 2018-01-23 Andrew Waterman <andrew@sifive.com>
16768 Jim Wilson <jimw@sifive.com>
16770 * config/riscv/riscv.c (riscv_stack_boundary): New.
16771 (riscv_option_override): Set riscv_stack_boundary. Handle
16772 riscv_preferred_stack_boundary_arg.
16773 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16774 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16775 (STACK_BOUNDARY): Set to riscv_stack_boundary.
16776 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16777 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16778 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16780 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
16783 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16784 of struct ix86_frame.
16785 (ix86_expand_epilogue): Likewise. Add a local variable for
16786 the reg_save_offset field in struct ix86_frame.
16788 2018-01-23 Bin Cheng <bin.cheng@arm.com>
16790 PR tree-optimization/82604
16791 * tree-loop-distribution.c (enum partition_kind): New enum item
16792 PKIND_PARTIAL_MEMSET.
16793 (partition_builtin_p): Support above new enum item.
16794 (generate_code_for_partition): Ditto.
16795 (compute_access_range): Differentiate cases that equality can be
16796 proven at all loops, the innermost loops or no loops.
16797 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16798 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
16799 (finalize_partitions, distribute_loop): Don't fuse partition of
16800 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16801 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16802 parloop is enabled.
16804 2018-01-23 Martin Liska <mliska@suse.cz>
16806 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16807 order to ignore the predictor.
16808 (PRED_POLYMORPHIC_CALL): Likewise.
16809 (PRED_RECURSIVE_CALL): Likewise.
16811 2018-01-23 Martin Liska <mliska@suse.cz>
16813 * tree-profile.c (tree_profiling): Print function header to
16814 aware reader which function we are working on.
16815 * value-prof.c (gimple_find_values_to_profile): Do not print
16816 not interesting value histograms.
16818 2018-01-23 Martin Liska <mliska@suse.cz>
16820 * profile-count.h (enum profile_quality): Add
16821 profile_uninitialized as the first value. Do not number values
16822 as they are zero based.
16823 (profile_count::verify): Update sanity check.
16824 (profile_probability::verify): Likewise.
16826 2018-01-23 Nathan Sidwell <nathan@acm.org>
16828 * doc/invoke.texi (ffor-scope): Deprecate.
16830 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16832 PR tree-optimization/83510
16833 * domwalk.c (set_all_edges_as_executable): New function.
16834 (dom_walker::dom_walker): Convert bool param
16835 "skip_unreachable_blocks" to enum reachability. Move setup of
16836 edge flags to set_all_edges_as_executable and only do it when
16837 reachability is REACHABLE_BLOCKS.
16838 * domwalk.h (enum dom_walker::reachability): New enum.
16839 (dom_walker::dom_walker): Convert bool param
16840 "skip_unreachable_blocks" to enum reachability.
16841 (set_all_edges_as_executable): New decl.
16842 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
16843 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16845 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16846 but converting true to REACHABLE_BLOCKS.
16847 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16849 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16850 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16851 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16853 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16854 if check_all_array_refs will be called.
16856 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16858 * tree.c (selftest::test_location_wrappers): Add more test
16861 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16863 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16864 (selftest::test_bit_in_range): Likewise.
16866 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16869 * doc/sourcebuild.texi (vect_float): Say that the selector
16870 only describes the situation when -funsafe-math-optimizations is on.
16871 (vect_float_strict): Document.
16873 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16875 PR tree-optimization/83965
16876 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16877 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16878 instead of checking only for a reduction.
16879 (vect_recog_widen_sum_pattern): Likewise.
16881 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16883 * predict.c (probably_never_executed): Only use precise profile info.
16884 (compute_function_frequency): Skip after inlining hack since we now
16885 have quality checking.
16887 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16889 * profile-count.h (profile_probability::very_unlikely,
16890 profile_probability::unlikely, profile_probability::even): Set
16891 precision to guessed.
16893 2018-01-23 Richard Biener <rguenther@suse.de>
16895 PR tree-optimization/83963
16896 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16897 Properly terminate dominator walk when crossing the exit edge not
16898 when visiting its source block.
16900 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16903 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16904 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16906 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16908 PR tree-optimization/83957
16909 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16910 semicolon after for body surrounded by braces.
16912 PR tree-optimization/83081
16913 * profile-count.h (profile_probability::split): New method.
16914 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16915 Use profile_probability::split.
16916 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16917 when splitting a single conditional jump into 2.
16919 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16921 PR tree-optimization/69452
16922 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16925 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16927 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16928 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16929 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16931 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16933 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16935 * config/rl78/rl78.md (movdi): New define_expand.
16936 * config/rl78/rl78.c (rl78_split_movdi): New function.
16938 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16941 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16943 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16944 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16945 128-bit to produce an UNSPEC move to get the double word with the
16946 signbit and then a shift directly to do signbit.
16947 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16948 implementation with a new version that just does either a direct
16949 move or a regular move. Move memory interface to separate insns.
16950 Move insns so they are next to the expander.
16951 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16952 with signbit move. Split big and little endian case.
16953 (signbit<mode>2_dm_mem_le): Likewise.
16954 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16955 (signbit<mode>2_dm2): Likewise.
16957 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16959 * config/rl78/rl78.md (anddi3): New define_expand.
16961 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16963 * config/rl78/rl78.md (umindi3): New define_expand.
16965 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16967 * config/rl78/rl78.md (smindi3): New define_expand.
16969 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16971 * config/rl78/rl78.md (smaxdi3): New define_expand.
16973 2018-01-22 Carl Love <cel@us.ibm.com>
16975 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16976 LVX_V1TI): Add macro expansion.
16977 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16978 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16979 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16980 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16981 Change check to determine if the instruction is a byte reversing
16982 entry. Fix typo in comment.
16983 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16984 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16985 Add def_builtin calls for new builtins.
16986 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16987 Add define_insn expansion.
16989 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16991 * config/rl78/rl78.md (umaxdi3): New define_expand.
16993 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16995 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16996 for non-QImode registers.
16998 2018-01-22 Richard Biener <rguenther@suse.de>
17000 PR tree-optimization/83963
17001 * graphite-scop-detection.c (scop_detection::get_sese): Delay
17002 including the loop exit block.
17003 (scop_detection::merge_sese): Likewise.
17004 (scop_detection::add_scop): Do it here instead.
17006 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17008 * doc/sourcebuild.texi (arm_softfloat): Document.
17010 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
17013 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17014 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17015 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17017 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17018 David Edelsohn <dje.gcc@gmail.com>
17021 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17022 Change "crset eq" to "crset 2".
17023 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17024 (*call_indirect_aix<mode>_nospec): Likewise.
17025 (*call_value_indirect_aix<mode>_nospec): Likewise.
17026 (*call_indirect_elfv2<mode>_nospec): Likewise.
17027 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17028 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17029 change assembly output from . to $.
17030 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17031 (indirect_jump<mode>_nospec): Change assembly output from . to $.
17032 (*tablejump<mode>_internal1_nospec): Likewise.
17034 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
17037 * config/sh/sh_optimize_sett_clrt.cc:
17038 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17040 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
17042 PR tree-optimization/83940
17043 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17044 offset_dt to vect_constant_def rather than vect_unknown_def_type.
17045 (vect_check_load_store_mask): Add a mask_dt_out parameter and
17046 use it to pass back the definition type.
17047 (vect_check_store_rhs): Likewise rhs_dt_out.
17048 (vect_build_gather_load_calls): Add a mask_dt argument and use
17049 it instead of a call to vect_is_simple_use.
17050 (vectorizable_store): Update calls to vect_check_load_store_mask
17051 and vect_check_store_rhs. Use the dt returned by the latter instead
17052 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
17053 instead of calls to vect_is_simple_use. Pass the scalar rather
17054 than the vector operand to vect_is_simple_use when handling
17055 second and subsequent copies of an rhs value.
17056 (vectorizable_load): Update calls to vect_check_load_store_mask
17057 and vect_build_gather_load_calls. Use the cached mask_dt and
17058 gs_info.offset_dt instead of calls to vect_is_simple_use.
17060 2018-01-20 Jakub Jelinek <jakub@redhat.com>
17062 PR middle-end/83945
17063 * tree-emutls.c: Include gimplify.h.
17064 (lower_emutls_2): New function.
17065 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17066 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17067 it before further processing.
17070 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17071 UINTVAL (trueop1) instead of INTVAL (op1).
17073 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17077 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17078 INCOMING_FRAME_SP_OFFSET if not defined.
17079 (scan_trace): Add ENTRY argument. If true and
17080 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17081 emit a note to adjust the CFA offset.
17082 (create_cfi_notes): Adjust scan_trace callers.
17083 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17084 INCOMING_FRAME_SP_OFFSET in the CIE.
17085 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17086 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17088 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17089 * doc/tm.texi: Regenerated.
17091 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17093 PR rtl-optimization/83147
17094 * lra-constraints.c (remove_inheritance_pseudos): Use
17095 lra_substitute_pseudo_within_insn.
17097 2018-01-19 Tom de Vries <tom@codesourcery.com>
17098 Cesar Philippidis <cesar@codesourcery.com>
17101 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17103 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17106 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17107 spaces for function labels.
17109 2018-01-19 Martin Liska <mliska@suse.cz>
17111 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17112 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17113 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17114 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17115 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17116 (PRED_CONST_RETURN): Change from 69 to 65.
17117 (PRED_NULL_RETURN): Change from 91 to 71.
17118 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17119 (PRED_LOOP_GUARD): Change from 66 to 73.
17121 2018-01-19 Martin Liska <mliska@suse.cz>
17123 * predict.c (predict_insn_def): Add new assert.
17124 (struct branch_predictor): Change type to signed integer.
17125 (test_prediction_value_range): Amend test to cover
17126 PROB_UNINITIALIZED.
17127 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17128 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17129 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17130 (PRED_LOOP_IV_COMPARE): Likewise.
17131 * predict.h (PROB_UNINITIALIZED): Define new constant.
17133 2018-01-19 Martin Liska <mliska@suse.cz>
17135 * predict.c (dump_prediction): Add new format for
17136 analyze_brprob.py script which is enabled with -details
17138 * profile-count.h (precise_p): New function.
17140 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17142 PR tree-optimization/83922
17143 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17144 there are no statements that need masking.
17145 (vect_active_double_reduction_p): New function.
17146 (vect_analyze_loop_operations): Use it when handling phis that
17147 are not in the loop header.
17149 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17151 PR tree-optimization/83914
17152 * tree-vect-loop.c (vectorizable_induction): Don't convert
17153 init_expr or apply the peeling adjustment for inductions
17154 that are nested within the vectorized loop.
17156 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17158 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17161 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17165 * function.h (gimplify_parameters): Add gimple_seq * argument.
17166 * function.c: Include gimple.h and options.h.
17167 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17168 for the added local temporaries if needed.
17169 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17170 if there are any parameter cleanups, wrap whole body into a
17171 try/finally with the cleanups.
17173 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17176 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17177 Use GET_MODE_CLASS for scalar floating point.
17179 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17183 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17184 Fix call of call_cgraph_insertion_hooks.
17186 2018-01-18 Martin Sebor <msebor@redhat.com>
17188 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17190 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17193 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17196 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
17199 * common.opt: (-ffile-prefix-map): New option.
17200 * opts.c (common_handle_option): Defer it.
17201 * opts-global.c (handle_common_deferred_options): Handle it.
17202 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17203 * file-prefix-map.h: New file.
17204 (remap_debug_filename, add_debug_prefix_map): ...here.
17205 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17206 * final.c (debug_prefix_map, add_debug_prefix_map
17207 remap_debug_filename): Move to...
17208 * file-prefix-map.c: New file.
17209 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17210 generalize, get rid of alloca(), use strrchr() instead of strchr().
17211 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17212 Implement in terms of add_prefix_map().
17213 (remap_macro_filename, remap_debug_filename): Implement in term of
17215 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17216 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17217 * dbxout.c: Include file-prefix-map.h.
17218 * varasm.c: Likewise.
17219 * vmsdbgout.c: Likewise.
17220 * xcoffout.c: Likewise.
17221 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17222 * doc/cppopts.texi (-fmacro-prefix-map): Document.
17223 * doc/invoke.texi (-ffile-prefix-map): Document.
17224 (-fdebug-prefix-map): Update description.
17226 2018-01-18 Martin Liska <mliska@suse.cz>
17228 * config/i386/i386.c (indirect_thunk_name): Document that also
17230 (output_indirect_thunk): Document why both instructions
17231 (pause and lfence) are generated.
17233 2018-01-18 Richard Biener <rguenther@suse.de>
17235 PR tree-optimization/83887
17236 * graphite-scop-detection.c
17237 (scop_detection::get_nearest_dom_with_single_entry): Remove.
17238 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17239 (scop_detection::merge_sese): Re-implement with a flood-fill
17240 algorithm that properly finds a SESE region if it exists.
17242 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17245 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17246 pointer_diff optimizations use view_convert instead of convert.
17248 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17250 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17251 Generate different code for -mno-speculate-indirect-jumps.
17252 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17253 (*call_indirect_aix<mode>): Disable for
17254 -mno-speculate-indirect-jumps.
17255 (*call_indirect_aix<mode>_nospec): New define_insn.
17256 (*call_value_indirect_aix<mode>): Disable for
17257 -mno-speculate-indirect-jumps.
17258 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17259 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17260 -mno-speculate-indirect-jumps.
17261 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17263 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17265 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17266 long double type, set the flags for noting the default long double
17267 type, even if we don't pass or return a long double type.
17269 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17272 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17275 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17277 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17278 support for merge[hl].
17279 (fold_mergehl_helper): New helper function.
17280 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17281 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17282 (altivec_vmrglw_direct): Add xxmrglw insn.
17284 2018-01-17 Andrew Waterman <andrew@sifive.com>
17286 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17287 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17289 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17292 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17293 call the lto_location_cache before reading the
17294 DECL_SOURCE_LOCATION of the types.
17296 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17297 Richard Sandiford <richard.sandiford@linaro.org>
17299 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17300 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17301 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17302 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17303 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17305 * config/aarch64/constraints.md (aarch64_movti_operand):
17307 * config/aarch64/predicates.md (Uti): Add new constraint.
17309 2018-01-17 Carl Love <cel@us.ibm.com>
17311 * config/rs6000/vsx.md (define_expand xl_len_r,
17312 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17313 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17315 (define_expand, define_insn): Move the shift left from the
17316 define_insn to the define_expand for lxvl and stxvl instructions.
17317 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17318 and XL_LEN_R definitions to PURE.
17320 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17322 * config/i386/i386.c (indirect_thunk_name): Declare regno
17323 as unsigned int. Compare regno with INVALID_REGNUM.
17324 (output_indirect_thunk): Ditto.
17325 (output_indirect_thunk_function): Ditto.
17326 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17327 in the call to output_indirect_thunk_function.
17329 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17331 PR middle-end/83884
17332 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17333 rather than the size of inner_type to determine the stack slot size
17334 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17336 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17339 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17342 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17344 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17345 endian Linux systems to optionally enable multilibs for selecting
17346 the long double type if the user configured an explicit type.
17347 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17348 have no long double multilibs if not defined.
17349 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17350 warn if the user used -mabi={ieee,ibm}longdouble and we built
17351 multilibs for long double.
17352 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17353 appropriate multilib option.
17354 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17356 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17357 for building long double multilibs.
17358 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17360 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17362 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17365 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17367 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17370 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17373 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17376 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17378 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17379 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17381 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17383 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17384 different rtl trees depending on TARGET_64BIT.
17385 (rs6000_gen_lvx): Likewise.
17387 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17389 * config/visium/visium.md (nop): Tweak comment.
17390 (hazard_nop): Likewise.
17392 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17394 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17395 -mspeculate-indirect-jumps.
17396 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17397 for -mno-speculate-indirect-jumps.
17398 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17399 (*call_value_indirect_elfv2<mode>): Disable for
17400 -mno-speculate-indirect-jumps.
17401 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17402 (indirect_jump): Emit different RTL for
17403 -mno-speculate-indirect-jumps.
17404 (*indirect_jump<mode>): Disable for
17405 -mno-speculate-indirect-jumps.
17406 (*indirect_jump<mode>_nospec): New define_insn.
17407 (tablejump): Emit different RTL for
17408 -mno-speculate-indirect-jumps.
17409 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17410 (tablejumpsi_nospec): New define_expand.
17411 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17412 (tablejumpdi_nospec): New define_expand.
17413 (*tablejump<mode>_internal1): Disable for
17414 -mno-speculate-indirect-jumps.
17415 (*tablejump<mode>_internal1_nospec): New define_insn.
17416 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17419 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17421 * caller-save.c (insert_save): Drop unnecessary parameter. All
17424 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17425 Richard Biener <rguenth@suse.de>
17428 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17429 return early, inline manually is_gimple_sizepos. Make sure if we
17430 call gimplify_expr we don't end up with a gimple constant.
17431 * tree.c (variably_modified_type_p): Don't return true for
17432 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17433 * gimplify.h (is_gimple_sizepos): Remove.
17435 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17437 PR tree-optimization/83857
17438 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17439 vectorizable_live_operation for pure SLP statements.
17440 (vectorizable_live_operation): Handle PHIs.
17442 2018-01-16 Richard Biener <rguenther@suse.de>
17444 PR tree-optimization/83867
17445 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17446 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17448 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17451 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17452 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17453 If off is not INTEGER_CST, issue a may not be aligned warning
17454 rather than isn't aligned. Use isn%'t rather than isn't.
17455 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17457 <case MULT_EXPR>: Improve the case when bottom and one of the
17458 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17459 operand, in that case check if the other operand is multiple of
17460 bottom divided by the INTEGER_CST operand.
17462 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17465 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17466 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17467 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17468 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17469 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17470 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17471 (pa_function_arg_size): New function.
17473 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17475 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17476 in a separate statement.
17478 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17480 PR tree-optimization/83847
17481 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17482 group gathers and scatters.
17484 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17486 PR rtl-optimization/86620
17487 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17489 PR rtl-optimization/83213
17490 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17491 to last if both are JUMP_INSNs.
17493 PR tree-optimization/83843
17494 * gimple-ssa-store-merging.c
17495 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17496 store_immediate_info for bswap/nop orig_stores.
17498 2018-01-15 Andrew Waterman <andrew@sifive.com>
17500 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17502 <UDIV>: Increase cost if !TARGET_DIV.
17504 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17506 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17507 (define_attr "cr_logical_3op"): New.
17508 (cceq_ior_compare): Adjust.
17509 (cceq_ior_compare_complement): Adjust.
17510 (*cceq_rev_compare): Adjust.
17511 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17512 (is_cracked_insn): Adjust.
17513 (insn_must_be_first_in_group): Adjust.
17514 * config/rs6000/40x.md: Adjust.
17515 * config/rs6000/440.md: Adjust.
17516 * config/rs6000/476.md: Adjust.
17517 * config/rs6000/601.md: Adjust.
17518 * config/rs6000/603.md: Adjust.
17519 * config/rs6000/6xx.md: Adjust.
17520 * config/rs6000/7450.md: Adjust.
17521 * config/rs6000/7xx.md: Adjust.
17522 * config/rs6000/8540.md: Adjust.
17523 * config/rs6000/cell.md: Adjust.
17524 * config/rs6000/e300c2c3.md: Adjust.
17525 * config/rs6000/e500mc.md: Adjust.
17526 * config/rs6000/e500mc64.md: Adjust.
17527 * config/rs6000/e5500.md: Adjust.
17528 * config/rs6000/e6500.md: Adjust.
17529 * config/rs6000/mpc.md: Adjust.
17530 * config/rs6000/power4.md: Adjust.
17531 * config/rs6000/power5.md: Adjust.
17532 * config/rs6000/power6.md: Adjust.
17533 * config/rs6000/power7.md: Adjust.
17534 * config/rs6000/power8.md: Adjust.
17535 * config/rs6000/power9.md: Adjust.
17536 * config/rs6000/rs64.md: Adjust.
17537 * config/rs6000/titan.md: Adjust.
17539 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17541 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17542 ix86_indirect_branch_register logic.
17544 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17546 * config/i386/constraints.md (Bs): Update
17547 ix86_indirect_branch_register check. Don't check
17548 ix86_indirect_branch_register with GOT_memory_operand.
17550 * config/i386/predicates.md (GOT_memory_operand): Don't check
17551 ix86_indirect_branch_register here.
17552 (GOT32_symbol_operand): Likewise.
17554 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17556 * config/i386/predicates.md (constant_call_address_operand):
17557 Rewrite ix86_indirect_branch_register logic.
17558 (sibcall_insn_operand): Likewise.
17560 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17562 * config/i386/constraints.md (Bs): Replace
17563 ix86_indirect_branch_thunk_register with
17564 ix86_indirect_branch_register.
17566 * config/i386/i386.md (indirect_jump): Likewise.
17567 (tablejump): Likewise.
17568 (*sibcall_memory): Likewise.
17569 (*sibcall_value_memory): Likewise.
17570 Peepholes of indirect call and jump via memory: Likewise.
17571 * config/i386/i386.opt: Likewise.
17572 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17573 (GOT_memory_operand): Likewise.
17574 (call_insn_operand): Likewise.
17575 (sibcall_insn_operand): Likewise.
17576 (GOT32_symbol_operand): Likewise.
17578 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17580 PR middle-end/83837
17581 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17582 type rather than type addr's type points to.
17583 (expand_omp_atomic_mutex): Likewise.
17584 (expand_omp_atomic): Likewise.
17586 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17589 * config/i386/i386.c (output_indirect_thunk_function): Use
17590 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17591 for __x86_return_thunk.
17593 2018-01-15 Richard Biener <rguenther@suse.de>
17595 PR middle-end/83850
17596 * expmed.c (extract_bit_field_1): Fix typo.
17598 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17601 * config/arm/iterators.md (VF): New mode iterator.
17602 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17603 Remove integer-related logic from pattern.
17604 (neon_vabd<mode>_3): Likewise.
17606 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17608 PR middle-end/82694
17609 * common.opt (fstrict-overflow): No longer an alias.
17610 (fwrapv-pointer): New option.
17611 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17612 also for pointer types based on flag_wrapv_pointer.
17613 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17614 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17615 opts->x_flag_wrapv got set.
17616 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17617 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17618 POINTER_TYPE_OVERFLOW_UNDEFINED.
17619 * match.pd: Likewise in address comparison pattern.
17620 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17622 2018-01-15 Richard Biener <rguenther@suse.de>
17625 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17626 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17627 Reset type names to their identifier if their TYPE_DECL doesn't
17628 have linkage (and thus is used for ODR and devirt).
17629 (save_debug_info_for_decl): Remove.
17630 (save_debug_info_for_type): Likewise.
17631 (add_tree_to_fld_list): Adjust.
17632 * tree-pretty-print.c (dump_generic_node): Make dumping of
17633 type names more robust.
17635 2018-01-15 Richard Biener <rguenther@suse.de>
17637 * BASE-VER: Bump to 8.0.1.
17639 2018-01-14 Martin Sebor <msebor@redhat.com>
17642 * builtins.c (check_access): Avoid warning when the no-warning bit
17645 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17647 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17648 * ira-color (allocno_hard_regs_compare): Likewise.
17650 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17653 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17654 Use .pushsection/.popsection.
17656 2018-01-14 Martin Sebor <msebor@redhat.com>
17659 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17661 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17663 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17664 entry from extra_headers.
17665 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17666 extra_headers, make the list bitwise identical to the i?86-*-* one.
17668 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17670 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17671 -mcmodel=large with -mindirect-branch=thunk,
17672 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17673 -mfunction-return=thunk-extern.
17674 * doc/invoke.texi: Document -mcmodel=large is incompatible with
17675 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17676 -mfunction-return=thunk and -mfunction-return=thunk-extern.
17678 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17680 * config/i386/i386.c (print_reg): Print the name of the full
17681 integer register without '%'.
17682 (ix86_print_operand): Handle 'V'.
17683 * doc/extend.texi: Document 'V' modifier.
17685 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17687 * config/i386/constraints.md (Bs): Disallow memory operand for
17688 -mindirect-branch-register.
17690 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17691 (GOT_memory_operand): Likewise.
17692 (call_insn_operand): Likewise.
17693 (sibcall_insn_operand): Likewise.
17694 (GOT32_symbol_operand): Likewise.
17695 * config/i386/i386.md (indirect_jump): Call convert_memory_address
17696 for -mindirect-branch-register.
17697 (tablejump): Likewise.
17698 (*sibcall_memory): Likewise.
17699 (*sibcall_value_memory): Likewise.
17700 Disallow peepholes of indirect call and jump via memory for
17701 -mindirect-branch-register.
17702 (*call_pop): Replace m with Bw.
17703 (*call_value_pop): Likewise.
17704 (*sibcall_pop_memory): Replace m with Bs.
17705 * config/i386/i386.opt (mindirect-branch-register): New option.
17706 * doc/invoke.texi: Document -mindirect-branch-register option.
17708 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17710 * config/i386/i386-protos.h (ix86_output_function_return): New.
17711 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17712 set function_return_type.
17713 (indirect_thunk_name): Add ret_p to indicate thunk for function
17715 (output_indirect_thunk_function): Pass false to
17716 indirect_thunk_name.
17717 (ix86_output_indirect_branch_via_reg): Likewise.
17718 (ix86_output_indirect_branch_via_push): Likewise.
17719 (output_indirect_thunk_function): Create alias for function
17720 return thunk if regno < 0.
17721 (ix86_output_function_return): New function.
17722 (ix86_handle_fndecl_attribute): Handle function_return.
17723 (ix86_attribute_table): Add function_return.
17724 * config/i386/i386.h (machine_function): Add
17725 function_return_type.
17726 * config/i386/i386.md (simple_return_internal): Use
17727 ix86_output_function_return.
17728 (simple_return_internal_long): Likewise.
17729 * config/i386/i386.opt (mfunction-return=): New option.
17730 (indirect_branch): Mention -mfunction-return=.
17731 * doc/extend.texi: Document function_return function attribute.
17732 * doc/invoke.texi: Document -mfunction-return= option.
17734 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17736 * config/i386/i386-opts.h (indirect_branch): New.
17737 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17738 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17739 with local indirect jump when converting indirect call and jump.
17740 (ix86_set_indirect_branch_type): New.
17741 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17742 (indirectlabelno): New.
17743 (indirect_thunk_needed): Likewise.
17744 (indirect_thunk_bnd_needed): Likewise.
17745 (indirect_thunks_used): Likewise.
17746 (indirect_thunks_bnd_used): Likewise.
17747 (INDIRECT_LABEL): Likewise.
17748 (indirect_thunk_name): Likewise.
17749 (output_indirect_thunk): Likewise.
17750 (output_indirect_thunk_function): Likewise.
17751 (ix86_output_indirect_branch_via_reg): Likewise.
17752 (ix86_output_indirect_branch_via_push): Likewise.
17753 (ix86_output_indirect_branch): Likewise.
17754 (ix86_output_indirect_jmp): Likewise.
17755 (ix86_code_end): Call output_indirect_thunk_function if needed.
17756 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17758 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17759 (ix86_attribute_table): Add indirect_branch.
17760 * config/i386/i386.h (machine_function): Add indirect_branch_type
17761 and has_local_indirect_jump.
17762 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17764 (tablejump): Likewise.
17765 (*indirect_jump): Use ix86_output_indirect_jmp.
17766 (*tablejump_1): Likewise.
17767 (simple_return_indirect_internal): Likewise.
17768 * config/i386/i386.opt (mindirect-branch=): New option.
17769 (indirect_branch): New.
17772 (thunk-inline): Likewise.
17773 (thunk-extern): Likewise.
17774 * doc/extend.texi: Document indirect_branch function attribute.
17775 * doc/invoke.texi: Document -mindirect-branch= option.
17777 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
17780 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17782 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
17784 * ipa-inline.c (want_inline_small_function_p): Return false if
17785 inlining has already failed with CIF_FINAL_ERROR.
17786 (update_caller_keys): Call want_inline_small_function_p before
17788 (update_callee_keys): Likewise.
17790 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17792 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17794 (rs6000_quadword_masked_address_p): Likewise.
17795 (quad_aligned_load_p): Likewise.
17796 (quad_aligned_store_p): Likewise.
17797 (const_load_sequence_p): Add comment to describe the outer-most loop.
17798 (mimic_memory_attributes_and_flags): New function.
17799 (rs6000_gen_stvx): Likewise.
17800 (replace_swapped_aligned_store): Likewise.
17801 (rs6000_gen_lvx): Likewise.
17802 (replace_swapped_aligned_load): Likewise.
17803 (replace_swapped_load_constant): Capitalize argument name in
17804 comment describing this function.
17805 (rs6000_analyze_swaps): Add a third pass to search for vector loads
17806 and stores that access quad-word aligned addresses and replace
17807 with stvx or lvx instructions when appropriate.
17808 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17809 New function prototype.
17810 (rs6000_quadword_masked_address_p): Likewise.
17811 (rs6000_gen_lvx): Likewise.
17812 (rs6000_gen_stvx): Likewise.
17813 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17814 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17815 when memory address is aligned.
17816 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17817 this split to select lvx instruction when memory address is aligned.
17818 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17819 instruction when memory address is aligned.
17820 (*vsx_le_perm_load_v16qi): Likewise.
17821 (four unnamed splitters): Modify to select the stvx instruction
17822 when memory is aligned.
17824 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
17826 * predict.c (determine_unlikely_bbs): Handle correctly BBs
17827 which appears in the queue multiple times.
17829 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17830 Alan Hayward <alan.hayward@arm.com>
17831 David Sherwood <david.sherwood@arm.com>
17833 * tree-vectorizer.h (vec_lower_bound): New structure.
17834 (_loop_vec_info): Add check_nonzero and lower_bounds.
17835 (LOOP_VINFO_CHECK_NONZERO): New macro.
17836 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17837 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17838 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17839 fields. Make seg_len the distance travelled, not including the
17841 (dr_direction_indicator): Declare.
17842 (dr_zero_step_indicator): Likewise.
17843 (dr_known_forward_stride_p): Likewise.
17844 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17846 (runtime_alias_check_p): Allow runtime alias checks with
17848 (operator ==): Compare access_size and align.
17849 (prune_runtime_alias_test_list): Rework for new distinction between
17850 the access_size and seg_len.
17851 (create_intersect_range_checks_index): Likewise. Cope with polynomial
17853 (get_segment_min_max): New function.
17854 (create_intersect_range_checks): Use it.
17855 (dr_step_indicator): New function.
17856 (dr_direction_indicator): Likewise.
17857 (dr_zero_step_indicator): Likewise.
17858 (dr_known_forward_stride_p): Likewise.
17859 * tree-loop-distribution.c (data_ref_segment_size): Return
17860 DR_STEP * (niters - 1).
17861 (compute_alias_check_pairs): Update call to the dr_with_seg_len
17863 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17864 (vect_preserves_scalar_order_p): New function, split out from...
17865 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17866 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17867 (vect_vfa_access_size): New function.
17868 (vect_vfa_align): Likewise.
17869 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17870 (dump_lower_bound): New function.
17871 (vect_check_lower_bound): Likewise.
17872 (vect_small_gap_p): Likewise.
17873 (vectorizable_with_step_bound_p): Likewise.
17874 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17875 depencies if the vectorization factor is 1. Convert the checks
17876 for nonzero steps into checks on the bounds of DR_STEP. Try using
17877 a bunds check for variable steps if the minimum required step is
17878 relatively small. Update calls to the dr_with_seg_len
17879 constructor and to vect_compile_time_alias.
17880 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17882 (vect_loop_versioning): Call it.
17883 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17885 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17887 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17888 Alan Hayward <alan.hayward@arm.com>
17889 David Sherwood <david.sherwood@arm.com>
17891 * doc/sourcebuild.texi (vect_scatter_store): Document.
17892 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17894 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17896 * genopinit.c (main): Add supports_vec_scatter_store and
17897 supports_vec_scatter_store_cached to target_optabs.
17898 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17899 IFN_MASK_SCATTER_STORE.
17900 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17902 * internal-fn.h (internal_store_fn_p): Declare.
17903 (internal_fn_stored_value_index): Likewise.
17904 * internal-fn.c (scatter_store_direct): New macro.
17905 (expand_scatter_store_optab_fn): New function.
17906 (direct_scatter_store_optab_supported_p): New macro.
17907 (internal_store_fn_p): New function.
17908 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17909 IFN_MASK_SCATTER_STORE.
17910 (internal_fn_mask_index): Likewise.
17911 (internal_fn_stored_value_index): New function.
17912 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17913 for scatter stores.
17914 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17915 * optabs-query.c (supports_vec_scatter_store_p): New function.
17916 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17917 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17918 true for scatter stores.
17919 (vect_gather_scatter_fn_p): Handle scatter stores too.
17920 (vect_check_gather_scatter): Consider using scatter stores if
17921 supports_vec_scatter_store_p.
17922 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17923 scatter stores too.
17924 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17925 internal_fn_stored_value_index.
17926 (check_load_store_masking): Handle scatter stores too.
17927 (vect_get_store_rhs): Make public.
17928 (vectorizable_call): Use internal_store_fn_p.
17929 (vectorizable_store): Handle scatter store internal functions.
17930 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17931 when deciding whether the end of the group has been reached.
17932 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17933 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17934 (mask_scatter_store<mode>): New insns.
17936 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17937 Alan Hayward <alan.hayward@arm.com>
17938 David Sherwood <david.sherwood@arm.com>
17940 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17941 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17942 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17944 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17945 Use vect_truncate_gather_scatter_offset if we can't treat the
17946 operation as a normal gather load or scatter store.
17947 (get_group_load_store_type): Take the gather_scatter_info
17948 as argument. Try using a gather load or scatter store for
17949 single-element groups.
17950 (get_load_store_type): Update calls to get_group_load_store_type
17951 and vect_use_strided_gather_scatters_p.
17953 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17954 Alan Hayward <alan.hayward@arm.com>
17955 David Sherwood <david.sherwood@arm.com>
17957 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17958 optional tree argument.
17959 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17961 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17962 but continue to use the current value as a fallback.
17963 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17964 to compare the updates.
17965 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17966 (get_load_store_type): Use it when handling a strided access.
17967 (vect_get_strided_load_store_ops): New function.
17968 (vect_get_data_ptr_increment): Likewise.
17969 (vectorizable_load): Handle strided gather loads. Always pass
17970 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17972 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17973 Alan Hayward <alan.hayward@arm.com>
17974 David Sherwood <david.sherwood@arm.com>
17976 * doc/md.texi (gather_load@var{m}): Document.
17977 (mask_gather_load@var{m}): Likewise.
17978 * genopinit.c (main): Add supports_vec_gather_load and
17979 supports_vec_gather_load_cached to target_optabs.
17980 * optabs-tree.c (init_tree_optimization_optabs): Use
17981 ggc_cleared_alloc to allocate target_optabs.
17982 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17983 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17985 * internal-fn.h (internal_load_fn_p): Declare.
17986 (internal_gather_scatter_fn_p): Likewise.
17987 (internal_fn_mask_index): Likewise.
17988 (internal_gather_scatter_fn_supported_p): Likewise.
17989 * internal-fn.c (gather_load_direct): New macro.
17990 (expand_gather_load_optab_fn): New function.
17991 (direct_gather_load_optab_supported_p): New macro.
17992 (direct_internal_fn_optab): New function.
17993 (internal_load_fn_p): Likewise.
17994 (internal_gather_scatter_fn_p): Likewise.
17995 (internal_fn_mask_index): Likewise.
17996 (internal_gather_scatter_fn_supported_p): Likewise.
17997 * optabs-query.c (supports_at_least_one_mode_p): New function.
17998 (supports_vec_gather_load_p): Likewise.
17999 * optabs-query.h (supports_vec_gather_load_p): Declare.
18000 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18001 and memory_type field.
18002 (NUM_PATTERNS): Bump to 15.
18003 * tree-vect-data-refs.c: Include internal-fn.h.
18004 (vect_gather_scatter_fn_p): New function.
18005 (vect_describe_gather_scatter_call): Likewise.
18006 (vect_check_gather_scatter): Try using internal functions for
18007 gather loads. Recognize existing calls to a gather load function.
18008 (vect_analyze_data_refs): Consider using gather loads if
18009 supports_vec_gather_load_p.
18010 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18011 (vect_get_gather_scatter_offset_type): Likewise.
18012 (vect_convert_mask_for_vectype): Likewise.
18013 (vect_add_conversion_to_patterm): Likewise.
18014 (vect_try_gather_scatter_pattern): Likewise.
18015 (vect_recog_gather_scatter_pattern): New pattern recognizer.
18016 (vect_vect_recog_func_ptrs): Add it.
18017 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18018 internal_fn_mask_index and internal_gather_scatter_fn_p.
18019 (check_load_store_masking): Take the gather_scatter_info as an
18020 argument and handle gather loads.
18021 (vect_get_gather_scatter_ops): New function.
18022 (vectorizable_call): Check internal_load_fn_p.
18023 (vectorizable_load): Likewise. Handle gather load internal
18025 (vectorizable_store): Update call to check_load_store_masking.
18026 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18027 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18028 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18029 (aarch64_gather_scale_operand_d): New predicates.
18030 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18031 (mask_gather_load<mode>): New insns.
18033 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18034 Alan Hayward <alan.hayward@arm.com>
18035 David Sherwood <david.sherwood@arm.com>
18037 * optabs.def (fold_left_plus_optab): New optab.
18038 * doc/md.texi (fold_left_plus_@var{m}): Document.
18039 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18040 * internal-fn.c (fold_left_direct): Define.
18041 (expand_fold_left_optab_fn): Likewise.
18042 (direct_fold_left_optab_supported_p): Likewise.
18043 * fold-const-call.c (fold_const_fold_left): New function.
18044 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18045 * tree-parloops.c (valid_reduction_p): New function.
18046 (gather_scalar_reductions): Use it.
18047 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18048 (vect_finish_replace_stmt): Declare.
18049 * tree-vect-loop.c (fold_left_reduction_fn): New function.
18050 (needs_fold_left_reduction_p): New function, split out from...
18051 (vect_is_simple_reduction): ...here. Accept reductions that
18052 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18053 (vect_force_simple_reduction): Also store the reduction type in
18054 the assignment's STMT_VINFO_REDUC_TYPE.
18055 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18056 (merge_with_identity): New function.
18057 (vect_expand_fold_left): Likewise.
18058 (vectorize_fold_left_reduction): Likewise.
18059 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
18060 scalar phi in place for it. Check for target support and reject
18061 cases that would reassociate the operation. Defer the transform
18062 phase to vectorize_fold_left_reduction.
18063 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18064 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18065 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18067 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18069 * tree-if-conv.c (predicate_mem_writes): Remove redundant
18070 call to ifc_temp_var.
18072 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18073 Alan Hayward <alan.hayward@arm.com>
18074 David Sherwood <david.sherwood@arm.com>
18076 * target.def (legitimize_address_displacement): Take the original
18077 offset as a poly_int.
18078 * targhooks.h (default_legitimize_address_displacement): Update
18080 * targhooks.c (default_legitimize_address_displacement): Likewise.
18081 * doc/tm.texi: Regenerate.
18082 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18083 as an argument, moving assert of ad->disp == ad->disp_term to...
18084 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18085 Try calling targetm.legitimize_address_displacement before expanding
18086 the address rather than afterwards, and adjust for the new interface.
18087 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18088 Match the new hook interface. Handle SVE addresses.
18089 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18090 new hook interface.
18092 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18094 * Makefile.in (OBJS): Add early-remat.o.
18095 * target.def (select_early_remat_modes): New hook.
18096 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18097 * doc/tm.texi: Regenerate.
18098 * targhooks.h (default_select_early_remat_modes): Declare.
18099 * targhooks.c (default_select_early_remat_modes): New function.
18100 * timevar.def (TV_EARLY_REMAT): New timevar.
18101 * passes.def (pass_early_remat): New pass.
18102 * tree-pass.h (make_pass_early_remat): Declare.
18103 * early-remat.c: New file.
18104 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18106 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18108 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18109 Alan Hayward <alan.hayward@arm.com>
18110 David Sherwood <david.sherwood@arm.com>
18112 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18113 vfm1 with a bound_epilog parameter.
18114 (vect_do_peeling): Update calls accordingly, and move the prologue
18115 call earlier in the function. Treat the base bound_epilog as 0 for
18116 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18117 this base when peeling for gaps.
18118 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18119 with fully-masked loops.
18120 (vect_estimate_min_profitable_iters): Handle the single peeled
18121 iteration in that case.
18123 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18124 Alan Hayward <alan.hayward@arm.com>
18125 David Sherwood <david.sherwood@arm.com>
18127 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18128 single-element interleaving even if the size is not a power of 2.
18129 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18130 accesses for single-element interleaving if the group size is
18133 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18134 Alan Hayward <alan.hayward@arm.com>
18135 David Sherwood <david.sherwood@arm.com>
18137 * doc/md.texi (fold_extract_last_@var{m}): Document.
18138 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18139 * optabs.def (fold_extract_last_optab): New optab.
18140 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18141 * internal-fn.c (fold_extract_direct): New macro.
18142 (expand_fold_extract_optab_fn): Likewise.
18143 (direct_fold_extract_optab_supported_p): Likewise.
18144 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18145 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18146 EXTRACT_LAST_REDUCTION.
18147 (get_initial_def_for_reduction): Do not create an initial vector
18148 for EXTRACT_LAST_REDUCTION reductions.
18149 (vectorizable_reduction): Leave the scalar phi in place for
18150 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18151 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18152 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18153 transform phase to vectorizable_condition.
18154 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18156 (vect_finish_stmt_generation): ...here.
18157 (vect_finish_replace_stmt): New function.
18158 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18159 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18161 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18163 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18164 Alan Hayward <alan.hayward@arm.com>
18165 David Sherwood <david.sherwood@arm.com>
18167 * doc/md.texi (extract_last_@var{m}): Document.
18168 * optabs.def (extract_last_optab): New optab.
18169 * internal-fn.def (EXTRACT_LAST): New internal function.
18170 * internal-fn.c (cond_unary_direct): New macro.
18171 (expand_cond_unary_optab_fn): Likewise.
18172 (direct_cond_unary_optab_supported_p): Likewise.
18173 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18174 loops using EXTRACT_LAST.
18175 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18176 (extract_last_<mode>): ...this optab.
18177 (vec_extract<mode><Vel>): Update accordingly.
18179 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18180 Alan Hayward <alan.hayward@arm.com>
18181 David Sherwood <david.sherwood@arm.com>
18183 * target.def (empty_mask_is_expensive): New hook.
18184 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18185 * doc/tm.texi: Regenerate.
18186 * targhooks.h (default_empty_mask_is_expensive): Declare.
18187 * targhooks.c (default_empty_mask_is_expensive): New function.
18188 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18189 if the target says that empty masks are expensive.
18190 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18192 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18194 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18195 Alan Hayward <alan.hayward@arm.com>
18196 David Sherwood <david.sherwood@arm.com>
18198 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18199 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18200 (vect_use_loop_mask_for_alignment_p): New function.
18201 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18202 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18203 niters_skip argument. Make sure that the first niters_skip elements
18204 of the first iteration are inactive.
18205 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18206 Update call to vect_set_loop_masks_directly.
18207 (get_misalign_in_elems): New function, split out from...
18208 (vect_gen_prolog_loop_niters): ...here.
18209 (vect_update_init_of_dr): Take a code argument that specifies whether
18210 the adjustment should be added or subtracted.
18211 (vect_update_init_of_drs): Likewise.
18212 (vect_prepare_for_masked_peels): New function.
18213 (vect_do_peeling): Skip prologue peeling if we're using a mask
18214 instead. Update call to vect_update_inits_of_drs.
18215 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18217 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18218 alignment. Do not include the number of peeled iterations in
18219 the minimum threshold in that case.
18220 (vectorizable_induction): Adjust the start value down by
18221 LOOP_VINFO_MASK_SKIP_NITERS iterations.
18222 (vect_transform_loop): Call vect_prepare_for_masked_peels.
18223 Take the number of skipped iterations into account when calculating
18225 * tree-vect-stmts.c (vect_gen_while_not): New function.
18227 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18228 Alan Hayward <alan.hayward@arm.com>
18229 David Sherwood <david.sherwood@arm.com>
18231 * doc/sourcebuild.texi (vect_fully_masked): Document.
18232 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18233 default value to 0.
18234 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18236 (vect_analyze_loop_2): ...here. Don't check the vectorization
18237 factor against the number of loop iterations if the loop is
18240 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18241 Alan Hayward <alan.hayward@arm.com>
18242 David Sherwood <david.sherwood@arm.com>
18244 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18245 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18246 (dump_groups): Update accordingly.
18247 (iv_use::mem_type): New member variable.
18248 (address_p): New function.
18249 (record_use): Add a mem_type argument and initialize the new
18251 (record_group_use): Add a mem_type argument. Use address_p.
18252 Remove obsolete null checks of base_object. Update call to record_use.
18253 (find_interesting_uses_op): Update call to record_group_use.
18254 (find_interesting_uses_cond): Likewise.
18255 (find_interesting_uses_address): Likewise.
18256 (get_mem_type_for_internal_fn): New function.
18257 (find_address_like_use): Likewise.
18258 (find_interesting_uses_stmt): Try find_address_like_use before
18259 calling find_interesting_uses_op.
18260 (addr_offset_valid_p): Use the iv mem_type field as the type
18261 of the addressed memory.
18262 (add_autoinc_candidates): Likewise.
18263 (get_address_cost): Likewise.
18264 (split_small_address_groups_p): Use address_p.
18265 (split_address_groups): Likewise.
18266 (add_iv_candidate_for_use): Likewise.
18267 (autoinc_possible_for_pair): Likewise.
18268 (rewrite_groups): Likewise.
18269 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18270 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18271 (get_alias_ptr_type_for_ptr_address): New function.
18272 (rewrite_use_address): Rewrite address uses in calls that were
18273 identified by find_address_like_use.
18275 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18276 Alan Hayward <alan.hayward@arm.com>
18277 David Sherwood <david.sherwood@arm.com>
18279 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18281 * gimple-expr.h (is_gimple_addressable: Likewise.
18282 * gimple-expr.c (is_gimple_address): Likewise.
18283 * internal-fn.c (expand_call_mem_ref): New function.
18284 (expand_mask_load_optab_fn): Use it.
18285 (expand_mask_store_optab_fn): Likewise.
18287 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18288 Alan Hayward <alan.hayward@arm.com>
18289 David Sherwood <david.sherwood@arm.com>
18291 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18292 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18293 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18294 (cond_umax@var{mode}): Document.
18295 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18296 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18297 (cond_umin_optab, cond_umax_optab): New optabs.
18298 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18299 (COND_IOR, COND_XOR): New internal functions.
18300 * internal-fn.h (get_conditional_internal_fn): Declare.
18301 * internal-fn.c (cond_binary_direct): New macro.
18302 (expand_cond_binary_optab_fn): Likewise.
18303 (direct_cond_binary_optab_supported_p): Likewise.
18304 (get_conditional_internal_fn): New function.
18305 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18306 Cope with reduction statements that are vectorized as calls rather
18308 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18309 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18310 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18311 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18312 (UNSPEC_COND_EOR): New unspecs.
18313 (optab): Add mappings for them.
18314 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18315 (sve_int_op, sve_fp_op): New int attributes.
18317 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18318 Alan Hayward <alan.hayward@arm.com>
18319 David Sherwood <david.sherwood@arm.com>
18321 * optabs.def (while_ult_optab): New optab.
18322 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18323 * internal-fn.def (WHILE_ULT): New internal function.
18324 * internal-fn.h (direct_internal_fn_supported_p): New override
18325 that takes two types as argument.
18326 * internal-fn.c (while_direct): New macro.
18327 (expand_while_optab_fn): New function.
18328 (convert_optab_supported_p): Likewise.
18329 (direct_while_optab_supported_p): New macro.
18330 * wide-int.h (wi::udiv_ceil): New function.
18331 * tree-vectorizer.h (rgroup_masks): New structure.
18332 (vec_loop_masks): New typedef.
18333 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18334 and fully_masked_p.
18335 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18336 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18337 (vect_max_vf): New function.
18338 (slpeel_make_loop_iterate_ntimes): Delete.
18339 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18340 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18341 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18342 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18343 internal-fn.h, stor-layout.h and optabs-query.h.
18344 (vect_set_loop_mask): New function.
18345 (add_preheader_seq): Likewise.
18346 (add_header_seq): Likewise.
18347 (interleave_supported_p): Likewise.
18348 (vect_maybe_permute_loop_masks): Likewise.
18349 (vect_set_loop_masks_directly): Likewise.
18350 (vect_set_loop_condition_masked): Likewise.
18351 (vect_set_loop_condition_unmasked): New function, split out from
18352 slpeel_make_loop_iterate_ntimes.
18353 (slpeel_make_loop_iterate_ntimes): Rename to..
18354 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18355 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18356 (vect_do_peeling): Update call accordingly.
18357 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18359 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18360 mask_compare_type, can_fully_mask_p and fully_masked_p.
18361 (release_vec_loop_masks): New function.
18362 (_loop_vec_info): Use it to free the loop masks.
18363 (can_produce_all_loop_masks_p): New function.
18364 (vect_get_max_nscalars_per_iter): Likewise.
18365 (vect_verify_full_masking): Likewise.
18366 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18367 retries, and free the mask rgroups before retrying. Check loop-wide
18368 reasons for disallowing fully-masked loops. Make the final decision
18369 about whether use a fully-masked loop or not.
18370 (vect_estimate_min_profitable_iters): Do not assume that peeling
18371 for the number of iterations will be needed for fully-masked loops.
18372 (vectorizable_reduction): Disable fully-masked loops.
18373 (vectorizable_live_operation): Likewise.
18374 (vect_halve_mask_nunits): New function.
18375 (vect_double_mask_nunits): Likewise.
18376 (vect_record_loop_mask): Likewise.
18377 (vect_get_loop_mask): Likewise.
18378 (vect_transform_loop): Handle the case in which the final loop
18379 iteration might handle a partial vector. Call vect_set_loop_condition
18380 instead of slpeel_make_loop_iterate_ntimes.
18381 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18382 (check_load_store_masking): New function.
18383 (prepare_load_store_mask): Likewise.
18384 (vectorizable_store): Handle fully-masked loops.
18385 (vectorizable_load): Likewise.
18386 (supportable_widening_operation): Use vect_halve_mask_nunits for
18388 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18389 (vect_gen_while): New function.
18390 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18391 (aarch64_uqdec<mode>): New insn.
18393 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18394 Alan Hayward <alan.hayward@arm.com>
18395 David Sherwood <david.sherwood@arm.com>
18397 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18398 (reduc_xor_scal_optab): New optabs.
18399 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18400 (reduc_xor_scal_@var{m}): Document.
18401 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18402 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18403 internal functions.
18404 * fold-const-call.c (fold_const_call): Handle them.
18405 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18406 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18407 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18408 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18409 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18410 (UNSPEC_XORV): New unspecs.
18411 (optab): Add entries for them.
18412 (BITWISEV): New int iterator.
18413 (bit_reduc_op): New int attributes.
18415 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18416 Alan Hayward <alan.hayward@arm.com>
18417 David Sherwood <david.sherwood@arm.com>
18419 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18420 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18421 * optabs.def (vec_shl_insert_optab): New optab.
18422 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18423 (duplicate_and_interleave): Likewise.
18424 * tree-vect-loop.c: Include internal-fn.h.
18425 (neutral_op_for_slp_reduction): New function, split out from
18426 get_initial_defs_for_reduction.
18427 (get_initial_def_for_reduction): Handle option 2 for variable-length
18428 vectors by loading the neutral value into a vector and then shifting
18429 the initial value into element 0.
18430 (get_initial_defs_for_reduction): Replace the code argument with
18431 the neutral value calculated by neutral_op_for_slp_reduction.
18432 Use gimple_build_vector for constant-length vectors.
18433 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18434 but the first group_size elements have a neutral value.
18435 Use duplicate_and_interleave otherwise.
18436 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18437 Update call to get_initial_defs_for_reduction. Handle SLP
18438 reductions for variable-length vectors by creating one vector
18439 result for each scalar result, with the elements associated
18440 with other scalar results stubbed out with the neutral value.
18441 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18442 Require IFN_VEC_SHL_INSERT for double reductions on
18443 variable-length vectors, or SLP reductions that have
18444 a neutral value. Require can_duplicate_and_interleave_p
18445 support for variable-length unchained SLP reductions if there
18446 is no neutral value, such as for MIN/MAX reductions. Also require
18447 the number of vector elements to be a multiple of the number of
18448 SLP statements when doing variable-length unchained SLP reductions.
18449 Update call to vect_create_epilog_for_reduction.
18450 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18451 and remove initial values.
18452 (duplicate_and_interleave): Make public.
18453 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18454 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18456 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18457 Alan Hayward <alan.hayward@arm.com>
18458 David Sherwood <david.sherwood@arm.com>
18460 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18461 (can_duplicate_and_interleave_p): New function.
18462 (vect_get_and_check_slp_defs): Take the vector of statements
18463 rather than just the current one. Remove excess parentheses.
18464 Restriction rejectinon of vect_constant_def and vect_external_def
18465 for variable-length vectors to boolean types, or types for which
18466 can_duplicate_and_interleave_p is false.
18467 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18468 (duplicate_and_interleave): New function.
18469 (vect_get_constant_vectors): Use gimple_build_vector for
18470 constant-length vectors and suitable variable-length constant
18471 vectors. Use duplicate_and_interleave for other variable-length
18472 vectors. Don't defer the update when inserting new statements.
18474 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18475 Alan Hayward <alan.hayward@arm.com>
18476 David Sherwood <david.sherwood@arm.com>
18478 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18479 min_profitable_iters doesn't go negative.
18481 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18482 Alan Hayward <alan.hayward@arm.com>
18483 David Sherwood <david.sherwood@arm.com>
18485 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18486 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18487 * optabs.def (vec_mask_load_lanes_optab): New optab.
18488 (vec_mask_store_lanes_optab): Likewise.
18489 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18490 (MASK_STORE_LANES): Likewise.
18491 * internal-fn.c (mask_load_lanes_direct): New macro.
18492 (mask_store_lanes_direct): Likewise.
18493 (expand_mask_load_optab_fn): Handle masked operations.
18494 (expand_mask_load_lanes_optab_fn): New macro.
18495 (expand_mask_store_optab_fn): Handle masked operations.
18496 (expand_mask_store_lanes_optab_fn): New macro.
18497 (direct_mask_load_lanes_optab_supported_p): Likewise.
18498 (direct_mask_store_lanes_optab_supported_p): Likewise.
18499 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18501 (vect_load_lanes_supported): Likewise.
18502 * tree-vect-data-refs.c (strip_conversion): New function.
18503 (can_group_stmts_p): Likewise.
18504 (vect_analyze_data_ref_accesses): Use it instead of checking
18505 for a pair of assignments.
18506 (vect_store_lanes_supported): Take a masked_p parameter.
18507 (vect_load_lanes_supported): Likewise.
18508 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18509 vect_store_lanes_supported and vect_load_lanes_supported.
18510 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18511 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18512 parameter. Don't allow gaps for masked accesses.
18513 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18514 and vect_load_lanes_supported.
18515 (get_load_store_type): Take a masked_p parameter and update
18516 call to get_group_load_store_type.
18517 (vectorizable_store): Update call to get_load_store_type.
18518 Handle IFN_MASK_STORE_LANES.
18519 (vectorizable_load): Update call to get_load_store_type.
18520 Handle IFN_MASK_LOAD_LANES.
18522 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18523 Alan Hayward <alan.hayward@arm.com>
18524 David Sherwood <david.sherwood@arm.com>
18526 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18528 * config/aarch64/aarch64-protos.h
18529 (aarch64_sve_struct_memory_operand_p): Declare.
18530 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18531 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18532 (VPRED, vpred): Handle SVE structure modes.
18533 * config/aarch64/constraints.md (Utx): New constraint.
18534 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18535 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18536 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18537 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18538 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18539 structure modes. Split into pieces after RA.
18540 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18541 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18543 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18544 SVE structure modes.
18545 (aarch64_classify_address): Likewise.
18546 (sizetochar): Move earlier in file.
18547 (aarch64_print_operand): Handle SVE register lists.
18548 (aarch64_array_mode): New function.
18549 (aarch64_sve_struct_memory_operand_p): Likewise.
18550 (TARGET_ARRAY_MODE): Redefine.
18552 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18553 Alan Hayward <alan.hayward@arm.com>
18554 David Sherwood <david.sherwood@arm.com>
18556 * target.def (array_mode): New target hook.
18557 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18558 * doc/tm.texi: Regenerate.
18559 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18560 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18561 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18562 targetm.array_mode.
18563 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18566 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18567 Alan Hayward <alan.hayward@arm.com>
18568 David Sherwood <david.sherwood@arm.com>
18570 * fold-const.c (fold_binary_loc): Check the argument types
18571 rather than the result type when testing for a vector operation.
18573 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18575 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18576 * doc/tm.texi: Regenerate.
18578 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18579 Alan Hayward <alan.hayward@arm.com>
18580 David Sherwood <david.sherwood@arm.com>
18582 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18583 (sve): Document new AArch64 extension.
18584 * doc/md.texi (w): Extend the description of the AArch64
18585 constraint to include SVE vectors.
18586 (Upl, Upa): Document new AArch64 predicate constraints.
18587 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18589 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18590 (msve-vector-bits=): New option.
18591 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18592 SVE when these are disabled.
18593 (sve): New extension.
18594 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18595 modes. Adjust their number of units based on aarch64_sve_vg.
18596 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18597 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18598 aarch64_addr_query_type.
18599 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18600 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18601 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18602 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18603 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18604 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18605 (aarch64_simd_imm_zero_p): Delete.
18606 (aarch64_check_zero_based_sve_index_immediate): Declare.
18607 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18608 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18609 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18610 (aarch64_sve_float_mul_immediate_p): Likewise.
18611 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18612 rather than an rtx.
18613 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18614 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18615 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18616 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18617 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18618 (aarch64_regmode_natural_size): Likewise.
18619 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18620 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18622 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18623 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18624 for VG and the SVE predicate registers.
18625 (V_ALIASES): Add a "z"-prefixed alias.
18626 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18627 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18628 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18629 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18630 (REG_CLASS_NAMES): Add entries for them.
18631 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18632 and the predicate registers.
18633 (aarch64_sve_vg): Declare.
18634 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18635 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18636 (REGMODE_NATURAL_SIZE): Define.
18637 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18639 * config/aarch64/aarch64.c: Include cfgrtl.h.
18640 (simd_immediate_info): Add a constructor for series vectors,
18641 and an associated step field.
18642 (aarch64_sve_vg): New variable.
18643 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18644 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18645 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18646 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18647 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18648 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18649 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18650 (aarch64_get_mask_mode): New functions.
18651 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18652 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18653 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18654 predicate modes and predicate registers. Explicitly restrict
18655 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18656 to store a vector mode if it is recognized by
18657 aarch64_classify_vector_mode.
18658 (aarch64_regmode_natural_size): New function.
18659 (aarch64_hard_regno_caller_save_mode): Return the original mode
18661 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18662 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18663 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18664 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18666 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18667 does not overlap dest if the function is frame-related. Handle
18669 (aarch64_split_add_offset): New function.
18670 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18671 them aarch64_add_offset.
18672 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18673 and update call to aarch64_sub_sp.
18674 (aarch64_add_cfa_expression): New function.
18675 (aarch64_expand_prologue): Pass extra temporary registers to the
18676 functions above. Handle the case in which we need to emit new
18677 DW_CFA_expressions for registers that were originally saved
18678 relative to the stack pointer, but now have to be expressed
18679 relative to the frame pointer.
18680 (aarch64_output_mi_thunk): Pass extra temporary registers to the
18682 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
18683 IP0 and IP1 values for SVE frames.
18684 (aarch64_expand_vec_series): New function.
18685 (aarch64_expand_sve_widened_duplicate): Likewise.
18686 (aarch64_expand_sve_const_vector): Likewise.
18687 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18688 Handle SVE constants. Use emit_move_insn to move a force_const_mem
18689 into the register, rather than emitting a SET directly.
18690 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18691 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18692 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18693 (offset_9bit_signed_scaled_p): New functions.
18694 (aarch64_replicate_bitmask_imm): New function.
18695 (aarch64_bitmask_imm): Use it.
18696 (aarch64_cannot_force_const_mem): Reject expressions involving
18697 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
18698 (aarch64_classify_index): Handle SVE indices, by requiring
18699 a plain register index with a scale that matches the element size.
18700 (aarch64_classify_address): Handle SVE addresses. Assert that
18701 the mode of the address is VOIDmode or an integer mode.
18702 Update call to aarch64_classify_symbol.
18703 (aarch64_classify_symbolic_expression): Update call to
18704 aarch64_classify_symbol.
18705 (aarch64_const_vec_all_in_range_p): New function.
18706 (aarch64_print_vector_float_operand): Likewise.
18707 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
18708 "vN" for FP registers with SVE modes. Handle (const ...) vectors
18709 and the FP immediates 1.0 and 0.5.
18710 (aarch64_print_address_internal): Handle SVE addresses.
18711 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18712 (aarch64_regno_regclass): Handle predicate registers.
18713 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18715 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18716 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18717 (aarch64_convert_sve_vector_bits): New function.
18718 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18719 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18720 rather than an rtx.
18721 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18722 Handle SVE vector and predicate modes. Accept VL-based constants
18723 that need only one temporary register, and VL offsets that require
18724 no temporary registers.
18725 (aarch64_conditional_register_usage): Mark the predicate registers
18726 as fixed if SVE isn't available.
18727 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18728 Return true for SVE vector and predicate modes.
18729 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18730 rather than an unsigned int. Handle SVE modes.
18731 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18733 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18735 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18736 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18737 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18738 (aarch64_sve_float_mul_immediate_p): New functions.
18739 (aarch64_sve_valid_immediate): New function.
18740 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18741 Explicitly reject structure modes. Check for INDEX constants.
18742 Handle PTRUE and PFALSE constants.
18743 (aarch64_check_zero_based_sve_index_immediate): New function.
18744 (aarch64_simd_imm_zero_p): Delete.
18745 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18746 vector modes. Accept constants in the range of CNT[BHWD].
18747 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18748 ask for an Advanced SIMD mode.
18749 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18750 (aarch64_simd_vector_alignment): Handle SVE predicates.
18751 (aarch64_vectorize_preferred_vector_alignment): New function.
18752 (aarch64_simd_vector_alignment_reachable): Use it instead of
18754 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18755 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18757 (MAX_VECT_LEN): Delete.
18758 (expand_vec_perm_d): Add a vec_flags field.
18759 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18760 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18761 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18763 (aarch64_evpc_rev): Rename to...
18764 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18765 (aarch64_evpc_rev_global): New function.
18766 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18767 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18769 (aarch64_evpc_sve_tbl): New function.
18770 (aarch64_expand_vec_perm_const_1): Update after rename of
18771 aarch64_evpc_rev. Handle SVE permutes too, trying
18772 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18773 than aarch64_evpc_tbl.
18774 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18775 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18776 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18777 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18778 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18779 (aarch64_expand_sve_vcond): New functions.
18780 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18781 of aarch64_vector_mode_p.
18782 (aarch64_dwarf_poly_indeterminate_value): New function.
18783 (aarch64_compute_pressure_classes): Likewise.
18784 (aarch64_can_change_mode_class): Likewise.
18785 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18786 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18787 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18788 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18789 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18790 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18791 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18792 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18794 (Dn, Dl, Dr): Accept const as well as const_vector.
18795 (Dz): Likewise. Compare against CONST0_RTX.
18796 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18797 of "vector" where appropriate.
18798 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18799 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18800 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18801 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18802 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18803 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18804 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18805 (v_int_equiv): Extend to SVE modes.
18806 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18808 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18809 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18810 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18811 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18812 (SVE_COND_FP_CMP): New int iterators.
18813 (perm_hilo): Handle the new unpack unspecs.
18814 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18816 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18817 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18818 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18819 (aarch64_equality_operator, aarch64_constant_vector_operand)
18820 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18821 (aarch64_sve_nonimmediate_operand): Likewise.
18822 (aarch64_sve_general_operand): Likewise.
18823 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18824 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18825 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18826 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18827 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18828 (aarch64_sve_float_arith_immediate): Likewise.
18829 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18830 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18831 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18832 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18833 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18834 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18835 (aarch64_sve_float_arith_operand): Likewise.
18836 (aarch64_sve_float_arith_with_sub_operand): Likewise.
18837 (aarch64_sve_float_mul_operand): Likewise.
18838 (aarch64_sve_vec_perm_operand): Likewise.
18839 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18840 (aarch64_mov_operand): Accept const_poly_int and const_vector.
18841 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18842 as well as const_vector.
18843 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18844 in file. Use CONST0_RTX and CONSTM1_RTX.
18845 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
18846 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18847 Use aarch64_simd_imm_zero.
18848 * config/aarch64/aarch64-sve.md: New file.
18849 * config/aarch64/aarch64.md: Include it.
18850 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18851 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18852 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18853 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18854 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18855 (sve): New attribute.
18856 (enabled): Disable instructions with the sve attribute unless
18858 (movqi, movhi): Pass CONST_POLY_INT operaneds through
18859 aarch64_expand_mov_immediate.
18860 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18861 CNT[BHSD] immediates.
18862 (movti): Split CONST_POLY_INT moves into two halves.
18863 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18864 Split additions that need a temporary here if the destination
18865 is the stack pointer.
18866 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18867 (*add<mode>3_poly_1): New instruction.
18868 (set_clobber_cc): New expander.
18870 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18872 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18873 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18874 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18875 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18876 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18877 Change innermode from fixed_mode_size to machine_mode.
18878 (simplify_subreg): Update call accordingly. Handle a constant-sized
18879 subreg of a variable-length CONST_VECTOR.
18881 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18882 Alan Hayward <alan.hayward@arm.com>
18883 David Sherwood <david.sherwood@arm.com>
18885 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18886 (add_offset_to_base): New function, split out from...
18887 (create_mem_ref): ...here. When handling a scale other than 1,
18888 check first whether the address is valid without the offset.
18889 Add it into the base if so, leaving the index and scale as-is.
18891 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18894 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18895 fold_for_warn before checking if arg2 is INTEGER_CST.
18897 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18899 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18900 (store_multiple_operation): Delete.
18901 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18902 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18903 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18904 guarded by TARGET_STRING.
18905 (rs6000_output_load_multiple): Delete.
18906 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18907 OPTION_MASK_STRING / TARGET_STRING handling.
18908 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18909 (const rs6000_opt_masks) <"string">: Change mask to 0.
18910 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18911 (MASK_STRING): Delete.
18912 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18914 (load_multiple): Delete.
18921 (store_multiple): Delete.
18928 (movmemsi_8reg): Delete.
18929 (corresponding unnamed define_insn): Delete.
18930 (movmemsi_6reg): Delete.
18931 (corresponding unnamed define_insn): Delete.
18932 (movmemsi_4reg): Delete.
18933 (corresponding unnamed define_insn): Delete.
18934 (movmemsi_2reg): Delete.
18935 (corresponding unnamed define_insn): Delete.
18936 (movmemsi_1reg): Delete.
18937 (corresponding unnamed define_insn): Delete.
18938 * config/rs6000/rs6000.opt (mno-string): New.
18939 (mstring): Replace by deprecation warning stub.
18940 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18942 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18944 * regrename.c (regrename_do_replace): If replacing the same
18945 reg multiple times, try to reuse last created gen_raw_REG.
18948 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18949 main to workaround a bug in GDB.
18951 2018-01-12 Tom de Vries <tom@codesourcery.com>
18954 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18956 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18958 PR rtl-optimization/80481
18959 * ira-color.c (get_cap_member): New function.
18960 (allocnos_conflict_by_live_ranges_p): Use it.
18961 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18962 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18964 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18967 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18968 (*saddl_se_1): Ditto.
18969 (*ssubsi_1): Ditto.
18970 (*ssubl_se_1): Ditto.
18972 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18974 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18975 rather than wi::to_widest for DR_INITs.
18976 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18977 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18978 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18980 (vect_analyze_group_access_1): Note that here.
18982 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18984 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18985 polynomial type sizes.
18987 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18989 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18990 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18991 (gimple_add_tmp_var): Likewise.
18993 2018-01-12 Martin Liska <mliska@suse.cz>
18995 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18996 (gimple_alloc_sizes): Likewise.
18997 (dump_gimple_statistics): Use PRIu64 in printf format.
18998 * gimple.h: Change uint64_t to int.
19000 2018-01-12 Martin Liska <mliska@suse.cz>
19002 * tree-core.h: Use uint64_t instead of int.
19003 * tree.c (tree_node_counts): Likewise.
19004 (tree_node_sizes): Likewise.
19005 (dump_tree_statistics): Use PRIu64 in printf format.
19007 2018-01-12 Martin Liska <mliska@suse.cz>
19009 * Makefile.in: As qsort_chk is implemented in vec.c, add
19010 vec.o to linkage of gencfn-macros.
19011 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19012 passing the info to record_node_allocation_statistics.
19013 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19015 * ggc-common.c (struct ggc_usage): Add operator== and use
19016 it in operator< and compare function.
19017 * mem-stats.h (struct mem_usage): Likewise.
19018 * vec.c (struct vec_usage): Remove operator< and compare
19019 function. Can be simply inherited.
19021 2018-01-12 Martin Jambor <mjambor@suse.cz>
19024 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19025 * tree-ssa-math-opts.c: Include domwalk.h.
19026 (convert_mult_to_fma_1): New function.
19027 (fma_transformation_info): New type.
19028 (fma_deferring_state): Likewise.
19029 (cancel_fma_deferring): New function.
19030 (result_of_phi): Likewise.
19031 (last_fma_candidate_feeds_initial_phi): Likewise.
19032 (convert_mult_to_fma): Added deferring logic, split actual
19033 transformation to convert_mult_to_fma_1.
19034 (math_opts_dom_walker): New type.
19035 (math_opts_dom_walker::after_dom_children): New method, body moved
19036 here from pass_optimize_widening_mul::execute, added deferring logic
19038 (pass_optimize_widening_mul::execute): Moved most of code to
19039 math_opts_dom_walker::after_dom_children.
19040 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19041 * config/i386/i386.c (ix86_option_override_internal): Added
19042 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19044 2018-01-12 Richard Biener <rguenther@suse.de>
19047 * dwarf2out.c (gen_variable_die): Do not reset old_die for
19048 inline instance vars.
19050 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
19053 * config/rx/rx.c (rx_is_restricted_memory_address):
19054 Handle SUBREG case.
19056 2018-01-12 Richard Biener <rguenther@suse.de>
19058 PR tree-optimization/80846
19059 * target.def (split_reduction): New target hook.
19060 * targhooks.c (default_split_reduction): New function.
19061 * targhooks.h (default_split_reduction): Declare.
19062 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19063 target requests first reduce vectors by combining low and high
19065 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19066 (get_vectype_for_scalar_type_and_size): Export.
19067 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19068 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19069 * doc/tm.texi: Regenerate.
19070 * config/i386/i386.c (ix86_split_reduction): Implement
19071 TARGET_VECTORIZE_SPLIT_REDUCTION.
19073 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19076 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19077 in PIC mode except for TARGET_VXWORKS_RTP.
19078 * config/sparc/sparc.c: Include cfgrtl.h.
19079 (TARGET_INIT_PIC_REG): Define.
19080 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19081 (sparc_pic_register_p): New predicate.
19082 (sparc_legitimate_address_p): Use it.
19083 (sparc_legitimize_pic_address): Likewise.
19084 (sparc_delegitimize_address): Likewise.
19085 (sparc_mode_dependent_address_p): Likewise.
19086 (gen_load_pcrel_sym): Remove 4th parameter.
19087 (load_got_register): Adjust call to above. Remove obsolete stuff.
19088 (sparc_expand_prologue): Do not call load_got_register here.
19089 (sparc_flat_expand_prologue): Likewise.
19090 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19091 (sparc_use_pseudo_pic_reg): New function.
19092 (sparc_init_pic_reg): Likewise.
19093 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19094 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19096 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19098 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19099 Add item for branch_cost.
19101 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19103 PR rtl-optimization/83565
19104 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19105 not extend the result to a larger mode for rotate operations.
19106 (num_sign_bit_copies1): Likewise.
19108 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19111 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19113 Use values-Xc.o for -pedantic.
19114 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19116 2018-01-12 Martin Liska <mliska@suse.cz>
19119 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19121 (possible_polymorphic_call_targets): Use it.
19122 (ipa_devirt): Likewise.
19124 2018-01-12 Martin Liska <mliska@suse.cz>
19126 * profile-count.h (enum profile_quality): Use 0 as invalid
19127 enum value of profile_quality.
19129 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19131 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19132 -mext-string options.
19134 2018-01-12 Richard Biener <rguenther@suse.de>
19136 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19137 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19138 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19140 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19142 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19144 * configure.ac (--with-long-double-format): Add support for the
19145 configuration option to change the default long double format on
19147 * config.gcc (powerpc*-linux*-*): Likewise.
19148 * configure: Regenerate.
19149 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19150 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19151 used without modification.
19153 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19155 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19156 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19157 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19158 MISC_BUILTIN_SPEC_BARRIER.
19159 (rs6000_init_builtins): Likewise.
19160 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19162 (speculation_barrier): New define_insn.
19163 * doc/extend.texi: Document __builtin_speculation_barrier.
19165 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19168 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19169 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19170 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19172 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19173 integral modes instead of "ss" and "sd".
19174 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19175 vectors with 32-bit and 64-bit elements.
19176 (vecdupssescalarmodesuffix): New mode attribute.
19177 (vec_dup<mode>): Use it.
19179 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19182 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19183 frame if argument is passed on stack.
19185 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19188 * ree.c (combine_reaching_defs): Optimize also
19189 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19190 reg2=any_extend(exp); reg1=reg2;, formatting fix.
19192 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19194 PR middle-end/83189
19195 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19197 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19199 PR middle-end/83718
19200 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19201 after they are computed.
19203 2018-01-11 Bin Cheng <bin.cheng@arm.com>
19205 PR tree-optimization/83695
19206 * gimple-loop-linterchange.cc
19207 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19208 reset cached scev information after interchange.
19209 (pass_linterchange::execute): Remove call to scev_reset_htab.
19211 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19213 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19214 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19215 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19216 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19217 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19218 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19219 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19220 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19221 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19222 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19223 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19224 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19225 (V_lane_reg): Likewise.
19226 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19228 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19229 (vfmal_lane_low<mode>_intrinsic,
19230 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19231 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19232 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19233 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19234 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19235 vfmsl_lane_high<mode>_intrinsic): New define_insns.
19237 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19239 * config/arm/arm-cpus.in (fp16fml): New feature.
19240 (ALL_SIMD): Add fp16fml.
19241 (armv8.2-a): Add fp16fml as an option.
19242 (armv8.3-a): Likewise.
19243 (armv8.4-a): Add fp16fml as part of fp16.
19244 * config/arm/arm.h (TARGET_FP16FML): Define.
19245 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19247 * config/arm/arm-modes.def (V2HF): Define.
19248 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19249 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19250 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19251 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19252 vfmsl_low, vfmsl_high): New set of builtins.
19253 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19254 (vfml_op): New code attribute.
19255 (VFMLHALVES): New int iterator.
19256 (VFML, VFMLSEL): New mode attributes.
19257 (V_reg): Define mapping for V2HF.
19258 (V_hi, V_lo): New mode attributes.
19259 (VF_constraint): Likewise.
19260 (vfml_half, vfml_half_selector): New int attributes.
19261 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19263 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19264 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19266 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19267 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19268 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19269 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19271 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19272 Document new effective target and option set.
19274 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19276 * config/arm/arm-cpus.in (armv8_4): New feature.
19277 (ARMv8_4a): New fgroup.
19278 (armv8.4-a): New arch.
19279 * config/arm/arm-tables.opt: Regenerate.
19280 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19281 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19282 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19283 Add matching rules for -march=armv8.4-a and extensions.
19284 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19286 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19289 * config/rx/rx.md (BW): New mode attribute.
19290 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19292 2018-01-11 Richard Biener <rguenther@suse.de>
19294 PR tree-optimization/83435
19295 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19296 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19297 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19299 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19300 Alan Hayward <alan.hayward@arm.com>
19301 David Sherwood <david.sherwood@arm.com>
19303 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19305 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19306 (aarch64_print_address_internal): Use it to check for a zero offset.
19308 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19309 Alan Hayward <alan.hayward@arm.com>
19310 David Sherwood <david.sherwood@arm.com>
19312 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19313 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19314 Return a poly_int64 rather than a HOST_WIDE_INT.
19315 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19316 rather than a HOST_WIDE_INT.
19317 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19318 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19319 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19320 final_offset from HOST_WIDE_INT to poly_int64.
19321 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19322 to_constant when getting the number of units in an Advanced SIMD
19324 (aarch64_builtin_vectorized_function): Check for a constant number
19326 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19328 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19329 attribute instead of GET_MODE_NUNITS.
19330 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19331 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19332 GET_MODE_SIZE for fixed-size registers.
19333 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19334 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19335 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19336 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19337 (aarch64_print_operand, aarch64_print_address_internal)
19338 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19339 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19340 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19341 Handle polynomial GET_MODE_SIZE.
19342 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19343 wider than SImode without modification.
19344 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19345 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19346 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19347 passing and returning SVE modes.
19348 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19349 rather than GEN_INT.
19350 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19351 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19352 (aarch64_allocate_and_probe_stack_space): Likewise.
19353 (aarch64_layout_frame): Cope with polynomial offsets.
19354 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19355 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19356 polynomial offsets.
19357 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19358 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19359 poly_int64 rather than a HOST_WIDE_INT.
19360 (aarch64_get_separate_components, aarch64_process_components)
19361 (aarch64_expand_prologue, aarch64_expand_epilogue)
19362 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19363 (aarch64_anchor_offset): New function, split out from...
19364 (aarch64_legitimize_address): ...here.
19365 (aarch64_builtin_vectorization_cost): Handle polynomial
19366 TYPE_VECTOR_SUBPARTS.
19367 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19369 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19370 number of elements from the PARALLEL rather than the mode.
19371 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19372 rather than GET_MODE_BITSIZE.
19373 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19374 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19375 (aarch64_expand_vec_perm_const_1): Handle polynomial
19376 d->perm.length () and d->perm elements.
19377 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19378 Apply to_constant to d->perm elements.
19379 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19380 polynomial CONST_VECTOR_NUNITS.
19381 (aarch64_move_pointer): Take amount as a poly_int64 rather
19383 (aarch64_progress_pointer): Avoid temporary variable.
19384 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19385 the mode attribute instead of GET_MODE.
19387 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19388 Alan Hayward <alan.hayward@arm.com>
19389 David Sherwood <david.sherwood@arm.com>
19391 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19392 x exists before using it.
19393 (aarch64_add_constant_internal): Rename to...
19394 (aarch64_add_offset_1): ...this. Replace regnum with separate
19395 src and dest rtxes. Handle the case in which they're different,
19396 including when the offset is zero. Replace scratchreg with an rtx.
19397 Use 2 additions if there is no spare register into which we can
19398 move a 16-bit constant.
19399 (aarch64_add_constant): Delete.
19400 (aarch64_add_offset): Replace reg with separate src and dest
19401 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19402 Use aarch64_add_offset_1.
19403 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19404 an rtx rather than an int. Take the delta as a poly_int64
19405 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19406 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19407 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19408 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19409 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19410 and aarch64_add_sp.
19411 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19412 aarch64_add_constant.
19414 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19416 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19417 Use scalar_float_mode.
19419 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19421 * config/aarch64/aarch64-simd.md
19422 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19423 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19424 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19425 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19426 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19427 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19428 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19429 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19430 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19431 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19433 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19436 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19437 targ_options->x_arm_arch_string is non NULL.
19439 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19441 * config/aarch64/aarch64.h
19442 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19444 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19447 * expmed.c (emit_store_flag_force): Swap if const op0
19448 and change VOIDmode to mode of op0.
19450 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19452 PR rtl-optimization/83761
19453 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19454 than bytes to mode_for_size.
19456 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19458 PR middle-end/83189
19459 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19460 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19463 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19465 PR middle-end/83575
19466 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19467 when in layout mode.
19468 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19469 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19472 2018-01-10 Michael Collison <michael.collison@arm.com>
19474 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19475 * config/aarch64/aarch64-option-extension.def: Add
19476 AARCH64_OPT_EXTENSION of 'fp16fml'.
19477 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19478 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19479 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19480 * config/aarch64/constraints.md (Ui7): New constraint.
19481 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19482 (VFMLA_SEL_W): Ditto.
19485 (VFMLA16_LOW): New int iterator.
19486 (VFMLA16_HIGH): Ditto.
19487 (UNSPEC_FMLAL): New unspec.
19488 (UNSPEC_FMLSL): Ditto.
19489 (UNSPEC_FMLAL2): Ditto.
19490 (UNSPEC_FMLSL2): Ditto.
19491 (f16mac): New code attribute.
19492 * config/aarch64/aarch64-simd-builtins.def
19493 (aarch64_fmlal_lowv2sf): Ditto.
19494 (aarch64_fmlsl_lowv2sf): Ditto.
19495 (aarch64_fmlalq_lowv4sf): Ditto.
19496 (aarch64_fmlslq_lowv4sf): Ditto.
19497 (aarch64_fmlal_highv2sf): Ditto.
19498 (aarch64_fmlsl_highv2sf): Ditto.
19499 (aarch64_fmlalq_highv4sf): Ditto.
19500 (aarch64_fmlslq_highv4sf): Ditto.
19501 (aarch64_fmlal_lane_lowv2sf): Ditto.
19502 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19503 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19504 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19505 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19506 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19507 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19508 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19509 (aarch64_fmlal_lane_highv2sf): Ditto.
19510 (aarch64_fmlsl_lane_highv2sf): Ditto.
19511 (aarch64_fmlal_laneq_highv2sf): Ditto.
19512 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19513 (aarch64_fmlalq_lane_highv4sf): Ditto.
19514 (aarch64_fmlsl_lane_highv4sf): Ditto.
19515 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19516 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19517 * config/aarch64/aarch64-simd.md:
19518 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19519 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19520 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19521 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19522 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19523 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19524 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19525 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19526 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19527 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19528 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19529 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19530 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19531 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19532 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19533 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19534 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19535 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19536 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19537 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19538 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19539 (vfmlsl_low_u32): Ditto.
19540 (vfmlalq_low_u32): Ditto.
19541 (vfmlslq_low_u32): Ditto.
19542 (vfmlal_high_u32): Ditto.
19543 (vfmlsl_high_u32): Ditto.
19544 (vfmlalq_high_u32): Ditto.
19545 (vfmlslq_high_u32): Ditto.
19546 (vfmlal_lane_low_u32): Ditto.
19547 (vfmlsl_lane_low_u32): Ditto.
19548 (vfmlal_laneq_low_u32): Ditto.
19549 (vfmlsl_laneq_low_u32): Ditto.
19550 (vfmlalq_lane_low_u32): Ditto.
19551 (vfmlslq_lane_low_u32): Ditto.
19552 (vfmlalq_laneq_low_u32): Ditto.
19553 (vfmlslq_laneq_low_u32): Ditto.
19554 (vfmlal_lane_high_u32): Ditto.
19555 (vfmlsl_lane_high_u32): Ditto.
19556 (vfmlal_laneq_high_u32): Ditto.
19557 (vfmlsl_laneq_high_u32): Ditto.
19558 (vfmlalq_lane_high_u32): Ditto.
19559 (vfmlslq_lane_high_u32): Ditto.
19560 (vfmlalq_laneq_high_u32): Ditto.
19561 (vfmlslq_laneq_high_u32): Ditto.
19562 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19563 (AARCH64_FL_FOR_ARCH8_4): New.
19564 (AARCH64_ISA_F16FML): New ISA flag.
19565 (TARGET_F16FML): New feature flag for fp16fml.
19566 (doc/invoke.texi): Document new fp16fml option.
19568 2018-01-10 Michael Collison <michael.collison@arm.com>
19570 * config/aarch64/aarch64-builtins.c:
19571 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19572 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19573 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19574 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19575 (AARCH64_ISA_SHA3): New ISA flag.
19576 (TARGET_SHA3): New feature flag for sha3.
19577 * config/aarch64/iterators.md (sha512_op): New int attribute.
19578 (CRYPTO_SHA512): New int iterator.
19579 (UNSPEC_SHA512H): New unspec.
19580 (UNSPEC_SHA512H2): Ditto.
19581 (UNSPEC_SHA512SU0): Ditto.
19582 (UNSPEC_SHA512SU1): Ditto.
19583 * config/aarch64/aarch64-simd-builtins.def
19584 (aarch64_crypto_sha512hqv2di): New builtin.
19585 (aarch64_crypto_sha512h2qv2di): Ditto.
19586 (aarch64_crypto_sha512su0qv2di): Ditto.
19587 (aarch64_crypto_sha512su1qv2di): Ditto.
19588 (aarch64_eor3qv8hi): Ditto.
19589 (aarch64_rax1qv2di): Ditto.
19590 (aarch64_xarqv2di): Ditto.
19591 (aarch64_bcaxqv8hi): Ditto.
19592 * config/aarch64/aarch64-simd.md:
19593 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19594 (aarch64_crypto_sha512su0qv2di): Ditto.
19595 (aarch64_crypto_sha512su1qv2di): Ditto.
19596 (aarch64_eor3qv8hi): Ditto.
19597 (aarch64_rax1qv2di): Ditto.
19598 (aarch64_xarqv2di): Ditto.
19599 (aarch64_bcaxqv8hi): Ditto.
19600 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19601 (vsha512h2q_u64): Ditto.
19602 (vsha512su0q_u64): Ditto.
19603 (vsha512su1q_u64): Ditto.
19604 (veor3q_u16): Ditto.
19605 (vrax1q_u64): Ditto.
19606 (vxarq_u64): Ditto.
19607 (vbcaxq_u16): Ditto.
19608 * config/arm/types.md (crypto_sha512): New type attribute.
19609 (crypto_sha3): Ditto.
19610 (doc/invoke.texi): Document new sha3 option.
19612 2018-01-10 Michael Collison <michael.collison@arm.com>
19614 * config/aarch64/aarch64-builtins.c:
19615 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19616 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19617 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19618 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19619 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19620 (AARCH64_ISA_SM4): New ISA flag.
19621 (TARGET_SM4): New feature flag for sm4.
19622 * config/aarch64/aarch64-simd-builtins.def
19623 (aarch64_sm3ss1qv4si): Ditto.
19624 (aarch64_sm3tt1aq4si): Ditto.
19625 (aarch64_sm3tt1bq4si): Ditto.
19626 (aarch64_sm3tt2aq4si): Ditto.
19627 (aarch64_sm3tt2bq4si): Ditto.
19628 (aarch64_sm3partw1qv4si): Ditto.
19629 (aarch64_sm3partw2qv4si): Ditto.
19630 (aarch64_sm4eqv4si): Ditto.
19631 (aarch64_sm4ekeyqv4si): Ditto.
19632 * config/aarch64/aarch64-simd.md:
19633 (aarch64_sm3ss1qv4si): Ditto.
19634 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19635 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19636 (aarch64_sm4eqv4si): Ditto.
19637 (aarch64_sm4ekeyqv4si): Ditto.
19638 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19639 (sm3part_op): Ditto.
19640 (CRYPTO_SM3TT): Ditto.
19641 (CRYPTO_SM3PART): Ditto.
19642 (UNSPEC_SM3SS1): New unspec.
19643 (UNSPEC_SM3TT1A): Ditto.
19644 (UNSPEC_SM3TT1B): Ditto.
19645 (UNSPEC_SM3TT2A): Ditto.
19646 (UNSPEC_SM3TT2B): Ditto.
19647 (UNSPEC_SM3PARTW1): Ditto.
19648 (UNSPEC_SM3PARTW2): Ditto.
19649 (UNSPEC_SM4E): Ditto.
19650 (UNSPEC_SM4EKEY): Ditto.
19651 * config/aarch64/constraints.md (Ui2): New constraint.
19652 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19653 * config/arm/types.md (crypto_sm3): New type attribute.
19654 (crypto_sm4): Ditto.
19655 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19656 (vsm3tt1aq_u32): Ditto.
19657 (vsm3tt1bq_u32): Ditto.
19658 (vsm3tt2aq_u32): Ditto.
19659 (vsm3tt2bq_u32): Ditto.
19660 (vsm3partw1q_u32): Ditto.
19661 (vsm3partw2q_u32): Ditto.
19662 (vsm4eq_u32): Ditto.
19663 (vsm4ekeyq_u32): Ditto.
19664 (doc/invoke.texi): Document new sm4 option.
19666 2018-01-10 Michael Collison <michael.collison@arm.com>
19668 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19669 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19670 (AARCH64_FL_FOR_ARCH8_4): New.
19671 (AARCH64_FL_V8_4): New flag.
19672 (doc/invoke.texi): Document new armv8.4-a option.
19674 2018-01-10 Michael Collison <michael.collison@arm.com>
19676 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19677 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19678 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19679 * config/aarch64/aarch64-option-extension.def: Add
19680 AARCH64_OPT_EXTENSION of 'sha2'.
19681 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19682 (crypto): Disable sha2 and aes if crypto disabled.
19683 (crypto): Enable aes and sha2 if enabled.
19684 (simd): Disable sha2 and aes if simd disabled.
19685 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19687 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19688 (TARGET_SHA2): New feature flag for sha2.
19689 (TARGET_AES): New feature flag for aes.
19690 * config/aarch64/aarch64-simd.md:
19691 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19692 conditional on TARGET_AES.
19693 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19694 (aarch64_crypto_sha1hsi): Make pattern conditional
19696 (aarch64_crypto_sha1hv4si): Ditto.
19697 (aarch64_be_crypto_sha1hv4si): Ditto.
19698 (aarch64_crypto_sha1su1v4si): Ditto.
19699 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19700 (aarch64_crypto_sha1su0v4si): Ditto.
19701 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19702 (aarch64_crypto_sha256su0v4si): Ditto.
19703 (aarch64_crypto_sha256su1v4si): Ditto.
19704 (doc/invoke.texi): Document new aes and sha2 options.
19706 2018-01-10 Martin Sebor <msebor@redhat.com>
19708 PR tree-optimization/83781
19709 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19712 2018-01-11 Martin Sebor <msebor@gmail.com>
19713 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19715 PR tree-optimization/83501
19716 PR tree-optimization/81703
19718 * tree-ssa-strlen.c (get_string_cst): Rename...
19719 (get_string_len): ...to this. Handle global constants.
19720 (handle_char_store): Adjust.
19722 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19723 Jim Wilson <jimw@sifive.com>
19725 * config/riscv/riscv-protos.h (riscv_output_return): New.
19726 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19727 (riscv_attribute_table, riscv_output_return),
19728 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19729 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19730 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19732 (riscv_expand_prologue): Add early return for naked function.
19733 (riscv_expand_epilogue): Likewise.
19734 (riscv_function_ok_for_sibcall): Return false for naked function.
19735 (riscv_set_current_function): New.
19736 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19737 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19738 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19739 * doc/extend.texi (RISC-V Function Attributes): New.
19741 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19743 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19744 check for 128-bit long double before checking TCmode.
19745 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19746 128-bit long doubles before checking TFmode or TCmode.
19747 (FLOAT128_IBM_P): Likewise.
19749 2018-01-10 Martin Sebor <msebor@redhat.com>
19751 PR tree-optimization/83671
19752 * builtins.c (c_strlen): Unconditionally return zero for the empty
19754 Use -Warray-bounds for warnings.
19755 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19756 for non-constant array indices with COMPONENT_REF, arrays of
19757 arrays, and pointers to arrays.
19758 (gimple_fold_builtin_strlen): Determine and set length range for
19759 non-constant character arrays.
19761 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19763 PR middle-end/81897
19764 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19767 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19769 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19771 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19774 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19775 VECTOR_MEM_ALTIVEC_OR_VSX_P.
19776 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19777 indexed_or_indirect_operand predicate.
19778 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19779 (*vsx_le_perm_load_v8hi): Likewise.
19780 (*vsx_le_perm_load_v16qi): Likewise.
19781 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19782 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19783 (*vsx_le_perm_store_v8hi): Likewise.
19784 (*vsx_le_perm_store_v16qi): Likewise.
19785 (eight unnamed splitters): Likewise.
19787 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19789 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19790 * config/rs6000/emmintrin.h: Likewise.
19791 * config/rs6000/mmintrin.h: Likewise.
19792 * config/rs6000/xmmintrin.h: Likewise.
19794 2018-01-10 David Malcolm <dmalcolm@redhat.com>
19797 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19799 * tree.c (tree_nop_conversion): Return true for location wrapper
19801 (maybe_wrap_with_location): New function.
19802 (selftest::check_strip_nops): New function.
19803 (selftest::test_location_wrappers): New function.
19804 (selftest::tree_c_tests): Call it.
19805 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19806 (maybe_wrap_with_location): New decl.
19807 (EXPR_LOCATION_WRAPPER_P): New macro.
19808 (location_wrapper_p): New inline function.
19809 (tree_strip_any_location_wrapper): New inline function.
19811 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
19814 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19815 stack_realign_offset for the largest alignment of stack slot
19817 (ix86_find_max_used_stack_alignment): New function.
19818 (ix86_finalize_stack_frame_flags): Use it. Set
19819 max_used_stack_alignment if we don't realign stack.
19820 * config/i386/i386.h (machine_function): Add
19821 max_used_stack_alignment.
19823 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
19825 * config/arm/arm.opt (-mbranch-cost): New option.
19826 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19829 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
19832 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19833 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19835 2018-01-10 Richard Biener <rguenther@suse.de>
19838 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19839 early out so it also covers the case where we have a non-NULL
19842 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19844 PR tree-optimization/83753
19845 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19846 for non-strided grouped accesses if the number of elements is 1.
19848 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19851 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19852 * i386.h (TARGET_USE_GATHER): Define.
19853 * x86-tune.def (X86_TUNE_USE_GATHER): New.
19855 2018-01-10 Martin Liska <mliska@suse.cz>
19858 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19859 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19861 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19862 CLEANUP_NO_PARTITIONING is not set.
19864 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19866 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19867 for vectors, as a partial revert of r254296.
19868 * rtl.h (const_vec_p): Delete.
19869 (const_vec_duplicate_p): Don't test for vector CONSTs.
19870 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19871 * expmed.c (make_tree): Likewise.
19874 * common.md (E, F): Use CONSTANT_P instead of checking for
19876 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19877 checking for CONST_VECTOR.
19879 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19881 PR middle-end/83575
19882 * predict.c (force_edge_cold): Handle in more sane way edges
19883 with no prediction.
19885 2018-01-09 Carl Love <cel@us.ibm.com>
19887 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19889 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19890 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19891 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19892 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19893 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19894 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19895 * config/rs6000/rs6000-protos.h: Add extern defition for
19896 rs6000_generate_float2_double_code.
19897 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19899 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19900 (float2_v2df): Add define_expand.
19902 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19905 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19906 op_mode in the force_to_mode call.
19908 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19910 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19911 instead of checking each element individually.
19912 (aarch64_evpc_uzp): Likewise.
19913 (aarch64_evpc_zip): Likewise.
19914 (aarch64_evpc_ext): Likewise.
19915 (aarch64_evpc_rev): Likewise.
19916 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19917 instead of checking each element individually. Return true without
19919 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19920 whether all selected elements come from the same input, instead of
19921 checking each element individually. Remove calls to gen_rtx_REG,
19922 start_sequence and end_sequence and instead assert that no rtl is
19925 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19927 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19928 order of HIGH and CONST checks.
19930 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19932 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19933 if the destination isn't an SSA_NAME.
19935 2018-01-09 Richard Biener <rguenther@suse.de>
19937 PR tree-optimization/83668
19938 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19940 (canonicalize_loop_form): ... here, renamed from ...
19941 (canonicalize_loop_closed_ssa_form): ... this and amended to
19942 swap successor edges for loop exit blocks to make us use
19943 the RPO order we need for initial schedule generation.
19945 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19947 PR tree-optimization/64811
19948 * match.pd: When optimizing comparisons with Inf, avoid
19949 introducing or losing exceptions from comparisons with NaN.
19951 2018-01-09 Martin Liska <mliska@suse.cz>
19954 * asan.c (shadow_mem_size): Add gcc_assert.
19956 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19958 Don't save registers in main().
19961 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19962 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19963 * config/avr/avr.c (avr_set_current_function): Don't error if
19964 naked, OS_task or OS_main are specified at the same time.
19965 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19967 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19969 * common/config/avr/avr-common.c (avr_option_optimization_table):
19970 Switch on -mmain-is-OS_task for optimizing compilations.
19972 2018-01-09 Richard Biener <rguenther@suse.de>
19974 PR tree-optimization/83572
19975 * graphite.c: Include cfganal.h.
19976 (graphite_transform_loops): Connect infinite loops to exit
19977 and remove fake edges at the end.
19979 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19981 * ipa-inline.c (edge_badness): Revert accidental checkin.
19983 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19986 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19987 symbols; not inline clones.
19989 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19992 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19993 hard registers. Formatting fixes.
19995 PR preprocessor/83722
19996 * gcc.c (try_generate_repro): Pass
19997 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19998 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20001 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
20002 Kito Cheng <kito.cheng@gmail.com>
20004 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20005 (riscv_leaf_function_p): Delete.
20006 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20008 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20010 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20012 (do_ifelse): New function.
20013 (do_isel): New function.
20014 (do_sub3): New function.
20015 (do_add3): New function.
20016 (do_load_mask_compare): New function.
20017 (do_overlap_load_compare): New function.
20018 (expand_compare_loop): New function.
20019 (expand_block_compare): Call expand_compare_loop() when appropriate.
20020 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20021 option description.
20022 (-mblock-compare-inline-loop-limit): New option.
20024 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20027 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20028 Reverse order of second and third operands in first alternative.
20029 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20030 of first and second elements in UNSPEC_VPERMR vector.
20031 (altivec_expand_vec_perm_le): Likewise.
20033 2018-01-08 Jeff Law <law@redhat.com>
20035 PR rtl-optimizatin/81308
20036 * tree-switch-conversion.c (cfg_altered): New file scoped static.
20037 (process_switch): If group_case_labels makes a change, then set
20039 (pass_convert_switch::execute): If a switch is converted, then
20040 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
20042 PR rtl-optimization/81308
20043 * recog.c (split_all_insns): Conditionally cleanup the CFG after
20046 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
20048 PR target/83663 - Revert r255946
20049 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20050 generation for cases where splatting a value is not useful.
20051 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20052 across a vec_duplicate and a paradoxical subreg forming a vector
20053 mode to a vec_concat.
20055 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20057 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20058 -march=armv8.3-a variants.
20059 * config/arm/t-multilib: Likewise.
20060 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
20062 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20064 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20066 (cceq_ior_compare_complement): Give it a name so I can use it, and
20067 change boolean_or_operator predicate to boolean_operator so it can
20068 be used to generate a crand.
20069 (eqne): New code iterator.
20070 (bd/bd_neg): New code_attrs.
20071 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20072 a single define_insn.
20073 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20074 decrement (bdnzt/bdnzf/bdzt/bdzf).
20075 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20076 with the new names of the branch decrement patterns, and added the
20077 names of the branch decrement conditional patterns.
20079 2018-01-08 Richard Biener <rguenther@suse.de>
20081 PR tree-optimization/83563
20082 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20085 2018-01-08 Richard Biener <rguenther@suse.de>
20087 PR middle-end/83713
20088 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20090 2018-01-08 Richard Biener <rguenther@suse.de>
20092 PR tree-optimization/83685
20093 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20094 references to abnormals.
20096 2018-01-08 Richard Biener <rguenther@suse.de>
20099 * dwarf2out.c (output_indirect_strings): Handle empty
20100 skeleton_debug_str_hash.
20101 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20103 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20105 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20106 (emit_store_direct): Likewise.
20107 (arc_trampoline_adjust_address): Likewise.
20108 (arc_asm_trampoline_template): New function.
20109 (arc_initialize_trampoline): Use asm_trampoline_template.
20110 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20111 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20112 * config/arc/arc.md (flush_icache): Delete pattern.
20114 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20116 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20117 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20120 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20123 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20124 by not USED_FOR_TARGET.
20125 (make_pass_resolve_sw_modes): Likewise.
20127 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20129 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20132 2018-01-08 Richard Biener <rguenther@suse.de>
20134 PR middle-end/83580
20135 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20137 2018-01-08 Richard Biener <rguenther@suse.de>
20139 PR middle-end/83517
20140 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20142 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20144 PR middle-end/81897
20145 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20146 basic blocks with a small number of successors.
20147 (convert_control_dep_chain_into_preds): Improve handling of
20149 (dump_predicates): Split apart into...
20150 (dump_pred_chain): ...here...
20151 (dump_pred_info): ...and here.
20152 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20153 (can_chain_union_be_invalidated_p): Improve check for invalidation
20155 (uninit_uses_cannot_happen): Avoid unnecessary if
20156 convert_control_dep_chain_into_preds yielded nothing.
20158 2018-01-06 Martin Sebor <msebor@redhat.com>
20160 PR tree-optimization/83640
20161 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20162 subtracting negative offset from size.
20163 (builtin_access::overlap): Adjust offset bounds of the access to fall
20164 within the size of the object if possible.
20166 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20168 PR rtl-optimization/83699
20169 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20170 extract_bit_field_as_subreg to cases in which the extracted
20171 value is also a vector.
20173 * lra-constraints.c (process_alt_operands): Test for the equivalence
20174 substitutions when detecting a possible reload cycle.
20176 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20179 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20180 by default if flag_selective_schedling{,2}. Formatting fixes.
20182 PR rtl-optimization/83682
20183 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20184 if it has non-VECTOR_MODE element mode.
20185 (vec_duplicate_p): Likewise.
20187 PR middle-end/83694
20188 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20189 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20191 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20194 * config/i386/i386-builtin.def
20195 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20196 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20197 Require also OPTION_MASK_ISA_AVX512F in addition to
20198 OPTION_MASK_ISA_GFNI.
20199 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20200 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20201 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20202 to OPTION_MASK_ISA_GFNI.
20203 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20204 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20205 OPTION_MASK_ISA_AVX512BW.
20206 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20207 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20208 addition to OPTION_MASK_ISA_GFNI.
20209 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20210 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20211 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20212 to OPTION_MASK_ISA_GFNI.
20213 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20214 a requirement for all ISAs rather than any of them with a few
20216 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20218 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20219 bitmasks to be enabled with 3 exceptions, instead of requiring any
20220 enabled ISA with lots of exceptions.
20221 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20222 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20223 Change avx512bw in isa attribute to avx512f.
20224 * config/i386/sgxintrin.h: Add license boilerplate.
20225 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
20226 to __AVX512F__ and __AVX512VL to __AVX512VL__.
20227 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20228 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20230 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20231 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20232 temporarily sse2 rather than sse if not enabled already.
20235 * config/i386/sse.md (VI248_VLBW): Rename to ...
20236 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
20237 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20238 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20239 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20240 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20241 mode iterator instead of VI248_VLBW.
20243 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
20245 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20246 (record_modified): Skip clobbers; add debug output.
20247 (param_change_prob): Use sreal frequencies.
20249 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20251 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20252 punt for user-aligned variables.
20254 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20256 * tree-chrec.c (chrec_contains_symbols): Return true for
20259 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20262 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20263 of (x|y) == x for BICS pattern.
20265 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20267 PR tree-optimization/83605
20268 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20269 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20272 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20274 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20275 * config/epiphany/rtems.h: New file.
20277 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20278 Uros Bizjak <ubizjak@gmail.com>
20281 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20282 QIreg_operand instead of register_operand predicate.
20283 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20284 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20285 comments instead of -fmitigate[-_]rop.
20287 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20290 * cgraphunit.c (symbol_table::compile): Switch to text_section
20291 before calling assembly_start debug hook.
20292 * run-rtl-passes.c (run_rtl_passes): Likewise.
20295 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20297 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20298 range_int_cst_p rather than !symbolic_range_p before calling
20299 extract_range_from_multiplicative_op_1.
20301 2018-01-04 Jeff Law <law@redhat.com>
20303 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20304 redundant test in assertion.
20306 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20308 * doc/rtl.texi: Document machine_mode wrapper classes.
20310 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20312 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20313 using tree_to_uhwi.
20315 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20317 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20318 the VEC_PERM_EXPR fold to fail.
20320 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20323 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20324 to switched_sections.
20326 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20329 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20330 test for d.testing.
20332 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20335 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20336 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20338 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20341 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20342 is BLKmode and bitpos not zero or mode change is needed.
20344 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20347 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20350 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20353 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20354 instead of MULT rtx. Update all corresponding splitters.
20355 (*saddl_se): Ditto.
20356 (*ssub<modesuffix>): Ditto.
20357 (*ssubl_se): Ditto.
20358 (*cmp_sadd_di): Update split patterns.
20359 (*cmp_sadd_si): Ditto.
20360 (*cmp_sadd_sidi): Ditto.
20361 (*cmp_ssub_di): Ditto.
20362 (*cmp_ssub_si): Ditto.
20363 (*cmp_ssub_sidi): Ditto.
20364 * config/alpha/predicates.md (const23_operand): New predicate.
20365 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20366 Look for ASHIFT, not MULT inner operand.
20367 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20369 2018-01-04 Martin Liska <mliska@suse.cz>
20371 PR gcov-profile/83669
20372 * gcov.c (output_intermediate_file): Add version to intermediate
20374 * doc/gcov.texi: Document new field 'version' in intermediate
20375 file format. Fix location of '-k' option of gcov command.
20377 2018-01-04 Martin Liska <mliska@suse.cz>
20380 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20382 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20384 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20386 2018-01-03 Martin Sebor <msebor@redhat.com>
20388 PR tree-optimization/83655
20389 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20390 checking calls with invalid arguments.
20392 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20394 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20395 (vectorizable_mask_load_store): Delete.
20396 (vectorizable_call): Return false for masked loads and stores.
20397 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20398 instead of gimple_assign_rhs1.
20399 (vectorizable_load): Handle IFN_MASK_LOAD.
20400 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20404 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20406 (vectorizable_mask_load_store): ...here.
20407 (vectorizable_load): ...and here.
20409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20411 * tree-vect-stmts.c (vect_build_all_ones_mask)
20412 (vect_build_zero_merge_argument): New functions, split out from...
20413 (vectorizable_load): ...here.
20415 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20417 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20419 (vectorizable_mask_load_store): ...here.
20420 (vectorizable_store): ...and here.
20422 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20424 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20426 (vectorizable_mask_load_store): ...here.
20428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20430 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20431 (vect_model_store_cost): Take a vec_load_store_type instead of a
20433 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20434 (vect_model_store_cost): Take a vec_load_store_type instead of a
20436 (vectorizable_mask_load_store): Update accordingly.
20437 (vectorizable_store): Likewise.
20438 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20442 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20443 IFN_MASK_LOAD calls here rather than...
20444 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20446 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20447 Alan Hayward <alan.hayward@arm.com>
20448 David Sherwood <david.sherwood@arm.com>
20450 * expmed.c (extract_bit_field_1): For vector extracts,
20451 fall back to extract_bit_field_as_subreg if vec_extract
20454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20455 Alan Hayward <alan.hayward@arm.com>
20456 David Sherwood <david.sherwood@arm.com>
20458 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20459 they are variable or constant sized.
20460 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20461 slots for constant-sized data.
20463 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20464 Alan Hayward <alan.hayward@arm.com>
20465 David Sherwood <david.sherwood@arm.com>
20467 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20468 handling COND_EXPRs with boolean comparisons, try to find a better
20469 basis for the mask type than the boolean itself.
20471 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20473 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20474 is calculated and how it can be overridden.
20475 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20476 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20478 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20481 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20482 Alan Hayward <alan.hayward@arm.com>
20483 David Sherwood <david.sherwood@arm.com>
20485 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20486 Remove the mode argument.
20487 (aarch64_simd_valid_immediate): Remove the mode and inverse
20489 * config/aarch64/iterators.md (bitsize): New iterator.
20490 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20491 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20492 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20493 aarch64_simd_valid_immediate.
20494 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20495 (aarch64_reg_or_bic_imm): Likewise.
20496 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20497 with an insn_type enum and msl with a modifier_type enum.
20498 Replace element_width with a scalar_mode. Change the shift
20499 to unsigned int. Add constructors for scalar_float_mode and
20500 scalar_int_mode elements.
20501 (aarch64_vect_float_const_representable_p): Delete.
20502 (aarch64_can_const_movi_rtx_p)
20503 (aarch64_simd_scalar_immediate_valid_for_move)
20504 (aarch64_simd_make_constant): Update call to
20505 aarch64_simd_valid_immediate.
20506 (aarch64_advsimd_valid_immediate_hs): New function.
20507 (aarch64_advsimd_valid_immediate): Likewise.
20508 (aarch64_simd_valid_immediate): Remove mode and inverse
20509 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20510 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20511 and aarch64_float_const_representable_p on the result.
20512 (aarch64_output_simd_mov_immediate): Remove mode argument.
20513 Update call to aarch64_simd_valid_immediate and use of
20514 simd_immediate_info.
20515 (aarch64_output_scalar_simd_mov_immediate): Update call
20518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20519 Alan Hayward <alan.hayward@arm.com>
20520 David Sherwood <david.sherwood@arm.com>
20522 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20523 (mode_nunits): Likewise CONST_MODE_NUNITS.
20524 * machmode.def (ADJUST_NUNITS): Document.
20525 * genmodes.c (mode_data::need_nunits_adj): New field.
20526 (blank_mode): Update accordingly.
20527 (adj_nunits): New variable.
20528 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20530 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20531 listed in adj_nunits.
20532 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20533 listed in adj_nunits. Don't emit case statements for such modes.
20534 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20535 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20536 nothing if adj_nunits is nonnull.
20537 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20538 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20539 (emit_mode_fbit): Update use of print_maybe_const_decl.
20540 (emit_move_size): Likewise. Treat the array as non-const
20542 (emit_mode_adjustments): Handle adj_nunits.
20544 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20546 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20547 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20548 (VECTOR_MODES): Use it.
20549 (make_vector_modes): Take the prefix as an argument.
20551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20552 Alan Hayward <alan.hayward@arm.com>
20553 David Sherwood <david.sherwood@arm.com>
20555 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20556 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20557 for MODE_VECTOR_BOOL.
20558 * machmode.def (VECTOR_BOOL_MODE): Document.
20559 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20560 (make_vector_bool_mode): New function.
20561 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20563 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20564 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20566 * stor-layout.c (int_mode_for_mode): Likewise.
20567 * tree.c (build_vector_type_for_mode): Likewise.
20568 * varasm.c (output_constant_pool_2): Likewise.
20569 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20570 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20571 for MODE_VECTOR_BOOL.
20572 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20573 of mode class checks.
20574 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20575 instead of a list of mode class checks.
20576 (expand_vector_scalar_condition): Likewise.
20577 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20580 Alan Hayward <alan.hayward@arm.com>
20581 David Sherwood <david.sherwood@arm.com>
20583 * machmode.h (mode_size): Change from unsigned short to
20585 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20586 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20587 or if measurement_type is not polynomial.
20588 (fixed_size_mode::includes_p): Check for constant-sized modes.
20589 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20590 return a poly_uint16 rather than an unsigned short.
20591 (emit_mode_size): Change the type of mode_size from unsigned short
20592 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20593 (emit_mode_adjustments): Cope with polynomial vector sizes.
20594 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20596 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20598 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20599 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20600 * caller-save.c (setup_save_areas): Likewise.
20601 (replace_reg_with_saved_mem): Likewise.
20602 * calls.c (emit_library_call_value_1): Likewise.
20603 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20604 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20605 (gen_lowpart_for_combine): Likewise.
20606 * convert.c (convert_to_integer_1): Likewise.
20607 * cse.c (equiv_constant, cse_insn): Likewise.
20608 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20609 (cselib_subst_to_values): Likewise.
20610 * dce.c (word_dce_process_block): Likewise.
20611 * df-problems.c (df_word_lr_mark_ref): Likewise.
20612 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20613 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20614 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20615 (rtl_for_decl_location): Likewise.
20616 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20617 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20618 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20619 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20620 (expand_expr_real_1): Likewise.
20621 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20622 (pad_below): Likewise.
20623 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20624 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20625 * ira.c (get_subreg_tracking_sizes): Likewise.
20626 * ira-build.c (ira_create_allocno_objects): Likewise.
20627 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20628 (ira_sort_regnos_for_alter_reg): Likewise.
20629 * ira-costs.c (record_operand_costs): Likewise.
20630 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20631 (resolve_simple_move): Likewise.
20632 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20633 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20634 (lra_constraints): Likewise.
20635 (CONST_POOL_OK_P): Reject variable-sized modes.
20636 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20637 (add_pseudo_to_slot, lra_spill): Likewise.
20638 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20639 * optabs-query.c (get_best_extraction_insn): Likewise.
20640 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20641 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20642 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20643 * recog.c (offsettable_address_addr_space_p): Likewise.
20644 * regcprop.c (maybe_mode_change): Likewise.
20645 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20646 * regrename.c (build_def_use): Likewise.
20647 * regstat.c (dump_reg_info): Likewise.
20648 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20649 (find_reloads, find_reloads_subreg_address): Likewise.
20650 * reload1.c (eliminate_regs_1): Likewise.
20651 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20652 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20653 (simplify_binary_operation_1, simplify_subreg): Likewise.
20654 * targhooks.c (default_function_arg_padding): Likewise.
20655 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20656 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20657 (verify_gimple_assign_ternary): Likewise.
20658 * tree-inline.c (estimate_move_cost): Likewise.
20659 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20660 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20661 (get_address_cost_ainc): Likewise.
20662 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20663 (vect_supportable_dr_alignment): Likewise.
20664 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20665 (vectorizable_reduction): Likewise.
20666 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20667 (vectorizable_operation, vectorizable_load): Likewise.
20668 * tree.c (build_same_sized_truth_vector_type): Likewise.
20669 * valtrack.c (cleanup_auto_inc_dec): Likewise.
20670 * var-tracking.c (emit_note_insn_var_location): Likewise.
20671 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20672 (ADDR_VEC_ALIGN): Likewise.
20674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20675 Alan Hayward <alan.hayward@arm.com>
20676 David Sherwood <david.sherwood@arm.com>
20678 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20680 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20681 or if measurement_type is polynomial.
20682 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20683 * combine.c (make_extraction): Likewise.
20684 * dse.c (find_shift_sequence): Likewise.
20685 * dwarf2out.c (mem_loc_descriptor): Likewise.
20686 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20687 (extract_bit_field, extract_low_bits): Likewise.
20688 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20689 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20690 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20691 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20692 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20693 * reload.c (find_reloads): Likewise.
20694 * reload1.c (alter_reg): Likewise.
20695 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20696 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20697 * tree-if-conv.c (predicate_mem_writes): Likewise.
20698 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20699 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20700 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20701 * valtrack.c (dead_debug_insert_temp): Likewise.
20702 * varasm.c (mergeable_constant_section): Likewise.
20703 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20705 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20706 Alan Hayward <alan.hayward@arm.com>
20707 David Sherwood <david.sherwood@arm.com>
20709 * expr.c (expand_assignment): Cope with polynomial mode sizes
20710 when assigning to a CONCAT.
20712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20713 Alan Hayward <alan.hayward@arm.com>
20714 David Sherwood <david.sherwood@arm.com>
20716 * machmode.h (mode_precision): Change from unsigned short to
20718 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20720 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20721 or if measurement_type is not polynomial.
20722 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20723 in which the mode is already known to be a scalar_int_mode.
20724 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20725 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20727 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20728 for GET_MODE_PRECISION.
20729 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20730 for GET_MODE_PRECISION.
20731 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20733 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20734 (expand_field_assignment, make_extraction): Likewise.
20735 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20736 (get_last_value): Likewise.
20737 * convert.c (convert_to_integer_1): Likewise.
20738 * cse.c (cse_insn): Likewise.
20739 * expr.c (expand_expr_real_1): Likewise.
20740 * lra-constraints.c (simplify_operand_subreg): Likewise.
20741 * optabs-query.c (can_atomic_load_p): Likewise.
20742 * optabs.c (expand_atomic_load): Likewise.
20743 (expand_atomic_store): Likewise.
20744 * ree.c (combine_reaching_defs): Likewise.
20745 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20746 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20747 * tree.h (type_has_mode_precision_p): Likewise.
20748 * ubsan.c (instrument_si_overflow): Likewise.
20750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20751 Alan Hayward <alan.hayward@arm.com>
20752 David Sherwood <david.sherwood@arm.com>
20754 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20755 polynomial numbers of units.
20756 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20757 (valid_vector_subparts_p): New function.
20758 (build_vector_type): Remove temporary shim and take the number
20759 of units as a poly_uint64 rather than an int.
20760 (build_opaque_vector_type): Take the number of units as a
20761 poly_uint64 rather than an int.
20762 * tree.c (build_vector_from_ctor): Handle polynomial
20763 TYPE_VECTOR_SUBPARTS.
20764 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20765 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20766 (build_vector_from_val): If the number of units is variable,
20767 use build_vec_duplicate_cst for constant operands and
20768 VEC_DUPLICATE_EXPR otherwise.
20769 (make_vector_type): Remove temporary is_constant ().
20770 (build_vector_type, build_opaque_vector_type): Take the number of
20771 units as a poly_uint64 rather than an int.
20772 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20774 * cfgexpand.c (expand_debug_expr): Likewise.
20775 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20776 (store_constructor, expand_expr_real_1): Likewise.
20777 (const_scalar_mask_from_tree): Likewise.
20778 * fold-const-call.c (fold_const_reduction): Likewise.
20779 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20780 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20781 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20782 (fold_relational_const): Likewise.
20783 (native_interpret_vector): Likewise. Change the size from an
20784 int to an unsigned int.
20785 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20786 TYPE_VECTOR_SUBPARTS.
20787 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20788 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20789 duplicating a non-constant operand into a variable-length vector.
20790 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20791 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20792 * ipa-icf.c (sem_variable::equals): Likewise.
20793 * match.pd: Likewise.
20794 * omp-simd-clone.c (simd_clone_subparts): Likewise.
20795 * print-tree.c (print_node): Likewise.
20796 * stor-layout.c (layout_type): Likewise.
20797 * targhooks.c (default_builtin_vectorization_cost): Likewise.
20798 * tree-cfg.c (verify_gimple_comparison): Likewise.
20799 (verify_gimple_assign_binary): Likewise.
20800 (verify_gimple_assign_ternary): Likewise.
20801 (verify_gimple_assign_single): Likewise.
20802 * tree-pretty-print.c (dump_generic_node): Likewise.
20803 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20804 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20805 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20806 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20807 (vect_shift_permute_load_chain): Likewise.
20808 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20809 (expand_vector_condition, optimize_vector_constructor): Likewise.
20810 (lower_vec_perm, get_compute_type): Likewise.
20811 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20812 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20813 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20814 (vect_recog_mask_conversion_pattern): Likewise.
20815 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20816 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20817 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20818 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20819 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20820 (vectorizable_shift, vectorizable_operation, vectorizable_store)
20821 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20822 (supportable_widening_operation): Likewise.
20823 (supportable_narrowing_operation): Likewise.
20824 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20826 * varasm.c (output_constant): Likewise.
20828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20829 Alan Hayward <alan.hayward@arm.com>
20830 David Sherwood <david.sherwood@arm.com>
20832 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20833 so that both the length == 3 and length != 3 cases set up their
20834 own permute vectors. Add comments explaining why we know the
20835 number of elements is constant.
20836 (vect_permute_load_chain): Likewise.
20838 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20839 Alan Hayward <alan.hayward@arm.com>
20840 David Sherwood <david.sherwood@arm.com>
20842 * machmode.h (mode_nunits): Change from unsigned char to
20844 (ONLY_FIXED_SIZE_MODES): New macro.
20845 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20846 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20847 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20849 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20850 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20851 or if measurement_type is not polynomial.
20852 * genmodes.c (ZERO_COEFFS): New macro.
20853 (emit_mode_nunits_inline): Make mode_nunits_inline return a
20855 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20856 Use ZERO_COEFFS when emitting initializers.
20857 * data-streamer.h (bp_pack_poly_value): New function.
20858 (bp_unpack_poly_value): Likewise.
20859 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20860 for GET_MODE_NUNITS.
20861 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20862 for GET_MODE_NUNITS.
20863 * tree.c (make_vector_type): Remove temporary shim and make
20864 the real function take the number of units as a poly_uint64
20865 rather than an int.
20866 (build_vector_type_for_mode): Handle polynomial nunits.
20867 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20868 * emit-rtl.c (const_vec_series_p_1): Likewise.
20869 (gen_rtx_CONST_VECTOR): Likewise.
20870 * fold-const.c (test_vec_duplicate_folding): Likewise.
20871 * genrecog.c (validate_pattern): Likewise.
20872 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20873 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20874 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20875 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20876 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20877 * rtlanal.c (subreg_get_info): Likewise.
20878 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20879 (vect_grouped_load_supported): Likewise.
20880 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20881 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20882 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20883 (simplify_const_unary_operation, simplify_binary_operation_1)
20884 (simplify_const_binary_operation, simplify_ternary_operation)
20885 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20886 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20887 instead of CONST_VECTOR_NUNITS.
20888 * varasm.c (output_constant_pool_2): Likewise.
20889 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20890 explicit-encoded elements in the XVEC for variable-length vectors.
20892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20894 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20896 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20897 Alan Hayward <alan.hayward@arm.com>
20898 David Sherwood <david.sherwood@arm.com>
20900 * coretypes.h (fixed_size_mode): Declare.
20901 (fixed_size_mode_pod): New typedef.
20902 * builtins.h (target_builtins::x_apply_args_mode)
20903 (target_builtins::x_apply_result_mode): Change type to
20904 fixed_size_mode_pod.
20905 * builtins.c (apply_args_size, apply_result_size, result_vector)
20906 (expand_builtin_apply_args_1, expand_builtin_apply)
20907 (expand_builtin_return): Update accordingly.
20909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20911 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20912 * cselib.c (cselib_hash_rtx): Likewise.
20913 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20914 CONST_VECTOR encoding.
20916 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20917 Jeff Law <law@redhat.com>
20920 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20921 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20922 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20923 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20926 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20927 explicitly probe *sp in a noreturn function if there were any callee
20928 register saves or frame pointer is needed.
20930 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20933 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20934 BLKmode for ternary, binary or unary expressions.
20937 * var-tracking.c (delete_vta_debug_insn): New inline function.
20938 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20939 insns from get_insns () to NULL instead of each bb separately.
20940 Use delete_vta_debug_insn. No longer static.
20941 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20942 delete_vta_debug_insns callers.
20943 * rtl.h (delete_vta_debug_insns): Declare.
20944 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20945 instead of variable_tracking_main.
20947 2018-01-03 Martin Sebor <msebor@redhat.com>
20949 PR tree-optimization/83603
20950 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20951 arguments past the endof the argument list in functions declared
20952 without a prototype.
20953 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20954 Avoid checking when arguments are null.
20956 2018-01-03 Martin Sebor <msebor@redhat.com>
20959 * doc/extend.texi (attribute const): Fix a typo.
20960 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20961 issuing -Wsuggest-attribute for void functions.
20963 2018-01-03 Martin Sebor <msebor@redhat.com>
20965 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20966 offset_int::from instead of wide_int::to_shwi.
20967 (maybe_diag_overlap): Remove assertion.
20968 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20969 * gimple-ssa-sprintf.c (format_directive): Same.
20970 (parse_directive): Same.
20971 (sprintf_dom_walker::compute_format_length): Same.
20972 (try_substitute_return_value): Same.
20974 2018-01-03 Jeff Law <law@redhat.com>
20976 PR middle-end/83654
20977 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20978 non-constant residual for zero at runtime and avoid probing in
20979 that case. Reorganize code for trailing problem to mirror handling
20982 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20984 PR tree-optimization/83501
20985 * tree-ssa-strlen.c (get_string_cst): New.
20986 (handle_char_store): Call get_string_cst.
20988 2018-01-03 Martin Liska <mliska@suse.cz>
20990 PR tree-optimization/83593
20991 * tree-ssa-strlen.c: Include tree-cfg.h.
20992 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20993 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20994 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20996 (strlen_dom_walker::before_dom_children): Call
20997 gimple_purge_dead_eh_edges. Dump tranformation with details
20999 (strlen_dom_walker::before_dom_children): Update call by adding
21000 new argument cleanup_eh.
21001 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21003 2018-01-03 Martin Liska <mliska@suse.cz>
21006 * cif-code.def (VARIADIC_THUNK): New enum value.
21007 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21010 2018-01-03 Jan Beulich <jbeulich@suse.com>
21012 * sse.md (mov<mode>_internal): Tighten condition for when to use
21013 vmovdqu<ssescalarsize> for TI and OI modes.
21015 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21017 Update copyright years.
21019 2018-01-03 Martin Liska <mliska@suse.cz>
21022 * ipa-visibility.c (function_and_variable_visibility): Skip
21023 functions with noipa attribure.
21025 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21027 * gcc.c (process_command): Update copyright notice dates.
21028 * gcov-dump.c (print_version): Ditto.
21029 * gcov.c (print_version): Ditto.
21030 * gcov-tool.c (print_version): Ditto.
21031 * gengtype.c (create_file): Ditto.
21032 * doc/cpp.texi: Bump @copying's copyright year.
21033 * doc/cppinternals.texi: Ditto.
21034 * doc/gcc.texi: Ditto.
21035 * doc/gccint.texi: Ditto.
21036 * doc/gcov.texi: Ditto.
21037 * doc/install.texi: Ditto.
21038 * doc/invoke.texi: Ditto.
21040 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21042 * vector-builder.h (vector_builder::m_full_nelts): Change from
21043 unsigned int to poly_uint64.
21044 (vector_builder::full_nelts): Update prototype accordingly.
21045 (vector_builder::new_vector): Likewise.
21046 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21047 (vector_builder::operator ==): Likewise.
21048 (vector_builder::finalize): Likewise.
21049 * int-vector-builder.h (int_vector_builder::int_vector_builder):
21050 Take the number of elements as a poly_uint64 rather than an
21052 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21053 from unsigned int to poly_uint64.
21054 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21055 (vec_perm_indices::new_vector): Likewise.
21056 (vec_perm_indices::length): Likewise.
21057 (vec_perm_indices::nelts_per_input): Likewise.
21058 (vec_perm_indices::input_nelts): Likewise.
21059 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21060 number of elements per input as a poly_uint64 rather than an
21061 unsigned int. Use the original encoding for variable-length
21062 vectors, rather than clamping each individual element.
21063 For the second and subsequent elements in each pattern,
21064 clamp the step and base before clamping their sum.
21065 (vec_perm_indices::series_p): Handle polynomial element counts.
21066 (vec_perm_indices::all_in_range_p): Likewise.
21067 (vec_perm_indices_to_tree): Likewise.
21068 (vec_perm_indices_to_rtx): Likewise.
21069 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21070 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21071 (tree_vector_builder::new_binary_operation): Handle polynomial
21072 element counts. Return false if we need to know the number
21073 of elements at compile time.
21074 * fold-const.c (fold_vec_perm): Punt if the number of elements
21075 isn't known at compile time.
21077 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21079 * vec-perm-indices.h (vec_perm_builder): Change element type
21080 from HOST_WIDE_INT to poly_int64.
21081 (vec_perm_indices::element_type): Update accordingly.
21082 (vec_perm_indices::clamp): Handle polynomial element_types.
21083 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21084 (vec_perm_indices::all_in_range_p): Likewise.
21085 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21087 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21088 polynomial vec_perm_indices element types.
21089 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21090 * fold-const.c (fold_vec_perm): Likewise.
21091 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21092 * tree-vect-generic.c (lower_vec_perm): Likewise.
21093 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21094 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21095 element type to HOST_WIDE_INT.
21097 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21098 Alan Hayward <alan.hayward@arm.com>
21099 David Sherwood <david.sherwood@arm.com>
21101 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21102 rather than an int. Use plus_constant.
21103 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21104 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21106 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21107 Alan Hayward <alan.hayward@arm.com>
21108 David Sherwood <david.sherwood@arm.com>
21110 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21111 a HOST_WIDE_INT to a poly_int64.
21113 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21114 Alan Hayward <alan.hayward@arm.com>
21115 David Sherwood <david.sherwood@arm.com>
21117 * calls.c (load_register_parameters): Cope with polynomial
21118 mode sizes. Require a constant size for BLKmode parameters
21119 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21120 forces a parameter to be padded at the lsb end in order to
21121 fill a complete number of words, require the parameter size
21122 to be ordered wrt UNITS_PER_WORD.
21124 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21125 Alan Hayward <alan.hayward@arm.com>
21126 David Sherwood <david.sherwood@arm.com>
21128 * reload1.c (spill_stack_slot_width): Change element type
21129 from unsigned int to poly_uint64_pod.
21130 (alter_reg): Treat mode sizes as polynomial.
21132 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21133 Alan Hayward <alan.hayward@arm.com>
21134 David Sherwood <david.sherwood@arm.com>
21136 * reload.c (complex_word_subreg_p): New function.
21137 (reload_inner_reg_of_subreg, push_reload): Use it.
21139 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21140 Alan Hayward <alan.hayward@arm.com>
21141 David Sherwood <david.sherwood@arm.com>
21143 * lra-constraints.c (process_alt_operands): Reject matched
21144 operands whose sizes aren't ordered.
21145 (match_reload): Refer to this check here.
21147 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21148 Alan Hayward <alan.hayward@arm.com>
21149 David Sherwood <david.sherwood@arm.com>
21151 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21152 that the mode size is in the set {1, 2, 4, 8, 16}.
21154 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21155 Alan Hayward <alan.hayward@arm.com>
21156 David Sherwood <david.sherwood@arm.com>
21158 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21159 Use plus_constant instead of gen_rtx_PLUS.
21161 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21162 Alan Hayward <alan.hayward@arm.com>
21163 David Sherwood <david.sherwood@arm.com>
21165 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21166 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21167 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21168 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21169 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21170 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21171 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21172 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21173 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21174 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21176 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21177 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21178 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21179 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21180 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21181 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21182 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21183 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21184 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21185 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21187 * expr.c (emit_move_resolve_push): Treat the input and result
21188 of PUSH_ROUNDING as a poly_int64.
21189 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21190 (emit_push_insn): Likewise.
21191 * lra-eliminations.c (mark_not_eliminable): Likewise.
21192 * recog.c (push_operand): Likewise.
21193 * reload1.c (elimination_effects): Likewise.
21194 * rtlanal.c (nonzero_bits1): Likewise.
21195 * calls.c (store_one_arg): Likewise. Require the padding to be
21196 known at compile time.
21198 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21199 Alan Hayward <alan.hayward@arm.com>
21200 David Sherwood <david.sherwood@arm.com>
21202 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21203 Use plus_constant instead of gen_rtx_PLUS.
21205 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21206 Alan Hayward <alan.hayward@arm.com>
21207 David Sherwood <david.sherwood@arm.com>
21209 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21210 rather than an int.
21212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21213 Alan Hayward <alan.hayward@arm.com>
21214 David Sherwood <david.sherwood@arm.com>
21216 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21217 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21218 via stack temporaries. Treat the mode size as polynomial too.
21220 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21221 Alan Hayward <alan.hayward@arm.com>
21222 David Sherwood <david.sherwood@arm.com>
21224 * expr.c (expand_expr_real_2): When handling conversions involving
21225 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21226 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
21227 as a poly_uint64 too.
21229 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21230 Alan Hayward <alan.hayward@arm.com>
21231 David Sherwood <david.sherwood@arm.com>
21233 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21235 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21236 Alan Hayward <alan.hayward@arm.com>
21237 David Sherwood <david.sherwood@arm.com>
21239 * combine.c (can_change_dest_mode): Handle polynomial
21240 REGMODE_NATURAL_SIZE.
21241 * expmed.c (store_bit_field_1): Likewise.
21242 * expr.c (store_constructor): Likewise.
21243 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21244 and polynomial REGMODE_NATURAL_SIZE.
21245 (gen_lowpart_common): Likewise.
21246 * reginfo.c (record_subregs_of_mode): Likewise.
21247 * rtlanal.c (read_modify_subreg_p): Likewise.
21249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21250 Alan Hayward <alan.hayward@arm.com>
21251 David Sherwood <david.sherwood@arm.com>
21253 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21254 numbers of elements.
21256 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21257 Alan Hayward <alan.hayward@arm.com>
21258 David Sherwood <david.sherwood@arm.com>
21260 * match.pd: Cope with polynomial numbers of vector elements.
21262 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21263 Alan Hayward <alan.hayward@arm.com>
21264 David Sherwood <david.sherwood@arm.com>
21266 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21267 in a POINTER_PLUS_EXPR.
21269 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21270 Alan Hayward <alan.hayward@arm.com>
21271 David Sherwood <david.sherwood@arm.com>
21273 * omp-simd-clone.c (simd_clone_subparts): New function.
21274 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21275 (ipa_simd_modify_function_body): Likewise.
21277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21278 Alan Hayward <alan.hayward@arm.com>
21279 David Sherwood <david.sherwood@arm.com>
21281 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21282 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21283 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21284 (expand_vector_condition, vector_element): Likewise.
21285 (subparts_gt): New function.
21286 (get_compute_type): Use subparts_gt.
21287 (count_type_subparts): Delete.
21288 (expand_vector_operations_1): Use subparts_gt instead of
21289 count_type_subparts.
21291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21292 Alan Hayward <alan.hayward@arm.com>
21293 David Sherwood <david.sherwood@arm.com>
21295 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21296 (vect_compile_time_alias): ...this new function. Do the calculation
21297 on poly_ints rather than trees.
21298 (vect_prune_runtime_alias_test_list): Update call accordingly.
21300 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21301 Alan Hayward <alan.hayward@arm.com>
21302 David Sherwood <david.sherwood@arm.com>
21304 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21306 (vect_schedule_slp_instance): Likewise.
21308 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21309 Alan Hayward <alan.hayward@arm.com>
21310 David Sherwood <david.sherwood@arm.com>
21312 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21313 constant and extern definitions for variable-length vectors.
21314 (vect_get_constant_vectors): Note that the number of units
21315 is known to be constant.
21317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21318 Alan Hayward <alan.hayward@arm.com>
21319 David Sherwood <david.sherwood@arm.com>
21321 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21322 of units as polynomial. Choose between WIDE and NARROW based
21325 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21326 Alan Hayward <alan.hayward@arm.com>
21327 David Sherwood <david.sherwood@arm.com>
21329 * tree-vect-stmts.c (simd_clone_subparts): New function.
21330 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21333 Alan Hayward <alan.hayward@arm.com>
21334 David Sherwood <david.sherwood@arm.com>
21336 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21337 vectors as polynomial. Use build_index_vector for
21338 IFN_GOMP_SIMD_LANE.
21340 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21341 Alan Hayward <alan.hayward@arm.com>
21342 David Sherwood <david.sherwood@arm.com>
21344 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21345 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21346 for variable-length vectors.
21347 (vectorizable_mask_load_store): Treat the number of units as
21348 polynomial, asserting that it is constant if the condition has
21349 already been enforced.
21350 (vectorizable_store, vectorizable_load): Likewise.
21352 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21353 Alan Hayward <alan.hayward@arm.com>
21354 David Sherwood <david.sherwood@arm.com>
21356 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21357 of units as polynomial. Punt if we can't tell at compile time
21358 which vector contains the final result.
21360 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21361 Alan Hayward <alan.hayward@arm.com>
21362 David Sherwood <david.sherwood@arm.com>
21364 * tree-vect-loop.c (vectorizable_induction): Treat the number
21365 of units as polynomial. Punt on SLP inductions. Use an integer
21366 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21367 cast of such a series for variable-length floating-point
21370 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21371 Alan Hayward <alan.hayward@arm.com>
21372 David Sherwood <david.sherwood@arm.com>
21374 * tree.h (build_index_vector): Declare.
21375 * tree.c (build_index_vector): New function.
21376 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21377 of units as polynomial, forcibly converting it to a constant if
21378 vectorizable_reduction has already enforced the condition.
21379 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21380 to create a {1,2,3,...} vector.
21381 (vectorizable_reduction): Treat the number of units as polynomial.
21382 Choose vectype_in based on the largest scalar element size rather
21383 than the smallest number of units. Enforce the restrictions
21386 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21387 Alan Hayward <alan.hayward@arm.com>
21388 David Sherwood <david.sherwood@arm.com>
21390 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21391 number of units as polynomial.
21393 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21394 Alan Hayward <alan.hayward@arm.com>
21395 David Sherwood <david.sherwood@arm.com>
21397 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21398 * target.def (autovectorize_vector_sizes): Return the vector sizes
21399 by pointer, using vector_sizes rather than a bitmask.
21400 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21401 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21402 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21404 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21405 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21406 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21407 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21408 * omp-general.c (omp_max_vf): Likewise.
21409 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21410 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21411 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21412 * tree-vect-slp.c (vect_slp_bb): Likewise.
21413 * doc/tm.texi: Regenerate.
21414 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21416 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21417 the vector size as a poly_uint64 rather than an unsigned int.
21418 (current_vector_size): Change from an unsigned int to a poly_uint64.
21419 (get_vectype_for_scalar_type): Update accordingly.
21420 * tree.h (build_truth_vector_type): Take the size and number of
21421 units as a poly_uint64 rather than an unsigned int.
21422 (build_vector_type): Add a temporary overload that takes
21423 the number of units as a poly_uint64 rather than an unsigned int.
21424 * tree.c (make_vector_type): Likewise.
21425 (build_truth_vector_type): Take the number of units as a poly_uint64
21426 rather than an unsigned int.
21428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21429 Alan Hayward <alan.hayward@arm.com>
21430 David Sherwood <david.sherwood@arm.com>
21432 * target.def (get_mask_mode): Take the number of units and length
21433 as poly_uint64s rather than unsigned ints.
21434 * targhooks.h (default_get_mask_mode): Update accordingly.
21435 * targhooks.c (default_get_mask_mode): Likewise.
21436 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21437 * doc/tm.texi: Regenerate.
21439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21440 Alan Hayward <alan.hayward@arm.com>
21441 David Sherwood <david.sherwood@arm.com>
21443 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21444 * omp-general.c (omp_max_vf): Likewise.
21445 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21446 (expand_omp_simd): Handle polynomial safelen.
21447 * omp-low.c (omplow_simd_context): Add a default constructor.
21448 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21449 (lower_rec_simd_input_clauses): Update accordingly.
21450 (lower_rec_input_clauses): Likewise.
21452 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21453 Alan Hayward <alan.hayward@arm.com>
21454 David Sherwood <david.sherwood@arm.com>
21456 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21457 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21458 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21459 (vect_analyze_slp_cost): Likewise.
21460 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21461 (vect_model_load_cost): Likewise.
21463 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21464 Alan Hayward <alan.hayward@arm.com>
21465 David Sherwood <david.sherwood@arm.com>
21467 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21468 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21469 from an unsigned int * to a poly_uint64_pod *.
21470 (calculate_unrolling_factor): New function.
21471 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21473 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21474 Alan Hayward <alan.hayward@arm.com>
21475 David Sherwood <david.sherwood@arm.com>
21477 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21478 from an unsigned int to a poly_uint64.
21479 (_loop_vec_info::slp_unrolling_factor): Likewise.
21480 (_loop_vec_info::vectorization_factor): Change from an int
21482 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21483 (vect_get_num_vectors): New function.
21484 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21485 (vect_get_num_copies): Use vect_get_num_vectors.
21486 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21487 to an unsigned int *.
21488 (vect_analyze_data_refs): Change min_vf from an int * to a
21490 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21491 than an unsigned HOST_WIDE_INT.
21492 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21493 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21494 to an unsigned int *.
21495 (vect_analyze_data_ref_dependences): Likewise.
21496 (vect_compute_data_ref_alignment): Handle polynomial vf.
21497 (vect_enhance_data_refs_alignment): Likewise.
21498 (vect_prune_runtime_alias_test_list): Likewise.
21499 (vect_shift_permute_load_chain): Likewise.
21500 (vect_supportable_dr_alignment): Likewise.
21501 (dependence_distance_ge_vf): Take the vectorization factor as a
21502 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21503 (vect_analyze_data_refs): Change min_vf from an int * to a
21505 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21506 vfm1 as a poly_uint64 rather than an int. Make the same change
21507 for the returned bound_scalar.
21508 (vect_gen_vector_loop_niters): Handle polynomial vf.
21509 (vect_do_peeling): Likewise. Update call to
21510 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21511 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21513 * tree-vect-loop.c (vect_determine_vectorization_factor)
21514 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21515 (vect_get_known_peeling_cost): Likewise.
21516 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21517 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21518 (vect_transform_loop): Likewise. Use the lowest possible VF when
21519 updating the upper bounds of the loop.
21520 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21521 rather than an int.
21522 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21523 polynomial unroll factors.
21524 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21525 (vect_make_slp_decision): Likewise.
21526 (vect_supported_load_permutation_p): Likewise, and polynomial
21528 (vect_analyze_slp_cost): Handle polynomial vf.
21529 (vect_slp_analyze_node_operations): Likewise.
21530 (vect_slp_analyze_bb_1): Likewise.
21531 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21532 than an unsigned HOST_WIDE_INT.
21533 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21534 (vectorizable_load): Handle polynomial vf.
21535 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21537 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21539 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21540 Alan Hayward <alan.hayward@arm.com>
21541 David Sherwood <david.sherwood@arm.com>
21543 * match.pd: Handle bit operations involving three constants
21544 and try to fold one pair.
21546 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21548 * tree-vect-loop-manip.c: Include gimple-fold.h.
21549 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21550 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21551 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21552 Add a path that uses a step of VF instead of 1, but disable it
21554 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21555 and niters_no_overflow parameters. Update calls to
21556 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21557 Create a new SSA name if the latter choses to use a ste other
21558 than zero, and return it via niters_vector_mult_vf_var.
21559 * tree-vect-loop.c (vect_transform_loop): Update calls to
21560 vect_do_peeling, vect_gen_vector_loop_niters and
21561 slpeel_make_loop_iterate_ntimes.
21562 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21563 (vect_gen_vector_loop_niters): Update declarations after above changes.
21565 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21567 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21568 128-bit round to integer instructions.
21569 (ceil<mode>2): Likewise.
21570 (btrunc<mode>2): Likewise.
21571 (round<mode>2): Likewise.
21573 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21575 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21576 unaligned VSX load/store on P8/P9.
21577 (expand_block_clear): Allow the use of unaligned VSX
21578 load/store on P8/P9.
21580 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21582 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21584 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21585 swap associated with both a load and a store.
21587 2018-01-02 Andrew Waterman <andrew@sifive.com>
21589 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21590 * config/riscv/riscv.md (clear_cache): Use it.
21592 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21594 * web.c: Remove out-of-date comment.
21596 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21598 * expr.c (fixup_args_size_notes): Check that any existing
21599 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21600 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21601 (emit_single_push_insn): ...here.
21603 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21605 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21606 (const_vector_encoded_nelts): New function.
21607 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21608 (const_vector_int_elt, const_vector_elt): Declare.
21609 * emit-rtl.c (const_vector_int_elt_1): New function.
21610 (const_vector_elt): Likewise.
21611 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21612 of CONST_VECTOR_ELT.
21614 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21616 * expr.c: Include rtx-vector-builder.h.
21617 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21618 directly on the tree encoding.
21619 (const_vector_from_tree): Likewise.
21620 * optabs.c: Include rtx-vector-builder.h.
21621 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21622 sequence of "u" values.
21623 * vec-perm-indices.c: Include rtx-vector-builder.h.
21624 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21625 directly on the vec_perm_indices encoding.
21627 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21629 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21630 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21631 * rtx-vector-builder.h: New file.
21632 * rtx-vector-builder.c: Likewise.
21633 * rtl.h (rtx_def::u2): Add a const_vector field.
21634 (CONST_VECTOR_NPATTERNS): New macro.
21635 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21636 (CONST_VECTOR_DUPLICATE_P): Likewise.
21637 (CONST_VECTOR_STEPPED_P): Likewise.
21638 (CONST_VECTOR_ENCODED_ELT): Likewise.
21639 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21640 (unwrap_const_vec_duplicate): Likewise.
21641 (const_vec_series_p): Check for a non-duplicated vector encoding.
21642 Say that the function only returns true for integer vectors.
21643 * emit-rtl.c: Include rtx-vector-builder.h.
21644 (gen_const_vec_duplicate_1): Delete.
21645 (gen_const_vector): Call gen_const_vec_duplicate instead of
21646 gen_const_vec_duplicate_1.
21647 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21648 (gen_const_vec_duplicate): Use rtx_vector_builder.
21649 (gen_const_vec_series): Likewise.
21650 (gen_rtx_CONST_VECTOR): Likewise.
21651 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21652 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21653 Build a new vector rather than modifying a CONST_VECTOR in-place.
21654 (handle_special_swappables): Update call accordingly.
21655 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21656 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21657 Build a new vector rather than modifying a CONST_VECTOR in-place.
21658 (handle_special_swappables): Update call accordingly.
21660 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21662 * simplify-rtx.c (simplify_const_binary_operation): Use
21663 CONST_VECTOR_ELT instead of XVECEXP.
21665 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21667 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21668 the selector elements to be different from the data elements
21669 if the selector is a VECTOR_CST.
21670 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21671 ssizetype for the selector.
21673 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21675 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21676 before testing each element individually.
21677 * tree-vect-generic.c (lower_vec_perm): Likewise.
21679 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21681 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21682 * selftest-run-tests.c (selftest::run_tests): Call it.
21683 * vector-builder.h (vector_builder::operator ==): New function.
21684 (vector_builder::operator !=): Likewise.
21685 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21686 (vec_perm_indices::all_from_input_p): New function.
21687 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21688 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21689 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21690 instead of reading the VECTOR_CST directly. Detect whether both
21691 vector inputs are the same before constructing the vec_perm_indices,
21692 and update the number of inputs argument accordingly. Use the
21693 utility functions added above. Only construct sel2 if we need to.
21695 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21697 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21698 the broadcast of the low byte.
21699 (expand_mult_highpart): Use an explicit encoding for the permutes.
21700 * optabs-query.c (can_mult_highpart_p): Likewise.
21701 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21702 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21703 (vectorizable_bswap): Likewise.
21704 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21705 explicit encoding for the power-of-2 permutes.
21706 (vect_permute_store_chain): Likewise.
21707 (vect_grouped_load_supported): Likewise.
21708 (vect_permute_load_chain): Likewise.
21710 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21712 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21713 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21714 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21715 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21716 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21717 (vect_gen_perm_mask_any): Likewise.
21719 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21721 * int-vector-builder.h: New file.
21722 * vec-perm-indices.h: Include int-vector-builder.h.
21723 (vec_perm_indices): Redefine as an int_vector_builder.
21724 (auto_vec_perm_indices): Delete.
21725 (vec_perm_builder): Redefine as a stand-alone class.
21726 (vec_perm_indices::vec_perm_indices): New function.
21727 (vec_perm_indices::clamp): Likewise.
21728 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21729 (vec_perm_indices::new_vector): New function.
21730 (vec_perm_indices::new_expanded_vector): Update for new
21731 vec_perm_indices class.
21732 (vec_perm_indices::rotate_inputs): New function.
21733 (vec_perm_indices::all_in_range_p): Operate directly on the
21734 encoded form, without computing elided elements.
21735 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21736 encoding. Update for new vec_perm_indices class.
21737 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21738 the given vec_perm_builder.
21739 (expand_vec_perm_var): Update vec_perm_builder constructor.
21740 (expand_mult_highpart): Use vec_perm_builder instead of
21741 auto_vec_perm_indices.
21742 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21743 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21744 or double series encoding as appropriate.
21745 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21746 vec_perm_indices instead of auto_vec_perm_indices.
21747 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21748 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21749 (vect_permute_store_chain): Likewise.
21750 (vect_grouped_load_supported): Likewise.
21751 (vect_permute_load_chain): Likewise.
21752 (vect_shift_permute_load_chain): Likewise.
21753 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21754 (vect_transform_slp_perm_load): Likewise.
21755 (vect_schedule_slp_instance): Likewise.
21756 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21757 (vectorizable_mask_load_store): Likewise.
21758 (vectorizable_bswap): Likewise.
21759 (vectorizable_store): Likewise.
21760 (vectorizable_load): Likewise.
21761 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21762 vec_perm_indices instead of auto_vec_perm_indices. Use
21763 tree_to_vec_perm_builder to read the vector from a tree.
21764 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21765 vec_perm_builder instead of a vec_perm_indices.
21766 (have_whole_vector_shift): Use vec_perm_builder and
21767 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21768 truncation to calc_vec_perm_mask_for_shift.
21769 (vect_create_epilog_for_reduction): Likewise.
21770 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21771 from auto_vec_perm_indices to vec_perm_indices.
21772 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21773 instead of changing individual elements.
21774 (aarch64_vectorize_vec_perm_const): Use new_vector to install
21775 the vector in d.perm.
21776 * config/arm/arm.c (expand_vec_perm_d::perm): Change
21777 from auto_vec_perm_indices to vec_perm_indices.
21778 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21779 instead of changing individual elements.
21780 (arm_vectorize_vec_perm_const): Use new_vector to install
21781 the vector in d.perm.
21782 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21783 Update vec_perm_builder constructor.
21784 (rs6000_expand_interleave): Likewise.
21785 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21786 (rs6000_expand_interleave): Likewise.
21788 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21790 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21791 to qimode could truncate the indices.
21792 * optabs.c (expand_vec_perm_var): Likewise.
21794 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21796 * Makefile.in (OBJS): Add vec-perm-indices.o.
21797 * vec-perm-indices.h: New file.
21798 * vec-perm-indices.c: Likewise.
21799 * target.h (vec_perm_indices): Replace with a forward class
21801 (auto_vec_perm_indices): Move to vec-perm-indices.h.
21802 * optabs.h: Include vec-perm-indices.h.
21803 (expand_vec_perm): Delete.
21804 (selector_fits_mode_p, expand_vec_perm_var): Declare.
21805 (expand_vec_perm_const): Declare.
21806 * target.def (vec_perm_const_ok): Replace with...
21807 (vec_perm_const): ...this new hook.
21808 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21809 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21810 * doc/tm.texi: Regenerate.
21811 * optabs.def (vec_perm_const): Delete.
21812 * doc/md.texi (vec_perm_const): Likewise.
21813 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21814 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21815 expand_vec_perm for constant permutation vectors. Assert that
21816 the mode of variable permutation vectors is the integer equivalent
21817 of the mode that is being permuted.
21818 * optabs-query.h (selector_fits_mode_p): Declare.
21819 * optabs-query.c: Include vec-perm-indices.h.
21820 (selector_fits_mode_p): New function.
21821 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21822 is defined, instead of checking whether the vec_perm_const_optab
21823 exists. Use targetm.vectorize.vec_perm_const instead of
21824 targetm.vectorize.vec_perm_const_ok. Check whether the indices
21825 fit in the vector mode before using a variable permute.
21826 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21827 vec_perm_indices instead of an rtx.
21828 (expand_vec_perm): Replace with...
21829 (expand_vec_perm_const): ...this new function. Take the selector
21830 as a vec_perm_indices rather than an rtx. Also take the mode of
21831 the selector. Update call to shift_amt_for_vec_perm_mask.
21832 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21833 Use vec_perm_indices::new_expanded_vector to expand the original
21834 selector into bytes. Check whether the indices fit in the vector
21835 mode before using a variable permute.
21836 (expand_vec_perm_var): Make global.
21837 (expand_mult_highpart): Use expand_vec_perm_const.
21838 * fold-const.c: Includes vec-perm-indices.h.
21839 * tree-ssa-forwprop.c: Likewise.
21840 * tree-vect-data-refs.c: Likewise.
21841 * tree-vect-generic.c: Likewise.
21842 * tree-vect-loop.c: Likewise.
21843 * tree-vect-slp.c: Likewise.
21844 * tree-vect-stmts.c: Likewise.
21845 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21847 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21848 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21849 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21850 (aarch64_vectorize_vec_perm_const): ...this new function.
21851 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21852 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21853 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21854 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21855 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21856 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21857 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21859 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
21860 check for NEON modes.
21861 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21862 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21863 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21864 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21866 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21867 the old VEC_PERM_CONST conditions.
21868 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21869 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21870 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21871 (ia64_vectorize_vec_perm_const_ok): Merge into...
21872 (ia64_vectorize_vec_perm_const): ...this new function.
21873 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21874 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21875 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21876 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21877 * config/mips/mips.c (mips_expand_vec_perm_const)
21878 (mips_vectorize_vec_perm_const_ok): Merge into...
21879 (mips_vectorize_vec_perm_const): ...this new function.
21880 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21881 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21882 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21883 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21884 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21885 (rs6000_expand_vec_perm_const): Delete.
21886 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21888 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21889 (altivec_expand_vec_perm_const_le): Take each operand individually.
21890 Operate on constant selectors rather than rtxes.
21891 (altivec_expand_vec_perm_const): Likewise. Update call to
21892 altivec_expand_vec_perm_const_le.
21893 (rs6000_expand_vec_perm_const): Delete.
21894 (rs6000_vectorize_vec_perm_const_ok): Delete.
21895 (rs6000_vectorize_vec_perm_const): New function.
21896 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21897 an element count and rtx array.
21898 (rs6000_expand_extract_even): Update call accordingly.
21899 (rs6000_expand_interleave): Likewise.
21900 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21901 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21902 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21903 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21904 (rs6000_expand_vec_perm_const): Delete.
21905 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21906 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21907 (altivec_expand_vec_perm_const_le): Take each operand individually.
21908 Operate on constant selectors rather than rtxes.
21909 (altivec_expand_vec_perm_const): Likewise. Update call to
21910 altivec_expand_vec_perm_const_le.
21911 (rs6000_expand_vec_perm_const): Delete.
21912 (rs6000_vectorize_vec_perm_const_ok): Delete.
21913 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21914 reference to the SPE evmerge intructions.
21915 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21916 an element count and rtx array.
21917 (rs6000_expand_extract_even): Update call accordingly.
21918 (rs6000_expand_interleave): Likewise.
21919 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21920 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21922 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21924 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21926 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21927 vector mode and that that mode matches the mode of the data
21929 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21930 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21931 directly using expand_vec_perm_1 when forcing selectors into
21933 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21935 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21937 * optabs-query.h (can_vec_perm_p): Delete.
21938 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21939 * optabs-query.c (can_vec_perm_p): Split into...
21940 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21941 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21942 particular selector is valid.
21943 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21944 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21945 (vect_grouped_load_supported): Likewise.
21946 (vect_shift_permute_load_chain): Likewise.
21947 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21948 (vect_transform_slp_perm_load): Likewise.
21949 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21950 (vectorizable_bswap): Likewise.
21951 (vect_gen_perm_mask_checked): Likewise.
21952 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21953 implementations of variable permutation vectors into account
21954 when deciding which selector to use.
21955 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21956 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21957 with a false third argument.
21958 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21959 to test whether the constant selector is valid and can_vec_perm_var_p
21960 to test whether a variable selector is valid.
21962 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21964 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21965 * optabs-query.c (can_vec_perm_p): Likewise.
21966 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21967 instead of vec_perm_indices.
21968 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21969 (vect_gen_perm_mask_checked): Likewise,
21970 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21971 (vect_gen_perm_mask_checked): Likewise,
21973 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21975 * optabs-query.h (qimode_for_vec_perm): Declare.
21976 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21977 (qimode_for_vec_perm): ...this new function.
21978 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21980 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21982 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21983 does not have a conditional at the top.
21985 2018-01-02 Richard Biener <rguenther@suse.de>
21987 * ipa-inline.c (big_speedup_p): Fix expression.
21989 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21992 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21995 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21999 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22000 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22001 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22002 cond_taken_branch_cost 3->4.
22004 2018-01-01 Jakub Jelinek <jakub@redhat.com>
22006 PR tree-optimization/83581
22007 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22008 TODO_cleanup_cfg if any changes have been made.
22010 PR middle-end/83608
22011 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22012 convert_modes if target mode has the right side, but different mode
22015 PR middle-end/83609
22016 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22017 last argument when extracting from CONCAT. If either from_real or
22018 from_imag is NULL, use expansion through memory. If result is not
22019 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22020 the parts directly to inner mode, if even that fails, use expansion
22023 PR middle-end/83623
22024 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22025 check for bswap in mode rather than HImode and use that in expand_unop
22028 Copyright (C) 2018 Free Software Foundation, Inc.
22030 Copying and distribution of this file, with or without modification,
22031 are permitted in any medium without royalty provided the copyright
22032 notice and this notice are preserved.