re PR target/86813 (xstormy16 port needs updating for CVE-2017-5753)
[gcc.git] / gcc / ChangeLog
1 2018-08-02 Tom de Vries <tdevries@suse.de>
2
3 PR target/86660
4 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5 function. Return UI_TARGET unconditionally.
6 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
8
9 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
10
11 * genemit.c (print_overload_test): Fix typo.
12
13 2018-08-02 Richard Biener <rguenther@suse.de>
14
15 PR c++/86763
16 * class.c (layout_class_type): Copy TYPE_TYPELESS_STORAGE
17 to the CLASSTYPE_AS_BASE.
18
19 2018-08-02 Richard Biener <rguenther@suse.de>
20
21 PR tree-optimization/86816
22 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
23 which checks for value availability before querying it.
24 (gvn_uses_equal): Use it.
25 (same_succ_hash): Likewise.
26 (gimple_equal_p): Likewise.
27
28 2018-08-02 Nick Clifton <nickc@redhat.com>
29
30 PR target/86813
31 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
32 Define to speculation_safe_value_not_needed.
33
34 PR target/86810
35 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
36 Define to speculation_safe_value_not_needed.
37
38 PR target/86810
39 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
40 Define to speculation_safe_value_not_needed.
41
42 PR target/86803
43 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
44 Define to speculation_safe_value_not_needed.
45
46 PR target/86797
47 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
48 Define to speculation_safe_value_not_needed.
49
50 PR target/86791
51 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
52 Define to speculation_safe_value_not_needed.
53
54 PR target/86789
55 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
56 Define to speculation_safe_value_not_needed.
57
58 PR target/86787
59 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
60 Define to speculation_safe_value_not_needed.
61
62 PR target/86782
63 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
64 speculation_safe_value_not_needed.
65
66 PR target/86781
67 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
68 to speculation_safe_value_not_needed.
69
70 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
71
72 * doc/md.texi: Expand the documentation of instruction names
73 to mention port-local uses. Document '@' in pattern names.
74 * read-md.h (overloaded_instance, overloaded_name): New structs.
75 (mapping): Declare.
76 (md_reader::handle_overloaded_name): New member function.
77 (md_reader::get_overloads): Likewise.
78 (md_reader::m_first_overload): New member variable.
79 (md_reader::m_next_overload_ptr): Likewise.
80 (md_reader::m_overloads_htab): Likewise.
81 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
82 m_next_overload_ptr and m_overloads_htab.
83 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
84 (get_mode_token, get_code_token, get_int_token): New functions.
85 (map_attr_string): Add an optional argument that passes back
86 the associated iterator.
87 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
88 (md_reader::handle_overloaded_name, add_overload_instance): New
89 functions.
90 (apply_iterators): Handle '@' names. Report an error if '@'
91 is used without iterators.
92 (initialize_iterators): Initialize the new iterator_group fields.
93 * genopinit.c (handle_overloaded_code_for)
94 (handle_overloaded_gen): New functions.
95 (main): Use them to print declarations of maybe_code_for_* and
96 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
97 * genemit.c (print_overload_arguments, print_overload_test)
98 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
99 (main): Use it to print definitions of maybe_code_for_* and
100 maybe_gen_* functions.
101 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
102 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
103 instead of explicit mode checks.
104 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
105 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
106 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
107 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
108 (aarch64_expand_compare_and_swap): Likewise
109 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
110 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
111 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
112 (aarch64_constant_pool_reload_icode): Delete.
113 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
114 instead of aarch64_constant_pool_reload_icode. Use
115 code_for_aarch64_reload_mov instead of explicit mode checks.
116 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
117 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
118 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
119 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
120 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
121 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
122 (aarch64_atomic_load_op_code): Delete.
123 (aarch64_emit_atomic_load_op): Likewise.
124 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
125 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
126 instead of aarch64_emit_atomic_load_op.
127 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
128 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
129 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
130 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
131 character before the pattern name.
132 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
133 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
134 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
135 (aarch64_frecps<mode>): Likewise.
136 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
137 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
138 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
139 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
140 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
141
142 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
143
144 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
145 Allow HFmode constants if TARGET_FP_F16INST.
146
147 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
148
149 PR target/86014
150 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
151 No longer check last store for clobber of address register.
152
153 2018-08-02 Martin Liska <mliska@suse.cz>
154
155 PR gcov-profile/86817
156 * gcov.c (process_all_functions): New function.
157 (main): Call it.
158 (process_file): Move functions processing to
159 process_all_functions.
160
161 2018-08-02 David Malcolm <dmalcolm@redhat.com>
162
163 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
164 "const" to the "gimple *" and "rtx_insn *" parameters.
165 * dumpfile.h (dump_user_location_t::dump_user_location_t):
166 Likewise.
167 (dump_location_t::dump_location_t): Likewise.
168
169 2018-08-01 Martin Sebor <msebor@redhat.com>
170
171 PR tree-optimization/86650
172 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
173 rather than a "gcall *". Directly pass the data of interest
174 to percent_K_format, rather than building a temporary CALL_EXPR
175 to hold it.
176 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
177 (gimple_fold_builtin_strncat): Adjust.
178 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
179 gcall* argument with gimple*.
180 * gimple-ssa-warn-restrict.c (check_call): Same.
181 (wrestrict_dom_walker::before_dom_children): Same.
182 (builtin_access::builtin_access): Same.
183 (check_bounds_or_overlap): Same
184 (maybe_diag_overlap): Same.
185 (maybe_diag_offset_bounds): Same.
186 * tree-diagnostic.c (default_tree_printer): Move usage of
187 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
188 to this callsite.
189 * tree-pretty-print.c (percent_K_format): Add argument.
190 * tree-pretty-print.h: Add argument.
191 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
192 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
193 (maybe_diag_stxncpy_trunc): Same.
194 (handle_builtin_stxncpy): Same.
195 (handle_builtin_strcat): Same.
196
197 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
198
199 * match.pd: Optimise pointer range checks.
200
201 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
202
203 PR tree-optimization/86758
204 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
205 to remove pattern statements.
206
207 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
208
209 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
210 result of dfs_enumerate_from when constructing stmt_vec_infos,
211 instead of additionally calling get_loop_body.
212
213 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
214
215 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
216 parameter.
217 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
218 When creating an iv, assert that the step is not known to be zero.
219 (vect_setup_realignment): Update call accordingly.
220 * tree-vect-stmts.c (vectorizable_store): Likewise.
221 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
222
223 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
224
225 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
226 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
227 (vectorizable_reduction): Likewise.
228 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
229 (vect_detect_hybrid_slp_stmts): Likewise.
230 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
231
232 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
233
234 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
235 (wide_int_set_zero_nonzero_bits): ...this.
236 (zero_nonzero_bits_from_vr): Rename to...
237 (vrp_set_zero_nonzero_bits): ...this.
238 (extract_range_from_multiplicative_op_1): Abstract wide int
239 code...
240 (wide_int_range_multiplicative_op): ...here.
241 (extract_range_from_binary_expr_1): Extract wide int binary
242 operations into their own functions.
243 (wide_int_range_lshift): New.
244 (wide_int_range_can_optimize_bit_op): New.
245 (wide_int_range_shift_undefined_p): New.
246 (wide_int_range_bit_xor): New.
247 (wide_int_range_bit_ior): New.
248 (wide_int_range_bit_and): New.
249 (wide_int_range_trunc_mod): New.
250 (extract_range_into_wide_ints): New.
251 (vrp_shift_undefined_p): New.
252 (extract_range_from_multiplicative_op): New.
253 (vrp_can_optimize_bit_op): New.
254 * tree-vrp.h (value_range::dump): New.
255 (wide_int_range_multiplicative_op): New.
256 (wide_int_range_lshift):New.
257 (wide_int_range_shift_undefined_p): New.
258 (wide_int_range_bit_xor): New.
259 (wide_int_range_bit_ior): New.
260 (wide_int_range_bit_and): New.
261 (wide_int_range_trunc_mod): New.
262 (zero_nonzero_bits_from_bounds): Rename to...
263 (wide_int_set_zero_nonzero_bits): ...this.
264 (zero_nonzero_bits_from_vr): Rename to...
265 (vrp_set_zero_nonzero_bits): ...this.
266 (range_easy_mask_min_max): Rename to...
267 (wide_int_range_can_optimize_bit_op): this.
268 * vr-values.c (simplify_bit_ops_using_ranges): Rename
269 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
270
271 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
272
273 * tree-vectorizer.h (vect_orig_stmt): New function.
274 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
275 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
276 (vect_create_epilog_for_reduction): Likewise.
277 (vectorizable_live_operation): Likewise.
278 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
279 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
280 * tree-vect-stmts.c (vectorizable_call): Likewise.
281 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
282
283 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
284
285 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
286 argument.
287 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
288 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
289 (vect_transform_loop): Likewise.
290 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
291
292 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
293
294 * tree-vectorizer.h (vect_schedule_slp): Return void.
295 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
296 (vect_schedule_slp): Likewise.
297
298 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
299
300 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
301 argument.
302 (vect_transform_loop): Update calls accordingly. Schedule SLP
303 instances before the main loop, if any exist.
304
305 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
306
307 PR tree-optimization/86749
308 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
309 If the lhs is used in a COND_EXPR, check that it is being used
310 as the "then" or "else" value.
311
312 2018-08-01 Tom de Vries <tdevries@suse.de>
313
314 PR target/86800
315 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
316 speculation_safe_value_not_needed.
317
318 2018-08-01 Richard Biener <rguenther@suse.de>
319
320 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
321 as base and offset.
322
323 2018-08-01 Martin Liska <mliska@suse.cz>
324
325 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
326 format how successful transformation is dumped.
327 (gimple_mod_pow2_value_transform): Likewise.
328 (gimple_mod_subtract_transform): Likewise.
329 (gimple_stringops_transform): Likewise.
330
331 2018-08-01 Martin Liska <mliska@suse.cz>
332
333 PR value-prof/35543
334 * value-prof.c (interesting_stringop_to_profile_p):
335 Simplify the code and add BUILT_IN_MEMMOVE.
336 (gimple_stringops_transform): Likewise.
337
338 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
339
340 * config/aarch64/aarch64-simd.md
341 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
342 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
343 use GPI iterator instead of SI mode.
344
345 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
346
347 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
348 rs6000_speculation_barrier.
349 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
350 new barrier pattern name.
351
352 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
353
354 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
355 (speculation_barrier): New insn.
356
357 2018-08-01 Richard Biener <rguenther@suse.de>
358
359 PR bootstrap/86724
360 * graphite.h: Include isl/id.h and isl/space.h to allow build
361 with ISL 0.20.
362
363 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
364
365 PR target/86651
366 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
367 mode for COFF targets.
368 * defaults.h (TARGET_COFF): Define.
369 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
370 TARGET_COFF): Define.
371 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
372 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
373 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
374
375 2018-07-31 Alexandre Oliva <oliva@adacore.com>
376
377 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
378 * gimple-streamer-out.c (output_bb): Save it.
379 * lto-streamer-in.c (input_struct_function_base): Restore
380 instance discriminator if available. Create map on demand.
381 * lto-streamer-out.c (output_struct_function_base): Save it if
382 available.
383 * final.c (decl_to_instance_map): Document LTO strategy.
384
385 2018-07-31 Alexandre Oliva <oliva@adacore.com>
386 Olivier Hainque <hainque@adacore.com>
387
388 * debug.h (decl_to_instance_map_t): New type.
389 (decl_to_instance_map): Declare.
390 (maybe_create_decl_to_instance_map): New inline function.
391 * final.c (bb_discriminator, last_bb_discriminator): New statics,
392 to track basic block discriminators.
393 (final_start_function_1): Initialize them.
394 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
395 bb_discriminator.
396 (decl_to_instance_map): New variable.
397 (map_decl_to_instance, maybe_set_discriminator): New functions.
398 (notice_source_line): Set discriminator.
399
400 2018-07-31 Ian Lance Taylor <iant@golang.org>
401
402 * targhooks.c (default_have_speculation_safe_value): Add
403 ATTRIBUTE_UNUSED.
404
405 2018-07-31 David Malcolm <dmalcolm@redhat.com>
406
407 * dump-context.h: Include "pretty-print.h".
408 (dump_context::refresh_dumps_are_enabled): New decl.
409 (dump_context::emit_item): New decl.
410 (class dump_context): Add fields "m_test_pp" and
411 "m_test_pp_flags".
412 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
413 (temp_dump_context::get_dumped_text): New decl.
414 (class temp_dump_context): Add field "m_pp".
415 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
416 (dump_context::refresh_dumps_are_enabled): ...and add a test for
417 m_test_pp.
418 (set_dump_file): Update for above change.
419 (set_alt_dump_file): Likewise.
420 (dump_loc): New overload, taking a pretty_printer *.
421 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
422 to any test pretty-printer.
423 (make_item_for_dump_gimple_stmt): New function, adapted from
424 optinfo::add_gimple_stmt.
425 (dump_context::dump_gimple_stmt): Call it, and use the result,
426 eliminating the direct usage of dump_file and alt_dump_file in
427 favor of indirectly using them via emit_item.
428 (make_item_for_dump_gimple_expr): New function, adapted from
429 optinfo::add_gimple_expr.
430 (dump_context::dump_gimple_expr): Call it, and use the result,
431 eliminating the direct usage of dump_file and alt_dump_file in
432 favor of indirectly using them via emit_item.
433 (make_item_for_dump_generic_expr): New function, adapted from
434 optinfo::add_tree.
435 (dump_context::dump_generic_expr): Call it, and use the result,
436 eliminating the direct usage of dump_file and alt_dump_file in
437 favor of indirectly using them via emit_item.
438 (make_item_for_dump_printf_va): New function, adapted from
439 optinfo::add_printf_va.
440 (make_item_for_dump_printf): New function.
441 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
442 and use the result, eliminating the direct usage of dump_file and
443 alt_dump_file in favor of indirectly using them via emit_item.
444 (make_item_for_dump_dec): New function.
445 (dump_context::dump_dec): Call it, and use the result,
446 eliminating the direct usage of dump_file and alt_dump_file in
447 favor of indirectly using them via emit_item.
448 (make_item_for_dump_symtab_node): New function, adapted from
449 optinfo::add_symtab_node.
450 (dump_context::dump_symtab_node): Call it, and use the result,
451 eliminating the direct usage of dump_file and alt_dump_file in
452 favor of indirectly using them via emit_item.
453 (dump_context::begin_scope): Reimplement, avoiding direct usage
454 of dump_file and alt_dump_file in favor of indirectly using them
455 via emit_item.
456 (dump_context::emit_item): New member function.
457 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
458 Set up test pretty-printer on the underlying context. Call
459 refresh_dumps_are_enabled.
460 (temp_dump_context::~temp_dump_context): Call
461 refresh_dumps_are_enabled.
462 (temp_dump_context::get_dumped_text): New member function.
463 (selftest::verify_dumped_text): New function.
464 (ASSERT_DUMPED_TEXT_EQ): New macro.
465 (selftest::test_capture_of_dump_calls): Run all tests twice, with
466 and then without optinfo enabled. Add uses of
467 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
468 * dumpfile.h: Update comment for the dump_* API.
469 * optinfo-emit-json.cc
470 (selftest::test_building_json_from_dump_calls): Update for new
471 param for temp_dump_context ctor.
472 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
473 and "m_owned" field.
474 (optinfo_item::~optinfo_item): Likewise.
475 (optinfo::add_item): New member function.
476 (optinfo::emit): Update comment.
477 (optinfo::add_string): Delete.
478 (optinfo::add_printf): Delete.
479 (optinfo::add_printf_va): Delete.
480 (optinfo::add_gimple_stmt): Delete.
481 (optinfo::add_gimple_expr): Delete.
482 (optinfo::add_tree): Delete.
483 (optinfo::add_symtab_node): Delete.
484 (optinfo::add_dec): Delete.
485 * optinfo.h (class dump_context): New forward decl.
486 (optinfo::add_item): New decl.
487 (optinfo::add_string): Delete.
488 (optinfo::add_printf): Delete.
489 (optinfo::add_printf_va): Delete.
490 (optinfo::add_gimple_stmt): Delete.
491 (optinfo::add_gimple_expr): Delete.
492 (optinfo::add_tree): Delete.
493 (optinfo::add_symtab_node): Delete.
494 (optinfo::add_dec): Delete.
495 (optinfo::add_poly_int): Delete.
496 (optinfo_item::optinfo_item): Remove "owned" param.
497 (class optinfo_item): Remove field "m_owned".
498
499 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
500
501 PR middle-end/86705
502 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
503 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
504 requested variable alignment.
505 (expand_one_ssa_partition): Likewise.
506 (expand_one_var): Likewise.
507
508 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
509
510 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
511 to speculation_safe_value_not_needed.
512
513 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
514
515 * targhooks.h (speculation_safe_value_not_needed): New prototype.
516 * targhooks.c (speculation_safe_value_not_needed): New function.
517 * target.def (have_speculation_safe_value): Update documentation.
518 * doc/tm.texi: Regenerated.
519
520 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
521
522 * config/aarch64/iterators.md (ALLI_TI): New iterator.
523 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
524 expand.
525 (despeculate_copy<ALLI:mode>_insn): New insn.
526 (despeculate_copyti_insn): New insn.
527 (despeculate_simple<ALLI:mode>): New insn
528 (despeculate_simpleti): New insn.
529 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
530 function.
531 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
532 aarch64_speculation_safe_value.
533 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
534
535 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
536
537 * config/aarch64/aarch64-speculation.cc: New file.
538 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
539 before pass_reorder_blocks.
540 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
541 prototype.
542 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
543 X14 and X15 when tracking speculation.
544 * config/aarch64/aarch64.md (register name constants): Add
545 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
546 (unspec): Add UNSPEC_SPECULATION_TRACKER.
547 (speculation_barrier): New insn attribute.
548 (cmp<mode>): Allow SP in comparisons.
549 (speculation_tracker): New insn.
550 (speculation_barrier): Add speculation_barrier attribute.
551 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
552 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
553 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
554
555 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
556
557 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
558 aarch64_track_speculation is true.
559 (tb<optab><mode>1): Likewise.
560 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
561 generate CB[N]Z when tracking speculation.
562 (aarch64_split_compare_and_swap): Likewise.
563 (aarch64_split_atomic_op): Likewise.
564
565 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
566
567 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
568
569 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
570
571 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
572 (speculation_barrier): New insn.
573
574 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
575
576 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
577 * config/arm/arm.md (speculation_barrier): New expand.
578 (speculation_barrier_insn): New pattern.
579
580 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
581
582 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
583 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
584 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
585 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
586 list.
587 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
588 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
589 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
590 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
591 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
592 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
593 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
594 * builtins.c (expand_speculation_safe_value): New function.
595 (expand_builtin): Call it.
596 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
597 * doc/extend.texi: Document __builtin_speculation_safe_value.
598 * doc/md.texi: Document "speculation_barrier" pattern.
599 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
600 TARGET_HAVE_SPECULATION_SAFE_VALUE.
601 * doc/tm.texi: Regenerated.
602 * target.def (have_speculation_safe_value, speculation_safe_value): New
603 hooks.
604 * targhooks.c (default_have_speculation_safe_value): New function.
605 (default_speculation_safe_value): New function.
606 * targhooks.h (default_have_speculation_safe_value): Add prototype.
607 (default_speculation_safe_value): Add prototype.
608
609 2018-07-31 David Malcolm <dmalcolm@redhat.com>
610
611 * dump-context.h (dump_context::dump_loc): New decl.
612 * dumpfile.c (dump_context::dump_loc): New member function.
613 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
614 and dump_gimple_stmt.
615 (dump_context::dump_gimple_expr_loc): Likewise, using
616 dump_gimple_expr.
617 (dump_context::dump_generic_expr_loc): Likewise, using
618 dump_generic_expr.
619 (dump_context::dump_printf_loc_va): Likewise, using
620 dump_printf_va.
621 (dump_context::begin_scope): Explicitly using the global function
622 "dump_loc", rather than the member function.
623
624 2018-07-31 Martin Sebor <msebor@redhat.com>
625
626 PR tree-optimization/86741
627 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
628
629 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
630
631 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
632 depend on whether prefetch instructions will be emitted or not.
633 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
634 will be emitted or not.
635 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
636 (TARGET_SETMEM_PFD): New macros.
637
638 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
639
640 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
641 (NULL_STMT_VEC_INFO): Delete.
642 (stmt_vec_info::operator*): Likewise.
643 (stmt_vec_info::operator gimple *): Likewise.
644 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
645 of NULL_STMT_VEC_INFO.
646 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
647 (vect_reassociating_reduction_p): Likewise.
648 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
649 (vectorizable_store): Likewise.
650 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
651 (vec_info::free_stmt_vec_infos): Likewise.
652
653 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
654
655 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
656 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
657
658 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
659
660 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
661 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
662 (vec_info::free_stmt_vec_info): New private member functions.
663 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
664 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
665 * tree-parloops.c (gather_scalar_reductions): Remove calls to
666 set_stmt_vec_info_vec and free_stmt_vec_infos.
667 * tree-vect-loop.c (_loop_vec_info): Remove call to
668 set_stmt_vec_info_vec.
669 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
670 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
671 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
672 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
673 (vec_info::free_stmt_vec_info): ...these new functions. Remove
674 assignments in {vec_info::,}new_stmt_vec_info that are redundant
675 with the clearing in the xcalloc.
676 (stmt_vec_info_vec): Delete.
677 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
678 (vectorize_loops): Likewise.
679 (vec_info::~vec_info): Remove argument from call to
680 free_stmt_vec_infos.
681 (vec_info::add_stmt): Remove vinfo argument from call to
682 new_stmt_vec_info.
683
684 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
685
686 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
687 rather than a gimple stmt.
688 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
689 information for pattern statements when passed the original
690 statement; instead wait to be passed the pattern statement itself.
691 Don't call set_vinfo_for_stmt here.
692 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
693 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
694 stmt_vec_infos here.
695 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
696 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
697 stmt_vec_infos entry.
698
699 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
700
701 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
702 * tree-vectorizer.c (vec_info::replace_stmt): New function.
703 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
704 * tree-vect-stmts.c (vectorizable_call): Likewise.
705 (vectorizable_simd_clone_call): Likewise.
706
707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
708
709 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
710 * tree-vectorizer.c (vec_info::remove_stmt): New function.
711 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
712 * tree-vect-loop.c (vect_transform_loop): Likewise.
713 * tree-vect-slp.c (vect_schedule_slp): Likewise.
714 * tree-vect-stmts.c (vect_remove_stores): Likewise.
715
716 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
717
718 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
719 (vect_dr_stmt): Delete.
720 * tree-vectorizer.c (vec_info::lookup_dr): New function.
721 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
722 of DR_VECT_AUX.
723 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
724 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
725 (vect_verify_datarefs_alignment, vect_peeling_supportable)
726 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
727 (vect_analyze_data_refs): Likewise.
728 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
729 argument.
730 (vect_find_same_alignment_drs): Likewise.
731 (vect_slp_analyze_node_dependences): Update calls accordingly.
732 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
733 instead of DR_VECT_AUX.
734 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
735 of a vector data references. Use vec_info::lookup_dr instead of
736 DR_VECT_AUX.
737 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
738 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
739 instead of DR_VECT_AUX.
740
741 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
742
743 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
744 dr_vec_info.
745 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
746 accordingly.
747 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
748 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
749 (vect_gen_prolog_loop_niters): Likewise.
750
751 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
752
753 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
754 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
755 (vect_known_alignment_in_bytes, vect_dr_behavior)
756 (vect_get_scalar_dr_size): Take references as dr_vec_infos
757 instead of data_references. Update calls to other routines for
758 which the same change has been made.
759 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
760 dr_vec_infos instead of stmt_vec_infos.
761 (vect_analyze_data_ref_dependence): Update call accordingly.
762 (vect_slp_analyze_data_ref_dependence)
763 (vect_record_base_alignments): Use DR_VECT_AUX.
764 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
765 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
766 (vector_alignment_reachable_p, vect_get_data_access_cost)
767 (vect_peeling_supportable, vect_analyze_group_access_1)
768 (vect_analyze_group_access, vect_analyze_data_ref_access)
769 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
770 (vect_compile_time_alias, vect_small_gap_p)
771 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
772 (vect_supportable_dr_alignment): Take references as dr_vec_infos
773 instead of data_references. Update calls to other routines for
774 which the same change has been made.
775 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
776 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
777 (vect_slp_analyze_and_verify_node_alignment)
778 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
779 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
780 (vect_setup_realignment): Use dr_vec_infos. Update calls after
781 above changes.
782 (_vect_peel_info::dr): Replace with...
783 (_vect_peel_info::dr_info): ...this new field.
784 (vect_peeling_hash_get_most_frequent)
785 (vect_peeling_hash_choose_best_peeling): Update accordingly.
786 (vect_peeling_hash_get_lowest_cost):
787 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
788 routines for which the same change has been made.
789 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
790 data_reference.
791 * tree-vect-loop-manip.c (get_misalign_in_elems)
792 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
793 above changes.
794 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
795 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
796 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
797 (get_group_load_store_type, get_negative_load_store_type)
798 (vect_get_data_ptr_increment, vectorizable_store)
799 (vectorizable_load): Likewise.
800 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
801 Update calls to other routines for which the same change has been made.
802
803 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
804
805 * tree-vectorizer.h (vec_info::move_dr): New member function.
806 (dataref_aux): Rename to...
807 (dr_vec_info): ...this and add "dr" and "stmt" fields.
808 (_stmt_vec_info::dr_aux): Update accordingly.
809 (_stmt_vec_info::data_ref_info): Delete.
810 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
811 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
812 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
813 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
814 of data_ref.
815 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
816 (STMT_VINFO_DR_INFO): New macro.
817 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
818 (set_dr_misalignment): Update after rename of dataref_aux.
819 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
820 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
821 initialization of STMT_VINFO_DATA_REF.
822 * tree-vectorizer.c (vec_info::move_dr): New function.
823 * tree-vect-patterns.c (vect_recog_bool_pattern)
824 (vect_recog_mask_conversion_pattern)
825 (vect_recog_gather_scatter_pattern): Use it.
826 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
827 the "dr" and "stmt" fields of dr_vec_info instead of
828 STMT_VINFO_DATA_REF.
829
830 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
831
832 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
833 (is_pattern_stmt_p): Use it.
834 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
835 on pattern statements.
836
837 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
838
839 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
840 original stmt as a stmt_vec_info rather than a gimple stmt.
841 (vect_pattern_recog_1): Take the statement directly as a
842 stmt_vec_info, rather than via a gimple_stmt_iterator.
843 Update call to vect_mark_pattern_stmts.
844 (vect_pattern_recog): Update calls accordingly.
845
846 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
847
848 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
849 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
850 a vect_def_type for the first argument.
851 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
852 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
853 operand if it isn't defined by a vectorized statement.
854 (vect_build_gather_load_calls): Remove the mask_dt argument and
855 update calls to vect_get_vec_def_for_stmt_copy.
856 (vectorizable_bswap): Likewise the dt argument.
857 (vectorizable_call): Update calls to vectorizable_bswap and
858 vect_get_vec_def_for_stmt_copy.
859 (vectorizable_simd_clone_call, vectorizable_assignment)
860 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
861 (vectorizable_comparison): Update calls to
862 vect_get_vec_def_for_stmt_copy.
863 (vectorizable_store): Likewise. Remove now-unnecessary calls to
864 vect_is_simple_use.
865 (vect_get_loop_based_defs): Remove dt argument and update call
866 to vect_get_vec_def_for_stmt_copy.
867 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
868 and vect_get_vec_def_for_stmt_copy.
869 (vectorizable_load): Update calls to vect_build_gather_load_calls
870 and vect_get_vec_def_for_stmt_copy.
871 * tree-vect-loop.c (vect_create_epilog_for_reduction)
872 (vectorizable_reduction, vectorizable_live_operation): Update calls
873 to vect_get_vec_def_for_stmt_copy.
874
875 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
876
877 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
878 and gimple stmt arguments with a stmt_vec_info.
879 (vect_record_base_alignments): Update calls accordingly.
880 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
881 and gimple stmt arguments with a stmt_vec_info.
882 (vect_build_slp_tree_1): Remove vinfo argument and update call
883 to vect_record_max_nunits.
884 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
885 and vect_record_max_nunits.
886
887 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
888
889 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
890 file and take a stmt_vec_info instead of a gimple stmt.
891 (supportable_widening_operation, vect_finish_replace_stmt)
892 (vect_finish_stmt_generation, vect_get_store_rhs)
893 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
894 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
895 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
896 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
897 (vect_create_data_ref_ptr, bump_vector_ptr)
898 (vect_permute_store_chain, vect_setup_realignment)
899 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
900 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
901 (vectorizable_reduction, vectorizable_induction)
902 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
903 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
904 than gimple stmts as arguments.
905 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
906 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
907 (can_group_stmts_p, vect_check_gather_scatter)
908 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
909 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
910 (vect_permute_load_chain, vect_shift_permute_load_chain)
911 (vect_transform_grouped_load)
912 (vect_record_grouped_load_vectors): Likewise.
913 * tree-vect-loop.c (vect_fixup_reduc_chain)
914 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
915 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
916 (vectorizable_reduction, vectorizable_induction)
917 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
918 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
919 (vect_get_load_store_mask): Likewise.
920 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
921 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
922 * tree-vect-stmts.c (vect_mark_relevant)
923 (is_simple_and_all_uses_invariant)
924 (exist_non_indexing_operands_for_use_p, process_use)
925 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
926 (vect_get_vec_def_for_operand, vect_get_vec_defs)
927 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
928 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
929 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
930 (get_negative_load_store_type, get_load_store_type)
931 (vect_check_load_store_mask, vect_check_store_rhs)
932 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
933 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
934 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
935 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
936 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
937 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
938 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
939 (supportable_widening_operation): Likewise.
940
941 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
942
943 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
944 a stmt_vec_info instead of a gcall.
945 (vect_check_gather_scatter): Update call accordingly.
946 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
947 of a gphi.
948 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
949 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
950 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
951 instead of a gimple stmt.
952 (vect_transform_loop): Update calls accordingly.
953 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
954 stmt_vec_infos instead of gimple stmts.
955 (vect_analyze_slp_instance): Update use accordingly.
956 * tree-vect-stmts.c (read_vector_array, write_vector_array)
957 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
958 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
959 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
960 (vect_gen_widened_results_half, vect_get_loop_based_defs)
961 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
962 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
963 down to subroutines.
964
965 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
966
967 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
968 of the worklist from a vector of gimple stmts to a vector of
969 stmt_vec_infos.
970 * tree-vect-stmts.c (vect_mark_relevant, process_use)
971 (vect_mark_stmts_to_be_vectorized): Likewise
972
973 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
974
975 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
976 statement before passing it to vect_analyze_stmt.
977 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
978 the chain of phi vector definitions. Track the exit phi via its
979 stmt_vec_info.
980 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
981 STMT_VINFO_REDUC_DEF.
982 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
983 stmt_vec_infos to handle the statement chains.
984 (vect_get_slp_defs): Record the first statement in the node
985 using a stmt_vec_info.
986 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
987 statements here and pass their stmt_vec_info down to subroutines.
988 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
989 down to vect_finish_stmt_generation.
990 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
991 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
992 stmt_vec_infos to subroutines.
993 (vect_remove_stores): Use stmt_vec_infos to handle the statement
994 chains.
995
996 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
997
998 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
999 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1000 (vect_permute_store_chain, vect_setup_realignment)
1001 (vect_permute_load_chain, vect_shift_permute_load_chain)
1002 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1003 stmts internally, and when passing values to other vectorizer routines.
1004 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1005 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1006 (vect_analyze_loop_operations, get_initial_def_for_reduction)
1007 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1008 (vectorizable_reduction, vectorizable_induction)
1009 (vectorizable_live_operation, vect_transform_loop_stmt)
1010 (vect_transform_loop): Likewise.
1011 * tree-vect-patterns.c (vect_reassociating_reduction_p)
1012 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1013 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1014 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1015 (vect_slp_analyze_node_operations_1): Likewise.
1016 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1017 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1018 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1019 (vect_finish_stmt_generation_1, get_group_load_store_type)
1020 (get_load_store_type, vect_build_gather_load_calls)
1021 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1022 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1023 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1024 (vectorizable_store, vectorizable_load, vectorizable_condition)
1025 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1026 (supportable_widening_operation): Likewise.
1027 (vect_get_vector_types_for_stmt): Likewise.
1028 * tree-vectorizer.h (vect_dr_behavior): Likewise.
1029
1030 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1031
1032 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1033 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1034 (vect_permute_store_chain, vect_permute_load_chain)
1035 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1036 repeated stmt_vec_info lookups.
1037 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1038 (vect_update_ivs_after_vectorizer): Likewise.
1039 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1040 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1041 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1042 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1043 (vect_bb_slp_scalar_cost): Likewise.
1044 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1045
1046 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1047
1048 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1049 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1050 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1051 to get gassigns and gcalls, rather than operating on generc gimple
1052 stmts.
1053 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1054 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1055 (vectorizable_load, vect_analyze_stmt): Likewise.
1056 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1057
1058 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1059
1060 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1061 return stmt_vec_infos rather than gimple stmts. Do not accept
1062 null arguments.
1063 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1064 of a gimple stmt.
1065 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1066 Update use of get_later_stmt.
1067 (vect_get_constant_vectors): Update call accordingly.
1068 (vect_schedule_slp_instance): Likewise
1069 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1070 (vect_slp_analyze_instance_dependence): Likewise.
1071 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1072
1073 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1074
1075 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1076 (stmt_info_for_cost::stmt_info): ...this new field.
1077 (add_stmt_costs): Update accordingly.
1078 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1079 (vect_get_known_peeling_cost): Likewise.
1080 (vect_estimate_min_profitable_iters): Likewise.
1081 * tree-vect-stmts.c (record_stmt_cost): Likewise.
1082
1083 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1084
1085 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1086 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1087 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1088 accordingly.
1089 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1090
1091 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1092
1093 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1094 a gimple stmt to a stmt_vec_info.
1095 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1096
1097 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1098
1099 * tree-vectorizer.h (vec_info::grouped_stores): Change from
1100 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1101 (_loop_vec_info::reduction_chains): Likewise.
1102 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1103 accordingly.
1104 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1105
1106 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1107
1108 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1109 a gimple stmt to a stmt_vec_info.
1110 (_stmt_vec_info::next_element): Likewise.
1111 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1112 (vect_slp_analyze_and_verify_node_alignment)
1113 (vect_analyze_group_access_1, vect_analyze_group_access)
1114 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1115 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1116 (vect_supportable_dr_alignment): Update accordingly.
1117 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1118 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1119 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1120 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1121 * tree-vect-slp.c (vect_build_slp_tree_1)
1122 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1123 (vect_split_slp_store_group, vect_analyze_slp_instance)
1124 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1125 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1126 (get_group_load_store_type, get_load_store_type)
1127 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1128 (vect_transform_stmt, vect_remove_stores): Likewise.
1129
1130 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1131
1132 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1133 than a gimple stmt.
1134 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1135 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1136 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1137 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1138 (vector_alignment_reachable_p, vect_get_data_access_cost)
1139 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1140 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1141 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1142 (vect_analyze_group_access_1, vect_analyze_group_access)
1143 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1144 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1145 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1146 result of vect_dr_stmt and use the stmt_vec_info instead of
1147 the associated gimple stmt.
1148 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1149 (vect_gen_prolog_loop_niters): Likewise.
1150 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1151
1152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1153
1154 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1155 to a vec<stmt_vec_info>.
1156 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1157 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1158 vec<stmt_vec_info>.
1159 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1160 to a vec<stmt_vec_info>.
1161 (bst_traits::value_type, bst_traits::value_type): Likewise.
1162 (bst_traits::hash): Update accordingly.
1163 (vect_get_and_check_slp_defs): Change the stmts parameter from
1164 a vec<gimple *> to a vec<stmt_vec_info>.
1165 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1166 (vect_build_slp_tree): Likewise.
1167 (vect_build_slp_tree_2): Likewise. Update uses of
1168 SLP_TREE_SCALAR_STMTS.
1169 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1170 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1171 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1172 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1173 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1174 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1175 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1176 (vect_get_constant_vectors, vect_get_slp_defs)
1177 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1178 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1179 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1180 instead of gimple stmts.
1181 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1182 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1183 (vect_slp_analyze_instance_dependence): Update uses of
1184 SLP_TREE_SCALAR_STMTS.
1185 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1186 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1187 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1188 (get_initial_defs_for_reduction): Likewise.
1189 (vect_create_epilog_for_reduction): Likewise.
1190 (vectorize_fold_left_reduction): Likewise.
1191 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1192 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1193 (can_vectorize_live_stmts): Likewise.
1194
1195 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1196
1197 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1198 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1199 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1200 than gimple stmts.
1201 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1202 of a gimple stmt.
1203 (gather_scalar_reductions): Update after above interface changes.
1204 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1205 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1206 than gimple stmts.
1207 (vect_force_simple_reduction): Likewise.
1208 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1209 LOOP_VINFO_REDUCTIONS.
1210 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1211
1212 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1213
1214 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1215 a gimple stmt to a stmt_vec_info.
1216 * tree-vect-loop.c (vect_active_double_reduction_p)
1217 (vect_force_simple_reduction, vectorizable_reduction): Update
1218 accordingly.
1219
1220 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1221
1222 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1223 vec<gimple *> to a vec<stmt_vec_info>.
1224 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1225 the reduction_phis argument from a vec<gimple *> to a
1226 vec<stmt_vec_info>.
1227 (vectorizable_reduction): Likewise the phis local variable that
1228 is passed to vect_create_epilog_for_reduction. Update for new type
1229 of SLP_TREE_VEC_STMTS.
1230 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1231 (vectorizable_live_operation): Likewise.
1232 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1233 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1234
1235 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1236
1237 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1238 a gimple stmt to a stmt_vec_info.
1239 (vectorizable_condition, vectorizable_live_operation)
1240 (vectorizable_reduction, vectorizable_induction): Pass back the
1241 vectorized statement as a stmt_vec_info.
1242 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1243 use of STMT_VINFO_VEC_STMT.
1244 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1245 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1246 as stmt_vec_infos rather than gimple stmts.
1247 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1248 to a stmt_vec_info.
1249 (vectorizable_live_operation): Likewise.
1250 (vectorizable_reduction, vectorizable_induction): Likewise,
1251 updating use of STMT_VINFO_VEC_STMT.
1252 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1253 of STMT_VINFO_VEC_STMT.
1254 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1255 (vectorizable_simd_clone_call, vectorizable_conversion)
1256 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1257 (vectorizable_store, vectorizable_load, vectorizable_condition)
1258 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1259 from a gimple stmt to a stmt_vec_info.
1260 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
1261 pointer to a stmt_vec_info to the vectorizable_* routines.
1262
1263 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1264
1265 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1266 a gimple stmt to a stmt_vec_info.
1267 (is_pattern_stmt_p): Update accordingly.
1268 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1269 (vect_record_grouped_load_vectors): Likewise.
1270 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1271 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1272 (vect_model_reduction_cost): Likewise.
1273 (vect_create_epilog_for_reduction): Likewise.
1274 (vectorizable_reduction, vectorizable_induction): Likewise.
1275 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1276 Return the stmt_vec_info for the pattern statement.
1277 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1278 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1279 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1280 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1281 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1282 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1283 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1284 (free_stmt_vec_info, vect_is_simple_use): Likewise.
1285
1286 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1287
1288 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1289 (vect_finish_stmt_generation): Likewise.
1290 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1291 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1292 (vect_build_gather_load_calls): Use the return value of the above
1293 functions instead of a separate call to vinfo_for_stmt. Use narrow
1294 scopes for the input gimple stmt and wider scopes for the associated
1295 stmt_vec_info. Use vec_info::lookup_def when setting these
1296 stmt_vec_infos from an SSA_NAME definition.
1297 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1298 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1299 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1300 (vectorizable_store, vectorizable_load, vectorizable_condition)
1301 (vectorizable_comparison): Likewise.
1302 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1303 (vectorizable_reduction): Likewise.
1304
1305 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1306
1307 * tree-vectorizer.h (vect_is_simple_use): Add an optional
1308 stmt_vec_info * parameter before the optional gimple **.
1309 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1310 (process_use, vect_get_vec_def_for_operand_1): Update callers.
1311 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1312 * tree-vect-loop.c (vectorizable_reduction): Likewise.
1313 (vectorizable_live_operation): Likewise.
1314 * tree-vect-patterns.c (type_conversion_p): Likewise.
1315 (vect_look_through_possible_promotion): Likewise.
1316 (vect_recog_rotate_pattern): Likewise.
1317 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1318
1319 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1320
1321 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1322 a typedef to a wrapper class.
1323 (NULL_STMT_VEC_INFO): New macro.
1324 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1325 (stmt_vec_info::operator*): New function.
1326 (stmt_vec_info::operator gimple *): Likewise.
1327 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1328 (add_stmt_costs): Likewise.
1329 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1330 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1331 (vect_get_known_peeling_cost): Likewise.
1332 (vect_estimate_min_profitable_iters): Likewise.
1333 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1334 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1335 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1336 (vectorizable_store, free_stmt_vec_infos): Likewise.
1337 (new_stmt_vec_info): Change return type of xcalloc to
1338 _stmt_vec_info *.
1339
1340 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1341
1342 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1343 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1344 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1345 a single_imm_use-based sequence.
1346 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1347
1348 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1349
1350 * tree-vectorizer.h (vec_info::lookup_def): Declare.
1351 * tree-vectorizer.c (vec_info::lookup_def): New function.
1352 * tree-vect-patterns.c (vect_get_internal_def): Use it.
1353 (vect_widened_op_tree): Likewise.
1354 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1355 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1356 (vectorizable_reduction): Likewise.
1357 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1358 of a gimple *.
1359 (vect_is_slp_reduction): Update calls accordingly. Use
1360 vec_info::lookup_def.
1361 (vect_is_simple_reduction): Likewise
1362 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1363
1364 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1365
1366 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1367 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1368 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1369 of vinfo_for_stmt.
1370 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1371 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1372 (vect_update_vf_for_slp, vect_analyze_loop_operations)
1373 (vect_is_slp_reduction, vectorizable_induction)
1374 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1375 * tree-vect-patterns.c (vect_init_pattern_stmt):
1376 (vect_determine_min_output_precision_1, vect_determine_precisions)
1377 (vect_pattern_recog): Likewise.
1378 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1379 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1380 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1381 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1382 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1383 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
1384 info field from a loop to a loop_vec_info.
1385
1386 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1387
1388 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1389 (vec_info::add_stmt): Declare.
1390 * tree-vectorizer.c (vec_info::add_stmt): New function.
1391 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1392 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1393 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1394 (vectorizable_induction): Likewise.
1395 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1396 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1397 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1398 (vectorizable_load): Likewise.
1399 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1400 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1401 (vect_recog_gather_scatter_pattern): Likewise.
1402 (append_pattern_def_seq): Likewise. Remove a check that is
1403 performed by add_stmt itself.
1404
1405 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1406
1407 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1408 which make_ssa_name was called with new_stmt before new_stmt
1409 had been created.
1410
1411 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1412
1413 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1414 split out from...
1415 (vect_is_slp_reduction): ...here...
1416 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1417 that are already known to be false.
1418
1419 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1420
1421 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1422 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1423 STMT_VINFO_NUM_SLP_USES when it's true.
1424 (vect_free_slp_instance): Add a final_p parameter and pass it to
1425 vect_free_slp_tree.
1426 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1427 (vect_analyze_slp_instance): Likewise.
1428 (vect_slp_analyze_operations): Likewise.
1429 (vect_slp_analyze_bb_1): Likewise.
1430 * tree-vectorizer.c (vec_info): Likewise.
1431 * tree-vect-loop.c (vect_transform_loop): Likewise.
1432
1433 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1434
1435 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1436 function is not called for second and subsequent members of
1437 a reduction group.
1438
1439 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1440
1441 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1442 cases for nested loops from here to ...
1443 (vect_create_epilog_for_reduction): ...here. Only call
1444 vect_is_simple_use for inner-loop reductions.
1445
1446 2018-07-31 Martin Liska <mliska@suse.cz>
1447
1448 PR gcov-profile/85338
1449 PR gcov-profile/85350
1450 PR gcov-profile/85372
1451 * profile.c (struct location_triplet): New.
1452 (struct location_triplet_hash): Likewise.
1453 (output_location): Do not output a BB that
1454 is already recorded for a line.
1455 (branch_prob): Use streamed_locations.
1456
1457 2018-07-31 Martin Liska <mliska@suse.cz>
1458
1459 PR gcov-profile/85370
1460 * coverage.c (coverage_begin_function): Do not mark target
1461 clones as artificial functions.
1462
1463 2018-07-31 Martin Liska <mliska@suse.cz>
1464
1465 PR gcov-profile/83813
1466 PR gcov-profile/84758
1467 PR gcov-profile/85217
1468 PR gcov-profile/85332
1469 * profile.c (branch_prob): Do not record GOTO expressions
1470 for GIMPLE statements which locations are already streamed.
1471
1472 2018-07-31 Olivier Hainque <hainque@adacore.com>
1473
1474 * gcc.c (handle_spec_function): Accept a soft_matched_part
1475 argument, as do_spec_1. Pass it down to ...
1476 (eval_spec_function): Accept a soft_matched_part argument,
1477 and pass it down to ...
1478 (do_spec_2): Accept a soft_matched_part argument, and pass
1479 it down to do_spec_1.
1480 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1481 (handle_braces): Update call to handle_spec_function.
1482 (driver::set_up_specs): Update calls to do_spec_2.
1483 (compare_debug_dump_opt_spec_function): Likewise.
1484 (compare_debug_self_opt_spec_function): Likewise.
1485
1486 2018-07-31 Olivier Hainque <hainque@adacore.com>
1487
1488 * common.opt (nolibc): New option.
1489 * doc/invoke.texi (Link Options): Document it.
1490 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1491 * config/alpha/linux.h: Likewise.
1492 * config/arc/elf.h: Likewise.
1493 * config/arm/uclinux-elf.h: Likewise.
1494 * config/arm/unknown-elf.h: Likewise.
1495 * config/avr/avrlibc.h: Likewise.
1496 * config/bfin/bfin.h: Likewise.
1497 * config/bfin/linux.h: Likewise.
1498 * config/bfin/uclinux.h: Likewise.
1499 * config/darwin.h: Likewise.
1500 * config/darwin10.h: Likewise.
1501 * config/darwin12.h: Likewise.
1502 * config/gnu-user.h: Likewise.
1503 * config/lm32/uclinux-elf.h: Likewise.
1504 * config/pa/pa-hpux11.h: Likewise.
1505 * config/pa/pa64-hpux.h: Likewise.
1506 * config/sparc/sparc.h: Likewise.
1507
1508 2018-07-31 Olivier Hainque <hainque@adacore.com>
1509
1510 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1511 undefined variables.
1512
1513 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1514
1515 PR target/86640
1516 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1517 instead of GEN_INT.
1518
1519 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1520
1521 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1522 terminated string literal.
1523
1524 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1525
1526 PR rtl-optimization/85160
1527 * combine.c (is_just_move): New function.
1528 (try_combine): Allow combining two instructions into two if neither of
1529 the original instructions was a move.
1530
1531 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
1532
1533 PR target/86673
1534 * doc/extend.texi (Global Register Variables): Discourage use of type
1535 qualifiers.
1536 (Local Register Variables): Likewise.
1537
1538 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
1539
1540 PR tree-optimization/86506
1541 * hwint.h (ceil_log2): Resync with hwint.c implementation.
1542
1543 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
1544
1545 PR target/86547
1546 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1547 hard_regno, make sure no insn between `from` and `to` clobbers it.
1548
1549 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
1550 Tom de Vries <tdevries@suse.de>
1551
1552 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1553 (PTX_DEFAULT_RUNTIME_DIM): ... this.
1554 (nvptx_goacc_validate_dims): Set default worker and gang dims to
1555 PTX_DEFAULT_RUNTIME_DIM.
1556 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1557
1558 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
1559
1560 * config/pa/pa.c (pa_output_addr_vec): Align address table.
1561 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1562 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1563
1564 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
1565
1566 * config/rs6000/constraints.md (wG constraint): Delete, no longer
1567 used.
1568 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1569 predicate to reflect toc fusion has been deleted.
1570 (toc_fusion_mem_raw): Delete, no longer used.
1571 (toc_fusion_mem_wrapped): Likewise.
1572 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1573 fusion mask bit.
1574 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1575 Delete, no longer used.
1576 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1577 meant to be used for toc fusion.
1578 (rs6000_debug_print_mode): Delete toc fusion debugging.
1579 (rs6000_debug_reg_global): Likewise.
1580 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1581 fusion and secondary reload support that were never used.
1582 (rs6000_option_override_internal): Delete TOC fusion, that was only
1583 partially defined, and it did not work unless you also used the
1584 -mcmodel= switch.
1585 (rs6000_legitimate_address_p): Delete TOC fusion support.
1586 (rs6000_opt_masks): Likewise.
1587 (fusion_wrap_memory_address): Delete function, no longer used.
1588 (fusion_split_address); Delete TOC fusion support.
1589 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1590 longer used with toc fusion being deleted.
1591 (TARGET_TOC_FUSION_FP): Likewise.
1592 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1593 UNSPEC.
1594 (toc fusion spliter): Delete TOC fusion support.
1595 (toc_fusionload_<mode>): Likewise.
1596 (toc_fusionload_di): Likewise.
1597 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1598 longer needs to be named. Rename predicate to delete TOC fusion.
1599 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1600 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1601 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1602 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1603 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1604
1605 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1606
1607 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1608 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1609 __int128 in built-in function prototypes.
1610 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1611 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1612
1613 2018-07-27 Martin Sebor <msebor@redhat.com>
1614
1615 PR tree-optimization/86696
1616 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1617 types, including enums.
1618 (handle_char_store): Be prepared for the above function to fail.
1619
1620 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1621
1622 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1623 when optimization level is lower than 2 or optimize for size.
1624
1625 2018-07-26 Martin Sebor <msebor@redhat.com>
1626
1627 PR tree-optimization/86043
1628 PR tree-optimization/86042
1629 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1630 (get_string_cst_length): Rename...
1631 (get_min_string_length): ...to this. Add argument.
1632 (handle_char_store): Extend to handle multi-character stores by
1633 MEM_REF.
1634 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1635 * tree.h (initializer_zerop): Add argument.
1636
1637 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1638
1639 PR middle-end/86660
1640 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1641 declare target to variables if they have always,{to,from,tofrom} map
1642 kinds.
1643
1644 2018-07-26 Martin Liska <mliska@suse.cz>
1645
1646 PR lto/86548
1647 * lto-wrapper.c: Add linker_output as prefix
1648 for ltrans_output_file.
1649
1650 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1651
1652 PR rtl-optimization/85805
1653 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1654 value for hard registers if that was written in the same mode.
1655
1656 2018-07-26 Martin Liska <mliska@suse.cz>
1657
1658 PR gcov-profile/86536
1659 * gcov.c (format_gcov): Use printf format %.*f directly
1660 and do not handle special values.
1661
1662 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1663
1664 * common/config/arc/arc-common.c (arc_option_optimization_table):
1665 Update default optimizations for size.
1666
1667 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1668
1669 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1670 * config/arc/constraints.md (CfZ): New constraint.
1671 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1672 (subsf3_fpu): Likewise.
1673 (cmpsf_fpu): Likewise.
1674 (cmpsf_fpu_uneq): Likewise.
1675
1676 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1677
1678 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1679 accesses as well.
1680 (arc_is_uncached_mem_p): uncached applies to both the variable and
1681 the pointer.
1682
1683 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1684
1685 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1686 register names.
1687
1688 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1689
1690 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1691 field "m_scopes" from vec to auto_vec.
1692
1693 2018-07-25 Martin Liska <mliska@suse.cz>
1694
1695 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1696 return type.
1697
1698 2018-07-25 Richard Biener <rguenther@suse.de>
1699
1700 PR debug/86654
1701 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1702 special wrt context_die late.
1703 (gen_subprogram_die): Re-use DIEs in local scope.
1704
1705 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1706
1707 PR tree-optimization/86644
1708 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1709
1710 2018-07-25 Martin Liska <mliska@suse.cz>
1711
1712 PR middle-end/86645
1713 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1714 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1715
1716 2018-07-25 Martin Liska <mliska@suse.cz>
1717
1718 PR sanitizer/79635
1719 * params.def: Explain ASan abbreviation and provide
1720 a documentation link.
1721
1722 2018-07-24 Martin Sebor <msebor@redhat.com>
1723
1724 PR tree-optimization/86622
1725 PR tree-optimization/86532
1726 * builtins.h (string_length): Declare.
1727 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1728 (check_access): Be prepared for non-constant length ranges.
1729 (string_length): Make extern.
1730 * expr.c (string_constant): Only handle the minor non-constant
1731 array index. Use string_constant to compute the length of
1732 a generic string constant.
1733
1734 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1735
1736 PR tree-optimization/86618
1737 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1738 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1739
1740 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1741
1742 PR tree-optimization/86636
1743 * json.cc (json::object::set): Fix comment. Add assertions.
1744 (json::array::append): Move here from json.h. Add comment and an
1745 assertion.
1746 (json::string::string): Likewise.
1747 * json.h (json::array::append): Move to json.cc.
1748 (json::string::string): Likewise.
1749 * optinfo-emit-json.cc
1750 (optrecord_json_writer::impl_location_to_json): Assert that we
1751 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1752 wrapper around it. Expand the location once, rather than three
1753 times.
1754 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1755 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1756 wrappers.
1757 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1758 places. Fix some overlong lines.
1759
1760 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1761
1762 * config/aarch64/aarch64-simd.md
1763 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1764 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1765 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1766 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1767 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1768 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1769 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1770 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1771 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1772
1773 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1774
1775 PR middle-end/86627
1776 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1777 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1778 and abs_d == d, do the power of two handling if profitable.
1779
1780 2018-07-24 Richard Biener <rguenther@suse.de>
1781
1782 * match.pd: Add BIT_FIELD_REF canonicalizations.
1783
1784 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1785
1786 PR c/86617
1787 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1788
1789 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1790
1791 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1792 terminated STRING_CST object.
1793
1794 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1795
1796 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1797
1798 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1799
1800 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1801 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1802 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1803 the elements into a register.
1804 (rs6000_split_v4si_init_di_reg): Delete.
1805 (rs6000_split_v4si_init): Delete.
1806 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1807 (vsx_init_v4si): Rewrite as a define_expand.
1808
1809 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1810
1811 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1812 zero_extend argument from memory): New.
1813
1814 2018-07-22 Martin Sebor <msebor@redhat.com>
1815
1816 PR bootstrap/86621
1817 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1818 diagnosing calls with unknown arguments unless -Walloca-larger-than
1819 is restricted to less than PTRDIFF_MAX bytes.
1820
1821 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1822
1823 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1824
1825 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1826
1827 * pretty-print.c (text_info::set_location): Remove redundant
1828 "line_table" parameter from call to rich_location::set_range.
1829
1830 2018-07-20 Martin Sebor <msebor@redhat.com>
1831
1832 PR middle-end/82063
1833 * builtins.c (expand_builtin_alloca): Adjust.
1834 * calls.c (alloc_max_size): Simplify.
1835 * cgraphunit.c (cgraph_node::expand): Adjust.
1836 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1837 variables.
1838 (frame_larger_than_size): Same.
1839 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1840 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1841 Initialize.
1842 * doc/invoke.texi (GCC Command Options): Document option arguments.
1843 Explain byte-size arguments and suffixes.
1844 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1845 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1846 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1847 * doc/options.texi (UInteger): Expand.
1848 (Host_Wide_Int, ByteSize): Document new properties.
1849 * final.c (final_start_function_1): Include sizes in an error message.
1850 * function.c (frame_offset_overflow): Same.
1851 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1852 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1853 Diagnose unbounded alloca calls only for limits of less than
1854 PTRDIFF_MAX.
1855 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1856 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1857 for alloca(0).
1858 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1859 only for limits of less than PTRDIFF_MAX.
1860 * langhooks-def.h (lhd_handle_option): Change function argument
1861 to HOST_WIDE_INT.
1862 * langhooks.c (lhd_handle_option): Same.
1863 * langhooks.h (handle_option): Same.
1864 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1865 ByteSize flags.
1866 (var_type, var_type_struct): Same.
1867 (var_set): Handle ByteSize flag.
1868 * optc-gen.awk: Add comments to output to ease debugging. Make
1869 use of HOST_WIDE_INT where appropriate.
1870 * opts-gen-save.awk: Use %lx to format unsigned long.
1871 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1872 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1873 arguments. Parse bytes-size suffixes.
1874 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1875 (enum_value_to_arg): Same.
1876 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1877 (handle_option): Adjust.
1878 (generate_option): Change function argument to HOST_WIDE_INT.
1879 (cmdline_handle_error): Adjust.
1880 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1881 (set_option): Change function argument to HOST_WIDE_INT.
1882 (option_enabled): Handle cl_host_wide_int.
1883 (get_option_state): Handle CLVC_SIZE.
1884 (control_warning_option): Same.
1885 * opts.c (common_handle_option): Change function argument to
1886 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1887 OPT_Wvla_larger_than_.
1888 * opts.h (enum cl_var_type): Add an enumerator.
1889 * stor-layout.c (layout_decl): Print a more meaningful warning.
1890 * toplev.c (output_stack_usage): Adjust.
1891
1892 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1893
1894 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1895 call to inline_expand_builtin_string_cmp.
1896 (expand_builtin_strcmp): Likewise.
1897 (expand_builtin_strncmp): Likewise.
1898 (inline_string_cmp): Delete the last parameter, change char_type_node
1899 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1900 two operands.
1901 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1902 the inlining expansion on target where the type of the call has same or
1903 narrower precision than unsigned char.
1904
1905 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1906
1907 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1908 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1909 * common.opt (fsave-optimization-record): New option.
1910 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1911 * doc/invoke.texi (-fsave-optimization-record): New option.
1912 * dumpfile.c: Include "optinfo-emit-json.h".
1913 (struct kv_pair): Move to coretypes.h.
1914 (optgroup_options): Make non-static.
1915 (dump_context::end_scope): Call
1916 optimization_records_maybe_pop_dump_scope.
1917 * dumpfile.h (optgroup_options): New decl.
1918 * json.cc: New file.
1919 * json.h: New file.
1920 * optinfo-emit-json.cc: New file.
1921 * optinfo-emit-json.h: New file.
1922 * optinfo.cc: Include "optinfo-emit-json.h".
1923 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1924 (optinfo_enabled_p): Check optimization_records_enabled_p.
1925 (optinfo_wants_inlining_info_p): Likewise.
1926 * optinfo.h: Update comment.
1927 * profile-count.c (profile_quality_as_string): New function.
1928 * profile-count.h (profile_quality_as_string): New decl.
1929 (profile_count::quality): New accessor.
1930 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1931 and optinfo_emit_json_cc_tests.
1932 * selftest.h (selftest::json_cc_tests): New decl.
1933 (selftest::optinfo_emit_json_cc_tests): New decl.
1934 * toplev.c: Include "optinfo-emit-json.h".
1935 (compile_file): Call optimization_records_finish.
1936 (do_compile): Call optimization_records_start.
1937 * tree-ssa-live.c: Include optinfo.h.
1938 (remove_unused_scope_block_p): Retain inlining information if
1939 optinfo_wants_inlining_info_p returns true.
1940
1941 2018-07-20 Richard Biener <rguenther@suse.de>
1942
1943 PR debug/86585
1944 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1945 to cover -flto-partition=none.
1946
1947 2018-07-20 Martin Liska <mliska@suse.cz>
1948
1949 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1950 (get_decl_source_range): Remove unused function.
1951
1952 2018-07-20 Richard Biener <rguenther@suse.de>
1953
1954 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1955 (struct vn_phi_s): Likewise.
1956 (struct vn_reference_s): Likewise.
1957 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1958 for searching the slot of an entry known to be in the hash itself.
1959 (vn_phi_hasher::equal): Likewise.
1960 (vn_reference_hasher::equal): Likewise.
1961 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1962 globals.
1963 (optimistic_info, current_info): Remove, keeping only valid_info.
1964 (vn_reference_lookup_1): Remove fallback lookup.
1965 (vn_reference_lookup_2): Likewise.
1966 (vn_nary_op_lookup_1): Likewise.
1967 (vn_phi_lookup): Likewise.
1968 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1969 hash element.
1970 (vn_reference_insert): Adjust, chain the inserted hash element
1971 at last_inserted_ref.
1972 (vn_reference_insert_pieces): Likewise.
1973 (visit_reference_op_call): Likewise.
1974 (vn_nary_op_insert_into): Chain the inserted hash element at
1975 last_inserted_nary.
1976 (vn_nary_op_insert_pieces): Adjust.
1977 (vn_nary_op_insert): Likewise.
1978 (vn_nary_op_insert_stmt): Likewise.
1979 (vn_phi_insert): Adjust, chain the inserted hash element at
1980 last_inserted_phi.
1981 (process_scc): Remove clearing and copying the optimistic
1982 table. Instead remove elements inserted during an optimistic
1983 iteration from the single table we maintain.
1984 (init_scc_vn): Adjust.
1985 (free_scc_vn): Likewise.
1986 (sccvn_dom_walker::record_cond): Likewise.
1987 (sccvn_dom_walker::after_dom_children): Likewise.
1988
1989 2018-07-19 Martin Sebor <msebor@redhat.com>
1990
1991 PR tree-optimization/84047
1992 PR tree-optimization/83776
1993 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1994 (check_array_bounds): Call it.
1995
1996 2018-07-19 Martin Sebor <msebor@redhat.com>
1997
1998 * align.h (align_flags): Use member initialization.
1999
2000 2018-07-19 David Malcolm <dmalcolm@redhat.com>
2001
2002 * Makefile.in (OBJS): Add optinfo.o.
2003 * coretypes.h (class symtab_node): New forward decl.
2004 (struct cgraph_node): New forward decl.
2005 (class varpool_node): New forward decl.
2006 * dump-context.h: New file.
2007 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2008 "tree-pass.h".
2009 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2010 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2011 (set_alt_dump_file): Likewise.
2012 (dump_context::~dump_context): New dtor.
2013 (dump_gimple_stmt): Move implementation to...
2014 (dump_context::dump_gimple_stmt): ...this new member function.
2015 Add the stmt to any pending optinfo, creating one if need be.
2016 (dump_gimple_stmt_loc): Move implementation to...
2017 (dump_context::dump_gimple_stmt_loc): ...this new member function.
2018 Start a new optinfo and add the stmt to it.
2019 (dump_gimple_expr): Move implementation to...
2020 (dump_context::dump_gimple_expr): ...this new member function.
2021 Add the stmt to any pending optinfo, creating one if need be.
2022 (dump_gimple_expr_loc): Move implementation to...
2023 (dump_context::dump_gimple_expr_loc): ...this new member function.
2024 Start a new optinfo and add the stmt to it.
2025 (dump_generic_expr): Move implementation to...
2026 (dump_context::dump_generic_expr): ...this new member function.
2027 Add the tree to any pending optinfo, creating one if need be.
2028 (dump_generic_expr_loc): Move implementation to...
2029 (dump_context::dump_generic_expr_loc): ...this new member
2030 function. Add the tree to any pending optinfo, creating one if
2031 need be.
2032 (dump_printf): Move implementation to...
2033 (dump_context::dump_printf_va): ...this new member function. Add
2034 the text to any pending optinfo, creating one if need be.
2035 (dump_printf_loc): Move implementation to...
2036 (dump_context::dump_printf_loc_va): ...this new member function.
2037 Start a new optinfo and add the stmt to it.
2038 (dump_dec): Move implementation to...
2039 (dump_context::dump_dec): ...this new member function. Add the
2040 value to any pending optinfo, creating one if need be.
2041 (dump_context::dump_symtab_node): New member function.
2042 (dump_context::get_scope_depth): New member function.
2043 (dump_context::begin_scope): New member function.
2044 (dump_context::end_scope): New member function.
2045 (dump_context::ensure_pending_optinfo): New member function.
2046 (dump_context::begin_next_optinfo): New member function.
2047 (dump_context::end_any_optinfo): New member function.
2048 (dump_context::s_current): New global.
2049 (dump_context::s_default): New global.
2050 (dump_scope_depth): Delete global.
2051 (dumpfile_ensure_any_optinfo_are_flushed): New function.
2052 (dump_symtab_node): New function.
2053 (get_dump_scope_depth): Reimplement in terms of dump_context.
2054 (dump_begin_scope): Likewise.
2055 (dump_end_scope): Likewise.
2056 (selftest::temp_dump_context::temp_dump_context): New ctor.
2057 (selftest::temp_dump_context::~temp_dump_context): New dtor.
2058 (selftest::verify_item): New function.
2059 (ASSERT_IS_TEXT): New macro.
2060 (ASSERT_IS_TREE): New macro.
2061 (ASSERT_IS_GIMPLE): New macro.
2062 (selftest::test_capture_of_dump_calls): New test.
2063 (selftest::dumpfile_c_tests): Call it.
2064 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2065 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2066 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2067 descriptive comment.
2068 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2069 (dump_node, dump_bb): Move these unrelated decls.
2070 (class dump_manager): Add leading comment.
2071 * optinfo.cc: New file.
2072 * optinfo.h: New file.
2073
2074 2018-07-19 Michael Collison <michael.collison@arm.com>
2075 Richard Henderson <rth@redhat.com>
2076
2077 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2078 (subti): Handle op1 zero.
2079 (subvti4, usub4ti4): New.
2080 (*sub<GPI>3_compare1_imm): New.
2081 (sub<GPI>3_carryinCV): New.
2082 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2083 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2084
2085 2018-07-19 Michael Collison <michael.collison@arm.com>
2086 Richard Henderson <rth@redhat.com>
2087
2088 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2089 (addti3): Create simpler code if low part is already known to be 0.
2090 (addvti4, uaddvti4): New.
2091 (*add<GPI>3_compareC_cconly_imm): New.
2092 (*add<GPI>3_compareC_cconly): New.
2093 (*add<GPI>3_compareC_imm): New.
2094 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2095 handle constants within this pattern..
2096 (*add<GPI>3_compareV_cconly_imm): New.
2097 (*add<GPI>3_compareV_cconly): New.
2098 (*add<GPI>3_compareV_imm): New.
2099 (add<GPI>3_compareV): New.
2100 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2101 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2102 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2103 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2104 with 'comparison' operator.
2105 (*add<GPI>3_compareV_cconly_imm): Ditto.
2106 (*add<GPI>3_compareV_cconly): Ditto.
2107 (*add<GPI>3_compareV_imm): Ditto.
2108 (add<GPI>3_compareV): Ditto.
2109 (add<mode>3_carryinC): Ditto.
2110 (*add<mode>3_carryinC_zero): Ditto.
2111 (*add<mode>3_carryinC): Ditto.
2112 (add<mode>3_carryinV): Ditto.
2113 (*add<mode>3_carryinV_zero): Ditto.
2114 (*add<mode>3_carryinV): Ditto.
2115
2116 2018-07-19 Michael Collison <michael.collison@arm.com>
2117 Richard Henderson <rth@redhat.com>
2118
2119 * config/aarch64/aarch64-modes.def (CC_V): New.
2120 * config/aarch64/aarch64-protos.h
2121 (aarch64_addti_scratch_regs): Declare
2122 (aarch64_subvti_scratch_regs): Declare.
2123 (aarch64_expand_subvti): Declare.
2124 (aarch64_gen_unlikely_cbranch): Declare
2125 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2126 for signed overflow using CC_Vmode.
2127 (aarch64_get_condition_code_1): Handle CC_Vmode.
2128 (aarch64_gen_unlikely_cbranch): New function.
2129 (aarch64_addti_scratch_regs): New function.
2130 (aarch64_subvti_scratch_regs): New function.
2131 (aarch64_expand_subvti): New function.
2132
2133 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2134
2135 * config/aarch64/aarch64-option-extensions.def: New entry for profile
2136 extension.
2137 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2138 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2139 extension.
2140
2141 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2142
2143 PR target/83009
2144 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2145 address check not strict.
2146
2147 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2148
2149 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2150 Umq with Umn.
2151 (store_pair_lanes<mode>): Likewise.
2152 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2153 enum value 'ADDR_QUERY_LDP_STP_N'.
2154 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2155 (aarch64_print_address_internal): Add declaration.
2156 (aarch64_print_ldpstp_address): Remove.
2157 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2158 (aarch64_print_operand): Change printing of 'y'.
2159 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2160 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2161 'true' rather than '1'.
2162 * config/aarch64/constraints.md (Uml): Likewise.
2163 (Uml): Rename to Umn.
2164 (Umq): Remove.
2165
2166 2018-07-19 Richard Biener <rguenther@suse.de>
2167
2168 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2169 a trailing array.
2170 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2171 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2172 (vn_reference_hasher): Likewise.
2173 (struct vn_tables_s): Remove obstack and alloc-pool members.
2174 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2175 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2176 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2177 (vn_reference_insert_pieces): Likewise.
2178 (alloc_vn_nary_op_noinit): Adjust.
2179 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2180 (vn_phi_eq): Adjust.
2181 (shared_lookup_phiargs): Remove.
2182 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2183 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2184 (visit_reference_op_call): Likewise.
2185 (copy_nary, copy_phi, copy_reference): Remove.
2186 (process_scc): Rewind the obstack when iterating. Do not
2187 copy the elements to valid_info but just move them from one
2188 hashtable to the other.
2189 (allocate_vn_table): Adjust.
2190 (free_vn_table): Likewise.
2191 (init_scc_vn): Likewise.
2192 (free_scc_vn): Likewise.
2193
2194 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
2195
2196 PR target/86560
2197 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2198 indirect_return as function type attribute.
2199 (ix86_attribute_table): Change indirect_return to function
2200 type attribute.
2201 * doc/extend.texi: Update indirect_return attribute.
2202
2203 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
2204
2205 * wide-int.h (widest2_int): New.
2206 * gimple-fold.c (arith_overflowed_p): Use it.
2207 * tree.h (widest2_int_cst): New.
2208 * tree-vrp.c (wide_int_binop_overflow): Rename from
2209 vrp_int_const_binop.
2210 Rewrite to work on trees.
2211 (extract_range_from_multiplicative_op_1): Abstract code to...
2212 (wide_int_range_min_max): ...here.
2213 (wide_int_range_cross_product): ...and here.
2214 (extract_range_from_binary_expr_1): Abstract overflow code to...
2215 (wide_int_range_mult_wrapping): ...here.
2216 * tree-vrp.h (wide_int_range_cross_product): New.
2217 (wide_int_range_mult_wrapping): New.
2218
2219 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
2220 Julia Koval <julia.koval@intel.com>
2221
2222 * config/i386/x86-tune-costs.h (skylake_memcpy,
2223 skylake_memset): Replace rep_prefix with unrolling for size 512.
2224
2225 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
2226
2227 PR middle-end/86544
2228 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2229 in last stmt.
2230
2231 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
2232
2233 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2234 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2235 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2236 previously known as "PowerPC AltiVec Built-in Functions". Move
2237 some material to new subsubsections "PowerPC AltiVec Built-in
2238 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2239 ISA 2.07".
2240 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2241 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2242 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2243 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2244
2245 2018-07-18 Richard Biener <rguenther@suse.de>
2246
2247 PR tree-optimization/86557
2248 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2249 EXACT_DIV_EXPR.
2250
2251 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
2252
2253 * config/s390/s390.c (s390_function_profiler): Generate CFI.
2254
2255 2018-07-17 Jeff Law <law@redhat.com>
2256
2257 * config/arm/arm.c (get_label_padding): Update for recent
2258 changes to label_to_alignment.
2259
2260 PR tree-optimization/86010
2261 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2262
2263 * config/mips/mips.c (vr4130_align_insns): Update for recent
2264 changes to label_to_alignment.
2265
2266 * config/frv/frv.c (frv_label_align): Update for recent changes
2267 to label_to_alignment.
2268
2269 * config/nios2/nios2.c (nios2_label_align): Update for recent
2270 changes which dropped ALIGN_LABELS_LOG.
2271
2272 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
2273
2274 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2275 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2276
2277 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
2278
2279 * config/arc/arc.c (arc_label_align): Use align_labels instead of
2280 deprecated align_labels_log.
2281
2282 2018-07-17 Richard Biener <rguenther@suse.de>
2283
2284 PR lto/86456
2285 * dwarf2out.c (init_sections_and_labels): Always generate
2286 a debug_line_str_section for early LTO debug.
2287 (dwarf2out_finish): Reset debug_line_str_hash output early.
2288 Bump counter for extra dwarf5 .debug_loc labels to not conflict
2289 with fat LTO part.
2290 (dwarf2out_early_finish): Output debug_line_str.
2291
2292 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2293
2294 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2295 index register on z196 or later.
2296
2297 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2298
2299 * config/s390/s390.c (s390_default_align): Set default function
2300 alignment to 16.
2301 (s390_override_options_after_change): Call s390_default align.
2302 (s390_option_override_internal): Call s390_default_align.
2303 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2304
2305 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2306
2307 PR middle-end/86542
2308 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2309 to _looptemp_ clauses, other than the first two.
2310
2311 2018-07-17 Martin Liska <mliska@suse.cz>
2312
2313 * opts.c: Do not enable OPT_falign_* for -Os.
2314
2315 2018-07-17 Martin Liska <mliska@suse.cz>
2316
2317 * align.h (MAX_CODE_ALIGN): New.
2318 (MAX_CODE_ALIGN_VALUE): New.
2319 * common/config/i386/i386-common.c (ix86_handle_option):
2320 (MAX_CODE_ALIGN): Moved to align.h.
2321 * final.c (MAX_CODE_ALIGN): Likewise.
2322 * opts.c (parse_and_check_align_values):
2323 (MAX_CODE_ALIGN): Likewise.
2324 (MAX_CODE_ALIGN_VALUE): Likewise.
2325
2326 2018-07-17 Martin Liska <mliska@suse.cz>
2327
2328 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2329 in order to fulfil coding style.
2330 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2331 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2332 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2333 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2334 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2335 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2336 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2337 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2338 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2339
2340 2018-07-17 Martin Liska <mliska@suse.cz>
2341
2342 * align.h: New file.
2343 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2344 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2345 align_flags of label_to_alignment.
2346 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2347 class.
2348 * config/m68k/m68k.c: Do not use removed align_labels_value and
2349 align_loops_value.
2350 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2351 (LOOP_ALIGN): Likewise.
2352 (LABEL_ALIGN): Likewise.
2353 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2354 Remove not used macro.
2355 (rs6000_loop_align): Change return type to align_flags.
2356 (rs6000_loop_align_max_skip): Remove.
2357 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2358 Change return type to align_flags.
2359 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2360 Remove not used macro.
2361 (rs6000_loop_align): Change return type to align_flags.
2362 (rs6000_loop_align_max_skip): Remove.
2363 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2364 * config/rx/rx-protos.h (rx_align_for_label): Make it
2365 static function.
2366 * config/rx/rx.c (rx_align_for_label): Change return type
2367 to align_flags.
2368 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2369 macro definitions.
2370 into align_flags class.
2371 (LABEL_ALIGN): Likewise.
2372 (LOOP_ALIGN): Likewise.
2373 * config/s390/s390.c (s390_label_align): Use align_flags
2374 class member.
2375 (s390_asm_output_function_label): Likewise.
2376 * config/sh/sh.c (sh_override_options_after_change):
2377 Use align_flags class directly without macros.
2378 (find_barrier): Likewise.
2379 (barrier_align): Likewise.
2380 (sh_loop_align): Likewise.
2381 * config/spu/spu.c (spu_option_override):
2382 Use align_flags_tuple::get_value instead of removed macros.
2383 (spu_sched_init): Likewise.
2384 * config/spu/spu.h (GTY): Likewise.
2385 * config/visium/visium.c (visium_option_override):
2386 Set "8" as default secondary alignment.
2387 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2388 in order to guarantee secondary alignment of 8.
2389 * coretypes.h: Include align.h header file.
2390 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2391 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2392 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2393 * doc/tm.texi.in: Likewise.
2394 * final.c (struct label_alignment): Remove not used structure.
2395 (LABEL_ALIGN): Change type to align_flags.
2396 (LOOP_ALIGN): Likewise.
2397 (JUMP_ALIGN): Likewise.
2398 (default_loop_align_max_skip): Remove.
2399 (default_label_align_max_skip): Likewise.
2400 (default_jump_align_max_skip): Likewise.
2401 (default_label_align_after_barrier_max_skip):
2402 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2403 (LABEL_TO_MAX_SKIP): Remove.
2404 (label_to_alignment): Return align_flags type instead of integer.
2405 (label_to_max_skip): Remove.
2406 (align_fuzz): Use align_flags type.
2407 (compute_alignments): Use align_flags type and use align_flags::max
2408 to combine multiple alignments.
2409 (grow_label_align): Grow vec instead of C array.
2410 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2411 (shorten_branches): Use align_flags type and use align_flags::max
2412 to combine multiple alignments.
2413 (final_scan_insn_1): Remove usage of secondary alignment that comes
2414 from label alignment, but instead use proper secondary alignment
2415 which is computed in grow_label_align.
2416 * flags.h (struct align_flags_tuple): Move to align.h.
2417 (struct align_flags): Likewise.
2418 (state_align_loops): Rename to align_loops.
2419 (state_align_jumps): Rename to align_jumps.
2420 (state_align_labels): Rename to align_labels.
2421 (state_align_functions): Rename to align_functions.
2422 (align_loops_log): Remove.
2423 (align_jumps_log): Remove.
2424 (align_labels_log): Remove.
2425 (align_functions_log): Remove.
2426 (align_loops_max_skip): Remove.
2427 (align_jumps_max_skip): Remove.
2428 (align_labels_max_skip): Remove.
2429 (align_functions_max_skip): Remove.
2430 (align_loops_value): Remove.
2431 (align_jumps_value): Remove.
2432 (align_labels_value): Remove.
2433 (align_functions_value): Remove.
2434 * output.h (label_to_alignment): Change return type to align_flags.
2435 (label_to_max_skip): Remove.
2436 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2437 jump_align_max_skip macros.
2438 * targhooks.h (default_loop_align_max_skip): Remove.
2439 (default_label_align_max_skip): Likewise.
2440 (default_jump_align_max_skip): Likewise.
2441 (default_label_align_after_barrier_max_skip): Remove.
2442 * toplev.c (read_log_maxskip): Use ::normalize function.
2443 (parse_N_M): Remove not used argument and also call ::normalize.
2444 (parse_alignment_opts): Do not pass unused arguments.
2445 * varasm.c (assemble_start_function): Use directly align_functions
2446 instead of removed macros.
2447 * system.h: Do not poison removed macros.
2448
2449 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2450
2451 PR middle-end/86539
2452 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2453 and cond temporaries don't have reference type if iterator has
2454 pointer type. For init use &for_pre_body instead of pre_p if
2455 for_pre_body is non-empty.
2456
2457 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2458
2459 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2460 double-double modes to SFmode directly directly.
2461 (trunc<mode>sf2_fprs): Delete.
2462
2463 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2464
2465 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2466 for conversions between IFmode and the decimal floating point modes.
2467 (init_float128_ieee): Use the correct names for conversions between
2468 KFmode and the decimal floating point modes.
2469
2470 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2471
2472 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2473 for the conversions between TDmode and IFmode.
2474 (init_float128_ieee): Use more correct names for the conversions
2475 between TDmode and KFmode.
2476
2477 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2478
2479 PR tree-optimization/86526
2480 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2481 (inline_expand_builtin_string_cmp): Likewise.
2482 (inline_string_cmp): Likewise. Use c_readstr instead of
2483 builtin_memcpy_read_str. Add unit_mode temporary.
2484
2485 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2486
2487 PR middle-end/86528
2488 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2489 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2490
2491 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2492
2493 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2494 Alphabetize prototypes of built-in functions, separating out
2495 built-in functions that are listed in this section but should be
2496 described elsewhere.
2497
2498 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2499
2500 PR target/86511
2501 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2502 conditional move when trapping comparison was split to a
2503 non-trapping one (and vice versa).
2504
2505 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2506
2507 * config/s390/s390.c (s390_function_profiler): Generate nops
2508 instead of profiler call sequences.
2509 * config/s390/s390.opt: Add the new option.
2510
2511 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2512
2513 * config/s390/s390.c (s390_function_profiler): Generate
2514 __mcount_loc section.
2515 * config/s390/s390.opt: Add the new option.
2516
2517 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2518
2519 * common.opt: Add the new warning.
2520 * config/s390/s390.c (s390_function_profiler): Emit "brasl
2521 %r0,__fentry__" when -mfentry is specified.
2522 (s390_option_override_internal): Disallow -mfentry for 31-bit
2523 CPUs.
2524 * config/s390/s390.opt: Add the new option.
2525
2526 2018-07-16 Richard Biener <rguenther@suse.de>
2527
2528 PR lto/86523
2529 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2530 for function-local FUNCTION_DECL and RESULT_DECL immediately.
2531
2532 2018-07-16 Martin Liska <mliska@suse.cz>
2533
2534 PR ipa/86529
2535 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2536 to ::get_create.
2537
2538 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2539
2540 * config/arc/arcHS.md: Update ARCHS scheduling rules.
2541
2542 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2543
2544 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2545 for ARCHS4x.
2546 * config/arc/arc-cpus.def (hs4x): New cpu.
2547 (hs4xd): Likewise.
2548 * config/arc/arc-tables.opt: Regenerate.
2549 * config/arc/arc.c (arc_sched_issue_rate): New function.
2550 (TARGET_SCHED_ISSUE_RATE): Define.
2551 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2552 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2553 fpu_cvt.
2554 (attr tune): Add ARCHS4x tune values.
2555 (attr tune_dspmpy): Define.
2556 (*tst): Correct instruction type.
2557 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2558 * config/arc/arcHS4x.md: New file.
2559 * config/arc/fpu.md: Update instruction type attributes.
2560 * config/arc/t-multilib: Regenerate.
2561
2562 2018-07-16 Tom de Vries <tdevries@suse.de>
2563
2564 PR debug/86455
2565 * var-tracking.c (vt_initialize): Fix pre_dec handling.
2566
2567 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2568
2569 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2570 early clobber.
2571
2572 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
2573
2574 PR tree-optimization/86514
2575 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2576 conversion to a boolean type from a type with greater precision.
2577
2578 2018-07-16 Tom de Vries <tdevries@suse.de>
2579
2580 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2581 dump_flags request TDF_SLIM.
2582
2583 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2584
2585 * fold-const.c (int_const_binop_1): Abstract...
2586 (wide_int_binop): ...wide int code here.
2587 (poly_int_binop): ...poly int code here.
2588 Abstract the rest of int_const_binop_1 into int_const_binop.
2589 * fold-const.h (wide_int_binop): New.
2590 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2591 Remove useless PLUS/MINUS_EXPR case.
2592 (zero_nonzero_bits_from_vr): Move wide int code...
2593 (zero_nonzero_bits_from_bounds): ...here.
2594 (extract_range_from_binary_expr_1): Move mask optimization code...
2595 (range_easy_mask_min_max): ...here.
2596 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2597 (range_easy_mask_min_max): New.
2598
2599 2018-07-15 Jeff Law <law@redhat.com>
2600
2601 PR target/85993
2602 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2603 block.
2604
2605 2018-07-14 Jim Wilson <jimw@sifive.com>
2606
2607 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2608
2609 2018-07-14 Paul Koning <ni1d@arrl.net>
2610
2611 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2612
2613 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2614
2615 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2616 copying section.
2617
2618 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2619 Steve Munroe <munroesj52@gmail.com>
2620
2621 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2622 (_mm_andnot_si128): Likewise.
2623 (_mm_or_si128): Likewise.
2624 (_mm_xor_si128): Likewise.
2625
2626 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2627
2628 PR middle-end/78809
2629 * builtins.c (expand_builtin_memcmp): Inline the calls first
2630 when result_eq is false.
2631 (expand_builtin_strcmp): Inline the calls first.
2632 (expand_builtin_strncmp): Likewise.
2633 (inline_string_cmp): New routine. Expand a string compare
2634 call by using a sequence of char comparison.
2635 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2636 a call to str(n)cmp/memcmp.
2637 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2638 New option.
2639 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2640
2641 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2642
2643 * config/arm/driver-arm.c: Include arm-native.h.
2644 (host_detect_local_cpu): Use auto-generated data tables.
2645 (vendors, arm_cpu_table): Delete. Move part information to ...
2646 * config/arm/arm-cpus.in: ... here.
2647 * config/arm/parsecpu.awk (gen_native): New function.
2648 (vendor, part): New CPU fields.
2649 (END): Add support for building the native CPU detection tables.
2650 * config/arm/t-arm (arm-native.h): Add build rule.
2651 (driver-arm.o): Add dependency on arm-native.h.
2652
2653 2018-07-13 Richard Biener <rguenther@suse.de>
2654
2655 PR middle-end/85974
2656 * match.pd (addr1 - addr2): Allow either of the operand to
2657 have a conversion.
2658
2659 2018-07-13 Tom de Vries <tdevries@suse.de>
2660
2661 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2662 in remap_ssa_name.
2663
2664 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2665
2666 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2667 arrays instead of numbered variables.
2668
2669 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2670
2671 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2672 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2673
2674 2018-07-13 Richard Biener <rguenther@suse.de>
2675
2676 PR debug/86452
2677 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2678 instead of get_context_die.
2679
2680 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2681 Richard Biener <rguenther@suse.de>
2682
2683 PR middle-end/86489
2684 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2685 that the loop latch destination where phi is defined.
2686
2687 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2688
2689 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2690 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2691 (riscv_set_current_function): Extract getting interrupt type to new
2692 function.
2693 (riscv_get_interrupt_type): New function.
2694 (riscv_merge_decl_attributes): New function, checking interrupt type is
2695 same.
2696 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2697
2698 2018-07-12 Paul Koning <ni1d@arrl.net>
2699
2700 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2701 directive.
2702
2703 2018-07-12 Paul Koning <ni1d@arrl.net>
2704
2705 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2706 zero reference, add doloop_end instead.
2707 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2708 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2709 detail for doloop_end.
2710
2711 2018-07-12 Martin Sebor <msebor@redhat.com>
2712
2713 PR c/86453
2714 * attribs.c (decl_attributes): Reject conflicting attributes before
2715 calling attribute handlers.
2716
2717 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2718
2719 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2720 parameter.
2721 (gcc::dump_manager::get_dump_file_name): likewise.
2722 (dump_begin): Likewise.
2723 * dumpfile.h (dump_begin): Update prototype.
2724 (gcc::dump_manager::get_dump_file_name,
2725 gcc::dump_manager::get_dump_file_name): Update prototype.
2726
2727 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2728
2729 * internal-fn.h (vectorizable_internal_fn_p): New function.
2730 * tree-vect-slp.c (compatible_calls_p): Likewise.
2731 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2732 to internal functions.
2733 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2734
2735 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2736
2737 * fold-const.h (inverse_conditions_p): Declare.
2738 * fold-const.c (inverse_conditions_p): New function.
2739 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2740 that test the inverse condition of a conditional internal function.
2741 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2742 * internal-fn.c (internal_fn_mask_index): Handle conditional
2743 internal functions.
2744 (vectorized_internal_fn_supported_p): New function.
2745 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2746 (any_pred_load_store): Replace with...
2747 (need_to_predicate): ...this new variable.
2748 (redundant_ssa_names): New variable.
2749 (ifcvt_can_use_mask_load_store): Move initial checks to...
2750 (ifcvt_can_predicate): ...this new function. Handle tree codes
2751 for which a conditional internal function exists.
2752 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2753 instead of ifcvt_can_use_mask_load_store. Update after variable
2754 name change.
2755 (predicate_load_or_store): New function, split out from
2756 predicate_mem_writes.
2757 (check_redundant_cond_expr): New function.
2758 (value_available_p): Likewise.
2759 (predicate_rhs_code): Likewise.
2760 (predicate_mem_writes): Rename to...
2761 (predicate_statements): ...this. Use predicate_load_or_store
2762 and predicate_rhs_code.
2763 (combine_blocks, tree_if_conversion): Update after above name changes.
2764 (ifcvt_local_dce): Handle redundant_ssa_names.
2765 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2766 general conditional functions.
2767 * tree-vect-stmts.c (vectorizable_call): Likewise.
2768
2769 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2770 Alan Hayward <alan.hayward@arm.com>
2771 David Sherwood <david.sherwood@arm.com>
2772
2773 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2774 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2775 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2776 plus and minus and convert them into IFN_COND_FMA-based sequences.
2777 (convert_mult_to_fma): Handle conditional plus and minus.
2778
2779 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2780
2781 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2782 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2783 (cond_fnms_optab): New optabs.
2784 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2785 internal functions.
2786 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2787 * internal-fn.h (get_conditional_internal_fn): Declare.
2788 (get_unconditional_internal_fn): Likewise.
2789 * internal-fn.c (cond_ternary_direct): New macro.
2790 (expand_cond_ternary_optab_fn): Likewise.
2791 (direct_cond_ternary_optab_supported_p): Likewise.
2792 (FOR_EACH_COND_FN_PAIR): Likewise.
2793 (get_conditional_internal_fn): New function.
2794 (get_unconditional_internal_fn): Likewise.
2795 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2796 (gimple_match_op::gimple_match_op): Add a new overload for 5
2797 operands.
2798 (gimple_match_op::set_op): Likewise.
2799 (gimple_resimplify5): Declare.
2800 * genmatch.c (decision_tree::gen): Generate simplifications for
2801 5 operands.
2802 * gimple-match-head.c (gimple_simplify): Define an overload for
2803 5 operands. Handle calls with 5 arguments in the top-level overload.
2804 (convert_conditional_op): Handle conversions from unconditional
2805 internal functions to conditional ones.
2806 (gimple_resimplify5): New function.
2807 (build_call_internal): Pass a fifth operand.
2808 (maybe_push_res_to_seq): Likewise.
2809 (try_conditional_simplification): Try converting conditional
2810 internal functions to unconditional internal functions.
2811 Handle 3-operand unconditional forms.
2812 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2813 Define ternary equivalents of the current rules for binary conditional
2814 internal functions.
2815 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2816 ternary operations.
2817 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2818 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2819 (optab): Handle them.
2820 (SVE_COND_FP_TERNARY): New int iterator.
2821 (sve_fmla_op, sve_fmad_op): New int attributes.
2822 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2823 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2824 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2825
2826 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2827
2828 * target.def (preferred_else_value): New target hook.
2829 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2830 * doc/tm.texi: Regenerate.
2831 * targhooks.h (default_preferred_else_value): Declare.
2832 * targhooks.c (default_preferred_else_value): New function.
2833 * internal-fn.h (conditional_internal_fn_code): Declare.
2834 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2835 (get_conditional_internal_fn): Use it.
2836 (conditional_internal_fn_code): New function.
2837 * gimple-match.h (gimple_match_cond): New struct.
2838 (gimple_match_op): Add a cond member function.
2839 (gimple_match_op::gimple_match_op): Update all forms to take a
2840 gimple_match_cond.
2841 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2842 for the suboperation, but don't specify a particular else_value.
2843 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2844 (visit_nary_op, visit_reference_op_load): Pass
2845 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2846 * gimple-match-head.c: Include tree-eh.h
2847 (convert_conditional_op): New function.
2848 (maybe_resimplify_conditional_op): Likewise.
2849 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2850 (gimple_resimplify2): Likewise.
2851 (gimple_resimplify3): Likewise.
2852 (gimple_resimplify4): Likewise.
2853 (maybe_push_res_to_seq): Return null for conditional operations.
2854 (try_conditional_simplification): New function.
2855 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2856 constructor.
2857 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2858 IFN_COND_* call.
2859 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2860 function.
2861 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2862
2863 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2864
2865 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2866 DECL_FCONTEXT
2867 (hash_tree): Do not hash DECL_FCONTEXT
2868 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2869 Do not stream DECL_FCONTEXT.
2870 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2871 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2872
2873 2018-07-12 Richard Biener <rguenther@suse.de>
2874
2875 PR debug/86462
2876 * dwarf2out.c (gen_block_die): Only output blocks when they have
2877 at least one !DECL_IGNORED_P variable.
2878
2879 2018-07-12 Richard Biener <rguenther@suse.de>
2880
2881 PR target/84829
2882 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2883 Remove -mieee-fp handling.
2884
2885 2018-07-12 Richard Biener <rguenther@suse.de>
2886
2887 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2888 left-over from last patch.
2889
2890 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2891
2892 PR tree-optimization/86492
2893 * gimple-ssa-store-merging.c
2894 (imm_store_chain_info::coalesce_immediate_stores): Call
2895 check_no_overlap even for the merge_overlapping case. Formatting fix.
2896
2897 2018-07-12 Richard Biener <rguenther@suse.de>
2898
2899 PR middle-end/86479
2900 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2901 move possibly trapping operations into the conditional.
2902
2903 2018-07-12 Richard Biener <rguenther@suse.de>
2904
2905 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2906 (vn_lookup_simplify_result): Remove recursion limit applied
2907 here.
2908 (vn_nary_build_or_lookup_1): Adjust.
2909 (try_to_simplify): Likewise.
2910 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2911 here.
2912 (gimple_resimplify2): Likewise.
2913 (gimple_resimplify3): Likewise.
2914 (gimple_resimplify4): Likewise.
2915
2916 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2917
2918 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2919 Use __mmask64 type instead of __mmask8 for __M argument.
2920 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2921 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2922 __U argument.
2923 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2924 __mmask16 for __M argument.
2925 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2926 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2927 to __mmask16 instead of __mmask8.
2928 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2929 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2930 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2931 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2932 instead of __mmask16 for __U argument.
2933 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2934 __mmask16 instead of __mmask8 for __U argument.
2935 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2936 __U argument.
2937 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2938 __mmask16.
2939 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2940 argument.
2941 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2942 __U argument.
2943 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2944 __mmask16.
2945 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2946 of __mmask16.
2947 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2948 __U argument.
2949 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2950 __U argument.
2951 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2952 __U argument.
2953 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2954 __U argument.
2955 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2956 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2957 return type as well as __M argument type and all casts from __mmask8
2958 to __mmask32.
2959 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2960 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2961 return type as well as __M argument type and all casts from __mmask8
2962 to __mmask16.
2963 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2964 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2965 return type as well as __M argument type and all casts from __mmask8
2966 to __mmask32.
2967 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2968 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2969 return type as well as __M argument type and all casts from __mmask8
2970 to __mmask16.
2971 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2972 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2973 __mmask16.
2974
2975 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2976
2977 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2978 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2979 for __U argument.
2980
2981 2018-07-11 Paul Koning <ni1d@arrl.net>
2982
2983 * doc/md.texi (define_subst): Document how multiple occurrences of
2984 the same argument in the replacement pattern are handled.
2985
2986 2018-07-11 Paul Koning <ni1d@arrl.net>
2987
2988 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2989 alphabetical order.
2990 (Common Type Attributes): Add "mode" attribute.
2991
2992 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2993
2994 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2995 stream DECL_ORIGINAL_TYPE.
2996 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2997 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2998 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2999 Do not walk original type.
3000 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3001 external decls.
3002 (write_ts_decl_non_common_tree_pointers): Do not stream
3003 DECL_ORIGINAL_TYPE
3004 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3005 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3006
3007 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3008
3009 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3010 thread twice from the same starting edge.
3011
3012 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3013
3014 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3015 * gimple.c (gimple_call_nonnull_result_p): ...here...
3016 (gimple_call_nonnull_arg): ...and here.
3017 * gimple.h (gimple_call_nonnull_result_p): New.
3018 (gimple_call_nonnull_arg): New.
3019
3020 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
3021
3022 * config/arm/arm-cpus.in: Move information from fpu field of each
3023 cpu definition to the isa field.
3024 * config/arm/parsecpu.awk (fpu): Delete match rule.
3025 (gen_comm_data): Don't add bits from the CPU's FPU entry.
3026
3027 2018-07-11 Richard Biener <rguenther@suse.de>
3028
3029 PR debug/86457
3030 * dwarf2out.c (init_sections_and_labels): Use
3031 output_asm_line_debug_info consistently.
3032 (dwarf2out_early_finish): Likewise.
3033 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3034 type units.
3035
3036 2018-07-11 Richard Biener <rguenther@suse.de>
3037
3038 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3039 Rework father_bb setting in a way to avoid propagating constants
3040 multiple times on a loop body.
3041
3042 2018-07-10 Mark Wielaard <mark@klomp.org>
3043
3044 PR debug/86459
3045 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3046
3047 2018-07-10 Richard Biener <rguenther@suse.de>
3048
3049 * hash-map.h (hash_map::iterator::operator*): Return
3050 references to key and value.
3051
3052 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3053
3054 PR c++/86443
3055 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3056 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3057 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3058 (gimplify_omp_for): For composite loops, move outer
3059 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3060 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
3061 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
3062 TREE_LIST for both the original class iterator and the "last" helper
3063 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
3064 loop, remember has_decl_expr from outer composite loops for the
3065 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3066
3067 2018-07-09 Martin Sebor <msebor@redhat.com>
3068
3069 PR middle-end/77357
3070 PR middle-end/86428
3071 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3072 accessing implicitly initialized array elements.
3073 * expr.c (string_constant): Handle string initializers of
3074 character arrays within aggregates.
3075 * gimple-fold.c (fold_array_ctor_reference): Add argument.
3076 Store element offset. As a special case, handle zero size.
3077 (fold_nonarray_ctor_reference): Same.
3078 (fold_ctor_reference): Add argument. Store subobject offset.
3079 * gimple-fold.h (fold_ctor_reference): Add argument.
3080
3081 2018-07-09 Paul Koning <ni1d@arrl.net>
3082
3083 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3084 (pdp11_insn_cost): New function.
3085 (pdp11_md_asm_adjust): New function.
3086 (TARGET_INVALID_WITHIN_DOLOOP): Define.
3087 (pdp11_rtx_costs): Update to match machine better.
3088 (output_addr_const_pdp11): Correct format mismatch warnings.
3089 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3090 * config/pdp11/pdp11.md: General change to add base_cost and/or
3091 length attributes for use by new pdp11_insn_cost function.
3092 (MIN_BRANCH): Correct definition.
3093 (MIN_SOB): Ditto.
3094 (doloop_end): Use standard pattern name for looping pattern.
3095 (doloop_end_nocc): New.
3096 (movsf): Add another constraint alternative.
3097 (zero_extendqihi2): Add constraint alternatives for not in place
3098 extend.
3099 (zero_extendhisi2): Remove.
3100 (shift patterns): Add CC handling variants.
3101 (bswaphi2): New.
3102 (bswapsi2): New.
3103 (rothi3): New.
3104 (define_peephole2): New peephole to recognize mov that sets CC for
3105 subsequent test.
3106
3107 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3108
3109 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3110 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3111 wi::add.
3112
3113 2018-07-09 Jakub Jelinek <jakub@redhat.com>
3114
3115 PR c/86420
3116 * real.c (real_nextafter): Return true if result is denormal.
3117
3118 2018-07-09 Martin Liska <mliska@suse.cz>
3119
3120 * common.opt: Add back wrongly removed attribute.
3121
3122 2018-07-09 Richard Biener <rguenther@suse.de>
3123
3124 PR debug/86413
3125 * dwarf2out.c (gen_block_die): For an early generated DIE
3126 always output high/low PC attributes.
3127
3128 2018-07-09 Tom de Vries <tdevries@suse.de>
3129
3130 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3131 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3132 onto VAR_DECL with abstract origin.
3133
3134 2018-07-07 Jim Wilson <jimw@sifive.com>
3135
3136 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3137
3138 2018-07-07 Tom de Vries <tdevries@suse.de>
3139
3140 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3141
3142 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
3143
3144 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3145 overflow_type.
3146 (combine_bound): Use wide-int overflow calculation instead of
3147 rolling our own.
3148 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3149 overflow_type.
3150 * fold-const.c (int_const_binop_2): Same.
3151 (extract_muldiv_1): Same.
3152 (fold_div_compare): Same.
3153 (fold_abs_const): Same.
3154 * match.pd: Same.
3155 * poly-int.h (add): Same.
3156 (sub): Same.
3157 (neg): Same.
3158 (mul): Same.
3159 * predict.c (predict_iv_comparison): Same.
3160 * profile-count.c (slow_safe_scale_64bit): Same.
3161 * simplify-rtx.c (simplify_const_binary_operation): Same.
3162 * tree-chrec.c (tree_fold_binomial): Same.
3163 * tree-data-ref.c (split_constant_offset_1): Same.
3164 * tree-if-conv.c (idx_within_array_bound): Same.
3165 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3166 * tree-ssa-phiopt.c (minmax_replacement): Same.
3167 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3168 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3169 * vr-values.c (vr_values::adjust_range_with_scev): Same.
3170 * wide-int.cc (wi::add_large): Same.
3171 (wi::mul_internal): Same.
3172 (wi::sub_large): Same.
3173 (wi::divmod_internal): Same.
3174 * wide-int.h: Change overflow type to overflow_type for neg, add,
3175 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3176 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3177 mul_internal, divmod_internal.
3178 (overflow_type): New enum.
3179 (accumulate_overflow): New.
3180
3181 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3182
3183 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3184 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3185
3186 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3187
3188 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3189 argument is checked for zero before entering loop, avoid checking again.
3190
3191 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3192
3193 * gimplify.h (generic_expr_could_trap_p): Set as global function.
3194 * gimplify.h (generic_expr_could_trap_p): Likwise.
3195 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3196
3197 2018-07-06 Jakub Jelinek <jakub@redhat.com>
3198
3199 PR tree-optimization/86401
3200 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3201 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3202 (fold_bit_and_mask): ... here. New helper function for match.pd.
3203 * fold-const.h (fold_bit_and_mask): Declare.
3204 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3205
3206 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3207
3208 PR target/86324
3209 * target.def (translate_mode_attribute): New hook.
3210 * targhooks.h (default_translate_mode_attribute): Declare.
3211 * targhooks.c (default_translate_mode_attribute): New function.
3212 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3213 * doc/tm.texi: Regenerate.
3214 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3215 (rs6000_translate_mode_attribute): New function.
3216
3217 2018-07-06 Paul Koning <ni1d@arrl.net>
3218
3219 * doc/md.texi (define_split): Document DONE and FAIL.
3220 (define_peephole2): Ditto.
3221
3222 2018-07-05 Jeff Law <law@redhat.com>
3223
3224 PR tree-optimization/86010
3225 * tree-ssa-dse.c (compute_trims): More aggressively trim at
3226 both the head and tail of mem* and str* calls.
3227
3228 2018-07-05 Jim Wilson <jimw@sifive.com>
3229
3230 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3231
3232 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
3233
3234 * config/aarch64/aarch64-simd.md: correct flags text for
3235 MIN_EXPR replacement.
3236
3237 2018-07-05 James Clarke <jrtc27@jrtc27.com>
3238
3239 * configure: Regenerated.
3240
3241 2018-07-05 Carl Love <cel@us.ibm.com>
3242
3243 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3244 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3245 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3246 VSX_BUILTIN_DOUBLEL_V4SF.
3247
3248 2018-07-05 Martin Sebor <msebor@redhat.com>
3249
3250 PR c++/86400
3251 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3252 than its domain to compute its the upper bound of a char array.
3253
3254 2018-07-05 Nathan Sidwell <nathan@acm.org>
3255
3256 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3257 * doc/cpp.texi: Update comment.
3258 * doc/tm.texi: Rebuilt.
3259 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3260 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3261 * doc/extend.texi (Backwards Compatibility): Clarify it is system
3262 headers affected by extern "C".
3263 * system.h: Poison NO_IMPLICIT_EXTERN_C.
3264 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3265 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3266 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3267 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3268 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3269 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3270 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3271 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3272 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3273 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3274 config/sparc/sp64-elf.h, config/spu/spu.h,
3275 config/stormy16/stormy16.h, config/v850/v850.h,
3276 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3277 define NO_IMPLICIT_EXTERN_C.
3278 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3279
3280 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3281
3282 PR target/84711
3283 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3284 instead of GET_MODE_SIZE when comparing Units.
3285
3286 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3287
3288 PR target/84711
3289 * rtlanal.c (set_noop_p): Constrain on mode change,
3290 include hard-reg-set.h
3291
3292 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3293
3294 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3295
3296 2018-07-05 Jakub Jelinek <jakub@redhat.com>
3297
3298 Revert
3299 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3300
3301 PR sanitizer/84250
3302 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3303 libasan.
3304 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3305
3306 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3307
3308 PR sanitizer/84250
3309 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3310 libasan.
3311 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3312
3313 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
3314
3315 PR middle-end/86380
3316 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3317
3318 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
3319
3320 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3321 neg_*_op* variables.
3322
3323 2018-07-04 Martin Liska <mliska@suse.cz>
3324
3325 * tree-switch-conversion.c: Define
3326 max_ratio_for_speed and max_ratio_for_size constants.
3327
3328 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3329 Martin Liska <mliska@suse.cz>
3330
3331 PR middle-end/66240
3332 PR target/45996
3333 PR c/84100
3334 * common.opt: Rename align options with 'str_' prefix.
3335 * common/config/i386/i386-common.c (set_malign_value): New
3336 function.
3337 (ix86_handle_option): Use it to set -falign-* options/
3338 * config/aarch64/aarch64-protos.h (struct tune_params): Change
3339 type from int to string.
3340 * config/aarch64/aarch64.c: Update default values from int
3341 to string.
3342 * config/alpha/alpha.c (alpha_override_options_after_change):
3343 Likewise.
3344 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3345 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3346 max skip conditionally.
3347 * config/i386/freebsd.h (SUBALIGN_LOG): New.
3348 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3349 max skip conditionally.
3350 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3351 max skip conditionally.
3352 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3353 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3354 max skip conditionally.
3355 * config/i386/i386.c (struct ptt): Change type from int to
3356 string.
3357 (ix86_default_align): Set default values.
3358 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3359 max skip conditionally.
3360 * config/i386/iamcu.h (SUBALIGN_LOG): New.
3361 (ASM_OUTPUT_MAX_SKIP_ALIGN):
3362 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3363 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3364 max skip conditionally.
3365 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3366 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3367 * config/i386/x86-64.h (SUBALIGN_LOG): New.
3368 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3369 max skip conditionally.
3370 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3371 * config/ia64/ia64.c (ia64_option_override): Set default values
3372 for alignment options.
3373 * config/m68k/m68k.c: Handle new str_align_* options.
3374 * config/mips/mips.c (mips_set_compression_mode): Change
3375 type of constants.
3376 (mips_option_override): Set default values for options.
3377 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3378 Likewise.
3379 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3380 Likewise.
3381 * config/rx/rx.c (rx_option_override): Likewise.
3382 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3383 (LABEL_ALIGN): Use align_labels_log.
3384 (LOOP_ALIGN): Use align_loops_align.
3385 * config/s390/s390.c (s390_asm_output_function_label): Use new
3386 macros.
3387 * config/sh/sh.c (sh_override_options_after_change):
3388 Change type of constants.
3389 * config/spu/spu.c (spu_sched_init): Likewise.
3390 * config/sparc/sparc.c (sparc_option_override): Set default
3391 values for options.
3392 * config/visium/visium.c (visium_option_override): Likewise.
3393 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3394 emit p2align format with last argument if it's not needed.
3395 * doc/invoke.texi: Document extended format of -falign-*.
3396 * final.c: Use align_labels alignment.
3397 * flags.h (struct target_flag_state): Change type to use
3398 align_flags.
3399 (struct align_flags_tuple): New.
3400 (struct align_flags): Likewise.
3401 (align_loops_log): Redefine macro to use new types.
3402 (align_loops_max_skip): Redefine macro to use new types.
3403 (align_jumps_log): Redefine macro to use new types.
3404 (align_jumps_max_skip): Redefine macro to use new types.
3405 (align_labels_log): Redefine macro to use new types.
3406 (align_labels_max_skip): Redefine macro to use new types.
3407 (align_functions_log): Redefine macro to use new types.
3408 (align_loops): Redefine macro to use new types.
3409 (align_jumps): Redefine macro to use new types.
3410 (align_labels): Redefine macro to use new types.
3411 (align_functions): Redefine macro to use new types.
3412 (align_functions_max_skip): Redefine macro to use new types.
3413 (align_loops_value): New macro.
3414 (align_jumps_value): New macro.
3415 (align_labels_value): New macro.
3416 (align_functions_value): New macro.
3417 * function.c (invoke_set_current_function_hook): Propagate
3418 alignment values from flags to global variables default in
3419 topleev.h.
3420 * ipa-icf.c (sem_function::equals_wpa): Use
3421 cl_optimization_option_eq instead of memcmp.
3422 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3423 of string types.
3424 (cl_optimization_stream_in): Likewise.
3425 * optc-save-gen.awk: Support strings in cl_optimization.
3426 * opth-gen.awk: Likewise.
3427 * opts.c (finish_options): Remove error checking of invalid
3428 value ranges.
3429 (MAX_CODE_ALIGN): Remove.
3430 (MAX_CODE_ALIGN_VALUE): Likewise.
3431 (parse_and_check_align_values): New function.
3432 (check_alignment_argument): Likewise.
3433 (common_handle_option): Use check_alignment_argument.
3434 * opts.h (parse_and_check_align_values): Declare.
3435 * toplev.c (init_alignments): Remove.
3436 (read_log_maxskip): New.
3437 (parse_N_M): Likewise.
3438 (parse_alignment_opts): Likewise.
3439 (backend_init_target): Remove usage of init_alignments.
3440 * toplev.h (parse_alignment_opts): Declare.
3441 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3442 argument.
3443 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3444 * tree.c (cl_option_hasher::equal): New.
3445 * varasm.c: Use new global macros.
3446
3447 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3448
3449 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3450 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3451 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3452 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3453 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3454 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3455 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3456 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3457 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3458 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3459 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3460 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3461 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3462
3463 2018-07-04 Martin Liska <mliska@suse.cz>
3464 Jonathan Wakely <jwakely@redhat.com>
3465
3466 * coverage.c: Use correct type.
3467 * doc/invoke.texi: Language correction.
3468
3469 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3470
3471 PR target/85620
3472 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3473 ENDBRANCH for non-tail call which may return via indirect branch.
3474 * doc/extend.texi: Document indirect_return attribute.
3475
3476 2018-07-03 Martin Sebor <msebor@redhat.com>
3477
3478 PR tree-optimization/86274
3479 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3480 precondition.
3481 (format_floating): Correct handling of infinities and NaNs.
3482
3483 2018-07-03 Martin Sebor <msebor@redhat.com>
3484
3485 * print-tree.c (print_real_cst): New function.
3486 (print_node_brief): Call it.
3487 (print_node): Ditto.
3488
3489 2018-07-03 Jeff Law <law@redhat.com>
3490
3491 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3492 into a single pattern.
3493
3494 * config/h8300/h8300.md (ors code_iterator): New.
3495 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3496 a single pattern and single splitter.
3497 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3498 (iorqi3_1, xorqi3_1): Likewise.
3499 (iorqi3, xorqi3 expanders): Similarly.
3500
3501 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3502 (movmd_internal) into a single pattern using the P mode iterator.
3503 (movmd splitters): Similarly.
3504 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3505 (movsd splitters): Similarly.
3506
3507 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3508 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3509 right table based on the size of the operand.
3510 * config/h8300/h8300.md (length_table): Corresponding changes. All
3511 references to "addb", "addw" and "addl" changed to "add".
3512 (btst patterns): Merge two variants into a single pattern.
3513 (tstqi, tsthi): Likewise.
3514 (addhi3_incdec, addsi3_incdec): Likewise.
3515 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3516 (mulhi3, mulsi3): Likewise.
3517 (udivhi3, udivsi3): Likewise.
3518 (divhi3, divsi3): Likewise.
3519 (andorqi3, andorhi3, andorsi3): Likewise.
3520
3521 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
3522
3523 PR target/85694
3524 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3525 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3526
3527 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3528
3529 PR tree-optimization/85694
3530 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3531 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3532 UNSPEC_URHADD.
3533 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3534 (<u>avg<mode>3_ceil): New patterns.
3535
3536 2018-07-03 David Malcolm <dmalcolm@redhat.com>
3537
3538 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3539 scan-tree-dump directive.
3540 * gcc.dg/vect/slp-perm-2.c: Likewise.
3541 * gcc.dg/vect/slp-perm-3.c: Likewise.
3542 * gcc.dg/vect/slp-perm-5.c: Likewise.
3543 * gcc.dg/vect/slp-perm-6.c: Likewise.
3544 * gcc.dg/vect/slp-perm-7.c: Likewise.
3545 * gcc.dg/vect/slp-perm-8.c: Likewise.
3546
3547 2018-07-03 Marek Polacek <polacek@redhat.com>
3548
3549 PR middle-end/86202
3550 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3551
3552 2018-07-03 Richard Biener <rguenther@suse.de>
3553
3554 PR ipa/86389
3555 * tree-ssa-structalias.c (find_func_clobbers): Properly
3556 handle indirect calls.
3557
3558 2018-07-03 Jeff Law <law@redhat.com>
3559
3560 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3561 (shifts): New code iterator.
3562 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3563 expander. Fix HImode handling on H8/SX.
3564 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3565 (subqi3, subhi3, subsi3 expanders): Likewise.
3566 (andqi3, andhi3, andsi3 expanders): Likewise.
3567 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3568 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3569 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3570 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3571 (zero_extendqihi2, zero_extendqisi2): Likewise.
3572 (extendqihi2, extendqisi2): Likewise.
3573 (rotlqi3, rotlhi3, rotlsi3): Likewise.
3574 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3575 (rotlqi3_1, rotlhi3_1): Likewise.
3576 (logicalhi3_sn, logicalsi3_sn): Likewise.
3577 (logicalhi3, logicalsi3): Likewise.
3578
3579 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3580
3581 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3582 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3583 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3584 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3585 type to append_pattern_def_seq instead of creating a stmt_vec_info
3586 directly.
3587 (build_mask_conversion): Likewise. Remove vinfo argument.
3588 (vect_add_conversion_to_patterm): Likewise, renaming to...
3589 (vect_add_conversion_to_pattern): ...this.
3590 (vect_recog_mask_conversion_pattern): Update call to
3591 build_mask_conversion. Pass the vector type to
3592 append_pattern_def_seq here too.
3593 (vect_recog_gather_scatter_pattern): Update call to
3594 vect_add_conversion_to_pattern.
3595
3596 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3597
3598 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3599 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3600 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3601 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3602 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3603 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3604 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3605 append_pattern_def_seq instead of new_pattern_def_seq.
3606 (vect_recog_divmod_pattern): Do both of the above.
3607 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3608 is null.
3609
3610 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3611
3612 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3613 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3614 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3615 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3616 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3617 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3618 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3619 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3620 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3621 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3622 parameter with a single stmt_vec_info.
3623 (vect_recog_func_ptr): Likewise.
3624 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3625 (vect_try_gather_scatter_pattern): ...this.
3626 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3627 the stmt_vec_info of the statement to be matched. Don't clear
3628 STMT_VINFO_RELATED_STMT.
3629 (vect_pattern_recog): Update call accordingly.
3630
3631 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3632
3633 PR tree-optimization/85694
3634 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3635 (uavgM3_ceil): Document new optabs.
3636 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3637 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3638 functions.
3639 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3640 (savg_ceil_optab): New optabs.
3641 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3642 (vect_vect_recog_func_ptrs): Add it.
3643 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3644 constant directly from the associated lhs.
3645
3646 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3647
3648 * tree-vect-patterns.c (vect_split_statement): New function.
3649 (vect_convert_input): Use it to try to split an existing cast.
3650
3651 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3652
3653 * poly-int.h (print_hex): New function.
3654 * dumpfile.h (dump_dec, dump_hex): Declare.
3655 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3656 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3657 min_input_precision, operation_precision and operation_sign.
3658 * tree-vect-patterns.c (vect_get_range_info): New function.
3659 (vect_same_loop_or_bb_p, vect_single_imm_use)
3660 (vect_operation_fits_smaller_type): Delete.
3661 (vect_look_through_possible_promotion): Add an optional
3662 single_use_p parameter.
3663 (vect_recog_over_widening_pattern): Rewrite to use new
3664 stmt_vec_info infomration. Handle one operation at a time.
3665 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3666 (vect_truncatable_operation_p, vect_set_operation_type)
3667 (vect_set_min_input_precision): New functions.
3668 (vect_determine_min_output_precision_1): Likewise.
3669 (vect_determine_min_output_precision): Likewise.
3670 (vect_determine_precisions_from_range): Likewise.
3671 (vect_determine_precisions_from_users): Likewise.
3672 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3673 (vect_vect_recog_func_ptrs): Put over_widening first.
3674 Add cast_forwprop.
3675 (vect_pattern_recog): Call vect_determine_precisions.
3676
3677 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3678
3679 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3680 statements that have been replaced by further pattern statements.
3681 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3682
3683 2018-07-03 Richard Biener <rguenther@suse.de>
3684
3685 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3686 always set *dt. Dump vectype in vectype overload.
3687 * dumpfile.h (dump_gimple_expr): New function.
3688 (dump_gimple_expr_loc): Likewise.
3689 * dumpfile.c (dump_gimple_expr): New function.
3690 (dump_gimple_expr_loc): Likewise.
3691
3692 2018-07-02 Jeff Law <law@redhat.com>
3693
3694 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3695 the H8/300, H8/300H and H8/S variants into a single pattern.
3696 (movhi_h8300, movqi_h8300hs): Similarly.
3697 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3698 (QHI mode iterator): New.
3699
3700 * config/h8300/h8300.md: Remove trailing whitespace.
3701
3702 2018-07-02 Jim Wilson <jimw@sifive.com>
3703
3704 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3705 instead of emit_insn for interrupt returns.
3706 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3707 (riscv_sret, riscv_uret): Likewise.
3708
3709 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3710
3711 * pretty-print.c (selftest::test_pp_format): Move save and restore
3712 of quotes to class auto_fix_quotes, and add an instance.
3713 * selftest.c: Include "intl.h".
3714 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3715 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3716 * selftest.h (selftest::auto_fix_quotes): New class.
3717
3718 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3719
3720 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3721 (aarch64_sve_prepare_conditional_op): Remove.
3722 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3723 Allow aarch64_simd_reg_or_zero as select operand; remove
3724 the aarch64_sve_prepare_conditional_op call.
3725 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3726 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3727 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3728 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3729 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3730 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3731 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3732 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3733 and a splitters to match all of the *_any patterns.
3734 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3735
3736 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3737 (SVE_COND_FP_BINARY_REV): Remove.
3738 (sve_int_op_rev, sve_fp_op_rev): New.
3739 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3740 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3741 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3742 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3743 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3744 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3745 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3746 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3747 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3748
3749 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3750 Remove match_dup 1 from the inner unspec.
3751 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3752
3753 * config/aarch64/aarch64.md (movprfx): New attr.
3754 (length): Default movprfx to 8.
3755 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3756 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3757 (*<su>mul<SVE_I>3_highpart): Likewise.
3758 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3759 (*v<ASHIFT><SVE_I>3): Likewise.
3760 (*<su><MAXMIN><SVE_I>3): Likewise.
3761 (*<su><MAXMIN><SVE_F>3): Likewise.
3762 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3763 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3764 (*div<SVE_F>4): Likewise.
3765
3766 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3767
3768 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3769 in dump string.
3770
3771 2018-07-02 Richard Biener <rguenther@suse.de>
3772
3773 PR tree-optimization/86363
3774 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3775 memset argument refers to a non-variable address.
3776
3777 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3778
3779 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3780 {PLUS,MINUS}_EXPR code to...
3781 (adjust_symbolic_bound): ...here,
3782 (combine_bound): ...here,
3783 (set_value_range_with_overflow): ...and here.
3784
3785 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3786
3787 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3788 code...
3789 (extract_range_from_abs_expr): ...here.
3790
3791 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3792
3793 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3794 -fno-omit-frame-pointer when not optimizing.
3795
3796 2018-07-02 Martin Liska <mliska@suse.cz>
3797
3798 PR ipa/86279
3799 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3800 (propagate_nothrow): Likewise.
3801
3802 2018-07-02 Martin Liska <mliska@suse.cz>
3803
3804 PR ipa/86323
3805 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3806
3807 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3808
3809 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3810 function in r262149, changing "loc" param from source_location to
3811 const dump_location_t &.
3812 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3813 declaration, as above.
3814
3815 2018-07-01 Paul Koning <ni1d@arrl.net>
3816
3817 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3818 -munit-asm, -mgnu-asm, -mdec-asm.
3819 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3820 (pdp11_output_labelref): New.
3821 (pdp11_output_def): New.
3822 (pdp11_output_addr_vec_elt): New.
3823 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3824 %# and %@ format codes.
3825 (pdp11_option_override): New.
3826 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3827 (pdp11_output_ident): New.
3828 (pdp11_asm_named_section): New.
3829 (pdp11_asm_init_sections): New.
3830 (pdp11_file_start): New.
3831 (pdp11_file_end): New.
3832 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3833 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3834 %o, like %c but octal.
3835 (pdp11_option_override): New.
3836 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3837 -mdec-asm.
3838 (DATA_SECTION_ASM_OP): Ditto.
3839 (READONLY_DATA_SECTION_ASM_OP): New.
3840 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3841 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3842 (ASM_OUTPUT_LABELREF): Ditto.
3843 (ASM_OUTPUT_DEF): Ditto.
3844 (ASM_OUTPUT_EXTERNAL): New.
3845 (ASM_OUTPUT_SOURCE_FILENAME): New.
3846 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3847 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3848 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3849 %# and %@ format codes.
3850 * config/pdp11/pdp11.opt (mgnu-asm): New.
3851 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3852 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3853 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3854
3855 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3856
3857 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3858 dereferencing path[] beyond its length.
3859 (debug_path): New.
3860 (debug_all_paths): New.
3861 (rewire_first_differing_edge): New.
3862 (adjust_paths_after_duplication): New.
3863 (duplicate_thread_path): Call adjust_paths_after_duplication.
3864 Add new argument.
3865 (thread_through_all_blocks): Add new argument to
3866 duplicate_thread_path.
3867
3868 2018-06-30 Jim Wilson <jimw@sifive.com>
3869
3870 * config/riscv/predicates.md (p2m1_shift_operand): New.
3871 (high_mask_shift_operand): New.
3872 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3873 pattern using p2m1_shift_operand.
3874 (lshsi3_zero_extend_3+2): New combiner pattern using
3875 high_mask_shift_operand.
3876
3877 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3878
3879 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3880 split out from...
3881 (vect_recog_rotate_pattern): ...here.
3882 (vect_convert_input): Try to insert casts of invariants in the
3883 preheader.
3884 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3885 preheader to be empty.
3886
3887 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3888
3889 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3890 vector type. If given, install it in the new statement's
3891 STMT_VINFO_VECTYPE.
3892 (vect_element_precision): New function.
3893 (vect_unpromoted_value): New struct.
3894 (vect_unpromoted_value::vect_unpromoted_value): New function.
3895 (vect_unpromoted_value::set_op): Likewise.
3896 (vect_look_through_possible_promotion): Likewise.
3897 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3898 (vect_widened_op_tree, vect_convert_input): Likewise.
3899 (vect_convert_inputs, vect_convert_output): Likewise.
3900 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3901 to handle the optional cast of the multiplication result and
3902 vect_widened_op_tree to detect the widened multiplication itself.
3903 Do not require the input and output of promotion casts to have
3904 the same sign, but base the signedness of the operation on the
3905 input rather than the result. If the pattern includes two
3906 promotions, check that those promotions have the same sign.
3907 Do not restrict the MULT_EXPR handling to a double-width result;
3908 handle quadruple-width results and wider. Use vect_convert_inputs
3909 to convert the inputs to the common type.
3910 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3911 to handle the optional cast of the ABS result. Also allow a sign
3912 change or a sign extension between the ABS and MINUS.
3913 Use vect_widened_op_tree to detect the widened subtraction and use
3914 vect_convert_inputs to convert the inputs to the common type.
3915 (vect_handle_widen_op_by_const): Delete.
3916 (vect_recog_widen_op_pattern): New function.
3917 (vect_recog_widen_mult_pattern): Use it.
3918 (vect_recog_widen_shift_pattern): Likewise.
3919 (vect_recog_widen_sum_pattern): Use
3920 vect_look_through_possible_promotion to handle the promoted
3921 PLUS_EXPR operand.
3922
3923 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3924
3925 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3926 the containing gimple_seq *.
3927 * gimple-iterator.h (gsi_for_stmt): Declare it.
3928 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3929 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3930 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3931 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3932 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3933 checks.
3934 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3935 split out from...
3936 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3937 statement being replaced is part of an existing pattern
3938 definition sequence, inserting the new pattern statements before
3939 the original one.
3940 (vect_pattern_recog_1): Don't return a bool. If the statement
3941 is already part of a pattern, instead apply pattern matching
3942 to the pattern definition statements. Don't clear the
3943 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3944 (vect_pattern_recog): Don't break after the first match;
3945 continue processing the pattern definition statements instead.
3946 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3947
3948 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3949
3950 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3951 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3952 (vect_recog_widen_sum_pattern): Use it.
3953
3954 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3955
3956 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3957 phi is not a pattern statement and has not been replaced by
3958 a pattern statement.
3959 * tree-vect-patterns.c (type_conversion_p): Don't check
3960 STMT_VINFO_IN_PATTERN_P.
3961 (vect_recog_vector_vector_shift_pattern): Likewise.
3962 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3963 the pattern statement rather than the original statement; check
3964 directly for a WIDEN_MULT_EXPR here.
3965 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3966 vect_is_simple_use to return the pattern statement rather
3967 than the original statement; use is_pattern_stmt_p to check
3968 for such a pattern statement.
3969 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3970 to return the pattern statement rather than the original statement;
3971 don't do the same transformation here.
3972 (vect_is_simple_use): If the defining statement has been replaced
3973 by a pattern statement, return the pattern statement instead.
3974 Remove the corresponding (local) transformation from the vectype
3975 overload.
3976
3977 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3978
3979 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3980 end and default to null.
3981 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3982 (vectorizable_reduction): Update calls accordingly, dropping the
3983 gimple ** argument if the passed-back statement isn't needed.
3984 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3985 (vect_recog_rotate_pattern): Likewise.
3986 (vect_recog_mask_conversion_pattern): Likewise.
3987 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3988 (vect_mask_constant_operand_p): Likewise.
3989 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3990 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3991 (get_group_load_store_type, get_load_store_type): Likewise.
3992 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3993 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3994 (vectorizable_conversion, vectorizable_assignment): Likewise.
3995 (vectorizable_shift, vectorizable_operation): Likewise.
3996 (vectorizable_store, vect_is_simple_cond): Likewise.
3997 (vectorizable_condition, vectorizable_comparison): Likewise.
3998 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3999 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4000 and move it to the end. Cope with null def_stmt_outs.
4001
4002 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4003
4004 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4005
4006 2018-06-29 Jeff Law <law@redhat.com>
4007
4008 * config/v850/v850.c (v850_legitimate_address_p): Handle large
4009 displacements for TARGET_V850E2V3 and newer.
4010 (TARGET_LRA_P): Remove. Defaults to LRA now.
4011 * config/v850/v850.md (sign23byte_load): Remove.
4012 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4013 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4014
4015 2018-06-29 Martin Liska <mliska@suse.cz>
4016
4017 PR lto/85759
4018 * coverage.c (coverage_init): Mangle full path name.
4019 * doc/invoke.texi: Document the change.
4020 * gcov-io.c (mangle_path): New.
4021 * gcov-io.h (mangle_path): Likewise.
4022 * gcov.c (mangle_name): Use mangle_path for path mangling.
4023
4024 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4025
4026 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4027 if starting source register is not even.
4028
4029 2018-06-29 Martin Liska <mliska@suse.cz>
4030
4031 PR tree-optimization/86263
4032 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4033 Make edge redirection.
4034
4035 2018-06-29 David Malcolm <dmalcolm@redhat.com>
4036
4037 * dumpfile.c (dump_loc): Add indentation based on scope depth.
4038 (dump_scope_depth): New variable.
4039 (get_dump_scope_depth): New function.
4040 (dump_begin_scope): New function.
4041 (dump_end_scope): New function.
4042 * dumpfile.h (get_dump_scope_depth): New declaration.
4043 (dump_begin_scope): New declaration.
4044 (dump_end_scope): New declaration.
4045 (class auto_dump_scope): New class.
4046 (AUTO_DUMP_SCOPE): New macro.
4047 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4048 AUTO_DUMP_SCOPE.
4049
4050 2018-06-29 Richard Biener <rguenther@suse.de>
4051
4052 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4053 compute_all_dependences succeeds.
4054 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4055 exceed --param loop-max-datarefs-for-datadeps.
4056
4057 2018-06-29 Jakub Jelinek <jakub@redhat.com>
4058
4059 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4060
4061 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
4062
4063 PR target/86348
4064 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4065 alternative 0 in preferred_for_speed attribute.
4066
4067 2018-06-28 Paul Koning <ni1d@arrl.net>
4068
4069 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4070 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4071 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4072 * config/pdp11/pdp11.md: Correct "length" attribute calculation
4073 for shift insn patterns.
4074
4075 2018-06-28 David Malcolm <dmalcolm@redhat.com>
4076
4077 * cgraph.c (cgraph_node::get_body): Replace assignments to
4078 "dump_file" with calls to set_dump_file.
4079 * dumpfile.c (alt_dump_file): Make static, and group with...
4080 (alt_flags): ...this definition.
4081 (dumps_are_enabled): New variable.
4082 (refresh_dumps_are_enabled): New function.
4083 (set_dump_file): New function.
4084 (set_alt_dump_file): New function.
4085 (gcc::dump_manager::dump_start): Replace assignments to
4086 "dump_file" and "alt_dump_file" with calls to set_dump_file and
4087 set_alt_dump_file.
4088 (gcc::dump_manager::dump_finish): Likewise.
4089 * dumpfile.h (alt_dump_file): Delete decl.
4090 (dumps_are_enabled): New variable decl.
4091 (set_dump_file): New function decl.
4092 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4093 global.
4094 * tree-nested.c (lower_nested_functions): Replace assignments to
4095 "dump_file" with calls to set_dump_file.
4096
4097 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4098
4099 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4100 goto_locus of each outgoing edge of each basic block.
4101
4102 2018-06-28 Richard Biener <rguenther@suse.de>
4103
4104 * dwarf2out.c (decl_scope_table): Remove.
4105 (push_decl_scope): Likewise.
4106 (pop_decl_scope): Likewise.
4107 (gen_type_die_for_member): Do not call push/pop_decl_scope.
4108 (gen_struct_or_union_type_die): Likewise.
4109 (gen_tagged_type_die): Likewise.
4110 (dwarf2out_init): Do not initialize decl_scope_table.
4111 (dwarf2out_c_finalize): Do not free it.
4112
4113 2018-06-28 Richard Biener <rguenther@suse.de>
4114
4115 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4116 deciding whether to not re-use a DIE.
4117
4118 2018-06-28 Richard Biener <rguenther@suse.de>
4119
4120 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4121 DW_AT_abstract_origin attribute.
4122
4123 2018-06-28 Martin Liska <mliska@suse.cz>
4124
4125 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4126 Use newly introduced constants.
4127 * tree-switch-conversion.h (struct jump_table_cluster):
4128 Define max_ratio_for_size and max_ratio_for_speed.
4129
4130 2018-06-28 Martin Liska <mliska@suse.cz>
4131
4132 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4133 Add new checking assert to catch invalid state.
4134 (jump_table_cluster::can_be_handled): Handle single case
4135 clusters.
4136 (jump_table_cluster::is_beneficial): Bail out for such case.
4137 (bit_test_cluster::find_bit_tests):
4138 Add new checking assert to catch invalid state.
4139 (bit_test_cluster::can_be_handled): Handle single case
4140 clusters.
4141 (bit_test_cluster::is_beneficial): Bail out for such case.
4142 (switch_decision_tree::analyze_switch_statement):
4143 Fix comment.
4144
4145 2018-06-28 Martin Liska <mliska@suse.cz>
4146
4147 * common.opt: Introduce -completion option.
4148 * gcc.c (driver_handle_option): Handle it.
4149 (driver::main): Print completions if completion
4150 is set.
4151 * opt-suggestions.c (option_proposer::get_completions):
4152 New function.
4153 (option_proposer::suggest_completion): Likewise.
4154 (option_proposer::find_param_completions): Likewise.
4155 (verify_autocompletions): Likewise.
4156 (test_completion_valid_options): Likewise.
4157 (test_completion_valid_params): Likewise.
4158 (in_completion_p): Likewise.
4159 (empty_completion_p): Likewise.
4160 (test_completion_partial_match): Likewise.
4161 (test_completion_garbage): Likewise.
4162 (opt_proposer_c_tests): Likewise.
4163 * opt-suggestions.h: Declare new functions.
4164 * opts.c (common_handle_option): Handle OPT__completion_.
4165 * selftest-run-tests.c (selftest::run_tests): Add
4166 opt_proposer_c_tests.
4167 * selftest.c (assert_str_startswith): New.
4168 * selftest.h (assert_str_startswith): Likewise.
4169 (opt_proposer_c_tests): New.
4170 (ASSERT_STR_STARTSWITH): Likewise.
4171
4172 2018-06-28 Martin Liska <mliska@suse.cz>
4173
4174 * Makefile.in: Add opt-suggestions.o.
4175 * gcc-main.c: Include opt-suggestions.h.
4176 * gcc.c (driver::driver): Likewise.
4177 (driver::~driver): Remove m_option_suggestions.
4178 (driver::build_option_suggestions): Moved to option_proposer.
4179 (driver::suggest_option): Likewise.
4180 (driver::handle_unrecognized_options): Use option_proposer.
4181 * gcc.h (class driver): Add new memver m_option_proposer.
4182 * opt-suggestions.c: New file.
4183 * opt-suggestions.h: New file.
4184
4185 2018-06-28 Martin Liska <mliska@suse.cz>
4186
4187 * vec.h (class auto_string_vec): New (moved from auto_argvec).
4188 (auto_string_vec::~auto_string_vec): Likewise.
4189
4190 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4191
4192 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4193 prevent_decl_creation_for_types fields up and add reset_location field.
4194 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4195 statement if id->reset_location is true.
4196 (copy_edges_for_bb): Do not set goto_locus on the new edges if
4197 id->reset_location is true.
4198 (copy_phis_for_bb): Force input_location on the arguments if
4199 id->reset_location is true.
4200 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4201 is set on the function to be inlined.
4202
4203 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
4204
4205 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4206
4207 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
4208
4209 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4210 registers for Pmode.
4211 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4212 hard registers for the clobbered pseudo.
4213
4214 2018-06-27 Paul Koning <ni1d@arrl.net>
4215
4216 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4217 mutually exclusive options.
4218 * config/pdp11/constraints.md (h): New constraint.
4219 (O): Update definition to match shift code generation.
4220 (D): New constraint.
4221 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4222 (CCFP): Remove.
4223 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4224 function.
4225 (output_jump): Change arguments.
4226 (pdp11_fixed_cc_regs): New function.
4227 (pdp11_cc_mode): Ditto.
4228 (pdp11_expand_shift): Ditto.
4229 (pdp11_assemble_shift): Ditto.
4230 (pdp11_small_shift): Ditto.
4231 (pdp11_branch_cost): Remove.
4232 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4233 from output.
4234 (pdp11_register_move_cost): Update for CC registers.
4235 (pdp11_rtx_costs): Add case for LSHIFTRT.
4236 (pdp11_output_jump): Add CCNZ mode conditional branches.
4237 (notice_update_cc_on_set): Remove.
4238 (pdp11_cc_mode): New function.
4239 (simple_memory_operand): Correct pre/post decrement case.
4240 (no_side_effect_operand): New function.
4241 (pdp11_regno_reg_class): Add CC_REGS class.
4242 (pdp11_fixed_cc_regs): New function.
4243 (pdp11_small_shift): New function.
4244 (pdp11_expand_shift): New function to expand shift insns.
4245 (pdp11_assemble_shift): New function to output shifts.
4246 (pdp11_branch_cost): Remove.
4247 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4248 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4249 (WCHAR_TYPE): Ditto.
4250 (PTRDIFF_TYPE): Ditto.
4251 (ADJUST_INSN_LENGTH): New macro.
4252 (FIXED_REGISTERS): Add CC registers.
4253 (CALL_USED_REGISTERS): Ditto.
4254 (reg_class): Ditto.
4255 (REG_CLASS_NAMES): Ditto.
4256 (REG_CLASS_CONTENTS): Ditto.
4257 (SELECT_CC_MODE): Use new function.
4258 (TARGET_FLAGS_REGNUM): New macro.
4259 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4260 (cc0_reg_rtx): Remove.
4261 (CC_STATUS_MDEP): Remove.
4262 (CC_STATUS_MDEFP_INIT): Remove.
4263 (CC_IN_FPU): Remove.
4264 (NOTICE_UPDATE_CC): Remove.
4265 (REGISTER_NAMES): Add CC registers.
4266 (BRANCH_COST): Change to constant 1.
4267 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4268 handling.
4269 * config/pdp11/pdp11.opt (mbcopy): Remove.
4270 (mbcopy-builtin): Remove.
4271 (mbranch-cheap): Remove.
4272 (mbranch-expensive): Remove.
4273 * config/pdp11/predicates.md (expand_shift_operand): Update to
4274 match shift code generation.
4275 (ccnz_operator): New predicate.
4276 * doc/invoke.texi (PDP-11 Options): Remove deleted options
4277 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4278 Remove non-existent option -mabshi, -mno-abshi. Document mutually
4279 exclusive options.
4280 * doc/md.texi (PDP-11): Document new D and h constraints. Update
4281 description of O constraint.
4282
4283 2018-06-27 Jeff Law <law@redhat.com>
4284 Austin Law <austinklaw@gmail.com>
4285
4286 * config/v850/v850.md (addsi3_set_flags): New pattern.
4287 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4288 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4289 (zero_extendhisi2_v850_set_flags): Likewise.
4290 (zero_extendqisi2_v850_set_flags): Likewise.
4291 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4292 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4293 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4294
4295 * config/v850/v850-protos.h (notice_update_cc): Remove.
4296 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4297 (v850_print_operand): Handle 'D' and "d".
4298 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4299 Add handling of arithmetic/logical operations compared against zero.
4300 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4301 Do not look at v850_compare_op, instead get mode from last argument.
4302 (v850_gen_compare): Remove
4303 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4304 after reload for prologue insns.
4305 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4306 patterns.
4307 (construct_save_jarl): Likewise.
4308 (TARGET_FLAGS_REGNUM): Define.
4309 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4310 (NOTICE_UPDATE_CC): Remove.
4311 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4312 than cc0. Conditionalize on reload_completed.
4313 (cmpsi_insn, setfcc_insn): Likewise.
4314 (tst1 splitter): Turn into define_and_split which sets the flags
4315 after reload.
4316 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4317 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4318 (cstoresf4, cstoredf4): Clobber the flags.
4319 (cmpsi, cmpsf, cmpdf): Remove expanders.
4320 (setf_insn): Remove pattern.
4321 (addsi3): Turn into define_and_split which clobbers the flags after
4322 reload and a suitable pattern (addsi3_clobber_flags) for use after
4323 reload.
4324 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4325 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4326 (ashrsi3, ashrsi3_v850e2): Likewise.
4327 (bins): Clobber the flags.
4328 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4329 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4330 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4331 (call_value_internal_short, call_value_internal_long): Likewise.
4332 (callt_save_interrupt, callt_return_interrupt): Likewise.
4333 (save_interrupt, return_interrupt): Likewise.
4334 (callt_save_all_interrupt, save_all_interrupt): Likewise.
4335 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4336 (restore_all_interrupt, _restore_all_interrupt): Likewise.
4337 (All FP comparisons): Only allow after reload has completed.
4338 (trfsr): Likewise.
4339 (divh, divhu): Tweak output template.
4340 (branch_z_normal, branch_z_invert): Remove
4341 (branch_nz_normal, branch_nz_invert): Likewise.
4342 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4343
4344 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4345 * config/v850/v850.c (notice_update_cc): Remove.
4346 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
4347 (CC_NO_CARRY): Likewise.
4348 (NOTICE_UPDATE_CC): Define to nothing.
4349 * config/v850/v850.md: Remove block comment on cc0 handling
4350 Remove "cc" attribute from all patterns. Remove cc_status handling
4351 from all patterns. Minor formatting fixes.
4352
4353 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4354
4355 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4356 (cortex-a76.cortex-a55): Likewise.
4357 * config/aarch64/aarch64-tune.md: Regenerate.
4358 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4359 cortex-a76.cortex-a55.
4360
4361 2018-06-27 Jeff Law <law@redhat.com>
4362
4363 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4364 (MULTILIB_DIRNAMES): Similarly.
4365
4366 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
4367
4368 * gimple.h (gimple_return_retbnd): Delete.
4369 (gimple_return_set_retbnd): Likewise.
4370 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4371 gimple_return_set_retbnd.
4372 * gimple-pretty-print.c (dump_gimple_return): Remove call to
4373 gimple_return_retbnd and adjust.
4374 * tree-inline.h (struct copy_body_data): Remove retbnd field.
4375 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4376 Explicitly return NULL in a couple more cases. Move assertion
4377 on debug statements and remove unreachable code.
4378 (reset_debug_binding): Do not test id->retbnd.
4379 (expand_call_inline): Do not set it.
4380
4381 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4382
4383 * configure.ac: Add --disable-gcov option.
4384 * configure: Regenerate.
4385 * Makefile.in: Honour @enable_gcov@.
4386 * doc/install.texi: Document --disable-gcov.
4387
4388 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4389
4390 * config/arm/arm-cpus.in (cortex-a76): New entry.
4391 (cortex-a76.cortex-a55): Likewise.
4392 * config/arm/arm-tables.opt: Regenerate.
4393 * config/arm/arm-tune.md: Likewise.
4394 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4395 * doc/invoke.texi (ARM Options): Document cortex-a76 and
4396 cortex-a76.cortex-a55.
4397
4398 2018-06-27 Tamar Christina <tamar.christina@arm.com>
4399
4400 PR target/85769
4401 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4402
4403 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4404
4405 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4406 comment.
4407 (EPILOGUE_USES): Likewise.
4408
4409 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4410
4411 * tree-inline.c (remap_location): New function extracted from...
4412 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4413 (copy_phis_for_bb): ...here. Call remap_location.
4414 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4415
4416 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4417
4418 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4419 unaligned vsx for 16B memset.
4420
4421 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4422
4423 PR target/86285
4424 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4425 ieee128_float_type_node to long_double_type_node unless
4426 TARGET_LONG_DOUBLE_128 is set.
4427
4428 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4429
4430 * cfgloop.c (get_loop_location): Convert return type from
4431 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4432 by implicit construction from rtx_insn *, and using
4433 dump_user_location_t::from_function_decl for the fallback case.
4434 * cfgloop.h (get_loop_location): Convert return type from
4435 location_t to dump_user_location_t.
4436 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4437 dump_printf_loc to pass in a dump_location_t rather than a
4438 location_t, via the gimple stmt.
4439 * coverage.c (get_coverage_counts): Update calls to
4440 dump_printf_loc to pass in dump_location_t rather than a
4441 location_t.
4442 * doc/optinfo.texi (Dump types): Convert example of
4443 dump_printf_loc from taking "locus" to taking "insn". Update
4444 description of the "_loc" calls to cover dump_location_t.
4445 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4446 "selftest.h".
4447 (dump_user_location_t::dump_user_location_t): New constructors,
4448 from gimple *stmt and rtx_insn *.
4449 (dump_user_location_t::from_function_decl): New function.
4450 (dump_loc): Make static.
4451 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4452 const dump_location_t &.
4453 (dump_generic_expr_loc): Delete.
4454 (dump_printf_loc): Convert param "loc" from location_t to
4455 const dump_location_t &.
4456 (selftest::test_impl_location): New function.
4457 (selftest::dumpfile_c_tests): New function.
4458 * dumpfile.h: Include "profile-count.h".
4459 (class dump_user_location_t): New class.
4460 (struct dump_impl_location_t): New struct.
4461 (class dump_location_t): New class.
4462 (dump_printf_loc): Convert 2nd param from source_location to
4463 const dump_location_t &.
4464 (dump_generic_expr_loc): Delete.
4465 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4466 const dump_location_t &.
4467 * gimple-fold.c (fold_gimple_assign): Update call to
4468 dump_printf_loc to pass in a dump_location_t rather than a
4469 location_t, via the gimple stmt.
4470 (gimple_fold_call): Likewise.
4471 * gimple-loop-interchange.cc
4472 (loop_cand::analyze_iloop_reduction_var): Update for change to
4473 check_reduction_path.
4474 (tree_loop_interchange::interchange): Update for change to
4475 find_loop_location.
4476 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4477 change in return-type of find_loop_location.
4478 (graphite_regenerate_ast_isl): Likewise.
4479 * graphite-optimize-isl.c (optimize_isl): Likewise.
4480 * graphite.c (graphite_transform_loops): Likewise.
4481 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4482 pass in a dump_location_t rather than a location_t, via the
4483 gimple stmt.
4484 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4485 * ipa.c (walk_polymorphic_call_targets): Likewise.
4486 * loop-unroll.c (report_unroll): Convert "locus" param from
4487 location_t to dump_location_t.
4488 (decide_unrolling): Update for change to get_loop_location's
4489 return type.
4490 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4491 location_t to dump_user_location_t.
4492 (grid_find_single_omp_among_assignments_1): Updates calls to
4493 dump_printf_loc to pass in a dump_location_t rather than a
4494 location_t, via the gimple stmt.
4495 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4496 location_t to dump_location_t. Updates calls to dump_printf_loc
4497 to pass in a dump_location_t rather than a location_t, via the
4498 gimple stmt.
4499 (grid_inner_loop_gridifiable_p): Likewise.
4500 (grid_dist_follows_simple_pattern): Likewise.
4501 (grid_gfor_follows_tiling_pattern): Likewise.
4502 (grid_target_follows_gridifiable_pattern): Likewise.
4503 (grid_attempt_target_gridification): Convert initialization
4504 of local "grid" from memset to zero-initialization; FIXME: does
4505 this require C++11? Update call to dump_printf_loc to pass in a
4506 optinfo_location rather than a location_t, via the gimple stmt.
4507 * profile.c (read_profile_edge_counts): Updates call to
4508 dump_printf_loc to pass in a dump_location_t rather than a
4509 location_t
4510 (compute_branch_probabilities): Likewise.
4511 * selftest-run-tests.c (selftest::run_tests): Call
4512 dumpfile_c_tests.
4513 * selftest.h (dumpfile_c_tests): New decl.
4514 * tree-loop-distribution.c (pass_loop_distribution::execute):
4515 Update for change in return type of find_loop_location.
4516 * tree-parloops.c (parallelize_loops): Likewise.
4517 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4518 "locus" from location_t to dump_user_location_t.
4519 (canonicalize_loop_induction_variables): Likewise.
4520 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4521 for change in return type of find_loop_location.
4522 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4523 to dump_printf_loc to pass in a dump_location_t rather than a
4524 location_t, via the stmt.
4525 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4526 Likewise.
4527 * tree-vect-loop-manip.c (find_loop_location): Convert return
4528 type from source_location to dump_user_location_t.
4529 (vect_do_peeling): Update for above change.
4530 (vect_loop_versioning): Update for change in type of
4531 vect_location.
4532 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4533 from location_t to dump_user_location_t.
4534 (vect_estimate_min_profitable_iters): Update for change in type
4535 of vect_location.
4536 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4537 location_t to dump_location_t.
4538 (vect_slp_bb): Update for change in type of vect_location.
4539 * tree-vectorizer.c (vect_location): Convert from source_location
4540 to dump_user_location_t.
4541 (try_vectorize_loop_1): Update for change in vect_location's type.
4542 (vectorize_loops): Likewise.
4543 (increase_alignment): Likewise.
4544 * tree-vectorizer.h (vect_location): Convert from source_location
4545 to dump_user_location_t.
4546 (find_loop_location): Convert return type from source_location to
4547 dump_user_location_t.
4548 (check_reduction_path): Convert 1st param from location_t to
4549 dump_user_location_t.
4550 * value-prof.c (check_counter): Update call to dump_printf_loc to
4551 pass in a dump_user_location_t rather than a location_t; update
4552 call to error_at for change in type of "locus".
4553 (check_ic_target): Update call to dump_printf_loc to
4554 pass in a dump_user_location_t rather than a location_t, via the
4555 call_stmt.
4556
4557 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
4558
4559 * config/s390/s390.h (enum processor_flags): Do not use
4560 default tune parameter when -march was specified.
4561
4562 2018-06-26 Jakub Jelinek <jakub@redhat.com>
4563
4564 PR target/86314
4565 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4566 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4567 operands.
4568
4569 2018-06-26 Richard Biener <rguenther@suse.de>
4570
4571 PR tree-optimization/86287
4572 PR bootstrap/86316
4573 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4574 (vect_analyze_loop): Initialize n_stmts.
4575
4576 2018-06-26 Richard Biener <rguenther@suse.de>
4577
4578 PR middle-end/86271
4579 * fold-const.c (fold_convertible_p): Pointer extension
4580 isn't valid.
4581
4582 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4583
4584 PR debug/86064
4585 * dwarf2out.c (loc_list_has_views): Adjust comments.
4586 (dw_loc_list): Split single cross-partition range with
4587 nonzero locview.
4588
4589 2018-06-25 Jeff Law <law@redhat.com>
4590
4591 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4592 on -mbig-switch by default.
4593
4594 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4595 test.
4596 (const_float_0_operand): Remove unused predicate.
4597 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4598 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4599 (recipsf2): New expander. Original pattern now called
4600 (recipsf2_insn).
4601 (recipdf2, recipdf2_insn): Similarly.
4602 (rsqrtsf2, rsqrtsf2_insn): Similarly
4603 (rsqrtdf2, rsqrtdf2_insn): Similarly
4604
4605 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4606
4607 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4608 Simplify logic for FreeBSD (twice).
4609
4610 2018-06-25 Martin Sebor <msebor@redhat.com>
4611
4612 PR tree-optimization/86204
4613 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4614 a strnlen result if it's less than the length of the string.
4615
4616 2018-06-25 Martin Sebor <msebor@redhat.com>
4617
4618 PR tree-optimization/85700
4619 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4620 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4621 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4622
4623 2018-06-25 Martin Sebor <msebor@redhat.com>
4624
4625 * doc/extend.texi (Zero-length arrays): Update and clarify.
4626
4627 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4628
4629 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4630 added IEEE/IBM long double multilib support on PowerPC little
4631 endian Linux systems.
4632 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4633 (MULTILIB_DEFAULTS): Likewise.
4634 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4635 Likewise.
4636 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4637 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4638 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4639
4640 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4641
4642 PR middle-end/86311
4643 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4644 (REORDER_45): Likewise.
4645
4646 2018-06-25 Jeff Law <law@redhat.com>
4647
4648 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4649 dividend to 32 bits. Adjust length.
4650 (udivmodhi4): Cleanup output template. Fix length.
4651
4652 2018-06-25 Carl Love <cel@us.ibm.com>
4653
4654 * config/rs6000/vsx.md: Change word selector to prefered location.
4655
4656 2018-06-25 Richard Biener <rguenther@suse.de>
4657
4658 PR tree-optimization/86304
4659 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4660 epilogue-if-converted loops as well.
4661
4662 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4663
4664 * lto-section-out.c (lto_begin_section): Do not print section
4665 name for noaddr and unnumbered dumps.
4666
4667 2018-06-25 Richard Biener <rguenther@suse.de>
4668
4669 * tree-vectorizer.h (struct vec_info_shared): New structure
4670 with parts split out from struct vec_info and loop_nest from
4671 struct _loop_vec_info.
4672 (struct vec_info): Adjust accordingly.
4673 (struct _loop_vec_info): Likewise.
4674 (LOOP_VINFO_LOOP_NEST): Adjust.
4675 (LOOP_VINFO_DATAREFS): Likewise.
4676 (LOOP_VINFO_DDRS): Likewise.
4677 (struct _bb_vec_info): Likewise.
4678 (BB_VINFO_DATAREFS): Likewise.
4679 (BB_VINFO_DDRS): Likewise.
4680 (struct _stmt_vec_info): Add dr_aux member.
4681 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4682 (DR_MISALIGNMENT_UNINITIALIZED): New.
4683 (set_dr_misalignment): Adjust.
4684 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4685 (vect_analyze_loop): Adjust prototype.
4686 (vect_analyze_loop_form): Likewise.
4687 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4688 Compute dependences lazily.
4689 (vect_record_base_alignments): Use shared datarefs/ddrs.
4690 (vect_verify_datarefs_alignment): Likewise.
4691 (vect_analyze_data_refs_alignment): Likewise.
4692 (vect_analyze_data_ref_accesses): Likewise.
4693 (vect_analyze_data_refs): Likewise.
4694 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4695 constructor parameter for shared part.
4696 (vect_analyze_loop_form): Pass in shared part and adjust.
4697 (vect_analyze_loop_2): Pass in storage for the number of
4698 stmts. Move loop nest finding to the caller. Compute
4699 datarefs lazily.
4700 (vect_analyze_loop): Pass in shared part.
4701 (vect_transform_loop): Verify shared datarefs are unchanged.
4702 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4703 constructor parameter for shared part.
4704 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4705 (vect_slp_bb): Verify shared datarefs are unchanged before
4706 transform.
4707 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4708 change.
4709 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4710 DR_MISALIGNMENT_UNINITIALIZED.
4711 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4712 parameter for shared part.
4713 (vec_info::~vec_info): Adjust.
4714 (vec_info_shared::vec_info_shared): New.
4715 (vec_info_shared::~vec_info_shared): Likewise.
4716 (vec_info_shared::save_datarefs): Likewise.
4717 (vec_info_shared::check_datarefs): Likewise.
4718 (try_vectorize_loop_1): Construct shared part live for analyses
4719 of a single loop for multiple vector sizes.
4720 * tree-parloops.c (gather_scalar_reductions): Adjust.
4721
4722 2018-06-25 Richard Biener <rguenther@suse.de>
4723
4724 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4725 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4726 (vect_analyze_data_refs): Remove similar code from here and
4727 simplify accordingly.
4728
4729 2018-06-25 Richard Biener <rguenther@suse.de>
4730
4731 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4732 for reverse storage order accesses rather than asserting
4733 they cannot happen here.
4734
4735 2018-06-25 Tom de Vries <tdevries@suse.de>
4736
4737 PR debug/86257
4738 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4739 Use data16 instead of .byte for insn prefix.
4740
4741 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4742
4743 PR C++/86082
4744 * parser.c (make_char_string_pack): Pass this literal chars
4745 through cpp_interpret_string.
4746 (cp_parser_userdef_numeric_literal): Check the result of
4747 make_char_string_pack.
4748
4749 2018-06-24 Maya Rashish <coypu@sdf.org>
4750
4751 * ginclude/stddef.h: Simplify conditions around avoiding
4752 re-definition of __size_t.
4753
4754 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4755
4756 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4757 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4758
4759 2018-06-22 Maya Rashish <coypu@sdf.org>
4760
4761 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4762 made to OpenBSD and NetBSD through the years.
4763
4764 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4765
4766 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4767 behavior of vec_pack (vector double, vector double) to match
4768 behavior of vec_float2 (vector double, vector double).
4769
4770 2018-06-22 Olivier Hainque <hainque@adacore.com>
4771
4772 * gimplify.c (gimplify_function_tree): Prevent creation
4773 of a trampoline for the address of the current function
4774 passed to entry/exit instrumentation hooks.
4775
4776 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4777
4778 PR target/86222
4779 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4780 correctly.
4781
4782 2018-06-22 Martin Liska <mliska@suse.cz>
4783
4784 PR tree-optimization/86263
4785 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4786 Bail out if is_enabled is false.
4787 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4788 New declaration.
4789 (jump_table_cluster::is_enabled): New function.
4790
4791 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4792
4793 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4794 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4795 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4796 (lto_input_ts_binfo_tree_pointers): Likewise.
4797 * tree-streamer-out.c (streamer_write_tree_bitfields,
4798 write_ts_binfo_tree_pointers): Likewise.
4799 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4800
4801 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4802
4803 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4804
4805 2018-06-22 Martin Liska <mliska@suse.cz>
4806
4807 * symbol-summary.h (get): Make it pure and inline move
4808 functionality from ::get function.
4809 (get): Remove and inline into ::get and ::get_create.
4810 (get_create): Move code from ::get function.
4811
4812 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4813
4814 PR target/85994
4815 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4816 -x assembler-with-cpp.
4817
4818 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4819
4820 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4821 _FILE_OFFSET_BITS=64 for C++.
4822
4823 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4824
4825 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4826 conversion insn that shows up when pr85657-3.c is compiled using
4827 IEEE 128-bit long double.
4828 (neg<mode>2_internal): Use the correct mode to check whether the
4829 mode is IBM extended.
4830 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4831 multiply and divide external functions from being created more
4832 than once.
4833
4834 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4835
4836 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4837 functions.
4838 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4839 the edge can be forwarded.
4840 (cfg_layout_merge_blocks): Likewise.
4841
4842 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4843
4844 * except.c (finish_eh_generation): Commit edge insertions only after
4845 the EH edges have been redirected from post-landing to landing pads.
4846
4847 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4848
4849 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4850 create_tmp_var_for to create the FRAME decl.
4851 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4852
4853 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4854
4855 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4856 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4857 debug statement when resetting its value.
4858 (expand_call_inline): Copy the locus of the call onto the assignment
4859 of the return value, if any. Use local variable in more cases.
4860
4861 2018-06-21 Martin Liska <mliska@suse.cz>
4862
4863 * ipa-pure-const.c (propagate_nothrow): Use
4864 funct_state_summaries->get.
4865 (dump_malloc_lattice): Likewise.
4866 (propagate_malloc): Likewise.
4867
4868 2018-06-21 Richard Biener <rguenther@suse.de>
4869
4870 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4871 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4872 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4873 comment.
4874 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4875 BLOCK_ABSTRACT_ORIGIN unconditionally.
4876
4877 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4878
4879 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4880 deleting it.
4881 * ipa-reference.c (ipa_reference_c_finalize): Delete
4882 ipa_ref_opt_sum_summaries and set it to NULL.
4883
4884 2018-06-21 Tom de Vries <tdevries@suse.de>
4885
4886 PR tree-optimization/85859
4887 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4888 test with comment from bb_no_side_effects_p.
4889
4890 2018-06-21 Richard Biener <rguenther@suse.de>
4891
4892 PR tree-optimization/86232
4893 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4894 max for constant niter.
4895
4896 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4897
4898 * config/aarch64/aarch64-simd.md
4899 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4900
4901 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4902
4903 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4904 Make opernads of the unspec commutative.
4905
4906 2018-06-21 Richard Biener <rguenther@suse.de>
4907
4908 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4909 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4910 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4911 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4912 NULL DR_STEP.
4913 (vect_record_base_alignments): Do not record base alignment
4914 for gathers or scatters.
4915 (vect_compute_data_ref_alignment): Drop return value that is always
4916 true. Bail out early for gathers or scatters.
4917 (vect_enhance_data_refs_alignment): Bail out early for gathers
4918 or scatters.
4919 (vect_find_same_alignment_drs): Likewise.
4920 (vect_analyze_data_refs_alignment): Remove dead code.
4921 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4922 (vect_analyze_data_refs): For possible gathers or scatters do
4923 not create an alternate DR, just check their possible validity
4924 and mark them. Adjust DECL_NONALIASED handling to not rely
4925 on DR_BASE_ADDRESS.
4926 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4927 update inits of gathers or scatters.
4928 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4929 Also copy gather/scatter flag to pattern vinfo.
4930
4931 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4932
4933 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4934 behavior of vec_packsu (vector unsigned long long, vector unsigned
4935 long long) to match behavior of vec_packs with same signature.
4936
4937 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4938 Thomas Schwinge <thomas@codesourcery.com>
4939 Cesar Philippidis <cesar@codesourcery.com>
4940
4941 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4942 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4943 (gimplify_adjust_omp_clauses): Likewise.
4944 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4945 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4946 (gimplify_omp_target_update): Update handling of acc update and
4947 enter/exit data.
4948 * omp-low.c (install_var_field): Remove unused parameter
4949 base_pointers_restrict.
4950 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4951 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4952 FINALIZE}
4953 (omp_target_base_pointers_restrict_p): Delete.
4954 (scan_omp_target): Update call to scan_sharing_clauses.
4955 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4956 FINALIZE}.
4957 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4958 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4959 (convert_local_omp_clauses): Likewise.
4960 * tree-pretty-print.c (dump_omp_clause): Likewise.
4961 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4962 FINALIZE}.
4963 (omp_clause_code_name): Likewise.
4964
4965 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4966
4967 PR debug/86194
4968 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4969 be narrowed.
4970
4971 PR tree-optimization/86231
4972 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4973 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4974
4975 2018-06-20 Tom de Vries <tdevries@suse.de>
4976
4977 PR tree-optimization/86097
4978 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4979 iv type if signedness of iv type is not the same as that of *nit.
4980
4981 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4982
4983 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4984 EDGE_EH edges, verify they are all EDGE_EH.
4985
4986 2018-06-20 Maya Rashish <coypu@sdf.org>
4987
4988 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4989
4990 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4991
4992 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4993 * config/aarch64/aarch64.c (xgene1_tunings): Add
4994 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4995 (aarch64_mode_valid_for_sched_fusion_p):
4996 Allow 16-byte modes.
4997 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4998 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4999 128-bit modes.
5000 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5001 New pattern.
5002 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5003 * config/aarch64/iterators.md (VQ2): New mode iterator.
5004
5005 2018-06-20 Martin Liska <mliska@suse.cz>
5006
5007 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5008 Change default ratio from 10 to 8.
5009
5010 2018-06-20 Martin Liska <mliska@suse.cz>
5011
5012 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5013 New.
5014 (bit_test_cluster::find_bit_tests): Likewise.
5015 (switch_decision_tree::analyze_switch_statement): Find clusters.
5016 * tree-switch-conversion.h (struct jump_table_cluster): Document
5017 hierarchy.
5018
5019 2018-06-20 Martin Liska <mliska@suse.cz>
5020
5021 * tree-switch-conversion.c (switch_conversion::collect):
5022 Record m_uniq property.
5023 (switch_conversion::expand): Bail out for special conditions.
5024 (group_cluster::~group_cluster): New.
5025 (group_cluster::group_cluster): Likewise.
5026 (group_cluster::dump): Likewise.
5027 (jump_table_cluster::emit): New.
5028 (switch_decision_tree::fix_phi_operands_for_edges): New.
5029 (struct case_node): Remove struct.
5030 (jump_table_cluster::can_be_handled): New.
5031 (case_values_threshold): Moved to header.
5032 (reset_out_edges_aux): Likewise.
5033 (jump_table_cluster::is_beneficial): New.
5034 (bit_test_cluster::can_be_handled): Likewise.
5035 (add_case_node): Remove.
5036 (bit_test_cluster::is_beneficial): New.
5037 (case_bit_test::cmp): New.
5038 (bit_test_cluster::emit): New.
5039 (expand_switch_as_decision_tree_p): Remove.
5040 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5041 (fix_phi_operands_for_edge): Likewise.
5042 (switch_decision_tree::analyze_switch_statement): New.
5043 (compute_cases_per_edge): Move ...
5044 (switch_decision_tree::compute_cases_per_edge): ... here.
5045 (try_switch_expansion): Likewise.
5046 (switch_decision_tree::try_switch_expansion): Likewise.
5047 (record_phi_operand_mapping): Likewise.
5048 (switch_decision_tree::record_phi_operand_mapping): Likewise.
5049 (emit_case_decision_tree): Likewise.
5050 (switch_decision_tree::emit): Likewise.
5051 (balance_case_nodes): Likewise.
5052 (switch_decision_tree::balance_case_nodes): Likewise.
5053 (dump_case_nodes): Likewise.
5054 (switch_decision_tree::dump_case_nodes): Likewise.
5055 (emit_jump): Likewise.
5056 (switch_decision_tree::emit_jump): Likewise.
5057 (emit_cmp_and_jump_insns): Likewise.
5058 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5059 (emit_case_nodes): Likewise.
5060 (switch_decision_tree::emit_case_nodes): Likewise.
5061 (conditional_probability): Remove.
5062 * tree-switch-conversion.h (enum cluster_type): New.
5063 (PRINT_CASE): New.
5064 (struct cluster): Likewise.
5065 (cluster::cluster): Likewise.
5066 (struct simple_cluster): Likewise.
5067 (simple_cluster::simple_cluster): Likewise.
5068 (struct group_cluster): Likewise.
5069 (struct jump_table_cluster): Likewise.
5070 (struct bit_test_cluster): Likewise.
5071 (struct min_cluster_item): Likewise.
5072 (struct case_tree_node): Likewise.
5073 (case_tree_node::case_tree_node): Likewise.
5074 (jump_table_cluster::case_values_threshold): Likewise.
5075 (struct case_bit_test): Likewise.
5076 (struct switch_decision_tree): Likewise.
5077 (struct switch_conversion): Likewise.
5078 (switch_decision_tree::reset_out_edges_aux): Likewise.
5079
5080 2018-06-20 Martin Liska <mliska@suse.cz>
5081
5082 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5083 (hoist_edge_and_branch_if_true): Likewise.
5084 (expand_switch_using_bit_tests_p): Likewise.
5085 (struct case_bit_test): Likewise.
5086 (case_bit_test_cmp): Likewise.
5087 (emit_case_bit_tests): Likewise.
5088 (switch_conversion::switch_conversion): New class.
5089 (struct switch_conv_info): Remove old struct.
5090 (collect_switch_conv_info): More to ...
5091 (switch_conversion::collect): ... this.
5092 (check_range): Likewise.
5093 (switch_conversion::check_range): Likewise.
5094 (check_all_empty_except_final): Likewise.
5095 (switch_conversion::check_all_empty_except_final): Likewise.
5096 (check_final_bb): Likewise.
5097 (switch_conversion::check_final_bb): Likewise.
5098 (create_temp_arrays): Likewise.
5099 (switch_conversion::create_temp_arrays): Likewise.
5100 (free_temp_arrays): Likewise.
5101 (gather_default_values): Likewise.
5102 (switch_conversion::gather_default_values): Likewise.
5103 (build_constructors): Likewise.
5104 (switch_conversion::build_constructors): Likewise.
5105 (constructor_contains_same_values_p): Likewise.
5106 (switch_conversion::contains_same_values_p): Likewise.
5107 (array_value_type): Likewise.
5108 (switch_conversion::array_value_type): Likewise.
5109 (build_one_array): Likewise.
5110 (switch_conversion::build_one_array): Likewise.
5111 (build_arrays): Likewise.
5112 (switch_conversion::build_arrays): Likewise.
5113 (gen_def_assigns): Likewise.
5114 (switch_conversion::gen_def_assigns): Likewise.
5115 (prune_bbs): Likewise.
5116 (switch_conversion::prune_bbs): Likewise.
5117 (fix_phi_nodes): Likewise.
5118 (switch_conversion::fix_phi_nodes): Likewise.
5119 (gen_inbound_check): Likewise.
5120 (switch_conversion::gen_inbound_check): Likewise.
5121 (process_switch): Use the newly created class.
5122 (switch_conversion::expand): New.
5123 (switch_conversion::~switch_conversion): New.
5124 * tree-switch-conversion.h: New file.
5125
5126 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5127
5128 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5129 tree-vect-patterns.c.
5130 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5131 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
5132 (vect_recog_sad_pattern): Likewise.
5133 (vect_recog_widen_sum_pattern): Likewise.
5134 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
5135 (vect_recog_widen_shift_pattern): Remove the type_in argument.
5136 (vect_recog_rotate_pattern): Likewise.
5137 (vect_recog_mult_pattern): Likewise.
5138 (vect_recog_vector_vector_shift_pattern): Likewise.
5139 (vect_recog_divmod_pattern): Likewise.
5140 (vect_recog_mixed_size_cond_pattern): Likewise.
5141 (vect_recog_bool_pattern): Likewise.
5142 (vect_recog_mask_conversion_pattern): Likewise.
5143 (vect_try_gather_scatter_pattern): Likewise.
5144 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
5145 (vect_recog_over_widening_pattern): Likewise.
5146 (vect_recog_gather_scatter_pattern): Likewise.
5147 (vect_recog_func_ptr): Move from tree-vectorizer.h
5148 (vect_vect_recog_func_ptrs): Move further down the file.
5149 (vect_recog_func): Likewise. Remove the third argument.
5150 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5151 (vect_pattern_recog_1): Expect the pattern function to do any
5152 necessary target tests. Also expect it to provide a vector type.
5153 Remove the type_in handling.
5154
5155 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5156
5157 * tree-vect-patterns.c (vect_pattern_detected): New function.
5158 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5159 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5160 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5161 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5162 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5163 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5164 (vect_recog_mask_conversion_pattern)
5165 (vect_try_gather_scatter_pattern): Likewise.
5166
5167 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5168
5169 * tree-vect-patterns.c (vect_get_internal_def): New function.
5170 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5171 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5172 (search_type_for_mask_1): Use it.
5173
5174 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5175
5176 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5177 redundant WIDEN_SUM_EXPR handling.
5178 (vect_recog_sad_pattern): Likewise.
5179
5180 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5181
5182 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5183 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5184 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5185 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5186 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5187
5188 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5189
5190 * tree-vect-stmts.c (vectorizable_call): Make sure that we
5191 use the stmt_vec_info of the original bb statement for the
5192 new zero assignment, even if the call is part of a pattern.
5193
5194 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5195
5196 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5197 that the sequence is attached to the original statement rather
5198 than the pattern statement.
5199 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5200 PATTERN_DEF_SEQ from the original statement rather than
5201 the main pattern statement.
5202 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5203 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5204 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5205
5206 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5207
5208 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5209 definition statements before the early exit for statements that aren't
5210 live or relevant.
5211 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5212 split out from...
5213 (vect_transform_loop): ...here. Process pattern definition
5214 statements without first checking whether the main pattern
5215 statement is live or relevant.
5216
5217 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5218
5219 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5220 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5221
5222 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
5223
5224 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5225 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5226 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5227 (expand_block_compare): Change select_block_compare_mode call.
5228 (expand_strncmp_align_check): Use new functions, fix comment.
5229 (emit_final_str_compare_gpr): New function.
5230 (expand_strn_compare): Refactor and clean up code.
5231 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5232
5233 2018-06-19 Tony Reix <tony.reix@atos.com>
5234 Damien Bergamini <damien.bergamini@atos.com>
5235 David Edelsohn <dje.gcc@gmail.com>
5236
5237 * collect2.c (static_obj): New variable.
5238 (static_libs): New variable.
5239 (is_in_list): Uncomment declaration.
5240 (main): Track AIX libraries linked statically.
5241 (is_in_list): Uncomment definition.
5242 (scan_prog_file): Don't add AIX shared libraries initializer
5243 to constructor list if linking statically.
5244
5245 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
5246
5247 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5248 constant.
5249 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5250
5251 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
5252
5253 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5254 blocks.
5255
5256 2018-06-19 Martin Liska <mliska@suse.cz>
5257
5258 * config/i386/i386.c (ix86_can_inline_p): Do not use
5259 ipa_fn_summaries::get_create.
5260 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5261 get.
5262 (devirtualization_time_bonus): Likewise.
5263 (ipcp_propagate_stage): Likewise.
5264 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5265 (edge_set_predicate): Likewise.
5266 (evaluate_conditions_for_known_args): Likewise.
5267 (evaluate_properties_for_edge): Likewise.
5268 (ipa_call_summary::reset): Tranform to ...
5269 (ipa_call_summary::~ipa_call_summary): ... this.
5270 (ipa_fn_summary::reset): Transform to ...
5271 (ipa_fn_summary::~ipa_fn_summary): ... this.
5272 (ipa_fn_summary_t::remove): Rename to ...
5273 (ipa_fn_summary_t::remove_callees): ... this.
5274 (ipa_fn_summary_t::duplicate): Use placement new
5275 instead of memory copy.
5276 (ipa_call_summary_t::duplicate): Likewise.
5277 (ipa_call_summary_t::remove): Remove.
5278 (dump_ipa_call_summary): Change get_create to get.
5279 (ipa_dump_fn_summary): Dump only when summary exists.
5280 (analyze_function_body): Use symbol_summary::get instead
5281 of get_create.
5282 (compute_fn_summary): Likewise.
5283 (estimate_edge_devirt_benefit): Likewise.
5284 (estimate_edge_size_and_time): Likewise.
5285 (inline_update_callee_summaries): Likewise.
5286 (remap_edge_change_prob): Likewise.
5287 (remap_edge_summaries): Likewise.
5288 (ipa_merge_fn_summary_after_inlining): Likewise.
5289 (write_ipa_call_summary): Likewise.
5290 (ipa_fn_summary_write): Likewise.
5291 (ipa_free_fn_summary): Likewise.
5292 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5293 (struct ipa_call_summary): Likewise.
5294 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5295 of get_create.
5296 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5297 (estimate_size_after_inlining): Likewise.
5298 (estimate_growth): Likewise.
5299 (growth_likely_positive): Likewise.
5300 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5301 (inline_call): Likewise.
5302 * ipa-inline.c (caller_growth_limits): Likewise.
5303 (can_inline_edge_p): Likewise.
5304 (can_inline_edge_by_limits_p): Likewise.
5305 (compute_uninlined_call_time): Likewise.
5306 (compute_inlined_call_time): Likewise.
5307 (want_inline_small_function_p): Likewise.
5308 (edge_badness): Likewise.
5309 (update_caller_keys): Likewise.
5310 (update_callee_keys): Likewise.
5311 (inline_small_functions): Likewise.
5312 (inline_to_all_callers_1): Likewise.
5313 (dump_overall_stats): Likewise.
5314 (early_inline_small_functions): Likewise.
5315 (early_inliner): Likewise.
5316 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5317 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5318 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5319 * ipa-split.c (execute_split_functions): Likewise.
5320 * symbol-summary.h: Likewise.
5321 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5322
5323 2018-06-19 Richard Biener <rguenther@suse.de>
5324
5325 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5326 (vectorize_loops): ... here. Fix dbgcnt handling.
5327 (try_vectorize_loop): Wrap try_vectorize_loop_1.
5328
5329 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
5330
5331 PR target/86197
5332 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5333 ieee128 argument takes up only one (vector) register, not two (floating
5334 point) registers.
5335
5336 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5337
5338 * gimplify.c (gimplify_init_constructor): Really never clear for an
5339 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5340
5341 2018-06-19 Richard Biener <rguenther@suse.de>
5342
5343 PR tree-optimization/86179
5344 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5345 after failed recognition.
5346
5347 2018-06-18 Martin Sebor <msebor@redhat.com>
5348
5349 PR middle-end/85602
5350 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5351 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5352 Handle integer subtraction.
5353 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5354 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5355
5356 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5357
5358 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5359 param from rtx to rtx_insn *.
5360 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5361 param.
5362 (frv_ifcvt_modify_insn): Likwise.
5363 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5364 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
5365 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5366 as_a <rtx_insn *> cast to local "unprotected_region" once
5367 it's been established that it's not NULL or pc_rtx.
5368 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5369 param "sethi" from rtx to rtx_insn *.
5370 (nds32_group_float_insns): Likewise for param "insn".
5371 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5372 param.
5373 (vax_output_int_subtract): Likewise.
5374 * config/vax/vax.c (vax_output_int_add): Likewise for param
5375 "insn".
5376 (vax_output_int_subtract): Likewise.
5377 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5378 (emit_pattern_after): Likewise for param "after".
5379 (emit_insn_after): Likewise.
5380 (emit_jump_insn_after): Likewise.
5381 (emit_call_insn_after): Likewise.
5382 (emit_debug_insn_after): Likewise.
5383 (emit_pattern_before): Likewise for param "before".
5384 (emit_insn_before): Likewise.
5385 (emit_jump_insn_before): Likewise.
5386 * final.c (get_insn_template): Likewise for param "insn", removing
5387 a cast.
5388 * output.h (get_insn_template): Likewise for 2nd param.
5389 * rtl.h (emit_insn_before): Likewise.
5390 (emit_jump_insn_before): Likewise.
5391 (emit_debug_insn_before_noloc): Likewise.
5392 (emit_insn_after): Likewise.
5393 (emit_jump_insn_after): Likewise.
5394 (emit_call_insn_after): Likewise.
5395 (emit_debug_insn_after): Likewise.
5396 (set_insn_deleted): Likewise for param.
5397
5398 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
5399
5400 PR target/85358
5401 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5402 floating point modes, so that IFmode is numerically greater than
5403 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5404 to declare the ordering. This prevents IFmode from being
5405 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5406 machine. Include rs6000-modes.h to share the fractional values
5407 between genmodes* and the rest of the compiler.
5408 (IFmode): Likewise.
5409 (KFmode): Likewise.
5410 (TFmode): Likewise.
5411 * config/rs6000/rs6000-modes.h: New file.
5412 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5413 meaning of rs6000_long_double_size so that 126..128 selects an
5414 appropriate 128-bit floating point type.
5415 (rs6000_option_override_internal): Likewise.
5416 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5417 (TARGET_LONG_DOUBLE_128): Change the meaning of
5418 rs6000_long_double_size so that 126..128 selects an appropriate
5419 128-bit floating point type.
5420 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5421 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5422 source and destination to match the standard usage.
5423 (truncifkf2): Likewise.
5424 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5425 ISA 2.07 to use an explicit clobber, instead of passing in a
5426 temporary.
5427 (copysign<mode>3_soft): Likewise.
5428
5429 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5430
5431 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5432 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5433 (vect_slp_analyze_instance_dependence): Likewise.
5434 (vect_enhance_data_refs_alignment): Likewise.
5435 (vect_analyze_data_refs_alignment): Likewise.
5436 (vect_slp_analyze_and_verify_instance_alignment
5437 (vect_analyze_data_ref_accesses): Likewise.
5438 (vect_prune_runtime_alias_test_list): Likewise.
5439 (vect_analyze_data_refs): Likewise.
5440 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5441 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5442 (vect_analyze_scalar_cycles_1): Likewise.
5443 (vect_get_loop_niters): Likewise.
5444 (vect_analyze_loop_form_1): Likewise.
5445 (vect_update_vf_for_slp): Likewise.
5446 (vect_analyze_loop_operations): Likewise.
5447 (vect_analyze_loop): Likewise.
5448 (vectorizable_induction): Likewise.
5449 (vect_transform_loop): Likewise.
5450 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5451 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5452 (vect_make_slp_decision): Likewise.
5453 (vect_detect_hybrid_slp): Likewise.
5454 (vect_slp_analyze_operations): Likewise.
5455 (vect_slp_bb): Likewise.
5456 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5457 (vectorizable_bswap): Likewise.
5458 (vectorizable_call): Likewise.
5459 (vectorizable_simd_clone_call): Likewise.
5460 (vectorizable_conversion): Likewise.
5461 (vectorizable_assignment): Likewise.
5462 (vectorizable_shift): Likewise.
5463 (vectorizable_operation): Likewise.
5464 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5465
5466 2018-06-18 Martin Sebor <msebor@redhat.com>
5467
5468 PR tree-optimization/81384
5469 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5470 * builtins.c (expand_builtin_strnlen): New function.
5471 (expand_builtin): Call it.
5472 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5473 * builtins.def (BUILT_IN_STRNLEN): New.
5474 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5475 Warn for bounds in excess of maximum object size.
5476 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5477 single-value ranges. Handle strnlen.
5478 (handle_builtin_strlen): Handle strnlen.
5479 (strlen_check_and_optimize_stmt): Same.
5480 * doc/extend.texi (Other Builtins): Document strnlen.
5481
5482 2018-06-18 Maya Rashish <coypu@sdf.org>
5483
5484 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5485 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5486 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5487
5488 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5489 here to ...
5490 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5491
5492 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5493
5494 * tree.c (escaped_string::escape): Replace cast to char * by
5495 const_cast<char *> (unescaped).
5496
5497 2018-06-18 Nick Clifton <nickc@redhat.com>
5498
5499 PR 84195
5500 * tree.c (escaped_string): New class. Converts an unescaped
5501 string into its escaped equivalent.
5502 (warn_deprecated_use): Use the new class to convert the
5503 deprecation message, if present.
5504 (test_escaped_strings): New self test.
5505 (test_c_tests): Add test_escaped_strings.
5506 * doc/extend.texi (deprecated): Add a note that the
5507 deprecation message is affected by the -fmessage-length
5508 option, and that control characters will be escaped.
5509 (#pragma GCC error): Document this pragma.
5510 (#pragma GCC warning): Likewise.
5511 * doc/invoke.texi (-fmessage-length): Document this option's
5512 effect on the #warning and #error preprocessor directives and
5513 the deprecated attribute.
5514
5515 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5516
5517 * tree.c (decl_value_expr_lookup): Revert latest change.
5518 (decl_value_expr_insert): Likewise.
5519
5520 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
5521
5522 * gimplify.c (nonlocal_vlas): Delete.
5523 (nonlocal_vla_vars): Likewise.
5524 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5525 referenced VLAs.
5526 (gimplify_body): Do not create and destroy nonlocal_vlas.
5527 * tree-nested.c: Include diagnostic.h.
5528 (use_pointer_in_frame): Tweak.
5529 (lookup_field_for_decl): Add assertion and declare the transformation.
5530 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5531 internal error when the reference is in a wrong context. Do not
5532 create a debug decl by default.
5533 (note_nonlocal_block_vlas): Delete.
5534 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5535 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
5536 create a debug decl by default.
5537 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5538 call is in a wrong context.
5539 (fixup_vla_decls): New function.
5540 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
5541 debug variables were created.
5542 * tree.c (decl_value_expr_lookup): Add checking assertion.
5543 (decl_value_expr_insert): Likewise.
5544
5545 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5546
5547 PR middle-end/82479
5548 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5549 * tree-scalar-evolution.c (interpret_expr): Likewise.
5550 (expression_expensive_p): Likewise.
5551 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5552 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5553 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5554 (ssa_defined_by_minus_one_stmt_p): New.
5555
5556 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5557
5558 PR middle-end/64946
5559 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5560 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5561 * dojump.c (do_jump): Likewise.
5562 * expr.c (expand_expr_real_2): Check operand type's sign.
5563 * fold-const.c (const_unop): Handle ABSU_EXPR.
5564 (fold_abs_const): Likewise.
5565 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5566 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5567 (strip_sign_op_1): Likesise.
5568 * match.pd: Add new pattern to generate ABSU_EXPR.
5569 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5570 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5571 * tree-eh.c (operation_could_trap_helper_p): Likewise.
5572 * tree-inline.c (estimate_operator_cost): Likewise.
5573 * tree-pretty-print.c (dump_generic_node): Likewise.
5574 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5575 * tree.def (ABSU_EXPR): New.
5576
5577 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5578
5579 PR middle-end/86095
5580 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5581 documented as preserved for backward compatibility only.
5582 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5583
5584 PR rtl-optimization/86108
5585 * bb-reorder.c (create_forwarder_block): Renamed to ...
5586 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5587 jump from new landing pad to the second part.
5588 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5589 Adjust callers.
5590
5591 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5592
5593 PR middle-end/85878
5594 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5595 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5596 Only call store_expr for halves if the mode is the same.
5597
5598 PR middle-end/86123
5599 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5600 Fix up comment formatting.
5601
5602 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5603
5604 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5605 (typed_splay_tree::closure,
5606 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5607 (typed_splay_tree::typed_splay_tree,
5608 typed_splay_tree::operator =): Declared private.
5609 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5610 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5611 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5612 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5613 typed_splay_tree::splay_tree_splay,
5614 typed_splay_tree::splay_tree_foreach_helper,
5615 typed_splay_tree::splay_tree_insert,
5616 typed_splay_tree::splay_tree_remove,
5617 typed_splay_tree::splay_tree_lookup,
5618 typed_splay_tree::splay_tree_predecessor,
5619 typed_splay_tree::splay_tree_successor,
5620 typed_splay_tree::splay_tree_min,
5621 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5622 (typed_splay_tree::root, typed_splay_tree::comp,
5623 typed_splay_tree::delete_key,
5624 typed_splay_tree::delete_value): New data members.
5625 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5626 typed_splay_tree::remove.
5627
5628 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5629
5630 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5631 -mginv and -mno-ginv to the assembler.
5632 * config/mips/mips.opt (-mcrc): New option.
5633 (-mginv): Likewise.
5634 * doc/invoke.text (-mcrc): Document.
5635 (-mginv): Likewise.
5636
5637 2018-06-15 Nick Clifton <nickc@redhat.com>
5638
5639 PR 84195
5640 * tree.c (escaped_string): New class. Converts an unescaped
5641 string into its escaped equivalent.
5642 (warn_deprecated_use): Use the new class to convert the
5643 deprecation message, if present.
5644 (test_escaped_strings): New self test.
5645 (test_c_tests): Add test_escaped_strings.
5646 * doc/extend.texi (deprecated): Add a note that the
5647 deprecation message is affected by the -fmessage-length
5648 option, and that control characters will be escaped.
5649 (#pragma GCC error): Document this pragma.
5650 (#pragma GCC warning): Likewise.
5651 * doc/invoke.texi (-fmessage-length): Document this option's
5652 effect on the #warning and #error preprocessor directives and
5653 the deprecated attribute.
5654
5655 2018-06-15 Richard Biener <rguenther@suse.de>
5656
5657 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5658 here, also noting vector size used.
5659 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5660 size used in MSG_OPTIMIZED_LOCATIONS dump.
5661 (pass_slp_vectorize::execute): Adjust.
5662
5663 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5664
5665 PR target/85968
5666 * config/arc/arc.c (arc_return_address_register): Fix
5667 if-condition.
5668
5669 2018-06-15 Richard Biener <rguenther@suse.de>
5670
5671 PR middle-end/86159
5672 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5673 leave useless conversion stripping to force_gimple_operand_gsi.
5674 (gimplify_build2): Likewise.
5675 (gimplify_build1): Likewise.
5676
5677 2018-06-15 Richard Biener <rguenther@suse.de>
5678
5679 PR middle-end/86076
5680 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5681 before adjusting their block.
5682
5683 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5684
5685 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5686 multilibs for *-*-rtems*.
5687 * config/riscv/t-rtems: New file.
5688
5689 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5690
5691 PR middle-end/86122
5692 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5693 unsigned_type_for returns NULL.
5694
5695 PR target/85945
5696 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5697 subregs of multi-word pseudos unless the float mode has word size.
5698
5699 2018-06-14 Richard Biener <rguenther@suse.de>
5700
5701 PR middle-end/86139
5702 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5703 duplicate and harmful type_hash_canon.
5704 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5705
5706 2018-06-14 Richard Biener <rguenther@suse.de>
5707
5708 PR ipa/86124
5709 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5710 NULL cgraph_node.
5711
5712 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5713
5714 * config/rtems.h (STDINT_LONG32): Define.
5715
5716 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5717 Prachi Godbole <prachi.godbole@imgtec.com>
5718
5719 * config/mips/mips-cpus.def: Define P6600.
5720 * config/mips/mips-tables.opt: Regenerate.
5721 * config/mips/mips.c (mips_ucbranch_type): New enum.
5722 (mips_rtx_cost_data): Add support for P6600.
5723 (mips_issue_rate): Likewise.
5724 (mips_multipass_dfa_lookahead): Likewise.
5725 (mips_avoid_hazard): Likewise.
5726 (mips_reorg_process_insns): Likewise.
5727 (mips_classify_branch_p6600): New function.
5728 * config/mips/mips.h (TUNE_P6600): New define.
5729 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5730 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5731 * config/mips/mips.md: Include p6600.md.
5732 (processor): Add p6600.
5733 * config/mips/p6600.md: New file.
5734 * doc/invoke.texi: Add p6600 to supported architectures.
5735
5736 2018-06-13 Martin Sebor <msebor@redhat.com>
5737
5738 PR tree-optimization/86114
5739 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5740 of integer types.
5741 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5742
5743 2018-06-13 Richard Biener <rguenther@suse.de>
5744
5745 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5746 Properly set vector type of the intermediate stmt.
5747 * tree-vect-stmts.c (vectorizable_operation): The destination
5748 var always has vectype_out type.
5749
5750 2018-06-13 Jeff Law <law@redhat.com>
5751
5752 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5753 integer 0 for argument to print_rtl_with_bb.
5754 (rl78_reorg): Likewise.
5755
5756 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5757
5758 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5759 from rtx to rtx_insn *.
5760 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5761 "label".
5762 (add_sched_insns_for_speculation): Likewise for local "target",
5763 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5764 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5765 from rtx_insn ** to rtx_code_label **.
5766 (reorg_emit_nops): Likewise.
5767 (c6x_reorg): Likewise for local "call_labels".
5768 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5769 rtx to rtx_insn *.
5770 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5771 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5772 the loops over LABEL_REFS.
5773 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5774 braf_label.
5775 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5776 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5777 (split_branches): Strengthen local "olabel" from rtx to
5778 rtx_insn *, adding a safe_as_a cast.
5779 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5780 to "rtx_insn *".
5781 (add_insn_after): Likewise for first two params.
5782 (add_insn_before): Likewise.
5783 (remove_insn): Likewise for param.
5784 (emit_pattern_before_noloc): Likewise for second and third params.
5785 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5786 (emit_call_insn_before_noloc): Likewise.
5787 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5788 to "rtx_insn *".
5789 (emit_barrier_before): Likewise.
5790 (emit_label_before): Strengthen "label" param from "rtx" to
5791 "rtx_code_label *". Strengthen "before" param from "rtx" to
5792 "rtx_insn *".
5793 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5794 "rtx_insn *".
5795 (emit_pattern_after_noloc): Likewise.
5796 (emit_insn_after_noloc): Likewise.
5797 (emit_jump_insn_after_noloc): Likewise.
5798 (emit_call_insn_after_noloc): Likewise.
5799 (emit_debug_insn_after_noloc): Likewise.
5800 (emit_barrier_after): Likewise.
5801 (emit_label_after): Likewise for both params.
5802 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5803 "loc" param from "int" to "location_t".
5804 (emit_insn_after_setloc): Likewise.
5805 (emit_jump_insn_after_setloc): Likewise.
5806 (emit_call_insn_after_setloc): Likewise.
5807 (emit_debug_insn_after_setloc): Likewise.
5808 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5809 "loc" param from "int" to "location_t".
5810 (emit_pattern_before): Convert NULL_RTX to NULL.
5811 (emit_insn_before_setloc): Convert "loc" param from "int" to
5812 "location_t".
5813 (emit_jump_insn_before_setloc): Likewise.
5814 (emit_call_insn_before_setloc): Likewise.
5815 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5816 rtx_insn *. Convert "loc" param from "int" to "location_t".
5817 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5818 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5819 Convert 3rd param from "int" to "location_t".
5820 (emit_barrier_before, emit_barrier_after, next_real_insn):
5821 Strengthen param from rtx to rtx_insn *.
5822 (emit_label_before): Strengthen 1st param from "rtx" to
5823 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5824 "rtx_insn *".
5825 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5826 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5827 Strengthen 2nd param from "rtx" to "rtx_insn *".
5828 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5829 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5830 Likewise. Convert 3rd param from "int" to "location_t".
5831 (emit_label_after): Strengthen 1st param from "rtx" to
5832 "rtx_code_label *".
5833 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5834 "rtx_insn *".
5835 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5836 from "rtx" to "rtx_insn *".
5837
5838 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5839
5840 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5841 bodies streamed in with -Q.
5842 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5843 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5844 * gimple-streamer-out.c: Include gimple-pretty-print.h
5845 (output_bb): Dump stmts streamed.
5846 * lto-section-out.c: Include print-tree.h
5847 (lto_begin_section): Dump sections created.
5848 (lto_output_decl_index): Dump decl encoded.
5849 * lto-streamer-out.c: Include print-tree.h
5850 (create_output_block): Dump output block created.
5851 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5852 (output_function): Dump function output.
5853 (output_constructor): Dump constructor streamed.
5854 (write_global_stream): Output indexes encoded.
5855 (produce_asm_for_decls): Dump streams encoded.
5856 * lto-streamer.c (streamer_dump_file): New global var.
5857 * lto-streamer.h (streamer_dump_file): Declare.
5858 * passes.c (ipa_write_summaries): Initialize streamer dump.
5859 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5860 in.
5861
5862 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5863
5864 PR target/86048
5865 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5866 offsets for register save directives. Emit a second batch of save
5867 directives, if need be, when the function accesses prior frames.
5868
5869 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5870
5871 * config/arc/fpu.md (fmasf4): Force operand to register.
5872 (fnmasf4): Likewise.
5873
5874 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5875
5876 * config/arc/arc-protos.h (arc_pad_return): Remove.
5877 * config/arc/arc.c (machine_function): Remove force_short_suffix
5878 and size_reason.
5879 (arc_print_operand): Adjust printing of '&'.
5880 (arc_verify_short): Remove conditional printing of short suffix.
5881 (arc_final_prescan_insn): Remove reference to size_reason.
5882 (pad_return): New function.
5883 (arc_reorg): Call pad_return.
5884 (arc_pad_return): Remove.
5885 (arc_init_machine_status): Remove reference to force_short_suffix.
5886 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5887 (attr length): When attribute iscompact is true force to 2
5888 regardless; in the case of maybe check if we want to force the
5889 instruction to have 4 bytes length.
5890 (nopv): Change it to generate 4 byte long nop as well.
5891 (blockage): New pattern.
5892 (simple_return): Remove call to arc_pad_return.
5893 (p_return_i): Likewise.
5894
5895 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5896
5897 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5898
5899 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5900
5901 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5902 ARC cores.
5903
5904 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5905
5906 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5907 for ARC700 and ARCv2.
5908
5909 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5910
5911 PR target/86076
5912 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5913 operands[2] instead of operands[1].
5914
5915
5916 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5917
5918 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5919 case, check whether the outer register overlaps an unallocatable
5920 register, not just whether it fits the required class.
5921
5922 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5923
5924 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5925 are poly_ints.
5926 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5927 (memrefs_conflict_p): Likewise.
5928 (init_alias_analysis): Likewise.
5929 * cfgexpand.c (expand_debug_expr): Likewise.
5930 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5931 * cse.c (fold_rtx): Likewise.
5932 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5933 * expr.c (emit_block_move_hints): Likewise.
5934 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5935 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5936 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5937 (emit_group_store): Likewise.
5938 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5939 to read the PRE/POST_MODIFY increment.
5940 * calls.c (store_one_arg): Use strip_offset.
5941 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5942 poly_int_rtx_p.
5943 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5944 by a VEC_SELECT.
5945 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5946 (simplify_binary_operation_1): Extend CONST_INT handling to
5947 poly_int_rtx_p.
5948 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5949 than a HOST_WIDE_INT.
5950 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5951 poly_int64.
5952 (adjust_mems, add_stores): Update accodingly.
5953 (vt_canonicalize_addr): Track polynomial offsets.
5954 (emit_note_insn_var_location): Likewise.
5955 (vt_add_function_parameter): Likewise.
5956 (vt_initialize): Likewise.
5957
5958 2018-06-12 Jeff Law <law@redhat.com>
5959
5960 * config.gcc (alpha*-*-freebsd*): Remove.
5961 * config/alpha/freebsd.h: Remove.
5962
5963 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5964
5965 PR other/69968
5966 * spellcheck-tree.c (levenshtein_distance): Rename to...
5967 (get_edit_distance): ...this, and update for underlying renaming.
5968 * spellcheck-tree.h (levenshtein_distance): Rename to...
5969 (get_edit_distance): ...this.
5970 * spellcheck.c (levenshtein_distance): Rename to...
5971 (get_edit_distance): ...this. Convert from Levenshtein distance
5972 to Damerau-Levenshtein distance by supporting transpositions of
5973 adjacent characters. Rename "v1" to "v_next" and "v0" to
5974 "v_one_ago".
5975 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5976 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5977 update for underlying renaming.
5978 (selftest::levenshtein_distance_unit_test): Rename to...
5979 (selftest::test_get_edit_distance_unit): ...this, and update for
5980 underlying renaming.
5981 (selftest::test_find_closest_string): Add example from PR 69968
5982 where transposition helps
5983 (selftest::test_metric_conditions): Update for renaming.
5984 (selftest::test_metric_conditions): Likewise.
5985 (selftest::spellcheck_c_tests): Likewise.
5986 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5987 (get_edit_distance): ...this.
5988 (best_match::consider): Update for renaming.
5989
5990 2018-06-12 Martin Sebor <msebor@redhat.com>
5991
5992 PR tree-optimization/85259
5993 * builtins.c (compute_objsize): Handle constant offsets.
5994 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5995 true iff a warning has been issued.
5996 * gimple.h (gimple_nonartificial_location): New function.
5997 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5998 gimple_nonartificial_location and handle -Wno-system-headers.
5999 (handle_builtin_stxncpy): Same.
6000
6001 2018-06-12 Martin Sebor <msebor@redhat.com>
6002
6003 PR c/85931
6004 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6005
6006 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
6007
6008 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6009 BUILTIN_VEC_XST entries for pointer to double and long long.
6010
6011 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
6012
6013 PR target/85990
6014 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6015 Update comments.
6016 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6017 Likewise.
6018
6019 2018-06-12 Martin Liska <mliska@suse.cz>
6020
6021 * doc/options.texi: Document IntegerRange.
6022
6023 2018-06-12 Martin Liska <mliska@suse.cz>
6024
6025 * config/i386/i386.opt: Make MPX-related options as Deprecated.
6026 * opt-functions.awk: Handle Deprecated flag.
6027 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6028 and report error.
6029 (read_cmdline_option): Report warning for a deprecated option.
6030 * opts.h (struct cl_option): Add new field cl_deprecated.
6031 (CL_ERR_DEPRECATED): New.
6032
6033 2018-06-12 Martin Liska <mliska@suse.cz>
6034
6035 * doc/options.texi: Document Deprecated option flag.
6036
6037 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6038
6039 * config/arc/arc-arch.h (arc_extras): New enum.
6040 (arc_cpu_t):Add field extra.
6041 (arc_cpu_types): Consider the extras.
6042 * config/arc/arc-cpus.def: Add extras info.
6043 * config/arc/arc-opts.h (processor_type): Consider extra field.
6044 * config/arc/arc.c (arc_override_options): Handle extra field.
6045
6046 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6047
6048 * config/arc/arc-arch.h: Update ARC_OPTX macro.
6049 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6050 field.
6051 * config/arc/arc.c (arc_init): Update pic warning.
6052 (irq_range): Update irq range parsing warnings.
6053 (arc_override_options): Update various warning messages.
6054 (arc_handle_aux_attribute): Likewise.
6055
6056 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
6057
6058 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6059
6060 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6061
6062 * doc/sourcebuild.texi: Document usage of line number 0 in verify
6063 compiler messages directives.
6064
6065 2018-06-12 Matthew Fortune <mfortune@gmail.com>
6066
6067 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6068 * config/mips/mips-tables.opt: Regenerate.
6069 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6070 mips64r6.
6071 * doc/invoke.texi: Document -march=i6500.
6072
6073 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
6074
6075 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6076 (i6400_gpmul): Add cpu_unit.
6077 (i6400_gpdiv): Likewise.
6078 (i6400_msa_add_d): Update reservations.
6079 (i6400_msa_int_add) Likewise.
6080 (i6400_msa_short_logic3) Likewise.
6081 (i6400_msa_short_logic2) Likewise.
6082 (i6400_msa_short_logic) Likewise.
6083 (i6400_msa_move) Likewise.
6084 (i6400_msa_cmp) Likewise.
6085 (i6400_msa_short_float2) Likewise.
6086 (i6400_msa_div_d) Likewise.
6087 (i6400_msa_long_logic1) Likewise.
6088 (i6400_msa_long_logic2) Likewise.
6089 (i6400_msa_mult) Likewise.
6090 (i6400_msa_long_float2) Likewise.
6091 (i6400_msa_long_float4) Likewise.
6092 (i6400_msa_long_float5) Likewise.
6093 (i6400_msa_long_float8) Likewise.
6094 (i6400_fpu_fadd): Include frint type.
6095 (i6400_fpu_store): New define_insn_reservation.
6096 (i6400_fpu_load): Likewise.
6097 (i6400_fpu_move): Likewise.
6098 (i6400_fpu_fcmp): Likewise.
6099 (i6400_fpu_fmadd): Likewise.
6100 (i6400_int_mult): Include imul3nc type and update reservation.
6101 (i6400_int_div): Include idiv3 type and update reservation.
6102 (i6400_int_load): Update to check type not move_type.
6103 (i6400_int_store): Likewise.
6104 (i6400_int_prefetch): Set zero latency.
6105
6106 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
6107
6108 * gcc.c: Document new %@{...} sequence.
6109 (LINK_COMMAND_SPEC): Use it for the -L switches.
6110 (cpp_unique_options): Use it for the -I switches.
6111 (at_file_argbuf): New global variable.
6112 (in_at_file): Likewise.
6113 (alloc_args): Create at_file_argbuf.
6114 (clear_args): Truncate at_file_argbuf.
6115 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6116 (open_at_file): New function.
6117 (close_at_file): Likewise.
6118 (create_at_file): Delete.
6119 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6120 <'o'>: Likewise.
6121 <'@'>: New case.
6122 (validate_switches_from_spec): Deal with %@{...} sequence.
6123 (validate_switches): Likewise.
6124 (driver::finalize): Call clear_args.
6125
6126 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
6127
6128 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6129
6130 2018-06-11 Martin Sebor <msebor@redhat.com>
6131
6132 * doc/invoke.texi (-Wall): List -Wc++17-compat.
6133 (Wno-class-memaccess): Add @opindex.
6134 (Wno-templates, Wno-multiple-inheritance): Same.
6135 (Wno-virtual-inheritance, Wno-namespaces): Same.
6136 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6137 (Wno-format-overflow, Wno-format-truncation): Same.
6138 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6139 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6140 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6141 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6142 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6143 (Wno-misspelled-isr): Same.
6144
6145 2018-06-11 Martin Sebor <msebor@redhat.com>
6146
6147 * PR tree-optimization/86083
6148 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6149
6150 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6151
6152 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6153
6154 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
6155
6156 PR target/85755
6157 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6158 on the correct operand.
6159 (*movdi_internal64): Ditto.
6160
6161 2018-06-11 Martin Liska <mliska@suse.cz>
6162
6163 PR tree-optimization/86089
6164 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6165
6166 2018-06-11 Julia Koval <julia.koval@intel.com>
6167
6168 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6169 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6170 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6171
6172 2018-06-11 Olivier Hainque <hainque@adacore.com>
6173
6174 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6175 for Ada with strict dwarf2.
6176
6177 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
6178
6179 PR target/85755
6180 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6181 addresses.
6182
6183 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
6184
6185 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6186
6187 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
6188
6189 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6190 TARGET_ELF.
6191
6192 2018-06-08 Martin Liska <mliska@suse.cz>
6193
6194 * tree-cfg.h (debug_function): Fix argument type to match
6195 implementation.
6196
6197 2018-06-08 Martin Liska <mliska@suse.cz>
6198
6199 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6200 Remove usage of MPX-related (and removed) fields.
6201 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6202
6203 2018-06-08 David Malcolm <dmalcolm@redhat.com>
6204
6205 * cfg.c (debug): Use TDF_NONE rather than 0.
6206 * cfghooks.c (debug): Likewise.
6207 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6208 (struct dump_option_value_info): Convert to...
6209 (struct kv_pair): ...this template type.
6210 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6211 rather than 0.
6212 (optinfo_verbosity_options): Likewise.
6213 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6214 OPTGROUP_NONE.
6215 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6216 than int for "optgroup_flags" param.
6217 (dump_generic_expr_loc): Use dump_flags_t rather than int for
6218 "dump_kind" param.
6219 (dump_dec): Likewise.
6220 (dump_finish): Use TDF_NONE rather than 0.
6221 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6222 rather than int for "optgroup_flags" param. Use TDF_NONE rather
6223 than 0. Update for change to option_ptr.
6224 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6225 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
6226 0. Update for changes to optinfo_verbosity_options and
6227 optgroup_options.
6228 (opt_info_switch_p): Convert optgroup_flags from int to
6229 optgroup_flags_t.
6230 (dump_basic_block): Use dump_flags_t rather than int
6231 for "dump_kind" param.
6232 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6233 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6234 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6235 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6236 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6237 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6238 TDF_NONE): Convert from macros to...
6239 (enum dump_flag): ...this new enum.
6240 (dump_flags_t): Update to use enum.
6241 (operator|, operator&, operator~, operator|=, operator&=):
6242 Implement for dump_flags_t.
6243 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6244 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6245 Convert from macros to...
6246 (enum optgroup_flag): ...this new enum.
6247 (optgroup_flags_t): New typedef.
6248 (operator|, operator|=): Implement for optgroup_flags_t.
6249 (struct dump_file_info): Convert field "alt_flags" to
6250 dump_flags_t. Convert field "optgroup_flags" to
6251 optgroup_flags_t.
6252 (dump_basic_block): Use dump_flags_t rather than int for param.
6253 (dump_generic_expr_loc): Likewise.
6254 (dump_dec): Likewise.
6255 (dump_register): Convert param "optgroup_flags" to
6256 optgroup_flags_t.
6257 (opt_info_enable_passes): Likewise.
6258 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6259 than 0.
6260 * gimple-pretty-print.c (debug): Likewise.
6261 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6262 (merged_store_group::apply_stores): Likewise.
6263 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6264 * gimple.c (verify_gimple_pp): Likewise.
6265 * graphite-poly.c (print_pbb_body): Likewise.
6266 * passes.c (pass_manager::register_one_dump_file): Convert
6267 local "optgroup_flags" to optgroup_flags_t.
6268 * print-tree.c (print_node): Use TDF_NONE rather than 0.
6269 (debug): Likewise.
6270 (debug_body): Likewise.
6271 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6272 to optgroup_flags_t.
6273 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6274 than 0.
6275 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6276 (convert_mult_to_fma): Likewise.
6277 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6278 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6279 * tree-vect-data-refs.c (dump_lower_bound): Convert param
6280 "dump_kind" to dump_flags_t.
6281
6282 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6283
6284 * config/rs6000/rs6000.c (min, max): Delete.
6285
6286 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6287
6288 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6289 -mabi=spe and -mabi=no-spe.
6290
6291 2018-06-08 Martin Liska <mliska@suse.cz>
6292
6293 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6294 where we expect an existing summary.
6295
6296 2018-06-08 Martin Liska <mliska@suse.cz>
6297
6298 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6299 * ipa-inline.h (estimate_edge_growth): Likewise.
6300
6301 2018-06-08 Martin Liska <mliska@suse.cz>
6302
6303 * cgraph.c (function_version_hasher::hash): Use
6304 cgraph_node::get_uid ().
6305 (function_version_hasher::equal):
6306 * cgraph.h (cgraph_node::get_uid): New method.
6307 * ipa-inline.c (update_caller_keys): Use
6308 cgraph_node::get_uid ().
6309 (update_callee_keys): Likewise.
6310 * ipa-utils.c (searchc): Likewise.
6311 (ipa_reduced_postorder): Likewise.
6312 * lto-cgraph.c (input_node): Likewise.
6313 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6314 * symbol-summary.h (symtab_insertion): Likewise.
6315 (symtab_removal): Likewise.
6316 (symtab_duplication): Likewise.
6317 * tree-pretty-print.c (dump_function_header): Likewise.
6318 * tree-sra.c (convert_callers_for_node): Likewise.
6319
6320 2018-06-08 Martin Liska <mliska@suse.cz>
6321
6322 * cgraph.c (symbol_table::create_edge): Always assign a new
6323 unique number.
6324 (symbol_table::free_edge): Do not recycle numbers.
6325 * cgraph.h (cgraph_edge::get): New method.
6326 * symbol-summary.h (symtab_removal): Use it.
6327 (symtab_duplication): Likewise.
6328 (call_summary::hashable_uid): Remove.
6329
6330 2018-06-08 Martin Liska <mliska@suse.cz>
6331
6332 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6333 (initialize_growth_caches): Remove.
6334 (free_growth_caches): Likewise.
6335 (do_estimate_edge_time): Use edge_growth_cache.
6336 (do_estimate_edge_size): Likewise.
6337 (do_estimate_edge_hints): Likewise.
6338 * ipa-inline.c (reset_edge_caches): Likewise.
6339 (recursive_inlining): Likewise.
6340 (inline_small_functions): Likewise.
6341 * ipa-inline.h (initialize_growth_caches): Remove.
6342 (estimate_edge_size): Likewise.
6343 (estimate_edge_time): Likewise.
6344 (estimate_edge_hints): Likewise.
6345 (reset_edge_growth_cache): Likewise.
6346 * symbol-summary.h (call_summary::remove): New method.
6347
6348 2018-06-08 Martin Liska <mliska@suse.cz>
6349
6350 * ipa-cp.c (class edge_clone_summary): New summary.
6351 (grow_edge_clone_vectors): Remove.
6352 (ipcp_edge_duplication_hook): Remove.
6353 (class edge_clone_summary_t): New call_summary class.
6354 (ipcp_edge_removal_hook): Remove.
6355 (edge_clone_summary_t::duplicate): New function.
6356 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6357 (create_specialized_node): Likewise.
6358 (ipcp_driver): Initialize edge_clone_summaries and do not
6359 register hooks.
6360
6361 2018-06-08 Martin Liska <mliska@suse.cz>
6362
6363 * symbol-summary.h (get): New function.
6364 (call_summary::m_initialize_when_cloning): New class member.
6365
6366 2018-06-08 Martin Liska <mliska@suse.cz>
6367
6368 * cgraph.c (cgraph_node::remove): Do not recycle uid.
6369 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6370 (symbol_table::allocate_cgraph_symbol): Do not set uid.
6371 * passes.c (uid_hash_t): Record removed_nodes by their uids.
6372 (remove_cgraph_node_from_order): Use the removed_nodes set.
6373 (do_per_function_toporder): Likwise.
6374 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6375 instead of summary_uid.
6376 (symtab_removal): Likewise.
6377 (symtab_duplication): Likewise.
6378
6379 2018-06-08 Martin Liska <mliska@suse.cz>
6380
6381 * ipa-cp.c (ipcp_store_bits_results): Use
6382 ipcp_transformation_sum.
6383 (ipcp_store_vr_results): Likewise.
6384 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6385 to ...
6386 (ipcp_transformation_initialize): ... this.
6387 (ipa_set_node_agg_value_chain):
6388 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6389 (write_ipcp_transformation_info): Likewise.
6390 (read_ipcp_transformation_info): Likewise.
6391 (ipcp_update_bits): Likewise.
6392 (ipcp_update_vr): Likewise.
6393 (ipcp_transform_function): Likewise.
6394 * ipa-prop.h: Rename ipcp_transformation_summary to
6395 ipcp_transformation.
6396 (class ipcp_transformation_t): New function summary.
6397 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6398 (ipa_get_agg_replacements_for_node): Likewise.
6399
6400 2018-06-08 Martin Liska <mliska@suse.cz>
6401
6402 * ipa-pure-const.c (struct funct_state_d): Do it class instead
6403 of struct.
6404 (class funct_state_summary_t): New function_summary class.
6405 (has_function_state): Remove.
6406 (get_function_state): Likewise.
6407 (set_function_state): Likewise.
6408 (add_new_function): Likewise.
6409 (funct_state_summary_t::insert): New function.
6410 (duplicate_node_data): Remove.
6411 (remove_node_data): Remove.
6412 (funct_state_summary_t::duplicate): New function.
6413 (register_hooks): Create new funct_state_summaries.
6414 (pure_const_generate_summary): Use it.
6415 (pure_const_write_summary): Likewise.
6416 (pure_const_read_summary): Likewise.
6417 (propagate_pure_const): Likewise.
6418 (propagate_nothrow): Likewise.
6419 (dump_malloc_lattice): Likewise.
6420 (propagate_malloc): Likewise.
6421 (execute): Do not register hooks, just remove summary
6422 instead.
6423 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6424 constructor.
6425
6426 2018-06-08 Martin Liska <mliska@suse.cz>
6427
6428 * ipa-reference.c (remove_node_data): Remove.
6429 (duplicate_node_data): Likewise.
6430 (class ipa_ref_var_info_summary_t): New class.
6431 (class ipa_ref_opt_summary_t): Likewise.
6432 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6433 (get_reference_optimization_summary): Use
6434 ipa_ref_opt_sum_summaries.
6435 (set_reference_vars_info): Remove.
6436 (set_reference_optimization_summary): Likewise.
6437 (ipa_init): Create summaries.
6438 (init_function_info): Use function summary.
6439 (ipa_ref_opt_summary_t::duplicate): New function.
6440 (ipa_ref_opt_summary_t::remove): New function.
6441 (get_read_write_all_from_node): Fix GNU coding style.
6442 (propagate): Use function summary.
6443 (write_node_summary_p): Fix GNU coding style.
6444 (stream_out_bitmap): Likewise.
6445 (ipa_reference_read_optimization_summary): Use function summary.
6446 (ipa_reference_c_finalize): Do not release hooks.
6447
6448 2018-06-08 Martin Liska <mliska@suse.cz>
6449
6450 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6451 (analyze_function_body): Extract multiple calls of get_create.
6452 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6453 * ipa-inline.c (recursive_inlining): Use ::get method.
6454 * ipa-inline.h (estimate_edge_growth): Likewise.
6455
6456 2018-06-08 Martin Liska <mliska@suse.cz>
6457
6458 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6459 HSA_INVALID.
6460 (hsa_function_summary::hsa_function_summary): Use the new enum
6461 value.
6462 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6463 * hsa-gen.c (hsa_get_host_function): Likewise.
6464 (get_brig_function_name): Likewise.
6465 * ipa-hsa.c (process_hsa_functions): Likewise.
6466 (ipa_hsa_write_summary): Likewise.
6467 * symbol-summary.h (symtab_duplication): Use ::get function/
6468 (get): New function.
6469
6470 2018-06-08 Martin Liska <mliska@suse.cz>
6471
6472 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6473 of get.
6474 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6475 (hsa_register_kernel): Likewise.
6476 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6477 * hsa-gen.c (hsa_get_host_function): Likewise.
6478 (get_brig_function_name): Likewise.
6479 (generate_hsa): Likewise.
6480 (pass_gen_hsail::execute): Likewise.
6481 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6482 (devirtualization_time_bonus): Likewise.
6483 (ipcp_propagate_stage): Likewise.
6484 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6485 (edge_set_predicate): Likewise.
6486 (evaluate_conditions_for_known_args): Likewise.
6487 (evaluate_properties_for_edge): Likewise.
6488 (ipa_fn_summary::reset): Likewise.
6489 (ipa_fn_summary_t::duplicate): Likewise.
6490 (dump_ipa_call_summary): Likewise.
6491 (ipa_dump_fn_summary): Likewise.
6492 (analyze_function_body): Likewise.
6493 (compute_fn_summary): Likewise.
6494 (estimate_edge_devirt_benefit): Likewise.
6495 (estimate_edge_size_and_time): Likewise.
6496 (estimate_calls_size_and_time): Likewise.
6497 (estimate_node_size_and_time): Likewise.
6498 (inline_update_callee_summaries): Likewise.
6499 (remap_edge_change_prob): Likewise.
6500 (remap_edge_summaries): Likewise.
6501 (ipa_merge_fn_summary_after_inlining): Likewise.
6502 (ipa_update_overall_fn_summary): Likewise.
6503 (read_ipa_call_summary): Likewise.
6504 (inline_read_section): Likewise.
6505 (write_ipa_call_summary): Likewise.
6506 (ipa_fn_summary_write): Likewise.
6507 (ipa_free_fn_summary): Likewise.
6508 * ipa-hsa.c (process_hsa_functions): Likewise.
6509 (ipa_hsa_write_summary): Likewise.
6510 (ipa_hsa_read_section): Likewise.
6511 * ipa-icf.c (sem_function::merge): Likewise.
6512 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6513 (do_estimate_edge_time): Likewise.
6514 (estimate_size_after_inlining): Likewise.
6515 (estimate_growth): Likewise.
6516 (growth_likely_positive): Likewise.
6517 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6518 (inline_call): Likewise.
6519 * ipa-inline.c (caller_growth_limits): Likewise.
6520 (can_inline_edge_p): Likewise.
6521 (can_inline_edge_by_limits_p): Likewise.
6522 (compute_uninlined_call_time): Likewise.
6523 (compute_inlined_call_time): Likewise.
6524 (want_inline_small_function_p): Likewise.
6525 (edge_badness): Likewise.
6526 (update_caller_keys): Likewise.
6527 (update_callee_keys): Likewise.
6528 (recursive_inlining): Likewise.
6529 (inline_small_functions): Likewise.
6530 (inline_to_all_callers_1): Likewise.
6531 (dump_overall_stats): Likewise.
6532 (early_inline_small_functions): Likewise.
6533 (early_inliner): Likewise.
6534 * ipa-inline.h (estimate_edge_growth): Likewise.
6535 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6536 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6537 * ipa-prop.h (IPA_NODE_REF): Likewise.
6538 (IPA_EDGE_REF): Likewise.
6539 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6540 (propagate_malloc): Likewise.
6541 * ipa-split.c (execute_split_functions): Likewise.
6542 * symbol-summary.h: Rename get to get_create.
6543 (get): Likewise.
6544 (get_create): Likewise.
6545 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6546
6547 2018-06-08 Martin Liska <mliska@suse.cz>
6548
6549 * symbol-summary.h (release): Move definition out of class
6550 declaration.
6551 (symtab_removal): Likewise.
6552 (symtab_duplication): Likewise.
6553
6554 2018-06-08 Martin Liska <mliska@suse.cz>
6555
6556 * symbol-summary.h (function_summary): Move constructor
6557 implementation out of class declaration.
6558 (release): Likewise.
6559 (symtab_insertion): Likewise.
6560 (symtab_removal): Likewise.
6561 (symtab_duplication): Likewise.
6562 (get): Likewise.
6563
6564 2018-06-08 Martin Liska <mliska@suse.cz>
6565
6566 * Makefile.in: Remove support for MPX (macros, related functions,
6567 fields in cgraph_node, ...).
6568 * builtin-types.def (BT_BND): Likewise.
6569 (BT_FN_BND_CONST_PTR): Likewise.
6570 (BT_FN_CONST_PTR_BND): Likewise.
6571 (BT_FN_VOID_PTR_BND): Likewise.
6572 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6573 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6574 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6575 (expand_builtin_mempcpy_with_bounds): Likewise.
6576 (expand_builtin_memset_with_bounds): Likewise.
6577 (expand_builtin_memset_args): Likewise.
6578 (std_expand_builtin_va_start): Likewise.
6579 (expand_builtin): Likewise.
6580 (expand_builtin_with_bounds): Likewise.
6581 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6582 (DEF_LIB_BUILTIN_CHKP): Likewise.
6583 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6584 (DEF_CHKP_BUILTIN): Likewise.
6585 (BUILT_IN_MEMCPY): Likewise.
6586 (BUILT_IN_MEMMOVE): Likewise.
6587 (BUILT_IN_MEMPCPY): Likewise.
6588 (BUILT_IN_MEMSET): Likewise.
6589 (BUILT_IN_STPCPY): Likewise.
6590 (BUILT_IN_STRCAT): Likewise.
6591 (BUILT_IN_STRCHR): Likewise.
6592 (BUILT_IN_STRCPY): Likewise.
6593 (BUILT_IN_STRLEN): Likewise.
6594 (BUILT_IN_MEMCPY_CHK): Likewise.
6595 (BUILT_IN_MEMMOVE_CHK): Likewise.
6596 (BUILT_IN_MEMPCPY_CHK): Likewise.
6597 (BUILT_IN_MEMSET_CHK): Likewise.
6598 (BUILT_IN_STPCPY_CHK): Likewise.
6599 (BUILT_IN_STRCAT_CHK): Likewise.
6600 (BUILT_IN_STRCPY_CHK): Likewise.
6601 * calls.c (store_bounds): Likewise.
6602 (emit_call_1): Likewise.
6603 (special_function_p): Likewise.
6604 (maybe_warn_nonstring_arg): Likewise.
6605 (initialize_argument_information): Likewise.
6606 (finalize_must_preallocate): Likewise.
6607 (compute_argument_addresses): Likewise.
6608 (expand_call): Likewise.
6609 * cfgexpand.c (expand_call_stmt): Likewise.
6610 (expand_return): Likewise.
6611 (expand_gimple_stmt_1): Likewise.
6612 (pass_expand::execute): Likewise.
6613 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6614 (cgraph_node::remove): Likewise.
6615 (cgraph_node::dump): Likewise.
6616 (cgraph_node::verify_node): Likewise.
6617 * cgraph.h (chkp_function_instrumented_p): Likewise.
6618 (symtab_node::get_alias_target): Likewise.
6619 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6620 (cgraph_local_p): Likewise.
6621 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6622 (cgraph_edge::rebuild_references): Likewise.
6623 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6624 (walk_polymorphic_call_targets): Likewise.
6625 (cgraph_node::expand_thunk): Likewise.
6626 (symbol_table::output_weakrefs): Likewise.
6627 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6628 (ix86_handle_option): Likewise.
6629 * config/i386/constraints.md: Likewise.
6630 * config/i386/i386-builtin-types.def (BND): Likewise.
6631 (VOID): Likewise.
6632 (PVOID): Likewise.
6633 (ULONG): Likewise.
6634 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6635 (BDESC_FIRST): Likewise.
6636 (BDESC): Likewise.
6637 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6638 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6639 * config/i386/i386.c (enum reg_class): Likewise.
6640 (ix86_target_string): Likewise.
6641 (ix86_option_override_internal): Likewise.
6642 (ix86_conditional_register_usage): Likewise.
6643 (ix86_valid_target_attribute_inner_p): Likewise.
6644 (ix86_set_indirect_branch_type): Likewise.
6645 (ix86_set_current_function): Likewise.
6646 (ix86_function_arg_regno_p): Likewise.
6647 (init_cumulative_args): Likewise.
6648 (ix86_function_arg_advance): Likewise.
6649 (ix86_function_arg): Likewise.
6650 (ix86_pass_by_reference): Likewise.
6651 (ix86_function_value_regno_p): Likewise.
6652 (ix86_function_value_1): Likewise.
6653 (ix86_function_value_bounds): Likewise.
6654 (ix86_return_in_memory): Likewise.
6655 (ix86_setup_incoming_vararg_bounds): Likewise.
6656 (ix86_va_start): Likewise.
6657 (indirect_thunk_need_prefix): Likewise.
6658 (print_reg): Likewise.
6659 (ix86_print_operand): Likewise.
6660 (ix86_expand_call): Likewise.
6661 (ix86_output_function_return): Likewise.
6662 (reg_encoded_number): Likewise.
6663 (BDESC_VERIFYS): Likewise.
6664 (ix86_init_mpx_builtins): Likewise.
6665 (ix86_init_builtins): Likewise.
6666 (ix86_emit_cmove): Likewise.
6667 (ix86_emit_move_max): Likewise.
6668 (ix86_expand_builtin): Likewise.
6669 (ix86_builtin_mpx_function): Likewise.
6670 (ix86_get_arg_address_for_bt): Likewise.
6671 (ix86_load_bounds): Likewise.
6672 (ix86_store_bounds): Likewise.
6673 (ix86_load_returned_bounds): Likewise.
6674 (ix86_store_returned_bounds): Likewise.
6675 (ix86_class_likely_spilled_p): Likewise.
6676 (ix86_hard_regno_mode_ok): Likewise.
6677 (x86_order_regs_for_local_alloc): Likewise.
6678 (ix86_mitigate_rop): Likewise.
6679 (ix86_bnd_prefixed_insn_p): Likewise.
6680 (ix86_mpx_bound_mode): Likewise.
6681 (ix86_make_bounds_constant): Likewise.
6682 (ix86_initialize_bounds): Likewise.
6683 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6684 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6685 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6686 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6687 (TARGET_CHKP_BOUND_MODE): Likewise.
6688 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6689 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6690 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6691 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6692 * config/i386/i386.h (TARGET_MPX): Likewise.
6693 (TARGET_MPX_P): Likewise.
6694 (VALID_BND_REG_MODE): Likewise.
6695 (FIRST_BND_REG): Likewise.
6696 (LAST_BND_REG): Likewise.
6697 (enum reg_class): Likewise.
6698 (BND_REG_P): Likewise.
6699 (BND_REGNO_P): Likewise.
6700 (BNDmode): Likewise.
6701 (ADJUST_INSN_LENGTH): Likewise.
6702 * config/i386/i386.md: Likewise.
6703 * config/i386/i386.opt: Likewise.
6704 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6705 (defined): Likewise.
6706 (LINK_MPX): Likewise.
6707 (MPX_SPEC): Likewise.
6708 (LIBMPX_SPEC): Likewise.
6709 (LIBMPXWRAPPERS_SPEC): Likewise.
6710 (CHKP_SPEC): Likewise.
6711 * config/i386/predicates.md: Likewise.
6712 * dbxout.c (dbxout_type): Likewise.
6713 * doc/extend.texi: Likewise.
6714 * doc/invoke.texi: Likewise.
6715 * doc/md.texi: Likewise.
6716 * doc/tm.texi: Likewise.
6717 * doc/tm.texi.in: Likewise.
6718 * dwarf2out.c (is_base_type): Likewise.
6719 (gen_formal_types_die): Likewise.
6720 (gen_subprogram_die): Likewise.
6721 (gen_type_die_with_usage): Likewise.
6722 (gen_decl_die): Likewise.
6723 (dwarf2out_late_global_decl): Likewise.
6724 * expr.c (expand_assignment): Likewise.
6725 (emit_storent_insn): Likewise.
6726 (store_expr_with_bounds): Likewise.
6727 (store_expr): Likewise.
6728 (expand_expr_real_1): Likewise.
6729 * expr.h (store_expr_with_bounds): Likewise.
6730 * function.c (use_register_for_decl): Likewise.
6731 (struct bounds_parm_data): Likewise.
6732 (assign_parms_augmented_arg_list): Likewise.
6733 (assign_parm_find_entry_rtl): Likewise.
6734 (assign_parm_is_stack_parm): Likewise.
6735 (assign_parm_load_bounds): Likewise.
6736 (assign_bounds): Likewise.
6737 (assign_parms): Likewise.
6738 (expand_function_start): Likewise.
6739 * gcc.c (CHKP_SPEC): Likewise.
6740 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6741 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6742 (wrestrict_dom_walker::check_call): Likewise.
6743 * gimple.c (gimple_build_call_from_tree): Likewise.
6744 * gimple.h (enum gf_mask): Likewise.
6745 (gimple_call_with_bounds_p): Likewise.
6746 (gimple_call_set_with_bounds): Likewise.
6747 * gimplify.c (gimplify_init_constructor): Likewise.
6748 * ipa-cp.c (initialize_node_lattices): Likewise.
6749 (propagate_constants_across_call): Likewise.
6750 (find_more_scalar_values_for_callers_subset): Likewise.
6751 * ipa-hsa.c (process_hsa_functions): Likewise.
6752 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6753 * ipa-icf.c (sem_function::merge): Likewise.
6754 * ipa-inline.c (early_inliner): Likewise.
6755 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6756 (warn_function_cold): Likewise.
6757 (propagate_pure_const): Likewise.
6758 * ipa-ref.h (enum GTY): Likewise.
6759 * ipa-split.c (find_retbnd): Likewise.
6760 (consider_split): Likewise.
6761 (split_function): Likewise.
6762 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6763 * ipa.c (walk_polymorphic_call_targets): Likewise.
6764 (symbol_table::remove_unreachable_nodes): Likewise.
6765 (process_references): Likewise.
6766 (cgraph_build_static_cdtor_1): Likewise.
6767 * lto-cgraph.c (lto_output_node): Likewise.
6768 (output_refs): Likewise.
6769 (compute_ltrans_boundary): Likewise.
6770 (input_overwrite_node): Likewise.
6771 (input_node): Likewise.
6772 (input_cgraph_1): Likewise.
6773 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6774 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6775 (class pass_chkp_instrumentation_passes): Likewise.
6776 (make_pass_chkp_instrumentation_passes): Likewise.
6777 * passes.def: Likewise.
6778 * rtl.h (struct GTY): Likewise.
6779 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6780 * stor-layout.c (layout_type): Likewise.
6781 * symtab.c: Likewise.
6782 * target.def: Likewise.
6783 * targhooks.c (default_chkp_bound_type): Likewise.
6784 (default_chkp_bound_mode): Likewise.
6785 (default_builtin_chkp_function): Likewise.
6786 (default_chkp_function_value_bounds): Likewise.
6787 (default_chkp_make_bounds_constant): Likewise.
6788 (default_chkp_initialize_bounds): Likewise.
6789 * targhooks.h (default_chkp_bound_type): Likewise.
6790 (default_chkp_bound_mode): Likewise.
6791 (default_builtin_chkp_function): Likewise.
6792 (default_chkp_function_value_bounds): Likewise.
6793 (default_chkp_make_bounds_constant): Likewise.
6794 (default_chkp_initialize_bounds): Likewise.
6795 * toplev.c (compile_file): Likewise.
6796 (process_options): Likewise.
6797 * tree-core.h (DEF_BUILTIN): Likewise.
6798 (DEF_BUILTIN_CHKP): Likewise.
6799 * tree-inline.c (declare_return_variable): Likewise.
6800 (remap_gimple_stmt): Likewise.
6801 (copy_bb): Likewise.
6802 (initialize_inlined_parameters): Likewise.
6803 (expand_call_inline): Likewise.
6804 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6805 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6806 (make_pass_ipa_chkp_produce_thunks): Likewise.
6807 (make_pass_chkp): Likewise.
6808 (make_pass_chkp_opt): Likewise.
6809 (make_pass_chkp_instrumentation_passes): Likewise.
6810 * tree-pretty-print.c (dump_generic_node): Likewise.
6811 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6812 * tree-ssa-dce.c (propagate_necessity): Likewise.
6813 (eliminate_unnecessary_stmts): Likewise.
6814 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6815 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6816 * tree-ssa-sccvn.h: Likewise.
6817 * tree-ssa-strlen.c (get_string_length): Likewise.
6818 (valid_builtin_call): Likewise.
6819 (adjust_last_stmt): Likewise.
6820 (handle_builtin_strchr): Likewise.
6821 (handle_builtin_strcpy): Likewise.
6822 (handle_builtin_stxncpy): Likewise.
6823 (handle_builtin_memcpy): Likewise.
6824 (handle_builtin_strcat): Likewise.
6825 (strlen_check_and_optimize_stmt): Likewise.
6826 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6827 * tree-streamer-in.c: Likewise.
6828 * tree-streamer.c (record_common_node): Likewise.
6829 * tree.c (tree_code_size): Likewise.
6830 (wide_int_to_tree_1): Likewise.
6831 (type_contains_placeholder_1): Likewise.
6832 (build_common_tree_nodes): Likewise.
6833 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6834 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6835 (POINTER_BOUNDS_P): Likewise.
6836 (BOUNDED_TYPE_P): Likewise.
6837 (BOUNDED_P): Likewise.
6838 (CALL_WITH_BOUNDS_P): Likewise.
6839 (pointer_bounds_type_node): Likewise.
6840 * value-prof.c (gimple_ic): Likewise.
6841 * var-tracking.c (vt_add_function_parameters): Likewise.
6842 * varasm.c (make_decl_rtl): Likewise.
6843 (assemble_start_function): Likewise.
6844 (output_constant): Likewise.
6845 (maybe_assemble_visibility): Likewise.
6846 * varpool.c (ctor_for_folding): Likewise.
6847 * chkp-builtins.def: Remove.
6848 * ipa-chkp.c: Remove.
6849 * ipa-chkp.h: Remove.
6850 * rtl-chkp.c: Remove.
6851 * rtl-chkp.h: Remove.
6852 * tree-chkp-opt.c: Remove.
6853 * tree-chkp.c: Remove.
6854 * tree-chkp.h: Remove.
6855
6856 2018-06-07 Carl Love <cel@us.ibm.com>
6857
6858 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6859 vextract_fp_from_shortl): Add BE support.
6860
6861 2018-06-07 Paul Koning <ni1d@arrl.net>
6862
6863 * compare-elim.c (try_merge_compare): Don't merge compare if
6864 address contains a side effect.
6865 (try_eliminate_compare): Likewise.
6866
6867 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6868
6869 * config.gcc: Support "tremont".
6870 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6871 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6872 PROCESSOR_TREMONT.
6873 * config/i386/i386.c (m_TREMONT): Define.
6874 (processor_target_table): Add "tremont".
6875 (PTA_TREMONT): Define.
6876 (ix86_lea_outperforms): Add TARGET_TREMONT.
6877 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6878 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6879 and M_INTEL_GOLDMONT_PLUS.
6880 (fold_builtin_cpu): Add "tremont".
6881 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6882 (ix86_option_override_internal): Add "tremont".
6883 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6884 (processor_type): Add PROCESSOR_TREMONT.
6885 * config/i386/x86-tune.def: Add m_TREMONT.
6886 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6887
6888 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6889
6890 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6891 symbol defined for msp430i* devices to be lower case.
6892
6893 2018-06-07 Richard Biener <rguenther@suse.de>
6894
6895 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6896 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6897 Properly wrap signed arithmetic if overflow wraps.
6898
6899 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6900
6901 PR tree-optimization/69615
6902 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6903 of a cast from a same precision integral SSA_NAME in a bb dominated
6904 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6905 cast to utype if rhs2 has already a compatible type.
6906
6907 2018-06-07 Richard Biener <rguenther@suse.de>
6908
6909 PR tree-optimization/85935
6910 * graphite-scop-detection.c (find_params_in_bb): Analyze
6911 condition operands with respect to the correct loop. Assert
6912 the analysis doesn't fail.
6913
6914 2018-06-04 Carl Love <cel@us.ibm.com>
6915
6916 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6917 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6918 as it is slightly cheaper.
6919 (first_match_or_eos_index_<mode>):
6920 Calculate index using natural element order.
6921 (first_match_index_<mode>):
6922 Calculate index using natural element order.
6923 (first_match_or_eos_index_<mode>):
6924 Calculate index using natural order.
6925 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6926 for BE and LE modes.
6927 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6928 P9V_BUILTIN_VCLZLSBB_V16QI.
6929 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6930 specific.
6931
6932 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6933
6934 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6935 indentation and line wrap for many prototypes. Add missing
6936 @smallexample directives around block of prototypes for vec_xl and
6937 vec_xst.
6938
6939 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6940
6941 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6942 track if we pass or return IEEE 128-bit floating point.
6943 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6944 C++ mangling that is compatible with GCC 8.1.
6945 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6946 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6947 floating point types.
6948 (rs6000_function_arg_advance_1): Likewise.
6949 (rs6000_mangle_type): Optionally generate mangled names that match
6950 what GCC 8.1 generated for IEEE 128-bit floating point types.
6951 (rs6000_globalize_decl_name): If we have an external function that
6952 passes or returns IEEE 128-bit types, generate a weak reference
6953 from the mangled name used in GCC 8.1 to the current mangled
6954 name.
6955 (rs6000_init_builtins): Make __ibm128 use the long double type if
6956 long double is IBM extended double. Make __float128 use the long
6957 double type if long double is IEEE 128-bit.
6958
6959 PR target/85657
6960 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6961 macro for __ibm128 built-in functions.
6962 (PACK_IF): Add __ibm128 pack/unpack functions.
6963 (UNPACK_IF): Likewise.
6964 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6965 enable long double built-in functions if long double is IEEE
6966 128-bit floating point.
6967 (rs6000_invalid_builtin): Update long double built-in function
6968 error message.
6969 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6970 functions, adjust the built-in function to use the long double
6971 built-in function if __ibm128 and long double are the same type.
6972 * doc/extend.texi (PowerPC builtins): Update documention for
6973 __builtin_{,un}pack_longdouble. Add documentation for
6974 __builtin_{,un}pack_ibm128.
6975
6976 2018-06-06 Jim Wilson <jimw@sifive.com>
6977
6978 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6979 (struct machine_function): New field interrupt_mode.
6980 (riscv_handle_type_attribute): New function. Add forward declaration.
6981 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6982 (riscv_expand_epilogue): Check interrupt_mode field.
6983 (riscv_set_current_function): Check interrupt attribute args and
6984 set interrupt_mode field.
6985 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6986 (riscv_sret, riscv_uret): New.
6987 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6988 new arguments to interrupt attribute.
6989
6990 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6991
6992 PR target/63177
6993 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6994 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6995
6996 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6997
6998 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6999 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7000 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7001 several redundant entries.
7002
7003 2018-06-06 David Malcolm <dmalcolm@redhat.com>
7004
7005 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7006 type from "rtx" to "rtx_insn *".
7007 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7008 for local "call_insn", removing cast.
7009 (ix86_expand_call): Likewise, introducing a "call_insn" local.
7010
7011 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
7012
7013 PR tree-optimization/86066
7014 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7015 for BIT_INSERT_EXPR stores.
7016
7017 2018-06-06 Richard Biener <rguenther@suse.de>
7018
7019 PR tree-optimization/86062
7020 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7021 component refs ontop
7022 of to be offsetted base.
7023
7024 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7025
7026 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7027 to be static and remove check on interrupt attribute name.
7028
7029 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
7030
7031 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7032 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7033
7034 2018-06-05 Steve Ellcey <sellcey@cavium.com>
7035
7036 PR target/79924
7037 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7038 second argument.
7039 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7040 Remove second argument, change how error is called.
7041 (aarch64_layout_arg): Remove second argument from
7042 aarch64_err_no_fpadvsimd call.
7043 (aarch64_init_cumulative_args): Ditto.
7044 (aarch64_gimplify_va_arg_expr): Ditto.
7045 * config/aarch64/aarch64.md (mov<mode>): Ditto.
7046
7047 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
7048
7049 * config/i386/i386.md (simple_return_indirect_internal): New expander.
7050 (*simple_return_indirect_internal<mode>): Rename from
7051 simple_return_indirect_internal. Use W mode iterator.
7052 (rstorssp): New expander.
7053 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
7054 (clrssbsy): New expander.
7055 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
7056
7057 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
7058
7059 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7060 __typeof__.
7061 (cmse_check_pointed_object): Likewise.
7062
7063 2018-06-05 Martin Liska <mliska@suse.cz>
7064
7065 PR gcov-profile/47618
7066 * doc/invoke.texi: Document how -fprofile-dir format
7067 is extended.
7068
7069 2018-06-05 Richard Biener <rguenther@suse.de>
7070
7071 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7072 removal pretend DOM info isn't available so we do not update
7073 it and only remove edges, not dominated blocks. Actually free
7074 DOM info in case we removed something. Remove unreachable blocks.
7075 (mfb_keep_latches): Work with either DOM info or marked backedges.
7076 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7077 first. Mark backedges if DOM info isn't available.
7078 (Re-)compute DOM info after cleanup_control_flow_pre.
7079
7080 2018-06-05 Richard Biener <rguenther@suse.de>
7081
7082 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7083 (locus_discrim_hasher::hash): Adjust.
7084 (locus_discrim_hasher::equal): Likewise.
7085 (next_discriminator_for_locus): Work on line directly.
7086 (same_line_p): Pass in expanded locus1 as well.
7087 (assign_discriminators): Avoid redundant location expansions.
7088
7089 2018-06-05 Richard Biener <rguenther@suse.de>
7090
7091 PR tree-optimization/86046
7092 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7093 if required after clearing TREE_ADDRESSABLE.
7094
7095 2018-06-05 Richard Biener <rguenther@suse.de>
7096
7097 PR tree-optimization/86047
7098 * tree-ssa-loop.c (for_each_index): Glob handling of all
7099 decls and constants and really handle all of them.
7100
7101 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7102
7103 PR target/81497
7104 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7105 qualifier_void_pointer and qualifier_const_void_pointer.
7106 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7107 (arm_init_builtins): Handle the above.
7108 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7109 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7110 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7111 void intrinsics.
7112
7113 2018-06-05 Martin Liska <mliska@suse.cz>
7114
7115 * auto-profile.c (read_autofdo_file): Do not use
7116 gcov_ctr_summary struct.
7117 (afdo_callsite_hot_enough_for_early_inline): Likewise.
7118 * coverage.c (struct counts_entry): Likewise.
7119 (read_counts_file): Read just single summary entry.
7120 (get_coverage_counts): Use gcov_summary struct.
7121 * coverage.h (get_coverage_counts): Likewise.
7122 * gcov-dump.c (dump_working_sets): Likewise.
7123 (tag_summary): Dump just single summary.
7124 * gcov-io.c (gcov_write_summary): Write just histogram
7125 summary.
7126 (gcov_read_summary): Read just single summary.
7127 (compute_working_sets): Use gcov_summary struct.
7128 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7129 of GCOV_COUNTERS_SUMMABLE.
7130 (GCOV_COUNTERS_SUMMABLE): Remove.
7131 (GCOV_FIRST_VALUE_COUNTER): Replace with
7132 GCOV_COUNTER_V_INTERVAL.
7133 (struct gcov_ctr_summary): Remove.
7134 (struct gcov_summary): Directly use fields of former
7135 gcov_ctr_summary.
7136 (compute_working_sets): Use gcov_summary struct.
7137 * gcov.c (read_count_file): Do not use ctrs fields.
7138 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7139 struct.
7140 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7141 struct.
7142 * profile.c: Likewise.
7143 * profile.h: Likewise.
7144
7145 2018-06-05 Martin Liska <mliska@suse.cz>
7146
7147 PR gcov-profile/84846
7148 * gcov.c (output_lines): Print working directory only
7149 in intermediate format.
7150
7151 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
7152
7153 * config/s390/s390-builtin-types.def: Add void function type.
7154 * config/s390/s390-builtins.def: Use the function type for the
7155 tbeginc builtin.
7156
7157 2018-06-04 Jim Wilson <jimw@sifive.com>
7158
7159 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7160 to int.
7161 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7162 and maybe_eh_return. Change regno to unsigned int. Use new args to
7163 handle EH_RETURN_DATA_REGNO registers properly.
7164 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7165 (riscv_expand_epilogue): Update comment. Change argument name and
7166 type. Update code to use new name and type. Pass new args to
7167 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
7168 EXCEPTION_RETURN.
7169 * config/riscv/riscv.md (NORMAL_RETURN): New.
7170 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7171 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7172 (eh_return): Call gen_eh_return_internal and emit barrier.
7173 (eh_return_internal): Call riscv_expand_epilogue.
7174
7175 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
7176
7177 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7178 bit_insertion field and declare can_be_merged_into method.
7179 (merged_store_group::can_be_merged_into): New method.
7180 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7181 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
7182 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7183
7184 2018-06-04 Richard Biener <rguenther@suse.de>
7185
7186 PR tree-optimization/85955
7187 * builtins.c (fold_builtin_sincos): Convert pointers to
7188 destination to appropriate type before dereferencing.
7189
7190 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
7191
7192 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7193
7194 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
7195
7196 * expr.c (expand_expr_real_1): Force the operand into memory if
7197 its TYPE_MODE is BLKmode and if there is no integer mode for
7198 the number of bits being extracted.
7199
7200 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7201
7202 PR target/85832
7203 PR target/86036
7204 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7205 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7206
7207 2018-06-04 Richard Biener <rguenther@suse.de>
7208
7209 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7210 (cleanup_tree_cfg_noloop): ... single caller. Do
7211 start_recording_case_labels later.
7212
7213 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
7214
7215 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7216 to _IMMINTRIN_H_INCLUDED.
7217 * config/i386/pconfigintrin.h: Ditto.
7218 * config/i386/waitpkgintrin.h: Ditto.
7219 * config/i386/immintrin.h: Add includes for sgxintrin.h,
7220 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7221 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7222 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7223 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7224 waitpkgintrin.h and cldemoteintrin.h.
7225
7226 2018-06-04 Richard Biener <rguenther@suse.de>
7227
7228 PR tree-optimization/86038
7229 * tracer.c (find_best_successor): Check probability for
7230 being initialized, bail out if not.
7231
7232 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
7233
7234 PR target/86003
7235 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7236 of bits to ignore when comparing architectures.
7237
7238 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7239
7240 PR tree-optimization/69615
7241 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7242 maximum or minimum of the type, try to merge it also as if
7243 range1 is + [-, x - 1] or + [x + 1, -].
7244
7245 PR c++/86025
7246 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7247
7248 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
7249
7250 PR tree-optimization/86034
7251 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7252 the unsigned bitfield type in a bit insertion sequence if it does not
7253 have a larger precision than the bitfield size.
7254 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7255
7256 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
7257
7258 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7259
7260 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7261
7262 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7263 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7264 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7265 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7266
7267 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7268
7269 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7270 Disable -fdelete-null-pointer-checks for ELF toolchain.
7271
7272 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7273 Kito Cheng <kito.cheng@gmail.com>
7274
7275 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7276 (nds32le-*-*, nds32be-*-*): Integrate checking process.
7277 (nds32*-*-*): Add glibc and uclibc conditions.
7278 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7279 (TARGET_EXCEPT_UNWIND_INFO): Define.
7280 * config/nds32/elf.h: New file.
7281 * config/nds32/linux.h: New file.
7282 * config/nds32/nds32-elf.opt: New file.
7283 * config/nds32/nds32-linux.opt: New file.
7284 * config/nds32/nds32-fp-as-gp.c
7285 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7286 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7287 TARGET_LINUX_ABI.
7288 (nds32_asm_file_end): Ditto.
7289 (nds32_print_operand): Ditto.
7290 (nds32_insert_attributes): Ditto.
7291 (nds32_init_libfuncs): New function.
7292 (TARGET_HAVE_TLS): Define.
7293 (TARGET_INIT_LIBFUNCS): Define.
7294 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7295 spec content.
7296 (TARGET_ELF): Apply different mcmodel setting.
7297 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7298 been migrated into elf.h and linux.h files.
7299 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7300 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7301 (mcmodel): The content has been migrated into nds32-elf.opt and
7302 nds32-linux.opt files.
7303 * config/nds32/t-elf: New file.
7304 * config/nds32/t-linux: New file.
7305
7306 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7307 Shiva Chen <shiva0217@gmail.com>
7308
7309 * config/nds32/constants.md (unspec_volatile_element): Add
7310 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7311 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7312 optimization.
7313 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7314 (make_pass_nds32_fp_as_gp): Declare.
7315 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7316 optmization pass.
7317 (nds32_asm_function_end_prologue): Remove unused asm output.
7318 (nds32_asm_function_begin_epilogue): Remove unused asm output.
7319 (nds32_asm_file_start): Output necessary fp_as_gp information.
7320 (nds32_option_override): Adjust register usage.
7321 (nds32_expand_prologue): Consider fp_as_gp situation.
7322 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7323 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7324 (epilogue): Ditto.
7325 (return): Ditto.
7326 (simple_return): Ditto.
7327 (omit_fp_begin): Output special directive for fp_as_gp.
7328 (omit_fp_end): Output special directive for fp_as_gp.
7329 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7330 mforbid-fp-as-gp): New options.
7331
7332 2018-06-01 Mark Wielaard <mark@klomp.org>
7333
7334 * dwarf2out.c (dwarf2out_finish): Remove generation of
7335 DW_AT_loclists_base.
7336
7337 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
7338
7339 * gimple-ssa-store-merging.c: Include gimple-fold.h.
7340 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7341 (struct merged_store_group): Add bit_insertion field.
7342 (dump_char_array): Use standard hexadecimal format.
7343 (merged_store_group::merged_store_group): Set bit_insertion to false.
7344 (merged_store_group::apply_stores): Use optimal buffer size. Deal
7345 with BIT_INSERT_EXPR stores. Move up code updating the mask and
7346 also print the mask in the dump file.
7347 (pass_store_merging::gate): Minor tweak.
7348 (imm_store_chain_info::coalesce_immediate): Fix wrong association
7349 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
7350 stores with INTEGER_CST stores.
7351 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7352 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7353 and use it throughout. Generate bit insertion sequences if need be.
7354 (pass_store_merging::process_store): Remove redundant condition.
7355 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7356
7357 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
7358
7359 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7360 the 128-bit floating point types. Fix function comment.
7361
7362 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7363
7364 * config/aarch64/aarch64-simd.md
7365 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7366 mnemonics.
7367 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7368 mnemonics.
7369
7370 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7371
7372 PR tree-optimization/85989
7373 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7374 variable.
7375 (backprop::intersect_uses): Check it when deciding whether this
7376 is a backedge reference.
7377 (backprop::process_block): Add each phi to m_visited_phis
7378 after visiting it, then clear it at the end.
7379
7380 2018-06-01 Richard Biener <rguenther@suse.de>
7381
7382 * tree-vectorizer.h (vect_dr_stmt): New function.
7383 (vect_get_load_cost): Adjust.
7384 (vect_get_store_cost): Likewise.
7385 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7386 Use vect_dr_stmt instead of DR_SMTT.
7387 (vect_record_base_alignments): Likewise.
7388 (vect_calculate_target_alignment): Likewise.
7389 (vect_compute_data_ref_alignment): Likewise and make static.
7390 (vect_update_misalignment_for_peel): Likewise.
7391 (vect_verify_datarefs_alignment): Likewise.
7392 (vector_alignment_reachable_p): Likewise.
7393 (vect_get_data_access_cost): Likewise. Pass down
7394 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7395 (vect_get_peeling_costs_all_drs): Likewise.
7396 (vect_peeling_hash_get_lowest_cost): Likewise.
7397 (vect_enhance_data_refs_alignment): Likewise.
7398 (vect_find_same_alignment_drs): Likewise.
7399 (vect_analyze_data_refs_alignment): Likewise.
7400 (vect_analyze_group_access_1): Likewise.
7401 (vect_analyze_group_access): Likewise.
7402 (vect_analyze_data_ref_access): Likewise.
7403 (vect_analyze_data_ref_accesses): Likewise.
7404 (vect_vfa_segment_size): Likewise.
7405 (vect_small_gap_p): Likewise.
7406 (vectorizable_with_step_bound_p): Likewise.
7407 (vect_prune_runtime_alias_test_list): Likewise.
7408 (vect_analyze_data_refs): Likewise.
7409 (vect_supportable_dr_alignment): Likewise.
7410 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7411 (vect_gen_prolog_loop_niters): Likewise.
7412 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7413 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7414 modify DR_STMT.
7415 (vect_recog_mask_conversion_pattern): Likewise.
7416 (vect_try_gather_scatter_pattern): Likewise.
7417 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7418 to vect_get_store_cost.
7419 (vect_get_store_cost): Get stmt_info instead of DR.
7420 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7421 (vect_get_load_cost): Get stmt_info instead of DR.
7422
7423 2018-06-01 Richard Biener <rguenther@suse.de>
7424
7425 PR middle-end/86017
7426 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7427 vars wrapped in MEM_REFs.
7428
7429 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7430
7431 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7432 Fix subreg tests so that we only return a choice between
7433 GENERAL_REGS and FP_REGS if the original classes included both.
7434
7435 2018-06-01 Richard Biener <rguenther@suse.de>
7436
7437 PR ipa/85960
7438 * tree-ssa-structalias.c (get_function_part_constraint):
7439 Handle NULL fi->decl.
7440 (find_func_aliases_for_call): Properly handle indirect
7441 fi from direct call.
7442 (find_func_clobbers): Likewise.
7443 (ipa_pta_execute): Likewise.
7444 (create_variable_info_for): For functions that are ifunc_resolver
7445 resolve to a varinfo that contains the result of the resolver call.
7446 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7447 aliases.
7448
7449 2018-05-31 Michael Collison <michael.collison@arm.com>
7450
7451 * config/aarch64/aarch64.md:
7452 (*fix_to_zero_extenddfdi2): New pattern.
7453 * gcc.target/aarch64/fix_extend1.c: New testcase.
7454
7455 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7456
7457 PR middle-end/78809
7458 PR middle-end/83026
7459 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7460 and BUILT_IN_STRNCMP_EQ.
7461 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7462 BUILT_IN_STRNCMP_EQ.
7463 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7464 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7465 (gimple_fold_builtin): Likewise.
7466 * tree-ssa-strlen.c (compute_string_length): New function.
7467 (determine_min_obsize): New function.
7468 (handle_builtin_string_cmp): New function to handle calls to
7469 string compare functions.
7470 (strlen_optimize_stmt): Add handling to builtin string compare
7471 calls.
7472 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7473 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7474 * tree.c (build_common_builtin_nodes): Add new defines of
7475 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7476
7477 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7478
7479 PR target/85984
7480 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7481 functions with naked attribute.
7482
7483 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7484
7485 * config/i386/sse.md (avx_vec_concat<mode>):
7486 Substitute concat_tg_mode mode attribute with xtg_mode.
7487 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7488 (concat_tg_mode): Remove mode attribute.
7489
7490 2018-05-31 Martin Sebor <msebor@redhat.com>
7491
7492 PR c/82063
7493 * calls.c (alloc_max_size): Correct a logic error/typo.
7494 Treat excessive arguments as infinite. Warn for invalid arguments.
7495 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7496
7497 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7498
7499 PR target/85829
7500 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7501 and movx for Haswell.
7502
7503 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7504 Cesar Philippidis <cesar@codesourcery.com>
7505
7506 PR middle-end/85879
7507 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7508 when emitting error on private/firstprivate reductions.
7509 * omp-low.c (lower_omp_target): Avoid reference-type processing
7510 on pointers for firstprivate clause.
7511
7512 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7513
7514 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7515 (st1x2): Likewise.
7516 (st1x3): Likewise.
7517 * config/aarch64/aarch64-simd.md
7518 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7519 (aarch64_ld1_x3_<mode>): Likewise
7520 (aarch64_st1x2<VALLDIF:mode>): Likewise
7521 (aarch64_st1_x2_<mode>): Likewise
7522 (aarch64_st1x3<VALLDIF:mode>): Likewise
7523 (aarch64_st1_x3_<mode>): Likewise
7524 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7525 (vld1_s8_x3): Likewise.
7526 (vld1_u16_x3): Likewise.
7527 (vld1_s16_x3): Likewise.
7528 (vld1_u32_x3): Likewise.
7529 (vld1_s32_x3): Likewise.
7530 (vld1_u64_x3): Likewise.
7531 (vld1_s64_x3): Likewise.
7532 (vld1_f16_x3): Likewise.
7533 (vld1_f32_x3): Likewise.
7534 (vld1_f64_x3): Likewise.
7535 (vld1_p8_x3): Likewise.
7536 (vld1_p16_x3): Likewise.
7537 (vld1_p64_x3): Likewise.
7538 (vld1q_u8_x3): Likewise.
7539 (vld1q_s8_x3): Likewise.
7540 (vld1q_u16_x3): Likewise.
7541 (vld1q_s16_x3): Likewise.
7542 (vld1q_u32_x3): Likewise.
7543 (vld1q_s32_x3): Likewise.
7544 (vld1q_u64_x3): Likewise.
7545 (vld1q_s64_x3): Likewise.
7546 (vld1q_f16_x3): Likewise.
7547 (vld1q_f32_x3): Likewise.
7548 (vld1q_f64_x3): Likewise.
7549 (vld1q_p8_x3): Likewise.
7550 (vld1q_p16_x3): Likewise.
7551 (vld1q_p64_x3): Likewise.
7552 (vst1_s64_x2): Likewise.
7553 (vst1_u64_x2): Likewise.
7554 (vst1_f64_x2): Likewise.
7555 (vst1_s8_x2): Likewise.
7556 (vst1_p8_x2): Likewise.
7557 (vst1_s16_x2): Likewise.
7558 (vst1_p16_x2): Likewise.
7559 (vst1_s32_x2): Likewise.
7560 (vst1_u8_x2): Likewise.
7561 (vst1_u16_x2): Likewise.
7562 (vst1_u32_x2): Likewise.
7563 (vst1_f16_x2): Likewise.
7564 (vst1_f32_x2): Likewise.
7565 (vst1_p64_x2): Likewise.
7566 (vst1q_s8_x2): Likewise.
7567 (vst1q_p8_x2): Likewise.
7568 (vst1q_s16_x2): Likewise.
7569 (vst1q_p16_x2): Likewise.
7570 (vst1q_s32_x2): Likewise.
7571 (vst1q_s64_x2): Likewise.
7572 (vst1q_u8_x2): Likewise.
7573 (vst1q_u16_x2): Likewise.
7574 (vst1q_u32_x2): Likewise.
7575 (vst1q_u64_x2): Likewise.
7576 (vst1q_f16_x2): Likewise.
7577 (vst1q_f32_x2): Likewise.
7578 (vst1q_f64_x2): Likewise.
7579 (vst1q_p64_x2): Likewise.
7580 (vst1_s64_x3): Likewise.
7581 (vst1_u64_x3): Likewise.
7582 (vst1_f64_x3): Likewise.
7583 (vst1_s8_x3): Likewise.
7584 (vst1_p8_x3): Likewise.
7585 (vst1_s16_x3): Likewise.
7586 (vst1_p16_x3): Likewise.
7587 (vst1_s32_x3): Likewise.
7588 (vst1_u8_x3): Likewise.
7589 (vst1_u16_x3): Likewise.
7590 (vst1_u32_x3): Likewise.
7591 (vst1_f16_x3): Likewise.
7592 (vst1_f32_x3): Likewise.
7593 (vst1_p64_x3): Likewise.
7594 (vst1q_s8_x3): Likewise.
7595 (vst1q_p8_x3): Likewise.
7596 (vst1q_s16_x3): Likewise.
7597 (vst1q_p16_x3): Likewise.
7598 (vst1q_s32_x3): Likewise.
7599 (vst1q_s64_x3): Likewise.
7600 (vst1q_u8_x3): Likewise.
7601 (vst1q_u16_x3): Likewise.
7602 (vst1q_u32_x3): Likewise.
7603 (vst1q_u64_x3): Likewise.
7604 (vst1q_f16_x3): Likewise.
7605 (vst1q_f32_x3): Likewise.
7606 (vst1q_f64_x3): Likewise.
7607 (vst1q_p64_x3): Likewise.
7608
7609 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7610
7611 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7612 user_label_prefix to name.
7613
7614 * tree-core.h: Update comment about the format of NAME string
7615 passed to handler in attribute_spec.
7616
7617 * config/msp430/msp430.md: Remove erroneous subreg expression from
7618 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7619 zero_extend{q,h}isi2.
7620
7621 2018-05-30 Borislav Petkov <bp@suse.de>
7622
7623 * doc/extend.texi: Document some architecture specific
7624 constraints and sort entries.
7625
7626 2018-05-30 Martin Sebor <msebor@redhat.com>
7627
7628 PR middle-end/85369
7629 * builtins.c (expand_builtin_stpcpy_1): New function.
7630 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7631 only if the former succeeds.
7632
7633 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7634
7635 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7636 in saphira.
7637
7638 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7639
7640 * doc/invoke.texi (-flinker-output): Document
7641
7642 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7643
7644 * passes.c (ipa_write_summaries): Only modify statements if body
7645 is in memory.
7646 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7647 incrementally linking.
7648 (ipa_passes): Likewise.
7649 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7650 pass down resolution info.
7651 * common.opt (flag_incremental_link): Update info.
7652 * gcc.c (plugin specs): Turn flinker-output=* to
7653 -plugin-opt=-linker-output-known
7654 * toplev.c (compile_file): Also cut compilation when doing incremental
7655 link.
7656 * flag-types. (enum lto_partition_model): Add
7657 LTO_LINKER_OUTPUT_NOLTOREL.
7658 (invoke.texi): Add -flinker-output docs.
7659 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7660 link same way as WPA; do not stream in dead initializers.
7661
7662 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7663 darf2out_register_external_decl): Support incremental link.
7664
7665 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7666
7667 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7668
7669 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7670
7671 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7672 it down to simple_object_copy_lto_debug_sections.
7673 (run_gcc): Determine incremental LTO link time and configure
7674 lto1 into non-wpa mode, disable renaming of debug sections.
7675
7676 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7677
7678 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7679 descriptions of various incorrectly documented functions.
7680
7681 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7682
7683 Revert:
7684 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7685 address check not strict.
7686
7687 2018-05-30 Richard Biener <rguenther@suse.de>
7688
7689 PR tree-optimization/85964
7690 * tracer.c (better_p): Drop initialized count check, we only
7691 call the function with initialized counts now.
7692 (find_best_successor): Do find a best edge if one
7693 has uninitialized count.
7694 (find_best_predecessor): Likewise. Do BB frequency check only
7695 if count is initialized.
7696
7697 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7698
7699 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7700 (aarch64_ldrstr_offset_compare): New.
7701 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7702 load/store orderings.
7703 (aarch64_gen_adjusted_ldpstp): Likewise.
7704
7705 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7706
7707 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7708 Check for subset of GENERAL_REGS and FP_REGS.
7709 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7710 r=w alternative.
7711
7712 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7713
7714 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7715 and wi::to_poly_offset. Add the current offset and then check
7716 whether the sum fits, rather than using an unchecked addition of
7717 a checked term. Check for a shwi rather than a uhwi.
7718 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7719 (store_constructor): Use poly_int_tree_p.
7720 (expand_expr_real_1): Likewise.
7721 * function.c (assign_temp): Likewise.
7722 * fold-const.c (const_binop): Use poly_int_tree_p and
7723 wi::to_poly_offset.
7724 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7725 division.
7726 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7727 to_poly_offset for MEM offsets.
7728 * ipa-icf.c (sem_variable::equals): Likewise.
7729 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7730 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7731 wi::to_poly_offset for BIT_FIELD_REF offsets.
7732 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7733 wi::to_poly_offset.
7734 * var-tracking.c (emit_note_insn_var_location): Use
7735 tree_to_poly_uint64.
7736
7737 2018-05-29 Jim Wilson <jimw@sifive.com>
7738
7739 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7740
7741 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7742
7743 PR target/85950
7744 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7745 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7746 sequence.
7747 (sse4_1_round<mode>2): Use nonimmediate_operand
7748 for operand 1 predicate.
7749
7750 2018-05-29 Martin Sebor <msebor@redhat.com>
7751 Richard Biener <rguenther@suse.de>
7752
7753 PR testsuite/85888
7754 * calls.c (get_size_range): Call determine_value_range instead
7755 of get_value_range..
7756 * tree-vrp.h (determine_value_range): Declared new function.
7757 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7758
7759 2018-05-29 Richard Biener <rguenther@suse.de>
7760
7761 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7762 sure to use non-pattern stmts for get_earlier_stmt arguments.
7763 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7764 called on pattern stmts.
7765 (get_later_stmt): Likewise.
7766
7767 2018-05-29 Martin Liska <mliska@suse.cz>
7768
7769 PR gcov-profile/85759
7770 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7771 env variables.
7772
7773 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7774
7775 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7776 VEC_UNPACK_*_EXPR.
7777 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7778 VEC_PACK_*_EXPR.
7779
7780 PR target/85918
7781 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7782 VEC_PACK_FLOAT_EXPR): New tree codes.
7783 * tree-pretty-print.c (op_code_prio): Handle
7784 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7785 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7786 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7787 * tree-inline.c (estimate_operator_cost): Likewise.
7788 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7789 * fold-const.c (const_binop): Likewise.
7790 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7791 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7792 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7793 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7794 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7795 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7796 * expr.c (expand_expr_real_2): Likewise.
7797 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7798 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7799 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7800 optabs.
7801 * optabs.c (expand_widen_pattern_expr): For
7802 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7803 sign from result type rather than operand's type.
7804 (expand_binop_directly): For vec_packu_float_optab and
7805 vec_packs_float_optab allow result type to be different from operand's
7806 type.
7807 * optabs-tree.c (optab_for_tree_code): Handle
7808 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7809 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7810 * tree-vect-generic.c (expand_vector_operations_1): Handle
7811 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7812 VEC_PACK_FLOAT_EXPR.
7813 * tree-vect-stmts.c (supportable_widening_operation): Handle
7814 FIX_TRUNC_EXPR.
7815 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7816 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7817 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7818 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7819 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7820 mode attributes.
7821 (vec_pack<floatprefix>_float_<mode>): New expander.
7822 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7823 attributes.
7824 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7825 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7826 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7827 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7828 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7829 Document.
7830 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7831 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7832 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7833 VEC_PACK_FLOAT_EXPR): Document.
7834
7835 2018-05-29 Richard Biener <rguenther@suse.de>
7836
7837 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7838 member.
7839 (stmt_vec_info_vec): Make pointer.
7840 (init_stmt_vec_info_vec): Remove.
7841 (free_stmt_vec_info_vec): Likewise.
7842 (set_stmt_vec_info_vec): New function.
7843 (free_stmt_vec_infos): Likewise.
7844 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7845 (set_vinfo_for_stmt): Likewise.
7846 (get_earlier_stmt): Likewise.
7847 (get_later_stmt): Likewise.
7848 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7849 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7850 (vec_info::~vec_info): Free stmt_vec_infos.
7851 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7852 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7853 (pass_slp_vectorize::execute): Likewise.
7854 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7855 (free_stmt_vec_info_vec): Likewise.
7856 (set_stmt_vec_info_vec): New function.
7857 (free_stmt_vec_infos): Likewise.
7858 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7859 the global stmt_vec_info_vec.
7860 * tree-parloops.c (gather_scalar_reductions): Use
7861 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7862 vector.
7863
7864 2018-05-29 Richard Biener <rguenther@suse.de>
7865
7866 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7867
7868 2018-05-29 Martin Liska <mliska@suse.cz>
7869 David Malcolm <dmalcolm@redhat.com>
7870
7871 * vec.c (test_reverse): New.
7872 (vec_c_tests): Add new test.
7873 * vec.h (vl_ptr>::reverse): New function.
7874
7875 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7876
7877 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7878
7879 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7880 and later.
7881
7882 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7883
7884 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7885
7886 2018-05-28 Richard Biener <rguenther@suse.de>
7887
7888 PR tree-optimization/85933
7889 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7890 look at stmts marked as vectorizable.
7891
7892 2018-05-28 Richard Biener <rguenther@suse.de>
7893
7894 PR tree-optimization/85934
7895 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7896 vector boolean check before scalar optimization.
7897
7898 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7899
7900 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7901 for armv5te.
7902
7903 2018-05-28 Mark Wielaard <mark@klomp.org>
7904
7905 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7906 if it is an expression containing a minus sign.
7907
7908 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7909
7910 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7911
7912 2018-05-27 Paul Koning <ni1d@arrl.net>
7913
7914 * config/pdp11/pdp11.md (truncsihi2): Remove.
7915
7916 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7917 Chung-Ju Wu <jasonwucj@gmail.com>
7918
7919 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7920 implementation.
7921 (unaligned_store_dw): Ditto.
7922 * config/nds32/nds32-memory-manipulation.c
7923 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7924 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7925 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7926 (emit_setmem_word_loop): Rename to ...
7927 (emit_setmem_doubleword_loop): ... this.
7928 (nds32_gen_dup_4_byte_to_word_value): New function.
7929 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7930 (nds32_expand_setmem_loop): Refine implementation.
7931 (nds32_expand_setmem_loop_v3m): Ditto.
7932 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7933 pattern.
7934
7935 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7936
7937 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7938
7939 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7940
7941 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7942 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7943 machine->attr_no_prologue_p.
7944 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7945 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7946 (nds32_expand_epilogue): Consider attr_naked_p.
7947 (nds32_expand_epilogue_v3pop): Likewise.
7948 (nds32_can_use_return_insn): Likewise.
7949 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7950 attr_no_prologue_p fields.
7951 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7952
7953 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7954
7955 PR target/85918
7956 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7957 attributes.
7958 * config/i386/sse.md
7959 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7960 Rename to ...
7961 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7962 ... this.
7963 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7964 Rename to ...
7965 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7966 ... this.
7967 (*<floatsuffix>floatv2div2sf2): Rename to ...
7968 (*float<floatunssuffix>v2div2sf2): ... this.
7969 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7970 (float<floatunssuffix>v2div2sf2_mask): ... this.
7971 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7972 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7973 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7974 to ...
7975 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7976 ... this.
7977 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7978 Rename to ...
7979 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7980 ... this.
7981 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7982 Rename to ...
7983 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7984 ... this.
7985 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7986 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7987 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7988 gen_ufix_truncv8dfv8si2.
7989 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7990 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7991 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7992 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7993 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7994 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7995 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7996 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7997
7998 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7999
8000 PR target/85900
8001 PR target/85345
8002 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8003
8004 2018-05-25 Jim Wilson <jimw@sifive.com>
8005
8006 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8007 * config/riscv/riscv.c (struct machine_function): Add
8008 interrupt_handler_p and attribute_checked_p fields.
8009 (riscv_attribute_table): Add interrupt.
8010 (riscv_interrupt_type_p): New.
8011 (riscv_save_reg_p): Save extra regs for interrupt handler.
8012 (riscv_use_save_libcall): Return false for interrupt handler.
8013 (riscv_first_stack_step): Add forward declaration.
8014 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
8015 for interrupt handler with large frame. Use it for saved reg list.
8016 (riscv_expand_prologue): Move flag_stack_usage_info support to
8017 eliminate duplication.
8018 (riscv_expand_epilogue): Generate mret for interrupt handler.
8019 (riscv_epilogue_uses): New.
8020 (riscv_can_use_return_insn): Return false for interrupt handler.
8021 (riscv_function_ok_for_sibcall): Likewise.
8022 (riscv_set_current_function): Add interrupt handler support.
8023 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8024 * config/riscv/riscv.md (UNSPECV_MRET): New.
8025 (GP_REGNUM): New.
8026 (riscv_frflags, riscv_fsflags): Use tab after opcode.
8027 (riscv_mret): New.
8028 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8029
8030 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
8031
8032 PR tree-optimization/85712
8033 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8034 this candidate has already been replaced in-situ by a copy.
8035
8036 2018-05-25 Jason Merrill <jason@redhat.com>
8037
8038 PR c++/80485 - inline function non-zero address.
8039 * symtab.c (nonzero_address): Check DECL_COMDAT.
8040
8041 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
8042
8043 PR target/83628
8044 * config/alpha/alpha.md (ashlsi3): New insn pattern.
8045 (*ashlsi_se): Rename from *ashldi_se. Define as sign
8046 extension of SImode operation. Use const123_operand predicate.
8047 (*saddsi_1): Remove.
8048 (*saddl_se_1): Ditto.
8049 (*ssubsi_1): Ditto.
8050 (*ssubl_se_1): Ditto.
8051 * config/alpha/predicates.md (const123_operand): New predicate.
8052 * config/alpha/constraints.md (P): Use IN_RANGE.
8053
8054 2018-05-25 Richard Biener <rguenther@suse.de>
8055
8056 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8057 defaulted to true.
8058 (ref_maybe_used_by_stmt_p): Likewise.
8059 (stmt_may_clobber_ref_p): Likewise.
8060 (stmt_may_clobber_ref_p_1): Likewise.
8061 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8062 and pass it along.
8063 (ref_maybe_used_by_stmt_p): Likewise.
8064 (stmt_may_clobber_ref_p): Likewise.
8065 (stmt_may_clobber_ref_p_1): Likewise.
8066 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8067 the alias oracle to disambiguate DRs with stmts DR analysis
8068 couldn't handle.
8069 (vect_analyze_data_refs): Do not give up on not analyzable
8070 DRs for BB vectorization. Remove code truncating the dataref
8071 vector.
8072
8073 2018-05-25 Jakub Jelinek <jakub@redhat.com>
8074
8075 PR target/85832
8076 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8077 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
8078 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8079
8080 2018-05-25 Richard Biener <rguenther@suse.de>
8081
8082 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8083 function, combining stmt data ref gathering and fatal analysis
8084 parts.
8085 (vect_analyze_data_refs): Remove now redudnant code and simplify.
8086 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8087 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8088 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8089 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8090
8091 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8092
8093 PR tree-optimization/85720
8094 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8095 SCC if all partitions are builtins.
8096 (version_loop_by_alias_check): New parameter. Generate cancelable
8097 runtime alias check if all partitions are builtins.
8098 (distribute_loop): Update call to above function.
8099
8100 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8101
8102 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8103 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8104 (parm_default_def_partition_arg): Ditto.
8105 (set_parm_default_def_partition): Ditto.
8106 (get_parm_default_def_partitions): Ditto and make it static.
8107 (get_undefined_value_partitions): Ditto and make it static.
8108 (remove_ssa_form): Refactor call to init_var_map here.
8109 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8110 computation for loop region.
8111 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8112 (register_default_def): Delete.
8113 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8114 (parm_default_def_partition_arg): Ditto.
8115 (set_parm_default_def_partition): Ditto.
8116 (get_parm_default_def_partitions): Ditto and make it static.
8117 (get_undefined_value_partitions): Ditto and make it static.
8118 (coalesce_with_default, coalesce_with_default): Update comment.
8119 (create_coalesce_list_for_region): New func factored out from
8120 create_outofssa_var_map.
8121 (populate_coalesce_list_for_outofssa): New func factored out from
8122 create_outofssa_var_map and coalesce_ssa_name.
8123 (create_outofssa_var_map): Delete.
8124 (coalesce_ssa_name): Refactor to support live range computation.
8125 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8126 (get_parm_default_def_partitions): Delete.
8127 (get_undefined_value_partitions): Ditto.
8128 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8129 computation for loop region.
8130 (new_tree_live_info, loe_visit_block): Ditto.
8131 (live_worklist, set_var_live_on_entry): Ditto.
8132 (calculate_live_on_exit, verify_live_on_entry): Ditto.
8133 * tree-ssa-live.h (struct _var_map): New fields.
8134 (init_var_map): Change decl.
8135 (region_contains_p): New.
8136
8137 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8138
8139 * tree-ssa-live.h (live_merge_and_clear): Delete.
8140
8141 2018-05-25 Richard Biener <rguenther@suse.de>
8142
8143 PR c++/85912
8144 * tree-dump.c (dequeue_and_dump): Remove access to removed
8145 operand 2 of a SWITCH_EXPR.
8146
8147 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8148
8149 * doc/sourcebuild.texi (vect_double_cond_arith): Include
8150 multiplication and division.
8151 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8152 (cond_udiv@var{m}, cond_umod@var{m}): Document.
8153 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8154 (cond_udiv_optab, cond_umod_optab): New optabs.
8155 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8156 (IFN_COND_RDIV): New internal functions.
8157 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8158 TRUNC_MOD_EXPR and RDIV_EXPR.
8159 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8160 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8161 New unspecs.
8162 (SVE_INT_BINARY): Include mult.
8163 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8164 (optab, sve_int_op): Handle mult.
8165 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8166 UNSPEC_COND_DIV.
8167 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8168 for SVE_INT_BINARY_SD.
8169
8170 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8171
8172 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8173 (optab, sve_int_op): Handle div and udiv.
8174 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8175 for SVE_INT_BINARY_SD.
8176 (*<optab><mode>3): New insn for the same.
8177
8178 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8179
8180 * tree-vect-patterns.c: Include predict.h.
8181 (vect_recog_divmod_pattern): Restrict check for division support
8182 to when optimizing for size.
8183
8184 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8185
8186 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8187 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8188 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8189 (gimple_match_op::set_op): Likewise.
8190 (gimple_resimplify4): Declare.
8191 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8192 (expr::gen_transform): Likewise.
8193 (decision_tree::gen): Generate a simplification routine for 4 operands.
8194 * gimple-match-head.c (gimple_simplify): Add an overload for
8195 4 operands. In the top-level function, handle up to 4 call
8196 arguments and call gimple_resimplify4.
8197 (gimple_resimplify4): New function.
8198 (build_call_internal): Pass a fourth operand.
8199 (maybe_push_to_seq): Likewise.
8200 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8201 Fold VEC_COND_EXPRs of an operation and a default value into
8202 an IFN_COND_* function if possible.
8203 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8204 New unspecs.
8205 (SVE_COND_FP_BINARY): Include them.
8206 (optab, sve_fp_op): Handle them.
8207 (SVE_INT_BINARY_REV): New code iterator.
8208 (SVE_COND_FP_BINARY_REV): New int iterator.
8209 (commutative): New int attribute.
8210 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8211 Declare.
8212 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8213 function.
8214 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8215 (*cond_<optab><mode>): New patterns for reversed operands.
8216
8217 2018-05-25 Richard Biener <rguenther@suse.de>
8218
8219 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8220 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8221 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8222 (STMT_VINFO_GROUPED_ACCESS): Adjust.
8223 * tree-vect-data-refs.c (everywhere): Adjust users.
8224 * tree-vect-loop.c (everywhere): Likewise.
8225 * tree-vect-slp.c (everywhere): Likewise.
8226 * tree-vect-stmts.c (everywhere): Likewise.
8227 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8228
8229 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8230
8231 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8232 Rename to...
8233 (gcc_cv_as_section_exclude): ... this.
8234 Try Solaris as #exclude syntax.
8235 * configure: Regenerate.
8236 * config.in: Regenerate.
8237 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8238 SECTION_EXCLUDE.
8239 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8240 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8241
8242 * varasm.c (default_elf_asm_named_section): Don't check if
8243 HAVE_GAS_SECTION_EXCLUDE is defined.
8244
8245 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8246
8247 * doc/md.texi: Update the documentation of the cond_* optabs
8248 to mention the new final operand. Fix GET_MODE_NUNITS call.
8249 Describe the scalar case too.
8250 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8251 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8252 instead of 2.
8253 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8254 (get_conditional_internal_fn): Update comment.
8255 * tree-vect-loop.c (vectorizable_reduction): Pass the original
8256 accumulator value as a final argument to conditional functions.
8257 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8258 a define_expand and add an "else" operand. Assert for now that
8259 the else operand is equal to operand 2. Use SVE_INT_BINARY and
8260 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8261 (*cond_<optab><mode>): New patterns.
8262 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8263 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8264 (UNSPEC_COND_EOR): Delete.
8265 (optab): Remove associated mappings.
8266 (SVE_INT_BINARY): New code iterator.
8267 (sve_int_op): Remove int attribute and add "minus" to the code
8268 attribute.
8269 (SVE_COND_INT_OP): Delete.
8270 (SVE_COND_FP_OP): Rename to...
8271 (SVE_COND_FP_BINARY): ...this.
8272
8273 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8274
8275 * optabs.c (can_reuse_operands_p): New function.
8276 (maybe_legitimize_operands): Try to reuse the results for
8277 earlier operands.
8278
8279 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8280
8281 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8282 Add {q} suffix to insn mnemonic.
8283
8284 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8285
8286 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8287 (msp430_warn_func_return): New.
8288
8289 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
8290
8291 * fold-const.c (tree_nonzero_bits): New function.
8292 * fold-const.h (tree_nonzero_bits): Likewise.
8293 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8294 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8295
8296 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8297
8298 PR target/85900
8299 PR target/85345
8300 * varasm.c (assemble_alias): Check ifunc_resolver only on
8301 FUNCTION_DECL.
8302
8303 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8304
8305 PR target/85903
8306 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8307 when memory input operand is handled.
8308
8309 2018-05-24 Luis Machado <luis.machado@linaro.org>
8310
8311 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8312 global.
8313 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8314
8315 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8316
8317 * match.pd: Delay FMA folds until after vectorization.
8318
8319 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
8320
8321 PR target/83009
8322 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8323 address check not strict.
8324
8325 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8326
8327 * gimple-match.h (gimple_match_op): New class.
8328 (mprts_hook): Replace parameters with a gimple_match_op *.
8329 (maybe_build_generic_op): Likewise.
8330 (gimple_simplified_result_is_gimple_val): Replace parameters with
8331 a const gimple_match_op *.
8332 (gimple_simplify): Replace code_helper * and tree * parameters with
8333 a gimple_match_op * parameter.
8334 (gimple_resimplify1): Replace code_helper *, tree and tree *
8335 parameters with a gimple_match_op * parameter.
8336 (gimple_resimplify2): Likewise.
8337 (gimple_resimplify3): Likewise.
8338 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8339 parameters with a gimple_match_op * parameter.
8340 * gimple-match-head.c (gimple_simplify): Change prototypes of
8341 auto-generated functions to take a gimple_match_op * instead of
8342 separate code_helper * and tree * parameters. Make the same
8343 change in the top-level overload and update calls to the
8344 gimple_resimplify routines. Update calls to the auto-generated
8345 functions and to maybe_push_res_to_seq in the publicly-facing
8346 operation-specific gimple_simplify overloads.
8347 (gimple_match_op::MAX_NUM_OPS): Define.
8348 (gimple_resimplify1): Replace rcode and ops with a single res_op
8349 parameter. Update call to gimple_simplify.
8350 (gimple_resimplify2): Likewise.
8351 (gimple_resimplify3): Likewise.
8352 (mprts_hook): Replace parameters with a gimple_match_op *.
8353 (maybe_build_generic_op): Likewise.
8354 (build_call_internal): Replace type, nargs and ops with
8355 a gimple_match_op *.
8356 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8357 with a single gimple_match_op *. Update calls to mprts_hook,
8358 build_call_internal and gimple_simplified_result_is_gimple_val.
8359 Factor out code that is common to the tree_code and combined_fn cases.
8360 * genmatch.c (expr::gen_transform): Replace tem_code and
8361 tem_ops with a gimple_match_op called tem_op. Update calls
8362 to the gimple_resimplify functions and maybe_push_res_to_seq.
8363 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8364 res_ops. Update call to the gimple_resimplify functions.
8365 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8366 (decision_tree::gen): Make the functions take a gimple_match_op *
8367 called res_op instead of separate res_code and res_ops parameters.
8368 Update call accordingly.
8369 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8370 and ops with a single res_op parameter. Update calls to
8371 maybe_build_generic_op and maybe_push_res_to_seq.
8372 (fold_stmt_1): Update calls to gimple_simplify and
8373 replace_stmt_with_simplification.
8374 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8375 and gimple_simplified_result_is_gimple_val.
8376 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8377 gimple_simplify.
8378 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8379 with a gimple_match_op *.
8380 (vn_nary_build_or_lookup): Likewise. Update call to
8381 vn_nary_build_or_lookup_1.
8382 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8383 gimple_match_op *. Update calls to the gimple_resimplify routines
8384 and to gimple_simplified_result_is_gimple_val.
8385 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8386 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8387 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8388 (visit_nary_op): Likewise.
8389 (visit_reference_op_load): Likewise.
8390
8391 2018-05-23 Luis Machado <luis.machado@linaro.org>
8392
8393 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8394 modifier for printing the step amount.
8395
8396 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
8397
8398 PR target/78849
8399 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8400 types.
8401
8402 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
8403
8404 * doc/sourcebuild.texi (Endianness): New subsubsection.
8405
8406 2018-05-23 Luis Machado <luis.machado@linaro.org>
8407
8408 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8409 <prefetch_dynamic_strides>: New const bool field.
8410 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8411 prefetch_dynamic_strides.
8412 (exynosm1_prefetch_tune): Likewise.
8413 (thunderxt88_prefetch_tune): Likewise.
8414 (thunderx_prefetch_tune): Likewise.
8415 (thunderx2t99_prefetch_tune): Likewise.
8416 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8417 false.
8418 (aarch64_override_options_internal): Update to set
8419 PARAM_PREFETCH_DYNAMIC_STRIDES.
8420 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8421 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8422 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8423 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8424 prefetch-dynamic-strides setting.
8425
8426 2018-05-23 Luis Machado <luis.machado@linaro.org>
8427
8428 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8429 <minimum_stride>: New const int field.
8430 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8431 minimum_stride field defaulting to -1.
8432 (exynosm1_prefetch_tune): Likewise.
8433 (thunderxt88_prefetch_tune): Likewise.
8434 (thunderx_prefetch_tune): Likewise.
8435 (thunderx2t99_prefetch_tune): Likewise.
8436 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8437 <default_opt_level>: Set to 3.
8438 (aarch64_override_options_internal): Update to set
8439 PARAM_PREFETCH_MINIMUM_STRIDE.
8440 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8441 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8442 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8443 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8444 stride is constant and is below the minimum stride threshold.
8445
8446 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8447
8448 * config/arm/arm-cpus.in (mode26): Delete.
8449 (armv4): Delete mode26 reference.
8450 * config/arm/arm.c (arm_configure_build_target): Delete use of
8451 isa_bit_mode26.
8452
8453 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8454
8455 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8456 New insn pattern.
8457 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8458 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8459 for non-SSE modes.
8460 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8461 (floatunsdidf2): Ditto.
8462
8463 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8464
8465 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8466 (fixuns_trunc<mode>si2_avx512f): Ditto.
8467 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8468 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8469 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8470
8471 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8472
8473 PR rtl-optimization/79985
8474 * df-scan.c (df_insn_refs_collect): Remove special case for
8475 global registers and asm statements.
8476
8477 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8478
8479 * extend.texi (Global Register Variables): Rewrite the bullet list.
8480 Note that the register is available for allocation. Note that access
8481 via inline asm must use constraints. Add note about async-signal
8482 handlers. Remove paragraph about automagic register selection.
8483
8484 2018-05-23 Richard Biener <rguenther@suse.de>
8485
8486 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8487 of fixed offset from memset VN.
8488
8489 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8490
8491 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8492 first_interp field.
8493 (alloc_cand_and_find_basis): Initialize first_interp field.
8494 (slsr_process_mul): Modify first_interp field.
8495 (slsr_process_add): Likewise.
8496 (slsr_process_cast): Modify first_interp field for each new
8497 interpretation.
8498 (slsr_process_copy): Likewise.
8499 (dump_candidate): Dump first_interp field.
8500 (replace_mult_candidate): Process all interpretations, not just
8501 subsequent ones.
8502 (replace_rhs_if_not_dup): Likewise.
8503 (replace_one_candidate): Likewise.
8504
8505 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8506
8507 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8508 Add new boolean.
8509 (aarch64_needs_frame_chain): New function.
8510 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8511
8512 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8513
8514 PR target/84882
8515 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8516 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8517 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8518 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8519 as true for strict-align.
8520 (aarch64_can_inline_p): Perform checks even when callee has no
8521 attributes to check for strict alignment.
8522 * doc/extend.texi (AArch64 Function Attributes): Document
8523 no-strict-align.
8524 * doc/invoke.texi: (AArch64 Options): Likewise.
8525
8526 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
8527
8528 PR tree-optimization/85853
8529 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8530 the handling of the root of the node to...
8531 (vect_slp_analyze_node_operations_1): ...this new function,
8532 and run the whole thing with the child nodes' def types
8533 set according to their SLP node's def type.
8534
8535 2018-05-23 Richard Biener <rguenther@suse.de>
8536
8537 PR middle-end/85874
8538 * tree-data-ref.c (create_runtime_alias_checks): Defer
8539 and ignore overflow warnings.
8540
8541 2018-05-23 Yury Gribov <tetra2005@gmail.com>
8542
8543 PR tree-optimization/85822
8544 * tree-vrp.c (is_masked_range_test): Fix handling of negative
8545 constants.
8546
8547 2018-05-23 Richard Biener <rguenther@suse.de>
8548
8549 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8550 memset constants via native_interpret_expr.
8551
8552 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
8553
8554 PR target/85345
8555 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8556 attribute.
8557 (cgraph_node::create_alias): Likewise.
8558 (cgraph_node::get_availability): Check ifunc_resolver instead
8559 of looking up ifunc attribute.
8560 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8561 * varasm.c (do_assemble_alias): Likewise.
8562 (assemble_alias): Likewise.
8563 (default_binds_local_p_3): Likewise.
8564 * cgraph.h (cgraph_node): Add ifunc_resolver.
8565 (cgraph_node::only_called_directly_or_aliased_p): Return false
8566 for IFUNC resolver.
8567 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8568 attribute.
8569 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8570 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8571 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8572 instead of looking up ifunc attribute.
8573
8574 2018-05-22 Luis Machado <luis.machado@linaro.org>
8575
8576 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8577
8578 2018-05-22 Martin Sebor <msebor@redhat.com>
8579
8580 PR middle-end/85359
8581 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8582 only when expasion succeeds.
8583 (expand_builtin_strcmp): Same.
8584 (expand_builtin_strncmp): Same.
8585
8586 2018-05-22 Martin Sebor <msebor@redhat.com>
8587
8588 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8589
8590 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8591 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8592
8593 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8594 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8595 code.
8596 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8597 Add check for legitimate_address.
8598 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8599 (aarch64_swap_ldrstr_operands): New.
8600 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8601 Define prototype.
8602
8603 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8604 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8605
8606 * config/aarch64/aarch64.md: New patterns to generate stp
8607 and ldp.
8608 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8609 single words and double words.
8610 (load_pair_sw, load_pair_dw): Likewise.
8611 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8612 Delete.
8613 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8614 Delete.
8615 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8616 for different mode ldpstp and add peephole for merged zero stores.
8617 Likewise for loads.
8618 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8619 Add size check.
8620 (aarch64_gen_store_pair): Rename calls to match new patterns.
8621 (aarch64_gen_load_pair): Rename calls to match new patterns.
8622 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8623 (load_pair<DREG:mode><DREG2:mode>): ... This.
8624 (store_pair<mode>): Rename to...
8625 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8626 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8627 New mode iterators.
8628 (V_INT_EQUIV): Handle SImode.
8629 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8630 New predicate.
8631
8632 2018-05-22 Martin Sebor <msebor@redhat.com>
8633
8634 PR c/85623
8635 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8636 or ajust the presumed bound on an operation to avoid unnecessary
8637 warnings.
8638
8639 2018-05-22 Martin Sebor <msebor@redhat.com>
8640
8641 PR tree-optimization/85826
8642 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8643 assuming that a DECL necesarily has a constant size.
8644
8645 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8646
8647 PR middle-end/85862
8648 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8649
8650 2018-05-22 Richard Biener <rguenther@suse.de>
8651
8652 PR tree-optimization/85834
8653 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8654 non-constant and non-zero memset arguments.
8655
8656 2018-05-22 Martin Liska <mliska@suse.cz>
8657
8658 PR ipa/85607
8659 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8660
8661 2018-05-22 Richard Biener <rguenther@suse.de>
8662
8663 PR tree-optimization/85863
8664 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8665 comparisons when vectype is specified.
8666 (vectorizable_condition): Do not specify vectype for
8667 vect_is_simple_cond when SLP vectorizing.
8668
8669 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8670
8671 PR target/85657
8672 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8673 define __ibm128 as long double.
8674 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8675 as a distinct type when IEEE 128-bit support is enabled.
8676 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8677 128-bit types to use the correct functions.
8678 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8679 convert between 128-bit floating point types that have different
8680 modes but the same representation, instead of using gen_lowpart to
8681 makean alias.
8682 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8683 KFmode.
8684 (IFKF_reg): New attributes to give the register constraints for
8685 IFmode and KFmode.
8686 (extend<mode>tf2_internal): New insns to mark an explicit
8687 conversion between 128-bit floating point types that have a
8688 different mode but share the same representation.
8689
8690 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8691
8692 PR tree-optimization/85814
8693 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8694 a null return from get_strinfo when unsharing the next
8695 strinfo in the chain.
8696
8697 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8698
8699 PR gcc/84923
8700 * varasm.c (weak_finish): Clean up weak_decls.
8701
8702 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8703
8704 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8705 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8706 UNSPEC_UADALP values.
8707 * config/aarch64/iterators.md (ABAL): New int iterator.
8708 (ABDL2): Likewise.
8709 (ADALP): Likewise.
8710 (sur): Add mappings for the above.
8711 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8712 New define_insn.
8713 (aarch64_<sur>abal<mode>_4): Likewise.
8714 (aarch64_<sur>adalp<mode>_3): Likewise.
8715 (<sur>sadv16qi): New define_expand.
8716
8717 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8718
8719 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8720 (*movdf_internal): Ditto.
8721 (*rcpsf2_sse): Ditto.
8722 (*rsqrtsf2_sse): Ditto.
8723 (*sqrt<mode>2_sse): Ditto.
8724
8725 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8726
8727 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8728 eor3q<mode>4.
8729 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8730 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8731 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8732 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8733 vbcaxq_s64): New.
8734 * config/aarch64/arm_neon.h: Likewise.
8735 * config/aarch64/iterators.md (VQ_I): New.
8736
8737 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8738
8739 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8740 arc*-*-linux*.
8741 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8742 MULTILIB_DIRNAMES
8743
8744 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8745
8746 * config/nds32/constraints.md (S): New constraint.
8747 * config/nds32/nds32.md (call_internal): Use constraint S.
8748 (call_value_internal): Likewise.
8749 (sibcall_internal): Likewise.
8750 (sibcall_value_internal): Likewise.
8751
8752 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8753 Chung-Ju Wu <jasonwucj@gmail.com>
8754
8755 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8756 into consideration.
8757
8758 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8759 Chung-Ju Wu <jasonwucj@gmail.com>
8760
8761 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8762 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8763 (nds32_rtx_costs_impl): Simplify.
8764 (nds32_address_cost_impl): Simplify.
8765 (nds32_init_rtx_costs): New function.
8766 (nds32_rtx_costs_speed_prefer): Likewise.
8767 (nds32_rtx_costs_size_prefer): Likewise.
8768 (nds32_address_cost_speed_prefer): Likewise.
8769 (nds32_address_cost_speed_fwprop): Likewise.
8770 (nds32_address_cost_size_prefer): Likewise.
8771 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8772 * config/nds32/nds32.c (nds32_option_override): Use
8773 nds32_init_rtx_costs function.
8774
8775 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8776
8777 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8778 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8779 (TARGET_PIPELINE_N8): Likewise.
8780 (TARGET_PIPELINE_N10): Likewise.
8781 (TARGET_PIPELINE_N13): Likewise.
8782 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8783
8784 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8785
8786 * config/nds32/nds32-fpu.md: Update copyright year.
8787
8788 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8789
8790 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8791
8792 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8793
8794 * config/nds32/nds32.c
8795 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8796 * config/nds32/nds32.opt (minline-asm-r15): New option.
8797
8798 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8799
8800 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8801 MASK_HW_ABS.
8802 * config/nds32/nds32.md (abssi2): New pattern.
8803
8804 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8805
8806 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8807 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8808 Merge insn pattern from sse_cvtsi2ss<round_name> and
8809 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8810 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8811 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8812 using SWI48 mode iterator.
8813 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8814 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8815 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8816 pattern from sse_cvttss2si<round_saeonly_name>
8817 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8818 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8819 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8820 using SWI48 mode iterator.
8821 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8822 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8823 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8824 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8825 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8826 using SWI48 mode iterator.
8827 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8828 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8829 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8830 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8831 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8832 SWI48 mode iterator.
8833 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8834 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8835 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8836 pattern from sse_cvttsd2si<round_saeonly_name>
8837 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8838
8839 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8840
8841 * config/nds32/nds32-md-auxiliary.c
8842 (nds32_valid_smw_lwm_base_p): Refine.
8843 (nds32_output_smw_single_word): Refine.
8844 (nds32_output_smw_double_word): New.
8845 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8846
8847 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8848
8849 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8850 (nds32_output_stack_pop): Refine.
8851 (nds32_expand_unaligned_load): Refine.
8852 (nds32_expand_unaligned_store): Refine.
8853
8854 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8855 Chung-Ju Wu <jasonwucj@gmail.com>
8856
8857 * config/nds32/constants.md: Add TP_REGNUM constant.
8858 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8859 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8860 UNSPEC_ADD32.
8861 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8862 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8863 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8864 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8865 and PIC code generation.
8866 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8867 code generation.
8868 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8869 optimization.
8870 * config/nds32/nds32.md: Support TLS and PIC.
8871 * config/nds32/nds32.c: Support TLS and PIC.
8872 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8873 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8874 predicate.
8875
8876 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8877
8878 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8879 mode with E_ prefix.
8880
8881 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8882 Chung-Ju Wu <jasonwucj@gmail.com>
8883
8884 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8885 * config/nds32/nds32-md-auxiliary.c
8886 (symbolic_reference_mentioned_p): New.
8887 (nds32_legitimize_ict_address): New.
8888 (nds32_expand_ict_move): New.
8889 (nds32_indirect_call_referenced_p): New.
8890 (nds32_symbol_binds_local_p): Delete.
8891 (nds32_long_call_p): Modify.
8892 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8893 * config/nds32/nds32-protos.h
8894 (symbolic_reference_mentioned_p): Declare.
8895 (nds32_legitimize_ict_address): Declare.
8896 (nds32_expand_ict_move): Declare.
8897 (nds32_indirect_call_referenced_p): Declare.
8898 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8899 (nds32_relax_group): Use nds32_ict_const_p as condition.
8900 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8901 (nds32_asm_file_start): Output ict_model directive in asm code.
8902 (nds32_legitimate_address_p): Consider indirect call.
8903 (nds32_print_operand): Consider indirect call.
8904 (nds32_print_operand_address): Consider indirect call.
8905 (nds32_insert_attributes): Handle "indirect_call" attribute.
8906 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8907 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8908 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8909 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8910 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8911 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8912 (TARGET_ICT_MODEL_SMALL): Define.
8913 (TARGET_ICT_MODEL_LARGE): Define.
8914 * config/nds32/nds32.md (movsi): Consider ict model.
8915 (call, call_value): Consider ict model.
8916 (sibcall, sibcall_value): Consider ict model.
8917 * config/nds32/nds32.opt (mict-model): New option.
8918 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8919 model.
8920
8921 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8922 Monk Chiang <sh.chiang04@gmail.com>
8923 Jim Wilson <jimw@sifive.com>
8924
8925 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8926 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8927 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8928 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8929 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8930 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8931 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8932 compute save_libcall_adjustment properly.
8933 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8934 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8935 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8936 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8937 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8938 (ABI_SPEC): Handle mabi=ilp32e.
8939 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8940 (RVE): Add RVE mask.
8941 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8942 <-march>: Add rv32e as an example.
8943
8944 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8945
8946 PR c++/82899
8947 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8948 (intra_create_variable_infos): Handle C++ constructors.
8949
8950 2018-05-18 Martin Liska <mliska@suse.cz>
8951
8952 * passes.def: Remove a redundant pass.
8953
8954 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8955
8956 PR bootstrap/85838
8957 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8958
8959 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8960
8961 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8962 (ARMv4): Update.
8963 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8964 (ARMv6m): Update.
8965 (armv2, armv2a, armv3, armv3m): Delete architectures.
8966 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8967 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8968 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8969 Delete cpus.
8970 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8971 (*mulsidi3adddi): Likewise.
8972 (mulsidi3): Likewise.
8973 (*mulsidi3_nov6): Likewise.
8974 (umulsidi3): Likewise.
8975 (umulsidi3_nov6): Likewise.
8976 (umaddsidi4): Likewise.
8977 (*umulsidi3adddi): Likewise.
8978 (smulsi3_highpart): Likewise.
8979 (*smulsi3_highpart_nov6): Likewise.
8980 (umulsi3_highpart): Likewise.
8981 (*umulsi3_highpart_nov6): Likewise.
8982 * config/arm/arm.h (arm_arch3m): Delete.
8983 * config/arm/arm.c (arm_arch3m): Delete.
8984 (arm_option_override_internal): Update armv3-related comment.
8985 (arm_configure_build_target): Delete use of isa_bit_mode32.
8986 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8987 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8988 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8989 (mulsa3): Likewise.
8990 (mulusa3): Likewise.
8991 * config/arm/arm-protos.h (arm_arch3m): Delete.
8992 * config/arm/arm-tables.opt: Regenerate.
8993 * config/arm/arm-tune.md: Likewise.
8994 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8995 deleted architectures.
8996
8997 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8998
8999 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9000 (armv5t, armv5te): New features.
9001 (ARMv5, ARMv5e): Delete fgroups.
9002 (ARMv5t, ARMv5te): Adjust for above changes.
9003 (ARMv6m): Likewise.
9004 (armv5, armv5e): Delete arches.
9005 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9006 arm_arch5.
9007 (*call_reg_arm): Likewise.
9008 (*call_value_reg_armv5): Likewise.
9009 (*call_value_reg_arm): Likewise.
9010 (*call_symbol): Likewise.
9011 (*call_value_symbol): Likewise.
9012 (*sibcall_insn): Likewise.
9013 (*sibcall_value_insn): Likewise.
9014 (clzsi2): Likewise.
9015 (prefetch): Likewise.
9016 (define_split and define_peephole2 dependent on arm_arch5):
9017 Likewise.
9018 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9019 arm_arch5e.
9020 (TARGET_ARM_QBIT): Likewise.
9021 (TARGET_DSP_MULTIPLY): Likewise.
9022 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9023 (arm_arch5, arm_arch5e): Delete.
9024 (arm_arch5t, arm_arch5te): Declare.
9025 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9026 (arm_arch5t): Declare.
9027 (arm_option_reconfigure_globals): Update for the above.
9028 (arm_options_perform_arch_sanity_checks): Update comment, replace
9029 use of arm_arch5 with arm_arch5t.
9030 (use_return_insn): Likewise.
9031 (arm_emit_call_insn): Likewise.
9032 (output_return_instruction): Likewise.
9033 (arm_final_prescan_insn): Likewise.
9034 (arm_coproc_builtin_available): Likewise.
9035 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9036 arm_arch5e with arm_arch5t and arm_arch5te.
9037 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9038 (arm_arch5t, arm_arch5te): Declare.
9039 * config/arm/arm-tables.opt: Regenerate.
9040 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9041 * config/arm/t-multilib: Likewise.
9042 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9043 instead of arm_arch5.
9044 (*call_reg_thumb1): Likewise.
9045 (*call_value_reg_thumb1_v5): Likewise.
9046 (*call_value_reg_thumb1): Likewise.
9047 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9048 unreachable path.
9049 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9050
9051 2018-05-18 Martin Liska <mliska@suse.cz>
9052
9053 PR gcov-profile/84846
9054 * doc/gcov.texi: Document -t option of gcov tool.
9055
9056 2018-05-18 Martin Liska <mliska@suse.cz>
9057
9058 PR gcov-profile/84846
9059 * gcov.c (print_usage): Add new -t option.
9060 (process_args): Handle the option.
9061 (generate_results): Use stdout as output when requested by
9062 the option.
9063
9064 2018-05-18 Martin Liska <mliska@suse.cz>
9065
9066 PR gcov-profile/84846
9067 * coverage.c (coverage_init): Write PWD to .gcno file.
9068 * doc/gcov.texi: Document how working directory is printed.
9069 * gcov-dump.c (dump_gcov_file): Print PWD.
9070 * gcov.c (output_intermediate_file): Likewise.
9071 (read_graph_file): Read PWD string.
9072 (output_lines): Print PWD.
9073
9074 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9075
9076 PR middle-end/85817
9077 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9078 for retval and return false if all args to phi are zero.
9079
9080 2018-05-18 Richard Biener <rguenther@suse.de>
9081
9082 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9083 method.
9084 (evrp_dom_walker::before_dom_children): Call it.
9085
9086 2018-05-18 Richard Biener <rguenther@suse.de>
9087
9088 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9089 results when processing array refs with variable index.
9090
9091 2018-05-18 Toon Moene <toon@moene.org>
9092
9093 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9094 directly after that of -floop-interchange. Indicate that both
9095 options are enabled by default when specifying -O3.
9096
9097 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9098
9099 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9100 iterator. Delete separate integer-mode vec_set<mode> expander.
9101 (aarch64_simd_vec_setv2di): Delete.
9102 (vec_setv2di): Delete.
9103 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9104 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
9105 the "w, r" alternative.
9106
9107 2018-05-18 Martin Liska <mliska@suse.cz>
9108
9109 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9110 * tree-pass.h (make_pass_lower_switch_O0): New function.
9111 * tree-switch-conversion.c (node_has_low_bound): Remove.
9112 (node_has_high_bound): Likewise.
9113 (node_is_bounded): Likewise.
9114 (class pass_lower_switch): Make it a template type and create
9115 two instances.
9116 (pass_lower_switch::execute): Add template argument.
9117 (make_pass_lower_switch): New function.
9118 (make_pass_lower_switch_O0): New function.
9119 (do_jump_if_equal): Remove.
9120 (emit_case_nodes): Simplify to just handle all 3 cases and leave
9121 all the hard work to tree optimization passes.
9122
9123 2018-05-18 Martin Liska <mliska@suse.cz>
9124
9125 * dbgcnt.c (limit_low): Renamed from limit.
9126 (limit_high): New variable.
9127 (dbg_cnt_is_enabled): Check for upper limit.
9128 (dbg_cnt): Adjust dumping.
9129 (dbg_cnt_set_limit_by_index): Add new argument for high
9130 value.
9131 (dbg_cnt_set_limit_by_name): Likewise.
9132 (dbg_cnt_process_single_pair): Parse new format.
9133 (dbg_cnt_process_opt): Use strtok.
9134 (dbg_cnt_list_all_counters): Remove 'value' and add
9135 'limit_high'.
9136 * doc/invoke.texi: Document changes.
9137
9138 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
9139
9140 * doc/sourcebuild.texi (scalar_all_fma): Document.
9141 * tree.def (FMA_EXPR): Delete.
9142 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9143 * internal-fn.c (ternary_direct): New macro.
9144 (expand_ternary_optab_fn): Likewise.
9145 (direct_ternary_optab_supported_p): Likewise.
9146 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9147 * builtins.c (fold_builtin_fma): Delete.
9148 (fold_builtin_3): Don't call it.
9149 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9150 * expr.c (expand_expr_real_2): Likewise.
9151 * fold-const.c (operand_equal_p): Likewise.
9152 (fold_ternary_loc): Likewise.
9153 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9154 * gimple.c (DEFTREECODE): Likewise.
9155 * gimplify.c (gimplify_expr): Likewise.
9156 * optabs-tree.c (optab_for_tree_code): Likewise.
9157 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9158 * tree-eh.c (operation_could_trap_p): Likewise.
9159 (stmt_could_throw_1_p): Likewise.
9160 * tree-inline.c (estimate_operator_cost): Likewise.
9161 * tree-pretty-print.c (dump_generic_node): Likewise.
9162 (op_code_prio): Likewise.
9163 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9164 * tree-ssa-operands.c (get_expr_operands): Likewise.
9165 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9166 * fold-const-call.h (fold_fma): Delete.
9167 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9168 CFN_FNMA and CFN_FNMS.
9169 (fold_fma): Delete.
9170 * genmatch.c (combined_fn): New enum.
9171 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9172 (commutative_op): New function.
9173 (commutate): Use it. Handle more than 2 operands.
9174 (dt_operand::gen_gimple_expr): Use commutative_op.
9175 (parser::parse_expr): Allow :c to be used with non-binary
9176 operators if the commutative operand is known.
9177 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9178 CFN_FMS, CFN_FNMA and CFN_FNMS.
9179 (backprop::process_assign_use): Remove FMA_EXPR handling.
9180 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9181 (gen_hsa_fma): New function.
9182 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9183 IFN_FNMA and IFN_FNMS.
9184 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9185 * gimple-fold.h (follow_all_ssa_edges): Declare.
9186 * gimple-fold.c (follow_all_ssa_edges): New function.
9187 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9188 gimple_build interface and use follow_all_ssa_edges to fold the result.
9189 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9190 instead of checking for optabs directly.
9191 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9192 rather than FMA_EXPRs.
9193 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9194 call to IFN_FMA instead of an FMA_EXPR.
9195
9196 2018-05-17 Jim Wilson <jimw@sifive.com>
9197
9198 * expr.c (do_tablejump): When converting index to Pmode, if we have a
9199 sign extended promoted subreg, and the range does not have the sign bit
9200 set, then do a sign extend.
9201
9202 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9203 test, check for sign extended subreg and/or constant operands, and
9204 do a sign extend in that case.
9205
9206 2018-05-17 Steve Ellcey <sellcey@cavium.com>
9207
9208 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9209 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9210 Add untyped.
9211 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9212 Change logics_shift_reg to logics_shift_imm.
9213 (thunderx2t99_fp_loadpair_basic): Delete.
9214 (thunderx2t99_fp_storepair_basic): Delete.
9215 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9216 (thunderx2t99_asimd_polynomial): Delete.
9217 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9218 and neon_fp_mul_d_scalar_q.
9219 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9220 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9221 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9222 (thunderx2t99_asimd_lut): Add missing tbl types.
9223 (thunderx2t99_asimd_ext): Delete.
9224 (thunderx2t99_asimd_load1_1_mult): Delete.
9225 (thunderx2t99_asimd_load1_2_mult): Delete.
9226 (thunderx2t99_asimd_load1_ldp): New.
9227 (thunderx2t99_asimd_load1): New.
9228 (thunderx2t99_asimd_load2): Add missing *load2* types.
9229 (thunderx2t99_asimd_load3): New.
9230 (thunderx2t99_asimd_load4): New.
9231 (thunderx2t99_asimd_store1_1_mult): Delete.
9232 (thunderx2t99_asimd_store1_2_mult): Delete.
9233 (thunderx2t99_asimd_store2_mult): Delete.
9234 (thunderx2t99_asimd_store2_onelane): Delete.
9235 (thunderx2t99_asimd_store_stp): New.
9236 (thunderx2t99_asimd_store1): New.
9237 (thunderx2t99_asimd_store2): New.
9238 (thunderx2t99_asimd_store3): New.
9239 (thunderx2t99_asimd_store4): New.
9240
9241 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
9242
9243 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9244 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
9245
9246 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
9247 Segher Boessenkool <segher@kernel.crashing.org>
9248
9249 PR target/85698
9250 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9251 operand.
9252
9253 2018-05-17 Richard Biener <rguenther@suse.de>
9254
9255 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9256 for pruning loop and prune defs feeding only already visited PHIs.
9257
9258 2018-05-17 Richard Biener <rguenther@suse.de>
9259
9260 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9261
9262 2018-05-17 Bin Cheng <bin.cheng@arm.com>
9263 Richard Biener <rguenther@suse.de>
9264
9265 PR tree-optimization/85793
9266 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9267 for VMAT_ELEMENTWISE.
9268
9269 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9270
9271 * internal-fn.h (lookup_internal_fn): Declare
9272 * internal-fn.c (lookup_internal_fn): New function.
9273 * gimple.c (gimple_build_call_from_tree): Handle calls to
9274 internal functions.
9275 * gimple-pretty-print.c (dump_gimple_call): Print "." before
9276 internal function names.
9277 * tree-pretty-print.c (dump_generic_node): Likewise.
9278 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9279
9280 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9281
9282 * gimple-fold.h (gimple_build): Make the function forms take
9283 combined_fn rather than built_in_function.
9284 (gimple_simplify): Likewise.
9285 * gimple-match-head.c (gimple_simplify): Likewise.
9286 * gimple-fold.c (gimple_build): Likewise.
9287 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9288 rather than gimple_build_call_internal.
9289 (get_initial_defs_for_reduction): Likewise.
9290 (vect_create_epilog_for_reduction): Likewise.
9291 (vectorizable_live_operation): Likewise.
9292
9293 2018-05-17 Martin Liska <mliska@suse.cz>
9294
9295 * gimple-ssa-sprintf.c (format_directive): Do not use
9296 space in between 'G_' and '('.
9297
9298 2018-05-17 Jakub Jelinek <jakub@redhat.com>
9299
9300 PR target/85323
9301 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9302 even if the mask is not all ones.
9303
9304 PR target/85323
9305 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9306 vector.
9307 (ix86_gimple_fold_builtin): Likewise.
9308
9309 PR target/85323
9310 * config/i386/i386.c: Include tree-vector-builder.h.
9311 (ix86_vector_shift_count): New function.
9312 (ix86_fold_builtin): Fold shift builtins by scalar count.
9313 (ix86_gimple_fold_builtin): Likewise.
9314
9315 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9316 _mm512_setzero): New intrinsics.
9317
9318 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
9319 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9320
9321 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9322 code generation for cases where splatting a value is not useful.
9323 * simplify-rtx.c (simplify_ternary_operation): Simplify
9324 vec_merge across a vec_duplicate and a paradoxical subreg forming
9325 a vector mode to a vec_concat.
9326
9327 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
9328
9329 * config.gcc: Support "goldmont-plus".
9330 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9331 "goldmont-plus".
9332 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9333 PROCESSOR_GOLDMONT_PLUS.
9334 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9335 (processor_target_table): Add "goldmont-plus".
9336 (PTA_GOLDMONT_PLUS): Define.
9337 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9338 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9339 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9340 (fold_builtin_cpu): Add "goldmont-plus".
9341 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9342 (ix86_option_override_internal): Add "goldmont-plus".
9343 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9344 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9345 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9346 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9347
9348 2018-05-17 Richard Biener <rguenther@suse.de>
9349
9350 PR tree-optimization/85757
9351 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9352 remove defs that only feed that PHI from further processing.
9353
9354 2018-05-16 Jim Wilson <jimw@sifive.com>
9355
9356 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9357 asterisk to name.
9358 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9359
9360 2018-05-16 Mark Wielaard <mark@klomp.org>
9361
9362 * dwarf2out.c (count_index_strings): New function.
9363 (output_indirect_strings): Call count_index_strings and generate
9364 header for dwarf_version >= 5.
9365
9366 2018-05-16 Mark Wielaard <mark@klomp.org>
9367
9368 * dwarf2out.c (dwarf_FORM): New function.
9369 (set_indirect_string): Use dwarf_FORM.
9370 (reset_indirect_string): Likewise.
9371 (size_of_die): Likewise.
9372 (value_format): Likewise.
9373 (output_die): Likewise.
9374 (add_skeleton_AT_string): Likewise.
9375 (output_macinfo_op): Likewise.
9376 (index_string): Likewise.
9377 (output_index_string_offset): Likewise.
9378 (output_index_string): Likewise.
9379 (count_index_strings): Likewise.
9380
9381 2018-05-16 Carl Love <cel@us.ibm.com>
9382
9383 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9384 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9385
9386 2018-05-16 Martin Jambor <mjambor@suse.cz>
9387
9388 * ipa-prop.c (ipa_free_all_edge_args): Remove.
9389 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9390
9391 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
9392
9393 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9394 (fnma<mode>4): Likewise.
9395 (fms<mode>4): Likewise.
9396 (fnms<mode>4): Likewise.
9397 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9398 (aarch64_fnma<mode>4): Likewise.
9399 (aarch64_fms<mode>4): Likewise.
9400 (aarch64_fnms<mode>4): Likewise.
9401 (aarch64_fnmadd<mode>4): Likewise.
9402
9403 2018-05-16 Jason Merrill <jason@redhat.com>
9404
9405 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9406
9407 2018-05-16 Richard Biener <rguenther@suse.de>
9408
9409 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9410 (dump_stmt_cost): Declare.
9411 (add_stmt_cost): Dump cost we add.
9412 (add_stmt_costs): New function.
9413 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9414 No longer exported.
9415 (vect_analyze_stmt): Adjust prototype.
9416 (vectorizable_condition): Likewise.
9417 (vectorizable_live_operation): Likewise.
9418 (vectorizable_reduction): Likewise.
9419 (vectorizable_induction): Likewise.
9420 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9421 cost vector to pass to vectorizable_ and record afterwards.
9422 (vect_model_reduction_cost): Take cost vector argument and adjust.
9423 (vect_model_induction_cost): Likewise.
9424 (vectorizable_reduction): Likewise.
9425 (vectorizable_induction): Likewise.
9426 (vectorizable_live_operation): Likewise.
9427 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9428 SLP_TREE_NUMBER_OF_VEC_STMTS.
9429 (vect_analyze_slp_cost_1): Remove.
9430 (vect_analyze_slp_cost): Likewise.
9431 (vect_slp_analyze_node_operations): Take visited args and
9432 a target cost vector. Avoid processing already visited stmt sets.
9433 (vect_slp_analyze_operations): Use a local cost vector to gather
9434 costs and register those of non-discarded instances.
9435 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9436 (vect_schedule_slp_instance): Remove copying of
9437 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9438 zero.
9439 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9440 adding cost. Record cost entry location.
9441 (vect_prologue_cost_for_slp_op): Function to compute cost of
9442 a constant or invariant generated for SLP vect in the prologue,
9443 split out from vect_analyze_slp_cost_1.
9444 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9445 (vect_model_promotion_demotion_cost): Likewise.
9446 (vect_model_store_cost): Likewise, make static.
9447 (vect_model_load_cost): Likewise.
9448 (vectorizable_bswap): Add cost vector arg and adjust.
9449 (vectorizable_call): Likewise.
9450 (vectorizable_simd_clone_call): Likewise.
9451 (vectorizable_conversion): Likewise.
9452 (vectorizable_assignment): Likewise.
9453 (vectorizable_shift): Likewise.
9454 (vectorizable_operation): Likewise.
9455 (vectorizable_store): Likewise.
9456 (vectorizable_load): Likewise.
9457 (vectorizable_condition): Likewise.
9458 (vectorizable_comparison): Likewise.
9459 (can_vectorize_live_stmts): Likewise.
9460 (vect_analyze_stmt): Likewise.
9461 (vect_transform_stmt): Adjust calls to vectorizable_*.
9462 * tree-vectorizer.c: Include gimple-pretty-print.h.
9463 (dump_stmt_cost): New function.
9464
9465 2018-05-16 Richard Biener <rguenther@suse.de>
9466
9467 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9468 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9469 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9470 (check_name): New callback.
9471 (dse_classify_store): Track cycles via a visited bitmap of PHI
9472 defs and simplify handling of in-loop and across loop dead stores
9473 and properly fail for loop-variant refs. Handle byte-tracking with
9474 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9475 limiting the walk.
9476
9477 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9478
9479 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9480 (vect_get_mask_type_for_stmt): Likewise.
9481 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9482 split out from...
9483 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9484 to determine the statement's vector type and the vector type that
9485 should be used for calculating nunits. Deal with cases in which
9486 the type has to be deferred.
9487 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9488 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9489 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9490 (vect_determine_vf_for_stmt): New functions, split out from...
9491 (vect_determine_vectorization_factor): ...here.
9492 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9493 (vect_get_mask_type_for_stmt): New functions, split out from
9494 vect_determine_vectorization_factor.
9495
9496 2018-05-16 Richard Biener <rguenther@suse.de>
9497
9498 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9499 verify the [VEC_]COND_EXPR embedded comparison.
9500
9501 2018-05-15 Martin Sebor <msebor@redhat.com>
9502
9503 PR tree-optimization/85753
9504 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9505 RECORD_TYPE in addition to ARRAY_TYPE.
9506
9507 2018-05-15 Martin Sebor <msebor@redhat.com>
9508
9509 PR middle-end/85643
9510 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9511
9512 2018-05-15 Richard Biener <rguenther@suse.de>
9513
9514 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9515 add by_clobber_p one. Change algorithm to collect all defs
9516 representing uses we need to walk and try reducing them to
9517 a single one before failing.
9518 (dse_dom_walker::dse_optimize_stmt): Adjust.
9519
9520 2018-05-13 Mark Wielaard <mark@klomp.org>
9521
9522 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9523 (size_of_loc_descr): Likewise.
9524 (output_loc_operands): Likewise.
9525 (output_loc_operands_raw): Likewise.
9526 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9527 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9528 (hash_loc_operands): Likewise.
9529 (compare_loc_operands): Likewise.
9530
9531 2018-05-14 Mark Wielaard <mark@klomp.org>
9532
9533 * dwarf2out.c (count_index_addrs): New function.
9534 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9535
9536 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9537
9538 PR tree-optimization/83648
9539 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9540 return value as malloc candidate.
9541
9542 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9543
9544 PR ipa/85734
9545 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9546 param as true in call to suggest_attribute.
9547
9548 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
9549
9550 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9551 -mreadonly-in-sdata.
9552
9553 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9554
9555 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9556 New pattern.
9557 (aarch64_crypto_aesd_fused): Likewise.
9558
9559 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
9560
9561 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9562 (movsi_aarch64): Likewise.
9563 (load_pairsi): Likewise.
9564 (load_pairdi): Likewise.
9565 (store_pairsi): Likewise.
9566 (store_pairdi): Likewise.
9567 (load_pairsf): Likewise.
9568 (load_pairdf): Likewise.
9569 (store_pairsf): Likewise.
9570 (store_pairdf): Likewise.
9571 (zero_extend): Likewise.
9572 (trunc): Swap alternatives.
9573 (fcvt_target): Add '?' to prefer w over r.
9574
9575 2018-05-14 Jakub Jelinek <jakub@redhat.com>
9576
9577 PR target/85756
9578 * config/i386/i386.md: Disallow non-commutative arithmetics in
9579 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9580 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9581 in the peephole2 before it.
9582
9583 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9584
9585 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9586 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9587 (ix86_handle_option): Handle -mcldemote.
9588 * config.gcc: New header.
9589 * config/i386/cldemoteintrin.h: New file.
9590 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9591 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9592 -mcldemote.
9593 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9594 OPTION_MASK_ISA_CLDEMOTE.
9595 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9596 (ix86_valid_target_attribute_inner_p): Ditto.
9597 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9598 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9599 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9600 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9601 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9602 (cldemote): New.
9603 * config/i386/i386.opt: Add -mcldemote.
9604 * config/i386/x86intrin.h: New header.
9605 * doc/invoke.texi: Add -mcldemote.
9606
9607 2018-05-14 Richard Biener <rguenther@suse.de>
9608
9609 * doc/match-and-simplify.texi: Adjust :s documentation.
9610
9611 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9612
9613 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9614 intended memcpy size.
9615 (REORDER_45): Likewise.
9616
9617 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9618
9619 * sort.cc: New file.
9620 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9621 * vec.c (qsort_chk): Use gcc_qsort.
9622 * Makefile.in (OBJS-libcommon): Add sort.o.
9623 (build/sort.o): New target. Use it...
9624 (BUILD_RTL): ... here, and...
9625 (build/gencfn-macros): ... here, and...
9626 (build/genmatch): ... here.
9627
9628 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9629 Chung-Ju Wu <jasonwucj@gmail.com>
9630
9631 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9632 * config/nds32/nds32-graywolf.md: New file.
9633 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9634 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9635 pipeline.
9636 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9637 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9638 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9639 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9640 * config/nds32/pipelines.md: Include n15 settings.
9641
9642 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9643 Chung-Ju Wu <jasonwucj@gmail.com>
9644
9645 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9646 * config/nds32/nds32-n13.md: New file.
9647 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9648 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9649 pipeline.
9650 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9651 * config/nds32/nds32.md (pipeline_model): Add n13.
9652 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9653 * config/nds32/pipelines.md: Include n13 settings.
9654
9655 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9656 Chung-Ju Wu <jasonwucj@gmail.com>
9657
9658 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9659 * config/nds32/nds32-n10.md: New file.
9660 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9661 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9662 pipeline.
9663 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9664 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9665 * config/nds32/nds32.md (pipeline_model): Add n10.
9666 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9667 * config/nds32/pipelines.md: Include n10 settings.
9668
9669 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9670 Kito Cheng <kito.cheng@gmail.com>
9671 Chung-Ju Wu <jasonwucj@gmail.com>
9672
9673 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9674 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9675 Add enum values for DSP extension instructions.
9676 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9677 New constraints.
9678 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9679 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9680 New code iterators.
9681 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9682 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9683 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9684 * config/nds32/nds32-intrinsic.md: Likewise.
9685 * config/nds32/nds32_intrinsic.h: Likewise.
9686 * config/nds32/nds32-md-auxiliary.c: Likewise.
9687 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9688 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9689 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9690 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9691 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9692 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9693 TYPE_DMAC in switch statement.
9694 * config/nds32/nds32.c: New checking and implementation for DSP
9695 extension instructions.
9696 * config/nds32/nds32.h: Likewise.
9697 * config/nds32/nds32.md: Likewise.
9698 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9699 * config/nds32/predicates.md: Implement new predicates for DSP
9700 extension.
9701
9702 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9703
9704 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9705 Reformat alternatives and attributes so it is easier to identify
9706 which constraints/attributes go with which instruction.
9707 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9708 (mov<mode>_softfloat32, FMOVE64): Likewise.
9709 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9710 (mov<mode>_softfloat64, FMOVE64): Likewise.
9711
9712 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9713
9714 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9715 subsection.
9716 (Basic PowerPC Built-in Functions): The new name of the
9717 subsection previously known as "PowerPC Built-in Functions".
9718 (Basic PowerPC Built-in Functions Available on all Configurations):
9719 New subsubsection.
9720 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9721 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9722 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9723 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9724
9725 2018-05-11 Martin Jambor <mjambor@suse.cz>
9726
9727 PR ipa/85655
9728 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9729 single const.
9730
9731 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9732
9733 PR target/85733
9734 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9735
9736 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9737
9738 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9739 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9740 (ix86_handle_option): Handle -mwaitpkg.
9741 * config.gcc: New header.
9742 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9743 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9744 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9745 function type.
9746 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9747 OPTION_MASK_ISA_WAITPKG.
9748 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9749 (ix86_option_override_internal): Add PTA_WAITPKG.
9750 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9751 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9752 IX86_BUILTIN_TPAUSE.
9753 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9754 __builtin_ia32_umwait and __builtin_ia32_tpause.
9755 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9756 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9757 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9758 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9759 UNSPECV_TPAUSE): New.
9760 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9761 * config/i386/i386.opt: Add -mwaitpkg.
9762 * config/i386/waitpkgintrin.h: New file.
9763 * config/i386/x86intrin.h: New header.
9764 * doc/invoke.texi: Add -mwaitpkg.
9765
9766 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9767
9768 PR target/85606
9769 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9770 equivalent.
9771 (cortex-m0): Use armv6s-m isa.
9772 (cortex-m0plus): Likewise.
9773 (cortex-m1): Likewise.
9774 (cortex-m0.small-multiply): Likewise.
9775 (cortex-m0plus.small-multiply): Likewise.
9776 (cortex-m1.small-multiply): Likewise.
9777
9778 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9779 Jakub Jelinek <jakub@redhat.com>
9780
9781 PR tree-optimization/85692
9782 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9783 source permute as well.
9784
9785 2018-05-11 Martin Liska <mliska@suse.cz>
9786
9787 PR sanitizer/85556
9788 * doc/extend.texi: Document LLVM style format for no_sanitize
9789 attribute.
9790
9791 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9792
9793 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9794 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9795 (mode_supports_vsx_dform_quad): Likewise.
9796 (mode_supports_vmx_dform): Move these functions to be next to the
9797 other mode_supports functions.
9798 (mode_supports_dq_form): Likewise.
9799 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9800 mode_supports_dq_form.
9801 (reg_offset_addressing_ok_p): Likewise.
9802 (offsettable_ok_by_alignment): Likewise.
9803 (rs6000_legitimate_offset_address_p): Likewise.
9804 (legitimate_lo_sum_address_p): Likewise.
9805 (rs6000_legitimize_address): Likewise.
9806 (rs6000_legitimize_reload_address): Likewise.
9807 (rs6000_secondary_reload_inner): Likewise.
9808 (rs6000_preferred_reload_class): Likewise.
9809 (rs6000_output_move_128bit): Likewise.
9810
9811 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9812
9813 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9814 Generate SImode target register for null target.
9815 <case IX86_BUILTIN_XGETBV>: Ditto.
9816 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9817 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9818
9819 2018-05-10 Carl Love <cel@us.ibm.com>
9820
9821 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9822 dcbtt and dcbtstt if operands[2] is 0.
9823
9824 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9825
9826 PR target/85693
9827 * config/i386/sse.md (usadv64qi): New expander.
9828
9829 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9830
9831 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9832 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9833 -maltivec=be support.
9834 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9835 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9836 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9837 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9838 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9839 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9840 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9841 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9842 altivec_vsumsws): Adjust.
9843 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9844 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9845 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9846 support.
9847 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9848 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9849 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9850 (altivec_lve<VI_char>x): Delete expand.
9851 (*altivec_lve<VI_char>x_internal): Rename to...
9852 (altivec_lve<VI_char>x): ... this.
9853 (altivec_lvxl_<mode>): Delete expand.
9854 (*altivec_lvxl_<mode>_internal): Rename to ...
9855 (altivec_lvxl_<mode>): ... this.
9856 (altivec_stvxl_<mode>): Delete expand.
9857 (*altivec_stvxl_<mode>_internal): Rename to ...
9858 (altivec_stvxl_<mode>): ... this.
9859 (altivec_stve<VI_char>x): Delete expand.
9860 (*altivec_stve<VI_char>x_internal): Rename to ...
9861 (altivec_stve<VI_char>x): ... this.
9862 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9863 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9864 reduc_plus_scal_<mode>): Adjust.
9865 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9866 comment.
9867 (rs6000_cpu_cpp_builtins): Adjust.
9868 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9869 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9870 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9871 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9872 -maltivec=be support.
9873 (rs6000_split_vec_extract_var): Adjust.
9874 (rs6000_split_v4si_init): Adjust.
9875 (swap_selector_for_mode): Delete.
9876 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9877 altivec_expand_stvex_be): Delete.
9878 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9879 -maltivec=be support.
9880 (rs6000_gimple_fold_builtin): Ditto.
9881 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9882 Adjust.
9883 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9884 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9885 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9886 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9887 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9888 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9889 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9890 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9891 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9892 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9893 anonymous split): Adjust.
9894 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9895 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9896
9897 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9898
9899 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9900 when --with-gxx-include-dir is also specified.
9901 * configure: Regenerate.
9902
9903 2018-05-09 Jim Wilson <jimw@sifive.com>
9904
9905 PR target/84797
9906 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9907 * config/riscv/t-withmultilib: New.
9908 * config/riscv/withmultilib.h: New.
9909 * doc/install.texi: Document RISC-V --with-multilib-list support.
9910
9911 2018-05-09 Richard Biener <rguenther@suse.de>
9912
9913 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9914 vector.
9915 (vect_bb_vectorization_profitable_p): Adjust. Compute
9916 actual scalar cost using the cost vector and the add_stmt_cost
9917 machinery.
9918
9919 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9920
9921 PR rtl-optimization/85645
9922 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9923 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9924
9925 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9926
9927 PR rtl-optimization/85645
9928 * shrink-wrap.c (spread_components): Return a boolean saying if
9929 anything was changed.
9930 (try_shrink_wrapping_separate): Iterate spread_components until
9931 nothing changes anymore.
9932
9933 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9934
9935 PR rtl-optimization/85645
9936 * regrename.c (build_def_use): Also kill the chains that include the
9937 destination of a REG_CFA_REGISTER note.
9938
9939 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9940
9941 PR rtl-optimization/85645
9942 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9943 insn that has a REG_CFA_REGISTER note.
9944
9945 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9946
9947 * cfgexpand.c (expand_clobber): New function.
9948 (expand_gimple_stmt_1): Use it.
9949 * tree-vect-stmts.c (vect_clobber_variable): New function,
9950 split out from...
9951 (vectorizable_simd_clone_call): ...here.
9952 (vectorizable_store): Emit a clobber either side of an
9953 IFN_STORE_LANES sequence.
9954 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9955
9956 2018-05-09 Tom de Vries <tom@codesourcery.com>
9957
9958 PR target/85626
9959 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9960 (define_insn "trap_if_false"): Add exit after trap.
9961
9962 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9963
9964 PR rtl-optimization/85638
9965 * bb-reorder.c: Include common/common-target.h.
9966 (create_forwarder_block): New function extracted from...
9967 (fix_up_crossing_landing_pad): ...here. Rename into...
9968 (dw2_fix_up_crossing_landing_pad): ...this.
9969 (sjlj_fix_up_crossing_landing_pad): New function.
9970 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9971 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9972 from both partitions and exit the loop after one iteration.
9973
9974 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9975
9976 Revert:
9977 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9978 subsection.
9979 (Basic PowerPC Built-in Functions): The new name of the
9980 subsection previously known as "PowerPC Built-in Functions".
9981 (Basic PowerPC Built-in Functions Available on all Configurations):
9982 New subsubsection.
9983 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9984 subsubsection.
9985 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9986 subsubsection.
9987 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9988 subsubsection.
9989 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9990 subsubsection.
9991
9992 2018-05-08 Jim Wilson <jimw@sifive.com>
9993
9994 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9995 (LD_EMUL_SUFFIX): New.
9996 (LINK_SPEC): Use it.
9997
9998 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9999
10000 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10001 subsection.
10002 (Basic PowerPC Built-in Functions): The new name of the
10003 subsection previously known as "PowerPC Built-in Functions".
10004 (Basic PowerPC Built-in Functions Available on all Configurations):
10005 New subsubsection.
10006 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10007 subsubsection.
10008 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10009 subsubsection.
10010 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10011 subsubsection.
10012 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10013 subsubsection.
10014
10015 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10016
10017 PR target/85683
10018 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10019 after cmpelim optimization.
10020
10021 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
10022
10023 * config.gcc: Support "goldmont".
10024 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10025 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10026 PROCESSOR_GOLDMONT.
10027 * config/i386/i386.c (m_GOLDMONT): Define.
10028 (processor_target_table): Add "goldmont".
10029 (PTA_GOLDMONT): Define.
10030 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10031 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10032 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10033 (fold_builtin_cpu): Add "goldmont".
10034 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10035 (ix86_option_override_internal): Add "goldmont".
10036 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10037 (processor_type): Add PROCESSOR_GOLDMONT.
10038 * config/i386/i386.md: Add CPU "glm".
10039 * config/i386/glm.md: New file.
10040 * config/i386/x86-tune.def: Add m_GOLDMONT.
10041 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10042
10043 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10044
10045 PR target/85572
10046 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10047 E_V4DImode.
10048 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10049 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
10050 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
10051
10052 PR target/85317
10053 * config/i386/i386.c (ix86_fold_builtin): Handle
10054 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10055
10056 PR target/85480
10057 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10058 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10059
10060 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
10061
10062 PR target/85658
10063 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10064 (check_arch): Likewise.
10065 (check_fpu): Return the result rather than printing it.
10066 (end arch): Fix operator precedence.
10067 (end cpu): Likewise.
10068 (END): Print the result from check_fpu.
10069
10070 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10071 Alan Hayward <alan.hayward@arm.com>
10072 David Sherwood <david.sherwood@arm.com>
10073
10074 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10075 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10076 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10077 (*fcmuo<mode>_and): New patterns.
10078
10079 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10080
10081 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10082 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10083 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10084 (cmp_op, sve_imm_con): New code attributes.
10085 (SVE_COND_INT_CMP, imm_con): Delete.
10086 (cmp_op): Remove above unspecs from int attribute.
10087 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10088 to...
10089 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
10090 comparison-specific unspecs.
10091 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10092 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10093 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10094 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10095 (*vec_fcm<cmp_op><mode>): Rename to...
10096 (*fcm<cmp_op><mode>): ...this and adjust likewise.
10097 (*vec_fcmuo<mode>): Rename to...
10098 (*fcmuo<mode>): ...this and adjust likewise.
10099 (*pred_fcm<cmp_op><mode>): New pattern.
10100 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10101 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10102 functions.
10103 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10104 and UNORDERED.
10105 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10106 (aarch64_emit_sve_predicated_cond): New function.
10107 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10108 (aarch64_emit_unspec_cond_or): Replace with...
10109 (aarch64_emit_sve_or_conds): ...this new function. Use
10110 aarch64_emit_sve_ptrue_op for the individual comparisons and
10111 aarch64_emit_binop to OR them together.
10112 (aarch64_emit_inverted_unspec_cond): Replace with...
10113 (aarch64_emit_sve_inverted_cond): ...this new function. Use
10114 aarch64_emit_sve_ptrue_op for the comparison and
10115 aarch64_emit_unop to invert the result.
10116 (aarch64_expand_sve_vec_cmp_float): Update after the above
10117 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
10118
10119 2018-05-07 Nathan Sidwell <nathan@acm.org>
10120
10121 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10122 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10123 (Backwards Compatibility): Likewise.
10124
10125 2018-05-07 Luis Machado <luis.machado@linaro.org>
10126
10127 PR bootstrap/85681
10128 Revert:
10129 2018-05-07 Luis Machado <luis.machado@linaro.org>
10130
10131 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10132 <prefetch_dynamic_strides>: New const bool field.
10133 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10134 prefetch_dynamic_strides.
10135 (exynosm1_prefetch_tune): Likewise.
10136 (thunderxt88_prefetch_tune): Likewise.
10137 (thunderx_prefetch_tune): Likewise.
10138 (thunderx2t99_prefetch_tune): Likewise.
10139 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10140 to false.
10141 (aarch64_override_options_internal): Update to set
10142 PARAM_PREFETCH_DYNAMIC_STRIDES.
10143 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10144 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10145 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10146 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10147 prefetch-dynamic-strides setting.
10148
10149 2018-05-07 Luis Machado <luis.machado@linaro.org>
10150
10151 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10152 <minimum_stride>: New const int field.
10153 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10154 minimum_stride field.
10155 (exynosm1_prefetch_tune): Likewise.
10156 (thunderxt88_prefetch_tune): Likewise.
10157 (thunderx_prefetch_tune): Likewise.
10158 (thunderx2t99_prefetch_tune): Likewise.
10159 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10160 (aarch64_override_options_internal): Update to set
10161 PARAM_PREFETCH_MINIMUM_STRIDE.
10162 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10163 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10164 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10165 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10166 stride is constant and is below the minimum stride threshold.
10167
10168 2018-05-07 Luis Machado <luis.machado@linaro.org>
10169
10170 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10171 to 512.
10172
10173 2018-05-07 Luis Machado <luis.machado@linaro.org>
10174
10175 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10176 <prefetch_dynamic_strides>: New const bool field.
10177 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10178 prefetch_dynamic_strides.
10179 (exynosm1_prefetch_tune): Likewise.
10180 (thunderxt88_prefetch_tune): Likewise.
10181 (thunderx_prefetch_tune): Likewise.
10182 (thunderx2t99_prefetch_tune): Likewise.
10183 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10184 to false.
10185 (aarch64_override_options_internal): Update to set
10186 PARAM_PREFETCH_DYNAMIC_STRIDES.
10187 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10188 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10189 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10190 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10191 prefetch-dynamic-strides setting.
10192
10193 2018-05-07 Luis Machado <luis.machado@linaro.org>
10194
10195 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10196 <minimum_stride>: New const int field.
10197 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10198 minimum_stride field.
10199 (exynosm1_prefetch_tune): Likewise.
10200 (thunderxt88_prefetch_tune): Likewise.
10201 (thunderx_prefetch_tune): Likewise.
10202 (thunderx2t99_prefetch_tune): Likewise.
10203 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10204 (aarch64_override_options_internal): Update to set
10205 PARAM_PREFETCH_MINIMUM_STRIDE.
10206 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10207 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10208 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10209 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10210 stride is constant and is below the minimum stride threshold.
10211
10212 2018-05-06 Jakub Jelinek <jakub@redhat.com>
10213
10214 PR c++/85659
10215 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10216 the type is addressable. Don't force op into register if it has
10217 BLKmode.
10218
10219 2018-05-05 Roland McGrath <mcgrathr@google.com>
10220
10221 PR other/77609
10222 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10223 any section for which we don't know a specific type it should have,
10224 regardless of name. Previously this was done only for the exact
10225 names ".init_array", ".fini_array", and ".preinit_array".
10226 (default_elf_asm_named_section): Add comment about
10227 relationship with default_section_type_flags and SECTION_NOTYPE.
10228 (get_section): Don't consider it a type conflict if one side has
10229 SECTION_NOTYPE and the other doesn't, as long as neither has the
10230 SECTION_BSS et al used in the default_section_type_flags logic.
10231
10232 2018-05-05 Tom de Vries <tom@codesourcery.com>
10233
10234 PR target/85653
10235 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10236 (workaround_barsyncs): New function.
10237 (nvptx_reorg): Use workaround_barsyncs.
10238 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10239 (define_expand "nvptx_membar_cta"): New define_expand.
10240 (define_insn "*nvptx_membar_cta"): New insn.
10241
10242 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
10243
10244 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10245 To improve optimization opportunities.
10246 * builtin-types.def: The new needed builtin types for the above.
10247
10248 2018-05-04 Richard Biener <rguenther@suse.de>
10249
10250 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10251 * gimple-ssa-store-merging.c
10252 (imm_store_chain_info::output_merged_store): Remove redundant create,
10253 release split_store vector contents on failure.
10254 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10255 scalar stmt vector on cache hit.
10256
10257 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
10258
10259 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10260 Xilinx FP support.
10261 * config.gcc (powerpc-xilinx-eabi*): Remove.
10262 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10263 support.
10264 (fusion_addis_mem_combo_load): Ditto.
10265 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10266 FP support.
10267 (rs6000_cpu_cpp_builtins): Ditto.
10268 * config/rs6000/rs6000-linux.c
10269 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10270 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10271 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10272 support.
10273 (rs6000_setup_reg_addr_masks): Ditto.
10274 (rs6000_init_hard_regno_mode_ok): Ditto.
10275 (rs6000_option_override_internal): Ditto.
10276 (legitimate_lo_sum_address_p): Ditto.
10277 (rs6000_legitimize_address): Ditto.
10278 (rs6000_legitimize_reload_address): Ditto.
10279 (rs6000_legitimate_address_p): Ditto.
10280 (abi_v4_pass_in_fpr): Ditto.
10281 (setup_incoming_varargs): Ditto.
10282 (rs6000_gimplify_va_arg): Ditto.
10283 (rs6000_split_multireg_move): Ditto.
10284 (rs6000_savres_strategy): Ditto.
10285 (rs6000_emit_prologue_components): Ditto.
10286 (rs6000_emit_epilogue_components): Ditto.
10287 (rs6000_emit_prologue): Ditto.
10288 (rs6000_emit_epilogue): Ditto.
10289 (rs6000_elf_file_end): Ditto.
10290 (rs6000_function_value): Ditto.
10291 (rs6000_libcall_value): Ditto.
10292 * config/rs6000/rs6000.h: Ditto.
10293 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10294 (TARGET_MINMAX): ... this. New.
10295 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10296 * config/rs6000/rs6000.md: Remove Xilinx FP support.
10297 (*movsi_internal1_single): Delete.
10298 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10299 mfpu=, mxilinx-fpu): Delete.
10300 * config/rs6000/singlefp.h: Delete.
10301 * config/rs6000/sysv4.h: Remove Xilinx FP support.
10302 * config/rs6000/t-rs6000: Ditto.
10303 * config/rs6000/t-xilinx: Delete.
10304 * config/rs6000/titan.md: Adjust for fp_type removal.
10305 * config/rs6000/vsx.md: Remove Xilinx FP support.
10306 (VStype_simple): Delete.
10307 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10308 * config/rs6000/xfpu.h: Delete.
10309 * config/rs6000/xfpu.md: Delete.
10310 * config/rs6000/xilinx.h: Delete.
10311 * config/rs6000/xilinx.opt: Delete.
10312 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10313 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10314
10315 2018-05-04 Tom de Vries <tom@codesourcery.com>
10316
10317 PR libgomp/85639
10318 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10319 if ignore == 0.
10320
10321 2018-05-04 Richard Biener <rguenther@suse.de>
10322
10323 PR middle-end/85627
10324 * tree-complex.c (update_complex_assignment): We are always in SSA form.
10325 (expand_complex_div_wide): Likewise.
10326 (expand_complex_operations_1): Likewise.
10327 (expand_complex_libcall): Preserve EH info of the original stmt.
10328 (tree_lower_complex): Handle removed blocks.
10329 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10330 on complex multiplication and division libcall builtins.
10331
10332 2018-05-04 Richard Biener <rguenther@suse.de>
10333
10334 PR middle-end/85574
10335 * fold-const.c (negate_expr_p): Restrict negation of operand
10336 zero of a division to when we know that can happen without
10337 overflow.
10338 (fold_negate_expr_1): Likewise.
10339
10340 2018-05-04 Jakub Jelinek <jakub@redhat.com>
10341
10342 PR libstdc++/85466
10343 * real.h (real_nextafter): Declare.
10344 * real.c (real_nextafter): New function.
10345 * fold-const-call.c (fold_const_nextafter): New function.
10346 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10347 CASE_CFN_NEXTTOWARD.
10348 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10349 even when arg1_mode is different from arg0_mode.
10350
10351 2018-05-03 Nathan Sidwell <nathan@acm.org>
10352
10353 * doc/extend.texi (Deprecated Features): Remove
10354 -ffriend-injection.
10355 (Backwards Compatibility): Likewise.
10356 * doc/invoke.texi (C++ Language Options): Likewise.
10357 (C++ Dialect Options): Likewise.
10358
10359 2018-05-03 Jakub Jelinek <jakub@redhat.com>
10360
10361 PR target/85530
10362 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10363 _mm512_mask_mullox_epi64): New intrinsics.
10364
10365 2018-05-03 Tom de Vries <tom@codesourcery.com>
10366
10367 PR testsuite/85106
10368 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10369 dump files): Add offload-tree.
10370
10371 2018-05-03 Richard Biener <rguenther@suse.de>
10372
10373 PR tree-optimization/85615
10374 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10375 to loops not nested in BBs loop father to avoid creating multi-entry
10376 loops.
10377
10378 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10379
10380 PR tree-optimization/70291
10381 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10382 arguments. Change return type to tree. Emit libcall as a new
10383 statement rather than replacing existing one when inplace_p is true.
10384 (expand_complex_multiplication_components): New function.
10385 (expand_complex_multiplication): Expand floating-point complex
10386 multiplication using the above.
10387 (expand_complex_division): Rename inner_type parameter to type.
10388 Update expand_complex_libcall call-site.
10389 (expand_complex_operations_1): Update expand_complex_multiplication
10390 and expand_complex_division call-sites.
10391
10392 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10393
10394 PR target/85582
10395 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10396 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10397 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10398 the highest significant bit of the shift count mask is clear. In
10399 check whether and[sq]i3 is needed verify that all significant bits
10400 of the shift count other than the highest are set.
10401
10402 2018-05-02 Tom de Vries <tom@codesourcery.com>
10403
10404 PR libgomp/82428
10405 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10406 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10407 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10408 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10409 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10410 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10411 __builtin_goacc_parlevel_size.
10412
10413 2018-05-02 Richard Biener <rguenther@suse.de>
10414
10415 PR tree-optimization/85597
10416 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10417 do not use split vect_get_vec_defs call but call vect_get_slp_defs
10418 directly.
10419
10420 2018-05-02 Tom de Vries <tom@codesourcery.com>
10421
10422 PR testsuite/85106
10423 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10424 dump files): Add ltrans-tree.
10425
10426 2018-05-02 Tom de Vries <tom@codesourcery.com>
10427
10428 PR testsuite/85106
10429 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10430 dump files): Add wpa-ipa.
10431
10432 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10433
10434 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10435 powerpc*-*-linux*paired* target.
10436 * config/rs6000/750cl.h: Delete.
10437 * config/rs6000/paired.h: Delete.
10438 * config/rs6000/paired.md: Delete.
10439 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10440 float support.
10441 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10442 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10443 comment. Remove paired float support.
10444 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10445 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10446 VECTOR_PAIRED.
10447 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10448 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10449 declarations.
10450 * config/rs6000/rs6000.c: Remove paired float support.
10451 (paired_expand_vector_init, paired_expand_vector_move,
10452 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10453 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10454 paired_expand_builtin, paired_expand_predicate_builtin,
10455 paired_init_builtins): Delete.
10456 * config/rs6000/rs6000.h: Remove paired float support.
10457 * config/rs6000/rs6000.md: Remove paired float support.
10458 (move_from_CR_ov_bit): Delete.
10459 * config/rs6000/rs6000.opt (mpaired): Delete.
10460 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10461 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10462
10463 2018-05-02 Richard Biener <rguenther@suse.de>
10464
10465 PR middle-end/85567
10466 * gimplify.c (gimplify_save_expr): When in SSA form allow
10467 SAVE_EXPRs to compute to SSA vars.
10468
10469 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10470
10471 PR target/85582
10472 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10473 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10474 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10475 clobber operands[2], instead use a new pseudo. Formatting fixes.
10476
10477 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10478
10479 PR tree-optimization/85586
10480 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10481 exit early for statements in the same group if the accesses are
10482 not strided.
10483
10484 2018-05-02 Tom de Vries <tom@codesourcery.com>
10485
10486 PR lto/85451
10487 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10488 error message.
10489
10490 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10491
10492 PR tree-optimization/85143
10493 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10494
10495 2018-05-01 Tom de Vries <tom@codesourcery.com>
10496
10497 PR lto/85451
10498 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10499 not found" error message.
10500
10501 2018-05-01 Tom de Vries <tom@codesourcery.com>
10502
10503 PR other/83786
10504 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10505 * vec.c (test_ordered_remove_if): New function.
10506 (vec_c_tests): Call test_ordered_remove_if.
10507 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10508 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10509 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10510 VEC_ORDERED_REMOVE_IF.
10511
10512 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10513
10514 PR tree-optimization/82665
10515 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10516 pointer subtraction where arguments come from a memchr call.
10517
10518 2018-05-01 Jakub Jelinek <jakub@redhat.com>
10519
10520 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10521 --push-state --as-needed and --pop-state instead of --as-needed and
10522 --no-as-needed if ld supports it.
10523 * configure: Regenerated.
10524
10525 PR web/85578
10526 * doc/install.texi2html: Replace _002d with - and _002a with * in
10527 generated html files using sed.
10528
10529 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10530
10531 PR c++/85523
10532 * gcc-rich-location.c (blank_line_before_p): New function.
10533 (use_new_line): New function.
10534 (gcc_rich_location::add_fixit_insert_formatted): New function.
10535 * gcc-rich-location.h
10536 (gcc_rich_location::add_fixit_insert_formatted): New function.
10537
10538 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10539
10540 * selftest.c (assert_streq): Rename "expected" and "actual" to
10541 "val1" and "val2". Extend NULL-handling to cover both inputs
10542 symmetrically, while still requiring both to be non-NULL for a pass.
10543 * selftest.h (assert_streq): Rename "expected" and "actual" to
10544 "val1" and "val2".
10545 (ASSERT_EQ): Likewise.
10546 (ASSERT_EQ_AT): Likewise.
10547 (ASSERT_KNOWN_EQ): Likewise.
10548 (ASSERT_KNOWN_EQ_AT): Likewise.
10549 (ASSERT_NE): Likewise.
10550 (ASSERT_MAYBE_NE): Likewise.
10551 (ASSERT_MAYBE_NE_AT): Likewise.
10552 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
10553 the assertion to pass.
10554 (ASSERT_STREQ_AT): Likewise.
10555
10556 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10557
10558 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10559 interaction with -pie.
10560
10561 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10562
10563 * selftest.h: Fix alphabetization of per-source-file selftest
10564 declarations.
10565
10566 2018-04-30 Jason Merrill <jason@redhat.com>
10567
10568 PR c++/61982 - dead stores to destroyed objects.
10569 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10570 of clobber.
10571
10572 2018-04-30 Jason Merrill <jason@redhat.com>
10573
10574 * tree.c (build_clobber): New.
10575 * tree.h: Declare it.
10576 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10577
10578 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10579
10580 * diagnostic-show-locus.c (layout::layout): Update for
10581 location_get_source_line returning a char_span.
10582 (struct char_span): Move to input.h.
10583 (struct correction): Update for fields in char_span becoming
10584 private.
10585 (struct source_line): Update for location_get_source_line
10586 returning a char_span.
10587 (layout::print_line): Likewise.
10588 * edit-context.c (edited_file::print_content): Likewise.
10589 (edited_file::print_diff_hunk): Likewise.
10590 (edited_file::print_run_of_changed_lines): Likewise.
10591 (edited_file::get_num_lines): Likewise.
10592 (edited_line::edited_line): Likewise.
10593 * final.c (asm_show_source): Likewise.
10594 * input.c (location_get_source_line): Convert return type
10595 from const char * to char_span, losing the final "line_len"
10596 param.
10597 (dump_location_info): Update for the above.
10598 (get_substring_ranges_for_loc): Likewise. Use a char_span
10599 when handling the literal within the line.
10600 (test_reading_source_line): Update for location_get_source_line
10601 returning a char_span.
10602 * input.h (class char_span): Move here from
10603 diagnostic-show-locus.c, converting from a struct to a class.
10604 Make data members private.
10605 (char_span::operator bool): New.
10606 (char_span::length): New.
10607 (char_span::get_buffer): New.
10608 (char_span::operator[]): New.
10609 (char_span::subspan): Make const.
10610 (char_span::xstrdup): New.
10611 (location_get_source_line): Convert return type from const char *
10612 to char_span, losing the final "line_size" param.
10613
10614 2018-04-30 Jan Hubicka <jh@suse.cz>
10615
10616 * lto-wrapper.c (ltrans_priorities): New static var.
10617 (cmp_priority): New.
10618 (run_gcc): Read priorities and if doing parallel build order
10619 the Makefile by them.
10620
10621 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10622
10623 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10624
10625 2018-04-30 Richard Biener <rguenther@suse.de>
10626
10627 * tree-cfg.c (verify_address): Remove base argument, add
10628 flag whether to check TREE_ADDRESSABLE and do that.
10629 (verify_expr): Remove.
10630 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10631 (verify_gimple_assign_single): Likewise.
10632 (verify_gimple_switch): Likewise.
10633 (verify_expr_location_1): Dereference tp once. Add (disabled)
10634 piece from verify_expr.
10635 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10636
10637 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10638
10639 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10640
10641 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10642
10643 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10644 (small_data_pattern): Likewise.
10645 (arc_rewrite_small_data): Likewise.
10646 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10647 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10648 (get_symbol_alignment): New function.
10649 (legitimate_small_data_address_p): Likewise.
10650 (legitimate_scaled_address): Update, call
10651 legitimate_small_data_address_p.
10652 (output_sdata): New static variable.
10653 (arc_print_operand): Update how we handle small data operands.
10654 (arc_print_operand_address): Likewise.
10655 (arc_legitimate_address_p): Update, use
10656 legitimate_small_data_address_p.
10657 (arc_rewrite_small_data_p): Remove.
10658 (arc_rewrite_small_data_1): Likewise.
10659 (arc_rewrite_small_data): Likewise.
10660 (small_data_pattern): Likewise.
10661 (compact_sda_memory_operand): Update to use
10662 legitimate_small_data_address_p and get_symbol_alignment.
10663 (prepare_move_operands): Don't rewite sdata pattern.
10664 (prepare_extend_operands): Remove.
10665 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10666 pattern.
10667 (zero_extendqisi2): Likewise.
10668 (zero_extendhisi2): Likewise.
10669 (extendqihi2): Likewise.
10670 (extendqisi2): Likewise.
10671 (extendhisi2): Likewise.
10672 (addsi3): Likewise.
10673 (subsi3): Likewise.
10674 (andsi3): Likewise.
10675 * config/arc/constraints.md (Usd): Change it to memory constraint.
10676
10677 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10678
10679 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10680 as source of std instructions.
10681 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10682 allow 6-bit constants as source for store instructions.
10683 (movdi_insn): Update instruction pattern to allow 6-bit constants
10684 as source for store instructions.
10685
10686 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10687
10688 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10689
10690 2018-04-30 Nathan Sidwell <nathan@acm.org>
10691 Sandra Loosemore <sandra@codesourcery.com>
10692
10693 * dumpfile.c (dump_open): Allow '-' for stdout.
10694 * doc/invoke.texi (Developer Options): Document dump filename
10695 determination early. Document stdin/stdout selection.
10696
10697 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10698
10699 Microblaze Target: PIC data text relative
10700
10701 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10702 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10703 Add declaration.
10704 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10705 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10706 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10707 New addressing mode for data-text relative position indepenedent code.
10708 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10709 'ADDRESS_SYMBOLIC_TXT_REL'.
10710 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10711 (microblaze_legitimate_pic_operand): Exclude function calls from
10712 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10713 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10714 addresses cases.
10715 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10716 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10717 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10718 for 'address + offset'.
10719 (microblaze_expand_prologue): Add new function prologue call for
10720 'r20' assignation.
10721 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10722 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10723 table in case of TARGET_PIC_DATA_TEXT_REL.
10724 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10725 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10726 Add new macros 'UNSPEC_TEXT',
10727 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10728 + exclude function calls from 'UNSPEC_PLT' in case of data text
10729 relative mode.
10730 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10731 new target hook for generating address diff vector tables in case of
10732 flag_pic.
10733 * doc/tm.texi : Regenerate.
10734 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10735 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10736 of addr diff vector generation.
10737 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10738 target hook definition.
10739 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10740 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10741 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10742 option for data text relative.
10743
10744 2018-04-30 Richard Biener <rguenther@suse.de>
10745
10746 * tree-chrec.h (evolution_function_is_constant_p): Remove
10747 redundant check.
10748 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10749
10750 2018-04-30 Richard Biener <rguenther@suse.de>
10751
10752 PR bootstrap/85571
10753 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10754
10755 2018-04-30 Richard Biener <rguenther@suse.de>
10756
10757 PR tree-optimization/28364
10758 PR tree-optimization/85275
10759 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10760 copying first exit test.
10761
10762 2018-04-28 Mark Wielaard <mark@klomp.org>
10763
10764 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10765 dwarf_version >= 5.
10766 (dwarf_AT): Handle DW_AT_addr_base.
10767 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10768
10769 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10770
10771 PR target/84431
10772 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10773 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10774 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10775 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10776
10777 2018-04-28 Richard Biener <rguenther@suse.de>
10778
10779 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10780 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10781 to reflect use. Only add interesting stmts.
10782
10783 2018-04-27 Martin Jambor <mjambor@suse.cz>
10784
10785 PR ipa/85549
10786 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10787 the jump function allows for passing through aggregate values.
10788
10789 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10790
10791 * input.h (in_system_header_at): Convert from macro to inline
10792 function.
10793 (from_macro_expansion_at): Likewise.
10794 (from_macro_definition_at): Likewise.
10795
10796 2018-04-27 Jeff Law <law@redhat.com>
10797
10798 * config.gcc: Mark tile* targets as deprecated/obsolete.
10799
10800 2018-04-27 Richard Biener <rguenther@suse.de>
10801
10802 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10803 fix for ILP32.
10804
10805 2018-04-27 Richard Biener <rguenther@suse.de>
10806
10807 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10808
10809 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10810
10811 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10812 with Yd constraint. Set "preferred_for_speed" attribute from
10813 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10814 with Yd constraint.
10815 (*movdi_internal): Ditto.
10816 (movti_interunit splitters): Remove
10817 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10818 (movdi_interunit splitters): Ditto.
10819 * config/i386/constraints.md (Ye): Remove.
10820 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10821
10822 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10823
10824 PR target/85512
10825 * config/aarch64/constraints.md (Usg): Limit to 31.
10826 (Usj): Limit to 63.
10827
10828 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10829
10830 PR tree-optimization/85529
10831 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10832 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10833 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10834 zero extension or masking of the MSB bit.
10835 (optimize_range_tests): Add FIRST_BB argument, pass it through
10836 to optimize_range_tests_var_bound.
10837 (maybe_optimize_range_tests, reassociate_bb): Adjust
10838 optimize_range_tests callers.
10839
10840 2018-04-26 Richard Biener <rguenther@suse.de>
10841 Jakub Jelinek <jakub@redhat.com>
10842
10843 * cgraph.h (symbol_table): Just declare debug method here.
10844 * symtab.c (symbol_table::debug): Define.
10845
10846 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10847
10848 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10849
10850 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10851
10852 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10853 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10854 (*movdi_internal): Substitute Yi and Yj constraint with x
10855 and Ym and Yn constraint with y constraint. Update "isa"
10856 attribute and set "preferred_for_speed" attribute from
10857 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10858 (*movsi_internal): Ditto.
10859 (*movdf_internal): Ditto.
10860 (*movsf_internal): Ditto.
10861 (*zero_extendsidi2): Ditto.
10862 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10863 (sse2_loadld): Ditto.
10864 (*vec_extract<ssevecmodelower>_0): Ditto.
10865 (*vec_extractv4si_0_zext_sse4): Ditto.
10866 (vec_concatv2di): Ditto.
10867 (*vec_dup<mode>): Ditto.
10868 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10869 * config/i386/constraints.md (Yi): Remove.
10870 (Yj): Remove.
10871 (Ym): Remove.
10872 (Yn): Remove.
10873
10874 2018-04-26 Nathan Sidwell <nathan@acm.org>
10875
10876 * dumpfile.c (dump_open): New.
10877 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10878 (dump_finish): Detect stdio/stderr by value not name.
10879
10880 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10881
10882 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10883
10884 2018-04-26 Tom de Vries <tom@codesourcery.com>
10885
10886 PR target/84952
10887 * config/nvptx/nvptx.c (verify_neutering_jumps)
10888 (verify_neutering_labels): New function
10889 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10890
10891 2018-04-26 Tom de Vries <tom@codesourcery.com>
10892
10893 PR target/84025
10894 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10895 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10896 need neutering.
10897
10898 2018-04-26 Richard Biener <rguenther@suse.de>
10899 Tom de Vries <tom@codesourcery.com>
10900
10901 PR lto/85422
10902 * lto-streamer-out.c (output_function): Fixup loops if required to match
10903 discovery done in the reader.
10904
10905 2018-04-26 Richard Biener <rguenther@suse.de>
10906
10907 PR tree-optimization/85116
10908 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10909 have a loop exit from the single latch predecessor. Remove
10910 case of header with just condition.
10911 (ch_base::copy_headers): Exclude infinite loops from any
10912 processing.
10913 (pass_ch::execute): Record exits.
10914
10915 2018-04-26 Richard Biener <rguenther@suse.de>
10916
10917 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10918 prologue cost vector and pass it to vect_get_load_cost.
10919 (vect_get_peeling_costs_all_drs): Likewise.
10920 (vect_peeling_hash_get_lowest_cost): Likewise.
10921 (vect_enhance_data_refs_alignment): Likewise.
10922
10923 2018-04-26 Richard Biener <rguenther@suse.de>
10924
10925 PR middle-end/85450
10926 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10927 checking of integer<->pointer conversions.
10928 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10929 sign-/zero-extending pointer types.
10930 (expand_omp_for_static_chunk): Likewise.
10931
10932 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10933 Jean Lee <xiaoyur347@gmail.com>
10934
10935 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10936 (TARGET_ASAN_SHADOW_OFFSET): Define.
10937 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10938 true for -fsanitize=address.
10939
10940 2018-04-25 Mark Wielaard <mark@klomp.org>
10941
10942 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10943 shorter ones.
10944
10945 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10946
10947 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10948 than "alu", remove explicit "memory" and "imm_disp" attributes.
10949 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10950
10951 PR middle-end/85414
10952 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10953 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10954 gen_lowpart_no_emit.
10955
10956 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10957
10958 PR target/85473
10959 * config/i386/i386.c (ix86_expand_builtin): Change memory
10960 operand to XI, extend p0 to Pmode.
10961 * config/i386/i386.md: Change unspec volatile and operand
10962 1 mode to XI, change operand 0 mode to P.
10963
10964 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10965
10966 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10967 GET_MODE_MASK before any checking.
10968 (nds32_can_use_bset_p): Likewise.
10969 (nds32_can_use_btgl_p): Likewise.
10970
10971 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10972
10973 * config/nds32/nds32-doubleword.md: New define_split pattern for
10974 illegal register number.
10975
10976 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10977
10978 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10979
10980 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10981
10982 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10983
10984 2018-04-25 Richard Biener <rguenther@suse.de>
10985
10986 * lto-streamer.h (LTO_major_version): Bump to 8.
10987
10988 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10989
10990 * BASE-VER: Set to 9.0.0.
10991
10992 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10993
10994 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10995 in __abskf2 and __powikf2.
10996
10997 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10998
10999 PR target/85512
11000 * config/aarch64/constraints.md (Usg, Usj): New constraints.
11001 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11002 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11003 Use the above on operand 2. Reindent.
11004 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11005
11006 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11007
11008 PR target/85485
11009 * common/config/i386/i386-common.c (ix86_handle_option): Don't
11010 handle OPT_mcet.
11011 * config/i386/i386.opt (mcet): Removed.
11012 * doc/install.texi: Remove -mcet documentation.
11013 * doc/invoke.texi: Likewise.
11014
11015 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11016
11017 PR target/85485
11018 * doc/install.texi: Remove -mcet from bootstrap-cet.
11019
11020 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11021
11022 PR target/85511
11023 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11024 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11025 if TARGET_64BIT.
11026
11027 PR target/85503
11028 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11029 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11030 containing a CONST_VECTOR.
11031
11032 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
11033
11034 * doc/install.texi: Update newlib dependency for nvptx.
11035
11036 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11037
11038 PR target/85508
11039 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11040 instead of INTVAL when shifting x left.
11041
11042 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
11043
11044 PR tree-optimization/85478
11045 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11046 vect_grouped_store_supported for single element vectors.
11047
11048 2018-04-24 Richard Biener <rguenther@suse.de>
11049
11050 PR target/85491
11051 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11052 load cost increase to the case of non-constant step.
11053
11054 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11055
11056 PR target/84828
11057 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11058 destination if any_malformed_asm.
11059
11060 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
11061
11062 PR middle-end/85496
11063 * expr.c (store_field): In the bitfield case, if the value comes from
11064 a function call and is returned in registers by means of a PARALLEL,
11065 do not change the mode of the temporary unless BLKmode and VOIDmode.
11066
11067 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
11068
11069 PR rtl-optimization/85423
11070 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11071 dependencies to debug insns when the previous insn is non-debug.
11072
11073 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11074
11075 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11076 enums into a single definition.
11077 (fls): Fix predicates and printing.
11078 (seti): Likewise.
11079
11080 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11081
11082 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11083 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11084 and short u6 immediate.
11085 (check_if_valid_sleep_operand): Remove.
11086 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11087
11088 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11089
11090 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11091 flag_always_save_lp condition.
11092 * config/nds32/nds32.opt (malways-save-lp): New option.
11093
11094 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11095
11096 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11097 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11098 * config/nds32/nds32.h
11099 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11100 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11101
11102 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11103
11104 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11105 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11106
11107 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11108 Chung-Ju Wu <jasonwucj@gmail.com>
11109
11110 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11111 Declare.
11112 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11113 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11114
11115 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11116
11117 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11118
11119 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11120
11121 * config/nds32/nds32-protos.h (nds32_data_alignment,
11122 nds32_local_alignment): Declare.
11123 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11124 nds32_local_alignment): New functions.
11125 (TARGET_CONSTANT_ALIGNMENT): Define.
11126 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11127
11128 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11129
11130 * config/nds32/nds32.c
11131 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11132 (TARGET_MODES_TIEABLE_P): Likewise.
11133
11134 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11135
11136 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11137 level Ofast and Og.
11138
11139 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
11140 Chung-Ju Wu <jasonwucj@gmail.com>
11141
11142 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11143 for unaligned access.
11144 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11145 unaligned access.
11146 * config/nds32/nds32-intrinsic.md: Likewise.
11147 * config/nds32/nds32_intrinsic.h: Likewise.
11148 * config/nds32/nds32.h (nds32_builtins): Likewise.
11149 * config/nds32/nds32.opt (munaligned-access): New option.
11150 * config/nds32/nds32.c (nds32_asm_file_start): Display
11151 flag_unaligned_access status.
11152
11153 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11154
11155 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11156 -mno-relax is present.
11157 * config/riscv/linux.h (LINK_SPEC): Ditto.
11158
11159 2018-04-20 Martin Sebor <msebor@redhat.com>
11160
11161 PR c/85365
11162 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11163 for null pointers.
11164 (gimple_fold_builtin_stxcpy_chk): Same.
11165 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11166
11167 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
11168
11169 PR target/85456
11170 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11171 __powikf2 when long double is IEEE 128-bit.
11172
11173 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11174
11175 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11176 step to make sure stack always aligned.
11177
11178 2018-04-20 Carl Love <cel@us.ibm.com>
11179
11180 PR target/83402
11181 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11182 size check for arg0.
11183
11184 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
11185 Tom de Vries <tom@codesourcery.com>
11186
11187 PR target/85445
11188 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11189 Emit insns for calls too.
11190 (nvptx_find_par): Always look for worker-level predecessor insn.
11191 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
11192 calls.
11193 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11194 (nvptx_process_pars): Propagate frames for calls.
11195
11196 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
11197
11198 PR target/85469
11199 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11200 Removed.
11201 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11202 (ix86_handle_option): Don't handle OPT_mibt.
11203 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11204 __SHSTK__.
11205 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11206 has_ibt and ibt.
11207 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11208 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11209 (ix86_target_macros): Define __CET__ with flag_cf_protection
11210 for -fcf-protection.
11211 * config/i386/i386.c (isa2_opts): Remove -mibt.
11212 * config/i386/i386.h (TARGET_IBT): Removed.
11213 (TARGET_IBT_P): Likewise.
11214 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11215 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11216 * config/i386/i386.opt (mcet): Update help message.
11217 (mshstk): Likewise.
11218 (mibt): Removed.
11219 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
11220 -mcet as an alias for -mshstk.
11221
11222 2018-04-20 Richard Biener <rguenther@suse.de>
11223
11224 PR middle-end/85475
11225 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11226 complexity by forcing a single use of the multiply operand.
11227
11228 2018-04-20 Martin Jambor <mjambor@suse.cz>
11229
11230 ipa/85449
11231 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11232 recursion dependency to only apply to non-clones.
11233
11234 2018-04-20 Martin Jambor <mjambor@suse.cz>
11235
11236 ipa/85447
11237 * ipa-cp.c (create_specialized_node): Check that clones of
11238 self-recursive edges exist during IPA-CP.
11239
11240 2018-04-19 Toon Moene <toon@moene.org>
11241
11242 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11243 by -O3.
11244
11245 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11246
11247 PR tree-optimization/85467
11248 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11249 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
11250 VECTOR_CST element to type.
11251
11252 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11253
11254 PR target/85397
11255 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11256 * config/i386/i386.md (builtin_setjmp_setup): Removed.
11257 (builtin_longjmp): Likewise.
11258 (save_stack_nonlocal): New pattern.
11259 (restore_stack_nonlocal): Likewise.
11260
11261 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11262
11263 PR target/85404
11264 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11265 Replace ASM_OUTPUT_LABEL with fprintf.
11266
11267 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11268
11269 PR target/85417
11270 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11271 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11272 * config/i386/i386-c.c (ix86_target_macros_internal): Also
11273 define __IBT__ and __SHSTK__ for -fcf-protection.
11274 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11275 TARGET_IBT.
11276 (ix86_trampoline_init): Likewise.
11277 (x86_output_mi_thunk): Likewise.
11278 (ix86_notrack_prefixed_insn_p): Likewise.
11279 (ix86_option_override_internal): Don't disallow -fcf-protection.
11280 * config/i386/i386.md (rdssp<mode>): Also enable for
11281 -fcf-protection.
11282 (incssp<mode>): Likewise.
11283 (nop_endbr): Likewise.
11284 * config/i386/i386.opt (mcet): Change help message to built-in
11285 functions only.
11286 (mibt): Likewise.
11287 (mshstk): Likewise.
11288 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11289 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
11290 enable CET built-in functions.
11291
11292 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
11293
11294 * common/config/i386/i386-common.c
11295 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11296 OPTION_MASK_ISA_MOVDIRI_UNSET,
11297 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11298 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11299 * config.gcc (movdirintrin.h): New header.
11300 * config/i386/cpuid.h (bit_MOVDIRI,
11301 bit_MOVDIR64B): New bits.
11302 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11303 and -mmvodir64b.
11304 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11305 (VOID, PVOID, PCVOID)): New function types.
11306 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11307 __builtin_ia32_directstoreu_u64,
11308 __builtin_ia32_movdir64b): New builtins.
11309 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11310 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11311 and -mmovdiri.
11312 (ix86_valid_target_attribute_inner_p): Ditto.
11313 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11314 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11315 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11316 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11317 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11318 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11319 (movdiri<mode>, movdir64b_<mode>): New.
11320 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11321 * config/i386/immintrin.h: Include movdirintrin.h.
11322 * config/i386/movdirintrin.h: New file.
11323 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11324
11325 2018-04-19 Richard Biener <rguenther@suse.de>
11326
11327 PR middle-end/85455
11328 * cfg.c (clear_bb_flags): When loop state says we have
11329 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11330
11331 2018-04-19 Richard Biener <rguenther@suse.de>
11332
11333 PR tree-optimization/84737
11334 * tree-vect-data-refs.c (vect_copy_ref_info): New function
11335 copying restrict info.
11336 (vect_setup_realignment): Use it.
11337 * tree-vectorizer.h (vect_copy_ref_info): Declare.
11338 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11339 the first DR to all generated stores.
11340 (vectorizable_load): Likewise for loads.
11341
11342 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11343
11344 PR tree-optimization/85446
11345 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11346 the integral and pointer types to have the same precision.
11347
11348 * doc/install.texi: Document --disable-cet being the default and
11349 --enable-cet=auto.
11350
11351 2018-04-18 Martin Liska <mliska@suse.cz>
11352
11353 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11354 style.
11355
11356 2018-04-18 Martin Liska <mliska@suse.cz>
11357
11358 Revert
11359 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11360
11361 PR ipa/83983
11362 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11363 arguments if they are comparable.
11364
11365 2018-04-18 Martin Liska <mliska@suse.cz>
11366
11367 Revert
11368 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11369
11370 PR lto/84805
11371 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11372 incomplete types.
11373
11374 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
11375
11376 PR target/85388
11377 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11378 ENDBR after calling __morestack.
11379
11380 2018-04-18 David Malcolm <dmalcolm@redhat.com>
11381
11382 PR jit/85384
11383 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11384 by using gcc_base_ver to generate a gcc_driver_version, and use
11385 it when generating GCC_DRIVER_NAME.
11386 * configure: Regenerate.
11387
11388 2018-04-18 Jakub Jelinek <jakub@redhat.com>
11389
11390 PR target/81084
11391 * config.gcc: Obsolete powerpc*-*-*spe*.
11392
11393 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11394
11395 PR debug/84637
11396 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11397 (stabstr_D): Change type of unum from unsigned int to
11398 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
11399 type.
11400
11401 2018-04-17 Jim Wilson <jimw@sifive.com>
11402
11403 PR 84856
11404 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11405 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11406 Set arg_pointer_offset after using pretend_args_size.
11407
11408 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11409
11410 PR rtl-optimization/85431
11411 * dse.c (record_store): Ignore zero width stores.
11412
11413 PR sanitizer/85230
11414 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11415 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11416 __builtin_stack_restore rather than after it.
11417 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11418 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11419 argument instead of virtual_dynamic_stack_rtx.
11420
11421 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11422
11423 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11424 New prototype.
11425 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11426 Add note to error message to explain internal mapping of overloaded
11427 built-in function name to non-overloaded built-in function name.
11428 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11429 function.
11430
11431 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11432
11433 PR target/85424
11434 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11435 where the inputs overlap with the output.
11436
11437 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11438
11439 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11440 (=v, v) alternative and explicit "memory" attribute.
11441 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11442 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11443 attributes.
11444 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11445 "sselog1" type instead of "sselog".
11446 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11447 "sselog". Remove explicit "memory" attribute.
11448 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11449 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11450 attributes.
11451 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11452 "sselog1" type instead of "sselog". Remove explicit "memory"
11453 attribute.
11454 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11455 use "sselog1" type instead of "sselog". Remove explicit "memory"
11456 attribute.
11457 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11458 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11459 attributes.
11460 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11461 "sselog1" type instead of "sselog". Remove explicit "memory"
11462 attribute.
11463 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11464 use "sselog1" type instead of "sselog". Remove explicit "memory"
11465 attribute.
11466
11467 PR target/85430
11468 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11469
11470 PR middle-end/85414
11471 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11472 on a SUBREG.
11473
11474 2018-04-17 Martin Jambor <mjambor@suse.cz>
11475
11476 PR ipa/85421
11477 * ipa-cp.c (create_specialized_node): Call
11478 expand_all_artificial_thunks if necessary.
11479
11480 2018-04-17 Martin Liska <mliska@suse.cz>
11481
11482 PR lto/85405
11483 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11484 in message, remote space in between '_G' and '('.
11485
11486 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11487
11488 PR target/85281
11489 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11490 avx512f_vmcmp<mode>3<round_saeonly_name>,
11491 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11492 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11493 avx512f_rndscale<mode><round_saeonly_name>,
11494 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11495 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11496 Use %<iptr>2 instead of %2 for -masm=intel.
11497 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11498 avx512f_vcvttss2usi<round_saeonly_name>,
11499 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11500 -masm=intel.
11501 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11502 avx512f_vcvttsd2usi<round_saeonly_name>,
11503 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11504 Use %q1 instead of %1 for -masm=intel.
11505 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11506 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11507 of %3 for -masm=intel.
11508 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11509 -masm=intel.
11510 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11511 -masm=intel.
11512 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11513 -masm=intel.
11514 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11515 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11516 %g1.
11517 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11518 -masm=intel.
11519 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11520 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11521 %g1 and one with %0 and %1.
11522 (avx512er_vmrcp28<mode><round_saeonly_name>,
11523 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11524 %1 for -masm=intel.
11525 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11526 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11527 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11528 of %0 and %{%4%} for -masm=intel.
11529 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11530 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11531 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11532 order of %0 and %{%5%}%{z%} for -masm=intel.
11533
11534 2018-04-17 Jan Hubicka <jh@suse.cz>
11535
11536 PR lto/85405
11537 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11538
11539 2018-04-17 Martin Liska <mliska@suse.cz>
11540
11541 PR ipa/85329
11542 * multiple_target.c (create_dispatcher_calls): Set apostrophes
11543 for target_clone error message. Make default implementation
11544 clone to be a local declaration.
11545 (separate_attrs): Add new argument and check for an empty
11546 string.
11547 (expand_target_clones): Handle it.
11548 (ipa_target_clone): Make redirection just for target_clones
11549 functions.
11550
11551 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
11552 Tom de Vries <tom@codesourcery.com>
11553
11554 PR middle-end/84955
11555 * omp-expand.c (expand_oacc_for): Add dummy false branch for
11556 tiled basic blocks without omp continue statements.
11557
11558 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
11559
11560 PR target/83660
11561 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11562 vec_extract expression as having side effects to make sure it gets
11563 a cleanup point.
11564
11565 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
11566
11567 PR target/85403
11568 * config/i386/i386.c (get_builtin_code_for_version): Check
11569 error_mark_node.
11570
11571 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
11572
11573 PR target/84331
11574 * config.gcc: Support "skylake".
11575 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11576 PROCESSOR_SKYLAKE.
11577 * config/i386/i386.c (m_SKYLAKE): Define.
11578 (processor_target_table): Add "skylake".
11579 (ix86_option_override_internal): Add "skylake".
11580 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11581 PROCESSOR_CANNONLAKE.
11582 (get_builtin_code_for_version): Fix priority for
11583 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11584 PROCESSOR_SKYLAKE-AVX512.
11585 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11586 (processor_type): Add PROCESSOR_SKYLAKE.
11587
11588 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11589 Jason Merrill <jason@redhat.com>
11590
11591 PR c++/85112
11592 * convert.c (convert_to_integer_1): Use direct recursion for
11593 enumeral types and types with a precision less than the number
11594 of bits in their mode.
11595
11596 2018-04-16 Julia Koval <julia.koval@intel.com>
11597
11598 PR target/84413
11599 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11600 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11601
11602 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11603
11604 PR target/85293
11605 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11606 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11607 and -mno-direct-move.
11608
11609 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11610
11611 PR target/83402
11612 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11613 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11614 Ensure negative shifts result in {0}.
11615
11616 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11617
11618 PR rtl-optimization/79916
11619 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11620 regs (if any) to define how to gnerate SD moves when LRA is in
11621 progress.
11622
11623 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11624
11625 PR rtl-optimization/85393
11626 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11627 * except.c (expand_dw2_landing_pad_for_region): Make static.
11628 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11629 a label and unconditional jump to old_bb, rather than
11630 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11631 basic block.
11632
11633 PR rtl-optimization/85376
11634 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11635 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11636 instead of a specific value.
11637
11638 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11639 Bin Cheng <bin.cheng@arm.com>
11640
11641 PR tree-optimization/82965
11642 PR tree-optimization/83991
11643 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11644 by_profile_only parameter.
11645 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11646 information if the loop was predicted to iterate too many times.
11647 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11648
11649 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11650
11651 PR lto/71991
11652 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11653 always inline.
11654
11655 2018-04-13 Martin Liska <mliska@suse.cz>
11656 Jakub Jelinek <jakub@redhat.com>
11657
11658 PR middle-end/81657
11659 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11660 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11661 * builtins.c (expand_builtin_memory_copy_args): Use
11662 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11663 handle dest_addr == pc_rtx.
11664
11665 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11666
11667 PR target/85291
11668 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11669 asked to not generate direct moves.
11670 (fix_trunc<mode>si2_stfiwx): Similar.
11671 (fix_trunc<mode>si2_internal): Similar.
11672
11673 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11674
11675 PR debug/83157
11676 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11677 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11678 lookup if dest in some wider mode is known to be const0_rtx and
11679 if so, record permanent equivalence for it to be ZERO_EXTEND of
11680 the narrower mode destination.
11681
11682 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11683
11684 * lto-streamer-out.c (output_function): Revert 259346.
11685 * omp-expand.c (expand_oacc_for): Likewise.
11686
11687 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11688
11689 PR rtl-optimization/85354
11690 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11691 * sel-sched.c (sel_global_init): ... here.
11692
11693 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11694
11695 PR target/85238
11696 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11697 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11698 mode for PE-COFF targets.
11699 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11700 (i386_pe_asm_lto_end): Likewise.
11701 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11702 (TARGET_ASM_LTO_END): Likewise.
11703 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11704 (i386_pe_asm_lto_start): New function.
11705 (i386_pe_asm_lto_end): Likewise.
11706
11707 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11708 Richard Biener <rguenther@suse.de>
11709
11710 PR middle-end/84955
11711 * lto-streamer-out.c (output_function): Fix CFG loop state before
11712 streaming out.
11713 * omp-expand.c (expand_oacc_for): Handle calls to internal
11714 functions like regular functions.
11715
11716 2018-04-12 Richard Biener <rguenther@suse.de>
11717
11718 PR lto/85371
11719 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11720 for the early LTO debug to properly generate references to it
11721 during DIE emission. Do not re-use that for the skeleton for
11722 split-dwarf.
11723 (dwarf2out_early_finish): Likewise.
11724
11725 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11726
11727 PR target/85328
11728 * config/i386/sse.md
11729 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11730 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11731 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11732 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11733 and output is a reg, avoid creating invalid lowpart subreg, but
11734 instead split into a 512-bit move. Don't split if not AVX512VL,
11735 input is xmm16+ reg and output is a mem.
11736 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11737 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11738 xmm16+ reg and output is a mem.
11739
11740 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11741
11742 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11743 also for flag_dwarf2_cfi_asm.
11744
11745 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11746
11747 PR rtl-optimization/85342
11748 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11749 a bool scalar var inside of the loop instead. Don't try to update
11750 recog_data.operand after failed apply_change_group.
11751
11752 2018-04-12 Tom de Vries <tom@codesourcery.com>
11753
11754 PR target/85296
11755 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11756 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11757 array with flexible array member as array without given dimension.
11758 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11759 argument for undefined param to true.
11760
11761 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11762
11763 PR target/85321
11764 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11765 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11766 from PowerPC section.
11767 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11768 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11769 help text that is too long.
11770 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11771 help text that is too long.
11772 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11773 help text that is too long.
11774
11775 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11776
11777 * config/alpha/alpha.md (stack_probe_internal): Rename
11778 from "probe_stack". Update all callers.
11779
11780 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11781
11782 PR rtl-optimization/84566
11783 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11784 sched_macro_fuse_insns.
11785
11786 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11787
11788 PR target/84301
11789 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11790 (compute_block_dependences): ... from here.
11791
11792 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11793
11794 PR tree-optimization/85331
11795 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11796 from int to HOST_WIDE_INT.
11797
11798 2018-04-11 Martin Jambor <mjambor@suse.cz>
11799
11800 PR ipa/84149
11801 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11802 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11803 not the same as the source val.
11804 (cgraph_edge_brings_value_p): New parameter.
11805 (gather_edges_for_value): Pass destination value to
11806 cgraph_edge_brings_value_p.
11807 (perhaps_add_new_callers): Likewise.
11808 (get_info_about_necessary_edges): Likewise and exclude values brought
11809 only by self-recursive edges.
11810 (create_specialized_node): Redirect only clones of self-calling edges.
11811 (+self_recursive_pass_through_p): New function.
11812 (find_more_scalar_values_for_callers_subset): Use it.
11813 (find_aggregate_values_for_callers_subset): Likewise.
11814 (known_aggs_to_agg_replacement_list): Removed.
11815 (decide_whether_version_node): Re-calculate known constants for all
11816 remaining context clones.
11817
11818 2018-04-11 Richard Biener <rguenther@suse.de>
11819
11820 PR lto/85339
11821 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11822 from early DWARF output.
11823 (dwarf2out_early_finish): Output line info unconditionally into
11824 early DWARF and add reference to it.
11825
11826 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11827
11828 PR target/85281
11829 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11830 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11831 other than V2DFmode using iptr mode attribute.
11832 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11833
11834 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11835
11836 PR rtl-optimization/84659
11837 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11838
11839 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11840
11841 PR debug/85302
11842 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11843 SIZEP is NULL.
11844 (output_loc_list): Pass address of a dummy size variable even in the
11845 locview handling loop.
11846 (index_location_lists): Add comment on why skip_loc_list_entry can't
11847 call size_of_locs.
11848
11849 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11850
11851 PR target/85261
11852 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11853 into register.
11854
11855 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11856
11857 PR target/85321
11858 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11859 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11860 and -mstring-compare-inline-limit.
11861
11862 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11863
11864 PR target/85287
11865 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11866 for stack clash protection in a register whenever we need it to be in
11867 a register.
11868
11869 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11870
11871 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11872 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11873
11874 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11875
11876 PR target/85321
11877 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11878 the help text.
11879 (mlong-double-): Ditto.
11880 * config/rs6000/sysv4.opt (msdata=): Ditto.
11881 (mtls-size=): Ditto.
11882
11883 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11884
11885 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11886 erroneous entries for
11887 "vector int vec_ldl (int, long int *)", and
11888 "vector unsigned int vec_ldl (int, unsigned long int *)".
11889 Add comments and entries for
11890 "vector bool char vec_ldl (int, bool char *)",
11891 "vector bool short vec_ldl (int, bool short *)",
11892 "vector bool int vec_ldl (int, bool int *)",
11893 "vector bool long long vec_ldl (int, bool long long *)",
11894 "vector pixel vec_ldl (int, pixel *)",
11895 "vector long long vec_ldl (int, long long *)",
11896 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11897 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11898 type tree bool_long_long_type_node and correct definition of
11899 bool_V2DI_type_node to make reference to this new type tree.
11900 (rs6000_mangle_type): Replace erroneous reference to
11901 bool_long_type_node with bool_long_long_type_node.
11902 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11903 comments to emphasize sign distinctions for char and int types and
11904 replace RS6000_BTI_bool_long constant with
11905 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11906 use of RS6000_BTI_pixel.
11907 (bool_long_type_node): Remove this macro definition.
11908 (bool_long_long_type_node): New macro definition
11909
11910 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11911
11912 PR rtl-optimization/85300
11913 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11914 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11915 simplify_unary_operation fails.
11916
11917 2018-04-10 Martin Liska <mliska@suse.cz>
11918
11919 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11920 cgraph_edge and ipa_ref.
11921
11922 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11923
11924 PR target/85177
11925 PR target/85255
11926 * config/i386/sse.md
11927 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11928 computation of the VEC_MERGE selector from mask.
11929 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11930 Fix decoding of the VEC_MERGE selector into mask.
11931
11932 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11933
11934 PR tree-optimization/85286
11935 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11936
11937 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11938
11939 * final.c (final_1): Set insn_last_address as well as
11940 insn_current_address.
11941
11942 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11943
11944 PR target/85173
11945 * explow.c (emit_stack_probe): Call validize_mem on memory location
11946 before passing it to gen_probe_stack. Create address operand and
11947 legitimize it for the probe_stack_address case.
11948
11949 2018-04-09 Jan Hubicka <jh@suse.cz>
11950
11951 PR lto/85078
11952 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11953 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11954 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11955 walk basetypes.
11956 (free_lang_data): Rebuild type inheritance graph.
11957
11958 2018-04-09 Martin Sebor <msebor@redhat.com>
11959
11960 * invoke.texi (-finline-small-functions): Mention other optimization
11961 options.
11962 (-findirect-inlining, -fpartial-inlining): Same.
11963 (-finline-functions-called-once): Same.
11964 (-freorder-blocks-and-partition): Same.
11965
11966 2018-04-09 Jan Hubicka <jh@suse.cz>
11967
11968 PR rtl/84058
11969 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11970 jumps; choose last target that matches the criteria (i.e.
11971 no partition changes for non-crossing jumps).
11972 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11973 support for redirecting crossing jumps to non-crossing.
11974
11975 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11976
11977 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11978 also for naked functions.
11979
11980 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11981
11982 * config/arc/arc.md (add_shift): New pattern.
11983 (add_shift2): Likewise.
11984 (sub_shift): Likewise.
11985 (sub_shift_cmp0_noout): Likewise.
11986 (compare_si_ashiftsi): Likewise.
11987 (xbfu_cmp0_noout): New combine pattern.
11988 (xbfu_cmp0"): Likewise.
11989 (movsi_set_cc_insn): Place the predicable variant first.
11990 (commutative_binary_cmp0_noout): Remove clobber.
11991 (commutative_binary_cmp0): New pattern.
11992 (noncommutative_binary_cmp0): Likewise.
11993 (noncommutative_binary_cmp0_noout): Likewise.
11994 (noncommutative_binary_comparison_result_used): Removed.
11995 (rsub_cmp0): New pattern.
11996 (rsub_cmp0_noout): Likewise.
11997 (extzvsi): Changed, keep only meaningful variants.
11998 (SQH, SEZ): New iterators.
11999 (SQH_postfix): New mode attribute.
12000 (SEZ_prefix): New code attribute.
12001 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12002 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12003 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12004 of numerical value.
12005 (noncommutative_operator): Check the availability of barrel
12006 shifter option.
12007
12008 2018-04-09 Richard Biener <rguenther@suse.de>
12009
12010 PR tree-optimization/85284
12011 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12012 Only use the niter constraining form of simple_iv when the exit
12013 is always executed.
12014
12015 2018-04-09 Tom de Vries <tom@codesourcery.com>
12016
12017 PR target/84041
12018 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12019 (define_expand "*memory_barrier"): New define_expand.
12020 (define_insn "memory_barrier"): New insn.
12021
12022 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12023
12024 PR rtl-optimization/80463
12025 PR rtl-optimization/83972
12026 PR rtl-optimization/83480
12027
12028 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12029 correct producer for the insn.
12030 (tidy_control_flow): Fixup seqnos in case of debug insns.
12031
12032 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12033
12034 PR rtl-optimization/83913
12035
12036 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12037 different sched-times when merging exprs.
12038
12039 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12040
12041 PR rtl-optimization/83962
12042
12043 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12044 tidy_fallthru_edge and tidy_control_flow.
12045
12046 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12047
12048 PR rtl-optimization/83530
12049
12050 * sel-sched.c (force_next_insn): New global variable.
12051 (remove_insn_for_debug): When force_next_insn is true, also leave only
12052 next insn in the ready list.
12053 (sel_sched_region): When the region wasn't scheduled, make another pass
12054 over it with force_next_insn set to 1.
12055
12056 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12057
12058 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12059 into tm_file.
12060 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12061 for interrupt control.
12062 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12063 functions for interrupt control.
12064 * config/nds32/nds32-intrinsic.md: Likewise.
12065 * config/nds32/nds32_intrinsic.h: Likewise.
12066 * config/nds32/nds32.h (nds32_builtins): Likewise.
12067
12068 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12069
12070 * config/nds32/nds32.c (nds32_init_machine_status,
12071 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12072 strict_aligned_p field.
12073 (nds32_expand_to_rtl_hook): New function.
12074 (TARGET_EXPAND_TO_RTL_HOOK): Define.
12075 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12076
12077 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12078 Chung-Ju Wu <jasonwucj@gmail.com>
12079
12080 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12081 * config/nds32/nds32-n7.md: New file.
12082 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12083 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12084 pipeline.
12085 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12086 * config/nds32/nds32.md (pipeline_model): Add n7.
12087 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12088 * config/nds32/pipelines.md: Include n7 settings.
12089
12090 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12091 Chung-Ju Wu <jasonwucj@gmail.com>
12092
12093 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12094 * config/nds32/nds32-e8.md: New file.
12095 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12096 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12097 pipeline.
12098 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12099 * config/nds32/nds32.md (pipeline_model): Add e8.
12100 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12101 * config/nds32/pipelines.md: Include e8 settings.
12102
12103 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12104 Chung-Ju Wu <jasonwucj@gmail.com>
12105
12106 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12107 * config/nds32/nds32-n8.md: New file.
12108 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12109 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12110 pipeline.
12111 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12112 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12113 * config/nds32/nds32.md (pipeline_model): Add n8.
12114 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12115 * config/nds32/pipelines.md: Include n8 settings.
12116
12117 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12118 Chung-Ju Wu <jasonwucj@gmail.com>
12119
12120 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12121 * config/nds32/nds32-n9-2r1w.md: New file.
12122 * config/nds32/nds32-n9-3r2w.md: New file.
12123 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12124 nds32_register_ports): New or modify for cpu n9.
12125 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12126 pipeline.
12127 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12128 * config/nds32/nds32-utils.c: New file.
12129 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12130 TARGET_MUL_SLOW): Define.
12131 * config/nds32/nds32.md (pipeline_model): New attribute.
12132 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12133 New options that support cpu n9.
12134 * config/nds32/pipelines.md: Include n9 settings.
12135 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12136
12137 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12138
12139 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12140 information if necessary.
12141 (output_cond_branch_compare_zero): Likewise.
12142 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12143 (nds32_target_alignment): Refine for alignment.
12144 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12145 (FUNCTION_BOUNDARY): Modify.
12146 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12147 align case.
12148 * config/nds32/nds32.opt (malways-align, malign-functions): New.
12149
12150 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12151
12152 * config/nds32/constants.md (unspec_volatile_element): Add values for
12153 TLB operation and data prefetch.
12154 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12155 functions for TLB operation and data prefetch.
12156 * config/nds32/nds32-intrinsic.md: Likewise.
12157 * config/nds32/nds32_intrinsic.h: Likewise.
12158 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12159 (nds32_print_operand): Likewise.
12160 * config/nds32/nds32.h (nds32_builtins): Likewise.
12161
12162 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
12163 Andrew Pinski <pinsika@gcc.gnu.org>
12164
12165 PR middle-end/82976
12166 * match.pd: Use constant_boolean_node of correct type instead of
12167 boolean_true_node or boolean_false_node for simplifying
12168 pointer comparisons to zero.
12169
12170 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12171
12172 PR tree-optimization/80021
12173 * tree.c (verify_type_variant): Make error call in verify_variant_match
12174 translatable and remove final full stop.
12175
12176 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12177
12178 * config/nds32/constants.md (unspec_volatile_element): Add
12179 UNSPEC_VOLATILE_EH_RETURN.
12180 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12181 nds32_output_stack_pop): Support dwarf exception handling process.
12182 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12183 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12184 exception handling process.
12185 (nds32_compute_stack_frame): Likewise.
12186 (nds32_return_addr_rtx): Likewise.
12187 (nds32_initial_elimination_offset): Likewise.
12188 (nds32_expand_prologue): Likewise.
12189 (nds32_expand_epilogue): Likewise.
12190 (nds32_dynamic_chain_address): New function.
12191 * config/nds32/nds32.h (machine_function): Add fields for dwarf
12192 exception handling.
12193 (DYNAMIC_CHAIN_ADDRESS): Define.
12194 (EH_RETURN_DATA_REGNO): Define.
12195 (EH_RETURN_STACKADJ_RTX): Define.
12196 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12197 patterns for dwarf exception handling.
12198
12199 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12200
12201 * config/nds32/nds32.h: Clean up obsolete macros.
12202
12203 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12204
12205 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12206 Add enum values for particular instructions.
12207 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12208 particular intrinsic functions.
12209 * config/nds32/nds32-intrinsic.md: Likewise.
12210 * config/nds32/nds32_intrinsic.h: Likewise.
12211 * config/nds32/nds32.h (nds32_builtins): Likewise.
12212 * config/nds32/nds32.md (type): Add pbsad and pbsada.
12213 (btst, ave): New patterns for particular instructions.
12214
12215 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12216
12217 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12218 Add enum values for atomic load/store and memory sync.
12219 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12220 and memory sync.
12221 * config/nds32/nds32-intrinsic.md: Likewise.
12222 * config/nds32/nds32_intrinsic.h: Likewise.
12223 * config/nds32/nds32.h (nds32_builtins): Likewise.
12224
12225 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12226
12227 PR tree-optimization/85257
12228 * fold-const.c (native_encode_vector): If not all elts could fit
12229 and off is -1, return 0 rather than offset.
12230 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12231 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12232 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
12233 adjust buffer in native_interpret_expr call.
12234
12235 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12236
12237 * config/nds32/constants.md (unspec_volatile_element): Add cache
12238 control enum values.
12239 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12240 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12241 * config/nds32/nds32.c (nds32_cctl_names): New.
12242 (nds32_print_operand): Handle cache control register names.
12243 * config/nds32/nds32.h (nds32_builtins): New enum values.
12244 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12245 macros.
12246 * config/nds32/nds32.md (type): Add mmu.
12247 * config/nds32/pipelines.md (simple_insn): Add mmu.
12248
12249 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12250
12251 * config/nds32/nds32.md (type): Remove call.
12252 * config/nds32/pipelines.md (simple_insn): Likewise.
12253
12254 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12255
12256 * config/nds32/constants.md (unspec_volatile_element): Add
12257 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12258 UNSPEC_VOLATILE_FMFCFG.
12259 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12260 description for fmfcfg and fmfcsr.
12261 (bdesc_1arg): Add fmtcsr.
12262 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12263 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12264 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12265 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12266 unspec_fmfcfg): New patterns.
12267 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12268 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12269 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12270 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12271 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12272 __nds32__fmfcfg): Define.
12273
12274 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12275
12276 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12277 intrinsic register names.
12278 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12279 intrinsic register enum values and macros.
12280
12281 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12282
12283 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12284 for load/store addressing form.
12285 (nds32_print_operand_address): Likewise.
12286
12287 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
12288
12289 PR target/85196
12290 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12291 based on LABEL_REF. Remove useless assertion.
12292 (pic_address_needs_scratch): Fix formatting.
12293 (sparc_legitimize_pic_address): Minor tweaks.
12294 (sparc_delegitimize_address): Adjust assertion accordingly.
12295 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12296 into symbolic_operand.
12297 (movsi_high_pic_label_ref): Likewise.
12298 (movsi_lo_sum_pic_label_ref): Likewise.
12299 (movdi_pic_label_ref): Likewise.
12300 (movdi_high_pic_label_ref): Likewise.
12301 (movdi_lo_sum_pic_label_ref): Likewise.
12302
12303 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
12304
12305 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12306 custom LIB_SPEC setup.
12307
12308 2018-04-06 Ruslan Bukin <br@bsdpad.com>
12309 Kito Cheng <kito.cheng@gmail.com>
12310
12311 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12312 * config/riscv/freebsd.h: New.
12313
12314 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12315
12316 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12317 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12318 file.
12319
12320 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12321 Kito Cheng <kito.cheng@gmail.com>
12322
12323 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12324 nds32_output_call, nds32_symbol_binds_local_p): New functions.
12325 * config/nds32/nds32-protos.h (nds32_output_call,
12326 nds32_output_return): Declare.
12327 * config/nds32/nds32.md: Refine all the call and return patterns.
12328
12329 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12330
12331 PR debug/85252
12332 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12333 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12334
12335 PR rtl-optimization/84872
12336 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12337 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12338 EDGE_CROSSING edge.
12339
12340 2018-04-06 Tamar Christina <tamar.christina@arm.com>
12341
12342 * expr.c (copy_blkmode_to_reg): Revert 254862.
12343 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12344
12345 2018-04-06 Richard Biener <rguenther@suse.de>
12346
12347 PR middle-end/85244
12348 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12349 after seeing a component reference with an adjacent field. Treat
12350 refs to arrays at struct end of external decls similar to
12351 refs to unconstrained commons.
12352
12353 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12354
12355 PR sanitizer/85213
12356 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12357 look through SAVE_EXPRs with non-side-effects argument. Adjust
12358 recursive calls.
12359 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12360 save_p here.
12361
12362 2018-04-06 Richard Biener <rguenther@suse.de>
12363
12364 PR middle-end/85180
12365 * alias.c (find_base_term): New wrapper around find_base_term
12366 unwinding CSELIB_VAL_PTR changes.
12367 (find_base_term): Do not restore CSELIB_VAL_PTR during the
12368 recursion.
12369
12370 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12371
12372 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12373 instructions.
12374 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12375 constant definitions.
12376 ("nop"): lr 0,0 -> nopr r0
12377 ("nop_lr0", "nop_lr1"): New insn definitions.
12378
12379 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12380
12381 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12382 NDS32_V3PUSH_AVAILABLE_P macro.
12383
12384 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
12385 Chung-Ju Wu <jasonwucj@gmail.com>
12386
12387 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12388 (nds32*-*-*): Add float and fpu_config into supported_defaults.
12389 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12390 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12391 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12392 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12393 * config/nds32/constraints.md: New constraints and checking for hard
12394 float configuration.
12395 * config/nds32/iterators.md: New mode iterator and attribute for hard
12396 float configuration.
12397 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12398 patterns.
12399 * config/nds32/nds32-fpu.md: New file.
12400 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12401 deal with hard float code generation.
12402 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12403 ARCH_V3S.
12404 (abi_type, float_reg_number): New enum type.
12405 * config/nds32/nds32-predicates.c: New predicates for hard float.
12406 * config/nds32/nds32-protos.h: Declare functions for hard float.
12407 * config/nds32/nds32.c: Implementation for hard float configuration.
12408 * config/nds32/nds32.h: Definitions for hard float configuration.
12409 * config/nds32/nds32.md: Include hard float machine description and
12410 modify patterns for hard float configuration.
12411 * config/nds32/nds32.opt: New options for hard float configuration.
12412 * config/nds32/predicates.md: New predicates for hard float
12413 configuration.
12414
12415 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12416
12417 * common/config/nds32/nds32-common.c
12418 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12419
12420 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12421
12422 PR middle-end/85195
12423 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12424 CONSTRUCTOR_ELT (ctor, ...)->value.
12425
12426 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12427
12428 PR target/85193
12429 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12430
12431 2018-04-05 Tom de Vries <tom@codesourcery.com>
12432
12433 PR target/85204
12434 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12435 cond jump.
12436
12437 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12438 Kito Cheng <kito.cheng@gmail.com>
12439
12440 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12441 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12442 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12443 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12444
12445 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12446 Kito Cheng <kito.cheng@gmail.com>
12447
12448 * config/nds32/constraints.md (Ufe): New memory constraint.
12449 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12450 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12451 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12452 operands.
12453 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12454 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12455
12456 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12457
12458 * config/nds32/nds32.md: Use optimize_size in the condition for
12459 alu-shift instructions.
12460
12461 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12462
12463 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12464
12465 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12466
12467 * config/nds32/nds32.md (negsi2): Refine pattern.
12468
12469 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12470 Chung-Ju Wu <jasonwucj@gmail.com>
12471
12472 * config/nds32/iterators.md (shift_rotate): New code iterator.
12473 (shift): New code attribute.
12474 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12475 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12476 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12477 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12478 bit-wise operations.
12479 (andsi3, *andsi3): Ditto.
12480 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12481 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12482 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12483 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12484 nds32_ior_operand, nds32_xor_operand): New predicates.
12485
12486 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12487
12488 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12489 (addsi3, subsi3): ... this.
12490
12491 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12492
12493 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12494
12495 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12496
12497 * config/nds32/nds32.md: Adjust indention.
12498
12499 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12500
12501 * config/nds32/nds32.md (feature): New attribute.
12502
12503 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12504
12505 * config/nds32/nds32.md (subtype): New attribute.
12506
12507 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12508
12509 PR target/85203
12510 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12511 expansion to perform a bitwise AND of the argument followed by a
12512 boolean negation of the result.
12513
12514 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12515
12516 PR rtl-optimization/84878
12517 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12518 the basic block. Assert the use reference is not artificial and that
12519 it has an associated insn.
12520
12521 2018-04-04 Michael Matz <matz@suse.de>
12522
12523 * builtins.c (compute_objsize): Pass correct operand
12524 to array_at_struct_end_p.
12525
12526 2018-04-04 Richard Biener <rguenther@suse.de>
12527
12528 PR lto/85176
12529 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12530 from contexts for DINFO_LEVEL_TERSE and below.
12531
12532 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12533
12534 * config/nds32/nds32-doubleword.md (move_<mode>): Require
12535 resiter_operand condition.
12536 * config/nds32/nds32.md (*move<mode>): Ditto.
12537
12538 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12539 Monk Chiang <sh.chiang04@gmail.com>
12540
12541 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12542
12543 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12544
12545 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12546
12547 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12548 Kito Cheng <kito.cheng@gmail.com>
12549
12550 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12551 nds32_cond_code_str, output_cond_branch,
12552 output_cond_branch_compare_zero, nds32_expand_cbranch,
12553 nds32_expand_cstore, nds32_expand_movcc,
12554 nds32_output_cbranchsi4_equality_zero,
12555 nds32_output_cbranchsi4_equality_reg,
12556 nds32_output_cbranchsi4_equality_reg_or_const_int,
12557 nds32_output_cbranchsi4_greater_less_zero: New functions.
12558 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12559 nds32_expand_cstore, nds32_expand_movcc,
12560 nds32_output_cbranchsi4_equality_zero,
12561 nds32_output_cbranchsi4_equality_reg,
12562 nds32_output_cbranchsi4_equality_reg_or_const_int,
12563 nds32_output_cbranchsi4_greater_less_zero): Declare.
12564 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12565 nds32_rimm11s_operand): New predicates.
12566 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12567 * config/nds32/nds32.md: Rewrite all the branch and conditional move
12568 patterns.
12569
12570 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12571
12572 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12573 * config/nds32/nds32.md: Ditto.
12574 * config/nds32/pipelines.md: Ditto.
12575
12576 2018-04-04 Richard Biener <rguenther@suse.de>
12577
12578 PR tree-optimization/85168
12579 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12580 propagating abnormals.
12581
12582 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12583
12584 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12585
12586 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12587 Kito Cheng <kito.cheng@gmail.com>
12588
12589 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12590 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12591 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12592 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12593 * config/nds32/nds32.md (sibcall_internal): New.
12594 (sibcall_register): Remove.
12595 (sibcall_immediate): Remove.
12596 (sibcall_value_internal): New.
12597 (sibcall_value_register): Remove.
12598 (sibcall_value_immediate): Remove.
12599 * config/nds32/predicates.md (nds32_general_register_operand): New.
12600 (nds32_call_address_operand): New.
12601
12602 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12603
12604 PR rtl-optimization/85167
12605 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12606 bb_defs if *split_p, instead preinitialize it to NULL.
12607
12608 PR tree-optimization/85156
12609 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12610 evaluating the argument multiple times.
12611
12612 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12613
12614 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12615 than vector.
12616 (_mm_cvtpd_ps): Likewise.
12617 (_mm_cvttpd_epi32): Likewise.
12618 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12619 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12620 vector, pixel, and bool following altivec.h include.
12621
12622 2018-04-03 Martin Sebor <msebor@redhat.com>
12623
12624 * doc/extend.texi (Common Function Attributes): Clarify.
12625 (const attribute): Likewise.
12626 (pure attribute): Likewise.
12627
12628 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12629
12630 PR target/85169
12631 * config/i386/i386.c (ix86_expand_vector_set): Use
12632 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12633
12634 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12635
12636 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12637 instructions when changing rounding bits to preserve precision bits
12638 in the x87 control word.
12639
12640 2018-04-03 Martin Liska <mliska@suse.cz>
12641
12642 PR tree-optimization/82491
12643 * rtl.h (strip_offset_and_add): Replace += suboffset with
12644 poly_uint64 () + suboffset.
12645
12646 2018-03-29 Martin Liska <mliska@suse.cz>
12647 Martin Jambor <mjambor@suse.cz>
12648
12649 PR ipa/84947
12650 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12651 param_type is not an integral or pointer type.
12652
12653 2018-04-03 Richard Biener <rguenther@suse.de>
12654
12655 * sese.h (recompute_all_dominators): Remove.
12656
12657 2018-04-02 Martin Sebor <msebor@redhat.com>
12658
12659 * doc/invoke.texi (-Wrestrict): Fix typos.
12660
12661 2018-04-02 Jim Wilson <jimw@sifive.com>
12662
12663 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12664 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12665 (<optab>di3, <optab>si3_extend): Likewise.
12666 (<optab>si3_mask, <optab>si3_mask_1): New.
12667 (<optab>di3_mask, <optab>di3_mask_1): New.
12668 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12669 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12670 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12671
12672 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12673
12674 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12675 example.
12676
12677 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12678
12679 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12680 (nds32_canonicalize_comparison): New function.
12681
12682 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12683 Kito Cheng <kito.cheng@gmail.com>
12684 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12685
12686 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12687 * config/nds32/constants.md (unspec_volatile_element): Add
12688 UNSPEC_VOLATILE_RELAX_GROUP.
12689 * config/nds32/nds32-relax-opt.c: New file.
12690 * config/nds32/nds32-predicates.c
12691 (nds32_symbol_load_store_p): New function.
12692 * config/nds32/nds32-protos.h
12693 (nds32_symbol_load_store_p): Declare function.
12694 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12695 * config/nds32/nds32.c
12696 (nds32_register_pass): New function to register pass.
12697 (nds32_register_passes): New function to register passes.
12698 * config/nds32/nds32.md (relax_group): New pattern.
12699 * config/nds32/nds32.opt (mrelax-hint): New option.
12700 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12701
12702 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12703
12704 * config/nds32/t-nds32: Modify files dependency.
12705
12706 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12707
12708 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12709 (PROFILE_HOOK): Define its implementation.
12710
12711 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12712
12713 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12714 type and 32-bit size.
12715
12716 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12717
12718 PR middle-end/85090
12719 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12720 (V_128_256): New mode iterator.
12721 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12722 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12723 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12724 of V.
12725 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12726 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12727
12728 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12729
12730 PR target/83315
12731 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12732 NaN inputs correctly.
12733
12734 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12735
12736 PR target/80546
12737 * config/rs6000/vsx.md (??r): New mode attribute.
12738 (*vsx_mov<mode>_64bit): Use it.
12739 (*vsx_mov<mode>_32bit): Likewise.
12740
12741 2018-03-30 Martin Sebor <msebor@redhat.com>
12742
12743 PR tree-optimization/84818
12744 * builtins.c (check_access): Use warning_n.
12745
12746 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12747
12748 PR target/83822
12749 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12750 condition.
12751 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12752 condition.
12753
12754 2018-03-30 Julia Koval <julia.koval@intel.com>
12755
12756 PR target/84413
12757 * x86-tune.def (movx, partial_reg_dependency): Enable for
12758 m_SKYLAKE_AVX512.
12759
12760 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12761
12762 PR inline-asm/84985
12763 * lra-constraints.c (process_alt_operands): Move setting
12764 this_alternative_matches below.
12765
12766 2018-03-29 Martin Liska <mliska@suse.cz>
12767
12768 PR lto/84995.
12769 * doc/invoke.texi: Document how LTO works with debug info.
12770 Describe auto-load support of binutils. Mention 'x86-64'
12771 as valid option value of -march option.
12772
12773 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12774
12775 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12776
12777 PR c/85094
12778 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12779 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12780 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12781 checking.
12782
12783 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12784
12785 PR target/84912
12786 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12787 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12788 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12789 for RS6000_BTM_POWERPC64.
12790 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12791 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12792 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12793 definition.
12794 (DIVDE): Use it.
12795 (DIVDEU): Likewise.
12796
12797 2018-03-28 Carl Love <cel@us.ibm.com>
12798
12799 Revert
12800 2017-09-27 Carl Love <cel@us.ibm.com>
12801
12802 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12803 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12804 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12805 fctiw instruction.
12806
12807 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12808
12809 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12810 instead of __vector bool.
12811 (_mm_max_pu8): Likewise.
12812 (_mm_min_pi16): Likewise.
12813
12814 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12815
12816 PR target/84912
12817 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12818 (DIVWEUO): Likewise.
12819 (DIVDEO): Likewise.
12820 (DIVDEUO): Likewise.
12821 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12822 DIVWEUO and DIVDEUO.
12823 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12824 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12825 (div_extend): Likewise.
12826 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12827 builtin function.
12828 (__builtin_divweuo): Likewise.
12829 (__builtin_divdeo): Likewise.
12830 (__builtin_divdeuo): Likewise.
12831
12832 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12833
12834 PR target/85095
12835 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12836 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12837
12838 PR tree-optimization/82004
12839 * gimple-match-head.c (optimize_pow_to_exp): New function.
12840 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12841 Don't fold to exp if optimize_pow_to_exp is false.
12842
12843 2018-03-28 Martin Liska <mliska@suse.cz>
12844
12845 PR other/84819
12846 * calls.c (initialize_argument_information): Fix trailing space.
12847 * common.opt: Fix typo and provide better explanation for
12848 -fsanitize-coverage option.
12849 * config/i386/i386.opt: Fix typo.
12850
12851 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12852 Martin Liska <mliska@suse.cz>
12853
12854 PR sanitizer/85081
12855 * gimplify.c (asan_poison_variable): Don't do the check for
12856 gimplify_omp_ctxp here.
12857 (gimplify_decl_expr): Do it here.
12858 (gimplify_target_expr): Likewise.
12859
12860 2018-03-28 Martin Liska <mliska@suse.cz>
12861
12862 PR target/84988
12863 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12864 chkp_type_bounds_count if MPX is not enabled.
12865
12866 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12867
12868 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12869
12870 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12871
12872 PR target/84914
12873 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12874 function to create the function decl for complex long double
12875 multiply and divide for -mabi=ieeelongdouble.
12876 (init_float128_ieee): Call it.
12877
12878 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12879
12880 PR target/85044
12881 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12882 -fcf-protection=branch -mibt.
12883 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12884
12885 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12886
12887 PR target/81863
12888 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12889 arm_word_relocations.
12890
12891 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12892
12893 PR target/85056
12894 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12895 extern array declarations.
12896
12897 2018-03-27 Richard Biener <rguenther@suse.de>
12898
12899 PR middle-end/84067
12900 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12901 explicit single_use checks.
12902
12903 2018-03-27 Richard Biener <rguenther@suse.de>
12904
12905 PR tree-optimization/85082
12906 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12907 Valueize the VUSE.
12908
12909 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12910
12911 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12912 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12913 Turn on fasynchronous-unwind-tables and funwind-tables.
12914
12915 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12916
12917 PR target/85073
12918 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12919 (*bmi_blsr_<mode>_ccz): Ditto.
12920
12921 2018-03-26 Tom de Vries <tom@codesourcery.com>
12922
12923 PR tree-optimization/85063
12924 * omp-general.c (offloading_function_p): New function. Factor out
12925 of ...
12926 * omp-offload.c (pass_omp_target_link::gate): ... here.
12927 * omp-general.h (offloading_function_p): Declare.
12928 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12929 with attribute omp declare target for offloading functions.
12930
12931 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12932
12933 PR tree-optimization/84005
12934 * tree-data-ref.h (get_base_for_alignment): Declare.
12935 * tree-data-ref.c (get_base_for_alignment_1): New function.
12936 (get_base_for_alignment): Likewise.
12937 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12938 get_base_for_alignment to find a suitable base object, instead
12939 of always using drb->base_address.
12940
12941 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12942
12943 PR inline-asm/85022
12944 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12945 known size by default.
12946
12947 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12948
12949 PR inline-asm/85030
12950 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12951 and non BLKmode operands.
12952
12953 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12954
12955 PR target/85026
12956 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12957 Clean up attributes.
12958
12959 2018-03-23 Richard Biener <rguenther@suse.de>
12960
12961 PR debug/85020
12962 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12963 we are going to emit early debug for LTO.
12964
12965 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12966
12967 PR inline-asm/85034
12968 * function.c (match_asm_constraints_1): Don't optimize if input
12969 doesn't satisfy general_operand predicate for output's mode.
12970
12971 PR inline-asm/85022
12972 * alias.c (write_dependence_p): Don't require for x_canonicalized
12973 non-VOIDmode if x has VOIDmode.
12974
12975 PR sanitizer/85029
12976 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12977 just don't try to optimize it rather than assert it never happens.
12978
12979 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12980
12981 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12982 macro expansions for definition of ST_INTERNAL_<mode> and
12983 LD_INTERNAL_<mode> builtins.
12984 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12985 Remove prototype.
12986 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12987 function.
12988 (altivec_expand_st_builtin): Likewise.
12989 (altivec_expand_builtin): Remove calls to deleted functions.
12990 (rs6000_address_for_altivec): Delete this function.
12991 * config/rs6000/vector.md: Remove expands for
12992 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12993
12994 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12995
12996 PR target/84826
12997 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12998 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12999 re-computing once computed.
13000 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13001 (arm_init_machine_status): Initialize
13002 machine->static_chain_stack_bytes.
13003
13004 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13005
13006 PR target/84760
13007 * doc/extend.texi: Add four new prototypes for vec_ld.
13008 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13009 definitions for more logical presentation.
13010 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13011 entries for V1TI variants of __builtin_altivec_ld builtin.
13012 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13013 handling of V1TI variant of LVX icode pattern.
13014 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13015 (rs6000_gimple_fold_builtin): Likewise.
13016 (altivec_init_builtins): Add code to define
13017 __builtin_altivec_lvx_v1ti function.
13018
13019 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13020
13021 PR inline-asm/84941
13022 * function.c (match_asm_constraints_1): Don't do the optimization
13023 if input isn't a REG, SUBREG, MEM or constant.
13024
13025 2018-03-22 Tom de Vries <tom@codesourcery.com>
13026
13027 PR tree-optimization/84956
13028 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13029 bb_has_abnormal_pred.
13030
13031 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13032
13033 PR sanitizer/85018
13034 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13035 DECL_INITIAL (decl) to decl at the end.
13036 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13037 adjust the comment.
13038
13039 2018-03-21 Joseph Myers <joseph@codesourcery.com>
13040
13041 * doc/extend.texi (__builtin_tgmath): Document when complex
13042 integer types are treated as _Complex _Float64.
13043
13044 2018-03-21 Tom de Vries <tom@codesourcery.com>
13045
13046 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13047
13048 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13049
13050 PR tree-optimization/84960
13051 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13052 if it is ENTRY block, move them into single succ of ENTRY in that case.
13053
13054 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
13055
13056 PR tree-optimization/84811
13057 * poly-int.h (poly_span_traits): Remove the T3 parameter and
13058 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13059 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13060 (known_subrange_p): Update accordingly. Cast each value involved
13061 in the size comparison, rather than casting the result of the
13062 subtraction.
13063
13064 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13065
13066 PR tree-optimization/84982
13067 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13068 by flipping the least significant bit rather than all bits from
13069 bitpos to bitpos + bitsize - 1.
13070
13071 2018-03-21 Nathan Sidwell <nathan@acm.org>
13072
13073 * doc/extend.texi (Deprecated Features): Remove mention of
13074 long-deleted deprecations.
13075
13076 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13077
13078 PR jit/84288
13079 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13080 * configure: Regenerate.
13081
13082 2018-03-21 Tom de Vries <tom@codesourcery.com>
13083
13084 PR tree-optimization/83126
13085 * tree-parloops.c (num_phis): New function.
13086 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13087
13088 2018-03-21 Nathan Sidwell <nathan@acm.org>
13089
13090 * doc/extend.texi (Deprecated Features): Update deprecated flags,
13091 mention anon-struct/union members and trailing attributes.
13092
13093 2018-03-21 Bin Cheng <bin.cheng@arm.com>
13094
13095 PR tree-optimization/84969
13096 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13097 builtin memset partitions if they set different rhs values.
13098
13099 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13100
13101 PR rtl-optimization/84989
13102 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13103 VEC_DUPLICATE with scalar result mode.
13104
13105 2018-03-21 Martin Liska <mliska@suse.cz>
13106
13107 PR ipa/84963
13108 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13109 not intended return statement.
13110
13111 2018-03-21 Martin Liska <mliska@suse.cz>
13112
13113 PR target/84988
13114 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13115 (chkp_find_bound_slots_1): Limit number of iterations.
13116
13117 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
13118
13119 PR target/84838
13120 * Minor grammar fixes for x86 options.
13121
13122 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13123
13124 PR debug/84875
13125 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13126 holding REG_CFA_RESTORE notes, instead turn them into a USE.
13127
13128 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
13129
13130 PR target/83789
13131 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13132 (altivec_lvx_<mode>_1op): Likewise.
13133 (altivec_stvx_<mode>_2op): Likewise.
13134 (altivec_stvx_<mode>_1op): Likewise.
13135 (altivec_lvx_<VM2:mode>): New define_expand.
13136 (altivec_stvx_<VM2:mode>): Likewise.
13137 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13138 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13139 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13140 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13141 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13142 (rs6000_gen_lvx): Likewise.
13143 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13144 (altivec_expand_stv_builtin): Likewise.
13145 (altivec_expand_builtin): Likewise.
13146 * config/rs6000/vector.md: Likewise.
13147
13148 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13149
13150 PR target/82518
13151 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13152 BYTES_BIG_ENDIAN.
13153
13154 2018-03-20 Richard Biener <rguenther@suse.de>
13155
13156 PR target/84986
13157 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13158 sign-conversions as zero, fall back to standard scalar_stmt
13159 cost for the rest.
13160
13161 2018-03-20 Martin Liska <mliska@suse.cz>
13162
13163 PR ipa/84825
13164 * predict.c (rebuild_frequencies): Handle case when we have
13165 PROFILE_ABSENT, but flag_guess_branch_prob is false.
13166
13167 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13168
13169 PR target/84990
13170 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13171 flag_section_anchors.
13172 * varasm.c (use_blocks_for_decl_p): Remove hack for
13173 dw2_force_const_mem.
13174
13175 PR target/84845
13176 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13177 to ...
13178 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
13179 be created, use lowpart_subreg of operands[0] rather than operands[0]
13180 itself.
13181 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13182 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13183 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13184 and n constraint instead of aarch64_shift_imm_di and Usd.
13185 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13186 (*aarch64_<optab>_reg_minus<mode>3): ... this.
13187
13188 2018-03-20 Sudakshina Das <sudi.das@arm.com>
13189
13190 PR target/82989
13191 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13192 to favor GPR over NEON registers.
13193 (<shift>di3_neon): Likewise.
13194
13195 2018-03-20 Tom de Vries <tom@codesourcery.com>
13196
13197 PR target/84952
13198 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13199 (nvptx_process_pars): Emit bar.sync asap and alap.
13200
13201 2018-03-20 Tom de Vries <tom@codesourcery.com>
13202
13203 PR target/84954
13204 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13205 seen_label if seen_label is already set.
13206
13207 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13208
13209 PR target/84945
13210 * config/i386/i386.c (fold_builtin_cpu): For features above 31
13211 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13212 Use 1U instead of 1. Formatting fixes.
13213
13214 PR c/84953
13215 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13216 instead of TREE_TYPE (s1) for the return value.
13217
13218 2018-03-19 Jakub Jelinek <jakub@redhat.com>
13219
13220 PR tree-optimization/84946
13221 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13222 bitsize + bitsize in poly_uint64 rather than poly_int64.
13223
13224 PR sanitizer/78651
13225 * dwarf2asm.c: Include fold-const.c.
13226 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13227 of decl rather than decl itself.
13228
13229 PR rtl-optimization/84643
13230 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13231
13232 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
13233
13234 PR sanitizer/78651
13235 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13236 calling assemble_variable.
13237
13238 2018-03-19 Sudakshina Das <sudi.das@arm.com>
13239
13240 PR target/81647
13241 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13242 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13243
13244 2018-03-19 Jim Wilson <jimw@sifive.com>
13245
13246 PR bootstrap/84856
13247 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13248 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13249 (riscv_first_stack_step): Likewise.
13250 (riscv_option_override): Use STACK_BOUNDARY instead of
13251 MIN_STACK_BOUNDARY.
13252 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13253 MIN_STACK_BOUNDARY.
13254 (BIGGEST_ALIGNMENT): Set to 128.
13255 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13256 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13257 STACK_BOUNDARY.
13258
13259 2018-03-19 Richard Biener <rguenther@suse.de>
13260
13261 PR tree-optimization/84933
13262 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13263 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13264
13265 2018-03-19 Richard Biener <rguenther@suse.de>
13266
13267 PR tree-optimization/84859
13268 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13269 (cond_if_else_store_replacement): Perform sinking operation on
13270 single-store BBs regardless of MAX_STORES_TO_SINK setting.
13271 Generalize what a BB with a single eligible store is.
13272
13273 2018-03-19 Richard Biener <rguenther@suse.de>
13274
13275 PR tree-optimization/84929
13276 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13277 chrec_is_positive against non-chrec arg.
13278
13279 2018-03-19 Tamar Christina <tamar.christina@arm.com>
13280
13281 PR target/84711
13282 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13283
13284 2018-03-18 Martin Liska <mliska@suse.cz>
13285
13286 PR rtl-optimization/84635
13287 * regrename.c (build_def_use): Use matches_mode only when
13288 matches >= 0.
13289
13290 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
13291
13292 PR tree-optimization/84913
13293 * tree-vect-loop.c (vectorizable_reduction): Don't try to
13294 vectorize chains of COND_EXPRs.
13295
13296 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13297
13298 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13299
13300 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13301
13302 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13303
13304 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13305
13306 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13307
13308 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13309 Kito Cheng <kito.cheng@gmail.com>
13310
13311 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13312 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13313 (nds32_adjust_reg_alloc_order): New function.
13314 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13315
13316 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
13317
13318 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13319 nds32_print_operand, nds32_print_operand_address): Use
13320 HOST_WIDE_INT_PRINT_DEC instead.
13321
13322 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13323
13324 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13325
13326 2018-03-17 Jakub Jelinek <jakub@redhat.com>
13327
13328 PR target/84902
13329 * config/i386/i386.c (initial_ix86_tune_features,
13330 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13331 unsigned long long.
13332 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13333 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13334 rather than 1u << ix86_tune. Formatting fix.
13335 (ix86_option_override_internal): Change ix86_arch_mask from
13336 unsigned int to unsigned HOST_WIDE_INT, initialize to
13337 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13338 (ix86_function_specific_restore): Likewise.
13339
13340 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13341
13342 PR target/84899
13343 * postreload.c (reload_combine_recognize_pattern): Perform
13344 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13345 truncate_int_for_mode the result for the destination's mode.
13346
13347 PR c/84909
13348 * hsa-gen.c (mem_type_for_type): Fix comment typo.
13349 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13350 Likewise.
13351 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13352 Likewise.
13353
13354 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
13355
13356 PR target/84876
13357 * lra-assigns.c (lra_split_hard_reg_for): Don't use
13358 regno_allocno_class_array and sorted_pseudos.
13359 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13360 insns where regno is used.
13361
13362 2018-03-16 Martin Liska <mliska@suse.cz>
13363
13364 PR ipa/84833
13365 * multiple_target.c (create_dispatcher_calls): Redirect
13366 reference in the symbol table.
13367
13368 2018-03-16 Martin Liska <mliska@suse.cz>
13369
13370 PR ipa/84722
13371 * multiple_target.c (create_dispatcher_calls): Redirect also
13372 an alias.
13373
13374 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13375
13376 PR c++/79937
13377 PR c++/82410
13378 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13379 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13380 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13381
13382 2018-03-16 Julia Koval <julia.koval@intel.com>
13383
13384 * doc/invoke.texi (Skylake Server): Add CLWB.
13385 Cannonlake): Remove CLWB.
13386
13387 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13388
13389 PR tree-optimization/84841
13390 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13391 1 << 3.
13392 (FLOAT_ONE_CONST_TYPE): Define.
13393 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13394 (sort_by_operand_rank): Put entries with higher constant_type last
13395 rather than first to match comments.
13396
13397 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
13398
13399 * config/nios2/nios2.md (movsi_internal): Fix thinko in
13400 split predicate.
13401
13402 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13403
13404 PR c++/79085
13405 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13406 check and use address of target always.
13407
13408 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13409
13410 PR target/84574
13411 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13412 (indirect_thunk_bnd_needed): Likewise.
13413 (indirect_thunks_used): Likewise.
13414 (indirect_thunks_bnd_used): Likewise.
13415 (indirect_return_needed): New.
13416 (indirect_return_bnd_needed): Likewise.
13417 (output_indirect_thunk_function): Add a bool argument for
13418 function return.
13419 (output_indirect_thunk_function): Don't generate alias for
13420 function return thunk.
13421 (ix86_code_end): Call output_indirect_thunk_function to generate
13422 function return thunks.
13423 (ix86_output_function_return): Set indirect_return_bnd_needed
13424 and indirect_return_needed instead of indirect_thunk_bnd_needed
13425 and indirect_thunk_needed.
13426
13427 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13428
13429 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13430 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13431 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13432
13433 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13434 Paul Hua <paul.hua.gm@gmail.com>
13435
13436 PR c/84852
13437 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13438
13439 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13440
13441 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13442 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13443 resp. SFmode cases.
13444
13445 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13446
13447 PR target/84711
13448 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13449 instead of GET_MODE_SIZE when comparing Units.
13450
13451 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13452
13453 PR target/68256
13454 * varasm.c (hash_section): Return an unchangeble hash value
13455 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13456 Return !aarch64_can_use_per_function_literal_pools_p ().
13457
13458 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13459
13460 PR target/84860
13461 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13462 rather than address of cmode as last argument to prepare_cmp_insn.
13463
13464 2018-03-15 Julia Koval <julia.koval@intel.com>
13465
13466 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13467 F_AVX512VNNI, F_AVX512BITALG): New.
13468
13469 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13470
13471 PR target/83451
13472 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13473 insn for floating-point loads and stores.
13474
13475 2018-03-14 Carl Love <cel@us.ibm.com>
13476
13477 * config/rs6000/rs6000-c.c: Add macro definitions for
13478 ALTIVEC_BUILTIN_VEC_PERMXOR.
13479 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13480 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13481 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13482 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13483 UNSPEC_VPERMXOR.
13484 * config/doc/extend.texi: Add prototypes for vec_permxor.
13485
13486 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13487
13488 PR c/84852
13489 * diagnostic-show-locus.c (class layout_point): Convert m_line
13490 from int to linenum_type.
13491 (line_span::comparator): Use linenum "compare" function when
13492 comparing line numbers.
13493 (test_line_span): New function.
13494 (layout_range::contains_point): Convert param "row" from int to
13495 linenum_type.
13496 (layout_range::intersects_line_p): Likewise.
13497 (layout::will_show_line_p): Likewise.
13498 (layout::print_source_line): Likewise.
13499 (layout::should_print_annotation_line_p): Likewise.
13500 (layout::print_annotation_line): Likewise.
13501 (layout::print_leading_fixits): Likewise.
13502 (layout::annotation_line_showed_range_p): Likewise.
13503 (struct line_corrections): Likewise for field m_row.
13504 (line_corrections::line_corrections): Likewise for param "row".
13505 (layout::print_trailing_fixits): Likewise.
13506 (layout::get_state_at_point): Likewise.
13507 (layout::get_x_bound_for_row): Likewise.
13508 (layout::print_line): Likewise.
13509 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13510 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13511 * input.c (selftest::test_linenum_comparisons): New function.
13512 (selftest::input_c_tests): Call it.
13513 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13514 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13515 * selftest.h (ASSERT_GT): New macro.
13516 (ASSERT_GT_AT): New macro.
13517 (ASSERT_LT): New macro.
13518 (ASSERT_LT_AT): New macro.
13519
13520 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
13521
13522 PR rtl-optimization/84780
13523 * combine.c (distribute_links): Don't make a link based on pc_rtx.
13524
13525 2018-03-14 Martin Liska <mliska@suse.cz>
13526
13527 * tree.c (record_node_allocation_statistics): Use
13528 get_stats_node_kind.
13529 (get_stats_node_kind): New function extracted from
13530 record_node_allocation_statistics.
13531 (free_node): Use get_stats_node_kind.
13532
13533 2018-03-14 Richard Biener <rguenther@suse.de>
13534
13535 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13536 that the value-set of ANTIC_IN doesn't grow.
13537
13538 Revert
13539 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13540 member.
13541 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13542 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13543
13544 2018-03-14 Julia Koval <julia.koval@intel.com>
13545
13546 * config.gcc (icelake-client, icelake-server): New.
13547 (icelake): Remove.
13548 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13549 (initial_ix86_arch_features): Ditto.
13550 (PTA_SKYLAKE): Add SGX.
13551 (PTA_ICELAKE): Remove.
13552 (PTA_ICELAKE_CLIENT): New.
13553 (PTA_ICELAKE_SERVER): New.
13554 (ix86_option_override_internal): Split up icelake on icelake client and
13555 icelake server.
13556 (get_builtin_code_for_version): Ditto.
13557 (fold_builtin_cpu): Ditto.
13558 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13559 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13560 * config/i386/i386.h (processor_type): Ditto.
13561 * doc/invoke.texi: Ditto.
13562
13563 2018-03-14 Jakub Jelinek <jakub@redhat.com>
13564
13565 PR sanitizer/83392
13566 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13567 INTEGER_CST offset, add it together with bitpos / 8 and
13568 sign extend based on POINTER_SIZE.
13569
13570 PR target/84844
13571 Revert
13572 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
13573
13574 PR target/78090
13575 * config/i386/constraints.md (Yc): New register constraint.
13576 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13577 Use Yc constraint for alternative 2 of operand 0. Remove
13578 preferred_for_speed attribute.
13579
13580 2018-03-14 Richard Biener <rguenther@suse.de>
13581
13582 PR tree-optimization/84830
13583 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13584 with the old one to avoid oscillations.
13585
13586 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13587
13588 PR target/83712
13589 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13590 pseudos.
13591 (assign_by_spills): Return a flag of reload assignment failure.
13592 Do not process the reload assignment failures. Do not spill other
13593 reload pseudos if they has the same reg class. Update n if
13594 necessary.
13595 (lra_assign): Add a return arg. Set up from the result of
13596 assign_by_spills call.
13597 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13598 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13599 usage_insns if it is not NULL.
13600 (spill_hard_reg_in_range): New function.
13601 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13602 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13603 function prototypes.
13604 (lra_assign): Change prototype.
13605 * lra.c (lra): Add code to deal with fails by splitting hard reg
13606 live ranges.
13607
13608 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13609
13610 * config/riscv/riscv.opt (mrelax): New option.
13611 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13612 "norelax" when riscv_mrelax is disabled.
13613 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13614
13615 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13616
13617 PR target/84743
13618 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13619 reassociation for int modes.
13620
13621 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13622
13623 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13624 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13625 for big-endian.
13626 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13627 * config/aarch64/aarch64-sve.md
13628 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13629 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13630 (*extend<mode><Vwide>2): Rename to...
13631 (aarch64_sve_extend<mode><Vwide>2): ...this.
13632 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13633 renaming the old pattern to...
13634 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13635 unsigned packs.
13636 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13637 define_expand, renaming the old pattern to...
13638 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13639 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13640 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13641 account when deciding which SVE instruction the optab should use.
13642 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13643
13644 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13645
13646 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13647 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13648 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13649 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13650 (tlsdesc_small_<mode>): Turn a define_expand and use
13651 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13652 (tlsdesc_small_advsimd_<mode>): ...this.
13653 (tlsdesc_small_sve_<mode>): New pattern.
13654
13655 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13656
13657 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13658 (UNSPEC_UMUL_HIGHPART): New constants.
13659 (MUL_HIGHPART): New int iteraor.
13660 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13661 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13662 define_expand.
13663 (*<su>mul<mode>3_highpart): New define_insn.
13664
13665 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13666
13667 PR lto/84805
13668 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13669 incomplete types.
13670
13671 2018-03-13 Martin Liska <mliska@suse.cz>
13672
13673 PR ipa/84658.
13674 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13675 vector.
13676 (sem_item_optimizer::~sem_item_optimizer): Release it.
13677 (sem_item_optimizer::merge_classes): Register variable aliases.
13678 (sem_item_optimizer::fixup_pt_set): New function.
13679 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13680 * ipa-icf.h: Declare new variables and functions.
13681
13682 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13683
13684 PR middle-end/84834
13685 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13686 integer_pow2p@2 and test integer_pow2p in condition.
13687 (A < 0 ? C : 0): Similarly for @1.
13688
13689 PR middle-end/84831
13690 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13691 characters starting at p contain '\0' character, don't look beyond
13692 that.
13693
13694 PR target/84827
13695 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13696 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13697
13698 PR target/84828
13699 * reg-stack.c (change_stack): Change update_end var from int to
13700 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13701 also call set_block_for_insn on the newly added insns and rescan.
13702
13703 PR target/84786
13704 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13705 on the last operand.
13706
13707 PR c++/84704
13708 * tree.c (stabilize_reference_1): Return save_expr (e) for
13709 STATEMENT_LIST even if it doesn't have side-effects.
13710
13711 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13712
13713 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13714
13715 2018-03-12 Renlin Li <renlin.li@arm.com>
13716
13717 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13718 aarch64_output_scalar_simd_mov_immediate.
13719
13720 2018-03-12 Martin Sebor <msebor@redhat.com>
13721
13722 PR tree-optimization/83456
13723 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13724 for perfectly overlapping calls to memcpy.
13725 (gimple_fold_builtin_memory_chk): Same.
13726 (gimple_fold_builtin_strcpy): Handle no-warning.
13727 (gimple_fold_builtin_stxcpy_chk): Same.
13728 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13729
13730 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13731
13732 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13733 parameter. Use it for SFmode.
13734 (rs6000_function_arg_advance_1): Adjust.
13735 (rs6000_function_arg): Adjust.
13736 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13737
13738 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13739
13740 PR rtl-optimization/84169
13741 PR rtl-optimization/84780
13742 * combine.c (can_combine_p): Check for a 2-insn combination whether
13743 the destination register is used between the two insns, too.
13744
13745 2018-03-12 Richard Biener <rguenther@suse.de>
13746
13747 PR tree-optimization/84803
13748 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13749 for refs DR analysis didn't process.
13750
13751 2018-03-12 Richard Biener <rguenther@suse.de>
13752
13753 PR tree-optimization/84777
13754 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13755 force-vectorize loops ignore whether we are optimizing for size.
13756
13757 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13758
13759 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13760 (TARGET_MD_ASM_ADJUST): Define.
13761
13762 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13763 Kito Cheng <kito.cheng@gmail.com>
13764 Chung-Ju Wu <jasonwucj@gmail.com>
13765
13766 * config/nds32/nds32.c (nds32_compute_stack_frame,
13767 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13768 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13769 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13770 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13771 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13772 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13773 * config/nds32/nds32.md (prologue, epilogue): Use macro
13774 NDS32_V3PUSH_AVAILABLE_P to do checking.
13775
13776 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13777
13778 PR debug/58150
13779 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13780 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13781 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13782 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13783 addition of most attributes on !orig_type_die or the attribute not
13784 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13785
13786 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13787 Chung-Ju Wu <jasonwucj@gmail.com>
13788
13789 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13790 __NDS32_VH__ macro.
13791 * config/nds32/nds32.opt (mvh): New option.
13792
13793 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13794 Chung-Ju Wu <jasonwucj@gmail.com>
13795
13796 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13797 function.
13798 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13799 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13800 definition.
13801
13802 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13803 Chung-Ju Wu <jasonwucj@gmail.com>
13804
13805 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13806 function.
13807 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13808 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13809
13810 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13811 Kito Cheng <kito.cheng@gmail.com>
13812 Chung-Ju Wu <jasonwucj@gmail.com>
13813
13814 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13815 UNSPEC_FFMISM and UNSPEC_FLMISM.
13816 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13817 for ffb, ffmism and flmism.
13818 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13819 (unspec_ffmism): Ditto.
13820 (unspec_flmism): Ditto.
13821 (nds32_expand_builtin_impl): Check if string extension is available.
13822 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13823 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13824
13825 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13826
13827 Reverting patch:
13828 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13829
13830 PR target/83712
13831 * lra-assigns.c (assign_by_spills): Return a flag of reload
13832 assignment failure. Do not process the reload assignment
13833 failures. Do not spill other reload pseudos if they has the same
13834 reg class.
13835 (lra_assign): Add a return arg. Set up from the result of
13836 assign_by_spills call.
13837 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13838 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13839 usage_insns if it is not NULL.
13840 (spill_hard_reg_in_range): New function.
13841 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13842 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13843 function prototypes.
13844 (lra_assign): Change prototype.
13845 * lra.c (lra): Add code to deal with fails by splitting hard reg
13846 live ranges.
13847
13848 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13849
13850 PR target/84807
13851 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13852
13853 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13854
13855 PR debug/84620
13856 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13857 (dw_val_node): Add val_symbolic_view.
13858 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13859 (symview_upper_bound): New.
13860 (new_line_info_table): Initialize symviews_since_reset.
13861 (dwarf2out_source_line): Count symviews_since_reset and set
13862 symview_upper_bound.
13863 (dw_val_equal_p): Handle symview.
13864 (add_AT_symview): New.
13865 (print_dw_val): Handle symview.
13866 (attr_checksum, attr_checksum_ordered): Likewise.
13867 (same_dw_val_p, size_of_die): Likewise.
13868 (value_format, output_die): Likewise.
13869 (add_high_low_attributes): Use add_AT_symview for entry_view.
13870 (dwarf2out_finish): Reset symview_upper_bound, clear
13871 zero_view_p.
13872
13873 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13874
13875 PR target/83969
13876 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13877 Add strict argument and use it.
13878 (rs6000_split_multireg_move): Update for new strict argument.
13879 (mem_operand_gpr): Disallow all non-offsettable addresses.
13880 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13881
13882 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13883
13884 PR target/84772
13885 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13886 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13887 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13888
13889 PR c++/84767
13890 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13891 decl, use remap_type if we want to use the type.
13892
13893 2018-03-09 Martin Sebor <msebor@redhat.com>
13894
13895 PR tree-optimization/84526
13896 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13897 Remove dead code.
13898 (builtin_access::generic_overlap): Be prepared to handle non-array
13899 base objects.
13900
13901 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13902
13903 PR rtl-optimization/84682
13904 * lra-constraints.c (process_address_1): Check is_address flag
13905 for address constraints.
13906 (process_alt_operands): Likewise.
13907 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13908 preprocess_constraints.
13909 * recog.h (preprocess_constraints): Add oploc parameter.
13910 Adjust callers.
13911 * recog.c (preprocess_constraints): Test address_operand for
13912 CT_ADDRESS constraints.
13913
13914 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13915
13916 PR target/83712
13917 * lra-assigns.c (assign_by_spills): Return a flag of reload
13918 assignment failure. Do not process the reload assignment
13919 failures. Do not spill other reload pseudos if they has the same
13920 reg class.
13921 (lra_assign): Add a return arg. Set up from the result of
13922 assign_by_spills call.
13923 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13924 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13925 usage_insns if it is not NULL.
13926 (spill_hard_reg_in_range): New function.
13927 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13928 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13929 function prototypes.
13930 (lra_assign): Change prototype.
13931 * lra.c (lra): Add code to deal with fails by splitting hard reg
13932 live ranges.
13933
13934 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13935
13936 PR target/83193
13937 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13938 Accept complain bool parameter. Only emit errors if it is true.
13939 (arm_parse_cpu_option_name): Likewise.
13940 (arm_target_thumb_only): Adjust callers of the above.
13941 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13942 prototype to take a default true bool parameter.
13943 (arm_parse_arch_option_name): Likewise.
13944
13945 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13946 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13947
13948 PR jit/64089
13949 PR jit/84288
13950 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13951 * configure: Regenerate.
13952 * configure.ac ("linker --version-script option"): New.
13953 ("linker soname option"): New.
13954
13955 2018-03-09 Richard Biener <rguenther@suse.de>
13956
13957 PR tree-optimization/84775
13958 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13959 immediate uses of predicate stmts and mark them modified.
13960
13961 Revert
13962 PR tree-optimization/84178
13963 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13964 to caller.
13965 (version_loop_for_if_conversion): Delay update_ssa call.
13966 (tree_if_conversion): Delay update_ssa until after predicate
13967 insertion.
13968
13969 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13970
13971 PR target/84763
13972 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13973 when the function accesses prior frames.
13974
13975 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13976
13977 PR debug/84456
13978 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13979 gen_llsym, otherwise call maybe_gen_llsym.
13980
13981 PR inline-asm/84742
13982 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13983 has ',' character inside of it.
13984
13985 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13986
13987 PR target/84748
13988 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13989 as clobbering CC_REGNUM.
13990
13991 2018-03-08 Richard Biener <rguenther@suse.de>
13992
13993 PR middle-end/84552
13994 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13995 (follow_copies_to_constant): Do not follow SSA names registered
13996 for update.
13997
13998 2018-03-08 Richard Biener <rguenther@suse.de>
13999
14000 PR tree-optimization/84178
14001 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14002 to caller.
14003 (version_loop_for_if_conversion): Delay update_ssa call.
14004 (tree_if_conversion): Delay update_ssa until after predicate
14005 insertion.
14006
14007 2018-03-08 David Malcolm <dmalcolm@redhat.com>
14008
14009 PR tree-optimization/84178
14010 * tree-if-conv.c (release_bb_predicate): Remove the
14011 the assertion that the stmts have NULL use_ops.
14012 Discard the statements, asserting that they haven't
14013 yet been added to a BB.
14014
14015 2018-03-08 Richard Biener <rguenther@suse.de>
14016
14017 PR tree-optimization/84746
14018 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14019 (phi_translate): Pass in destination ANTIC_OUT set.
14020 (phi_translate_1): Likewise. For a simplified result lookup
14021 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14022 (phi_translate_set): Adjust.
14023 (do_pre_regular_insertion): Likewise.
14024 (do_pre_partial_partial_insertion): Likewise.
14025
14026 2018-03-08 Martin Liska <mliska@suse.cz>
14027
14028 PR gcov-profile/84735
14029 * doc/gcov.texi: Document usage of profile files.
14030 * gcov-io.h: Document changes in the format.
14031
14032 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
14033
14034 PR debug/84404
14035 PR debug/84408
14036 * dwarf2out.c (struct dw_line_info_table): Update comments for
14037 view == -1.
14038 (FORCE_RESET_NEXT_VIEW): New.
14039 (FORCE_RESETTING_VIEW_P): New.
14040 (RESETTING_VIEW_P): Check for -1 too.
14041 (ZERO_VIEW_P): Likewise.
14042 (new_line_info_table): Force-reset next view.
14043 (dwarf2out_begin_function): Likewise.
14044 (dwarf2out_source_line): Simplify zero_view_p initialization.
14045 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14046 view directly. Omit view when omitting .loc at line 0.
14047
14048 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14049
14050 PR tree-optimization/84740
14051 * tree-switch-conversion.c (process_switch): Call build_constructors
14052 only if info.phi_count is non-zero.
14053
14054 PR tree-optimization/84739
14055 * tree-tailcall.c (find_tail_calls): Check call arguments against
14056 DECL_ARGUMENTS (current_function_decl) rather than
14057 DECL_ARGUMENTS (func) when checking for tail recursion.
14058
14059 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14060
14061 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14062 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14063 Volker Reichelt's entry and add entries for people that perform
14064 GCC fuzzy testing and report numerous bugs.
14065
14066 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
14067
14068 PR target/82411
14069 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14070 readonly data in sdata, if that is disabled.
14071 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14072 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14073 -mreadonly-in-sdata option.
14074
14075 2018-03-07 Martin Sebor <msebor@redhat.com>
14076
14077 PR tree-optimization/84468
14078 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14079 basic block when looking for nul assignment.
14080
14081 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
14082
14083 PR target/84277
14084 * except.h (output_function_exception_table): Adjust prototype.
14085 * except.c (output_function_exception_table): Remove FNNAME parameter
14086 and add SECTION parameter. Ouput one part of the table at a time.
14087 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14088 the first part of the exception table and emit unwind directives.
14089 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14090 (i386_pe_seh_cold_init): Likewise.
14091 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14092 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14093 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14094 (ix86_output_call_insn): Emit a nop in one more case for SEH.
14095 * config/i386/winnt.c: Include except.h.
14096 (struct seh_frame_state): Add reg_offset, after_prologue and
14097 in_cold_section fields.
14098 (i386_pe_seh_end_prologue): Set seh->after_prologue.
14099 (i386_pe_seh_cold_init): New function.
14100 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14101 to seh->in_cold_section.
14102 (seh_emit_push): Record the offset of the push.
14103 (seh_emit_save): Record the offet of the save.
14104 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14105 Test seh->after_prologue to disregard the epilogue.
14106 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14107 (i386_pe_end_cold_function): New function.
14108
14109 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14110
14111 PR fortran/84565
14112 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14113 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14114
14115 PR c++/84704
14116 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14117 on tmp_var.
14118 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14119 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14120
14121 PR middle-end/84723
14122 * multiple_target.c: Include tree-inline.h and intl.h.
14123 (expand_target_clones): Diagnose and fail if node->definition and
14124 !tree_versionable_function_p (node->decl).
14125
14126 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
14127
14128 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14129 sprint_ul.
14130 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14131 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14132 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14133
14134 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14135
14136 PR target/84710
14137 * combine.c (try_combine): Use reg_or_subregno instead of handling
14138 just paradoxical SUBREGs and REGs.
14139
14140 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
14141
14142 * config/arc/arc.c (arc_finalize_pic): Remove function.
14143 (arc_must_save_register): We use single base PIC register, remove
14144 checks to save/restore the PIC register.
14145 (arc_expand_prologue): Likewise.
14146 * config/arc/arc-protos.h (arc_set_default_type_attributes):
14147 Remove.
14148 (arc_verify_short): Likewise.
14149 (arc_attr_type): Likewise.
14150 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14151 (walk_stores): Likewise.
14152 (arc_address_cost): Make it static.
14153 (arc_verify_short): Likewise.
14154 (branch_dest): Likewise.
14155 (arc_attr_type): Likewise.
14156 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14157 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14158 (arc_final_prescan_insn): Remove inserting the nops due to
14159 hardware hazards. It is done in reorg step.
14160 (insn_length_variant_t): Remove.
14161 (insn_length_parameters_t): Likewise.
14162 (arc_insn_length_parameters): Likewise.
14163 (arc_get_insn_variants): Likewise.
14164 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14165
14166 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14167
14168 PR inline-asm/84683
14169 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14170 assertion failure.
14171
14172 PR tree-optimization/84687
14173 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14174 on new_node->decl.
14175 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14176
14177 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14178
14179 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14180 Rename to ppc_speculation_barrier.
14181 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14182 __builtin_ppc_speculation_barrier.
14183
14184 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14185
14186 PR target/84700
14187 * combine.c (combine_simplify_rtx): Don't try to simplify if
14188 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14189 are equal to x.
14190
14191 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
14192
14193 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14194 to 32 bytes when compiling for POWER9.
14195
14196 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14197
14198 PR target/84564
14199 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14200 regparm >= 3 with no arg reg available also for calls with
14201 flag_force_indirect_call. Pass decl to ix86_function_regparm.
14202
14203 PR target/84524
14204 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14205 orig,vex.
14206 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
14207
14208 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
14209
14210 PR target/84264
14211 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14212
14213 2018-03-05 Richard Biener <rguenther@suse.de>
14214
14215 PR tree-optimization/84486
14216 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14217 When inserting a __builtin_assume_aligned call set the LHS
14218 SSA name alignment info accordingly.
14219
14220 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
14221
14222 PR tree-optimization/84114
14223 * config/aarch64/aarch64.c (aarch64_reassociation_width)
14224 Avoid reassociation of FLOAT_MODE addition.
14225
14226 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
14227
14228 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14229 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14230 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14231 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14232 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14233 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14234 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14235 and -mwbnoinvd.
14236 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14237 __builtin_ia32_wbinvd): New builtins.
14238 (SPECIAL_ARGS2): New.
14239 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14240 (SPECIAL_ARGS2): New.
14241 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14242 (ix86_valid_target_attribute_inner_p): Ditto.
14243 (ix86_init_mmx_sse_builtins): Add special_args2.
14244 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14245 TARGET_WBNOINVD_P): New.
14246 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14247 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14248 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14249 * config/i386/immintrin.h (_wbinvd): New intrinsic.
14250 * config/i386/pconfigintrin.h: New file.
14251 * config/i386/wbnoinvdintrin.h: Ditto.
14252 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14253 wbnoinvdintrin.h.
14254 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14255
14256 2018-03-05 Richard Biener <rguenther@suse.de>
14257
14258 PR tree-optimization/84670
14259 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14260 member.
14261 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14262 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14263 (compute_antic_aux): Only assert the number of values in ANTIC_IN
14264 doesn't grow if all successors (recursively) were visited at least
14265 once.
14266
14267 2018-03-05 Richard Biener <rguenther@suse.de>
14268
14269 PR tree-optimization/84650
14270 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14271 if executed in the loop pipeline.
14272
14273 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
14274
14275 * doc/configfiles.texi (Configuration Files): Move info about
14276 conditionalizing $target-protos.h to...
14277 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
14278 differs from $target-protos.h.
14279
14280 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
14281 Chung-Ju Wu <jasonwucj@gmail.com>
14282
14283 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14284 * config/nds32/nds32-multiple.md (setmemsi): Define.
14285 * config/nds32/nds32-memory-manipulation.c
14286 (nds32_gen_dup_4_byte_to_word_value): New.
14287 (emit_setmem_word_loop): New.
14288 (emit_setmem_byte_loop): New.
14289 (nds32_expand_setmem_loop): New.
14290 (nds32_expand_setmem_loop_v3m): New.
14291 (nds32_expand_setmem_unroll): New.
14292 (nds32_expand_setmem): New.
14293
14294 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14295 Chung-Ju Wu <jasonwucj@gmail.com>
14296
14297 * config/nds32/nds32-memory-manipulation.c
14298 (nds32_emit_load_store): New.
14299 (nds32_emit_post_inc_load_store): New.
14300 (nds32_emit_mem_move): New.
14301 (nds32_emit_mem_move_block): New.
14302 (nds32_expand_movmemsi_loop_unknown_size): New.
14303 (nds32_expand_movmemsi_loop_known_size): New.
14304 (nds32_expand_movmemsi_loop): New.
14305 (nds32_expand_movmemsi_unroll): New.
14306 (nds32_expand_movmemqi): Rename ...
14307 (nds32_expand_movmemsi): ... to this.
14308 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14309 (movmemsi): ... to this.
14310 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14311 (nds32_expand_movmemsi): ... to this.
14312
14313 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14314 Monk Chiang <sh.chiang04@gmail.com>
14315 Chung-Ju Wu <jasonwucj@gmail.com>
14316
14317 * config/nds32/nds32-protos.h
14318 (nds32_expand_load_multiple): New arguments.
14319 (nds32_expand_store_multiple): Ditto.
14320 (nds32_valid_multiple_load_store): Rename ...
14321 (nds32_valid_multiple_load_store_p): ... to this.
14322 * config/nds32/nds32-memory-manipulation.c
14323 (nds32_expand_load_multiple): Refine implementation.
14324 (nds32_expand_store_multiple): Ditto.
14325 * config/nds32/nds32-multiple.md
14326 (load_multiple): Update nds32_expand_load_multiple interface.
14327 (store_multiple): Update nds32_expand_store_multiple interface.
14328 * config/nds32/nds32-predicates.c
14329 (nds32_valid_multiple_load_store): Rename ...
14330 (nds32_valid_multiple_load_store_p): ... to this and refine
14331 implementation.
14332 * config/nds32/predicates.md
14333 (nds32_load_multiple_and_update_address_operation): New predicate.
14334 (nds32_store_multiple_and_update_address_operation): New predicate.
14335
14336 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14337 Chung-Ju Wu <jasonwucj@gmail.com>
14338
14339 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14340 (combo): New attribute.
14341 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14342
14343 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
14344
14345 * config/nds32/nds32.opt: Change -mcmodel= default value.
14346
14347 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
14348 Monk Chiang <sh.chiang04@gmail.com>
14349 Chung-Ju Wu <jasonwucj@gmail.com>
14350
14351 * config/nds32/constants.md (unspec_element): New enum.
14352 * config/nds32/constraints.md (Umw): New constraint.
14353 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14354 * config/nds32/nds32-intrinsic.md: Likewise.
14355 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14356 (nds32_valid_smw_lwm_base_p): New.
14357 (nds32_output_smw_single_word): New.
14358 (nds32_output_lmw_single_word): New.
14359 (nds32_expand_unaligned_load): New.
14360 (nds32_expand_unaligned_store): New.
14361 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14362 (nds32_output_smw_single_word): Declare.
14363 (nds32_output_lmw_single_word): Declare.
14364 (nds32_expand_unaligned_load): Declare.
14365 (nds32_expand_unaligned_store): Declare.
14366 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14367 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14368 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14369 NDS32_BUILTIN_UASTORE_DW.
14370 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14371 predicate.
14372
14373 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
14374 Kito Cheng <kito.cheng@gmail.com>
14375 Chung-Ju Wu <jasonwucj@gmail.com>
14376
14377 * config/nds32/nds32-intrinsic.c
14378 (nds32_expand_builtin_null_ftype_reg): Delete.
14379 (nds32_expand_builtin_reg_ftype_imm): Ditto.
14380 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14381 (nds32_read_argument): New.
14382 (nds32_legitimize_target): Ditto.
14383 (nds32_legitimize_argument): Ditto.
14384 (nds32_check_constant_argument): Ditto.
14385 (nds32_expand_unop_builtin): Ditto.
14386 (nds32_expand_unopimm_builtin): Ditto.
14387 (nds32_expand_binop_builtin): Ditto.
14388 (nds32_builtin_decl_impl): Ditto.
14389 (builtin_description): Ditto.
14390 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14391 (nds32_init_builtins_impl): Ditto.
14392 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14393 (nds32_builtin_decl): New.
14394 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14395 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14396
14397 2018-03-02 Jeff Law <law@redhat.com>
14398
14399 * reorg.c (stop_search_p): Handle DEBUG_INSN.
14400 (redundant_insn, fill_simple_delay_slots): Likewise.
14401 (fill_slots_from_thread): Likewise.
14402 * resource.c (mark_referenced_resources): Likewise.
14403 (mark_set_resources, find_dead_or_set_registers): Likewise.
14404
14405 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14406
14407 * substring-locations.h (format_warning_va): Formatting fix for
14408 ATTRIBUTE_GCC_DIAG.
14409 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14410 argument.
14411 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14412 * substring-locations.c: Include intl.h.
14413 (format_warning_va): Turned into small wrapper around
14414 format_warning_n_va, renamed to ...
14415 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14416 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14417 use ngettext.
14418 (format_warning_at_substring_n): New function.
14419 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14420 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14421 format_warning_at_substring with just a shorter name instead of
14422 const function pointer.
14423 (fmtwarn_n): New function.
14424 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14425 appropriate, get rid of all the fmtstr temporaries, move conditionals
14426 with G_() wrapped string literals directly into fmtwarn arguments,
14427 cast dir.len to (int), formatting fixes.
14428
14429 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14430
14431 * doc/invoke.texi: Remove "Cilk Plus" references.
14432
14433 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14434 Richard Biener <rguenther@suse.de>
14435
14436 PR ipa/84628
14437 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14438 for error or warning attributes if CALL_FROM_THUNK_P is set.
14439 Formatting fixes.
14440
14441 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14442
14443 PR target/56540
14444 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14445 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14446
14447 PR target/56540
14448 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14449 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14450
14451 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14452 instead of -1U in last predictors element's probability member.
14453
14454 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14455
14456 PR ipa/83983
14457 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14458 arguments if they are comparable.
14459
14460 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14461
14462 PR tree-optimization/84634
14463 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14464 masks and masked_loop_p with a single loop_masks, making sure it's
14465 null for bb vectorization.
14466
14467 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14468
14469 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14470 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14471 loop->force_vectorize to check whether there is no alias.
14472
14473 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14474
14475 PR target/84614
14476 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14477 prototypes.
14478 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14479 comments.
14480 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14481 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14482 instead of a loop around prev_real_insn.
14483 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14484 prev_real_insn.
14485
14486 PR inline-asm/84625
14487 * config/i386/i386.c (ix86_print_operand): Use conditional
14488 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14489 zero vector.
14490
14491 2018-03-02 Richard Biener <rguenther@suse.de>
14492
14493 PR tree-optimization/84427
14494 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14495 (bitmap_set_subtract_values): Rewrite to handle multiple
14496 exprs per value.
14497 (clean): Likewise.
14498 (prune_clobbered_mems): Likewise.
14499 (phi_translate): Take edge instead of pred/phiblock.
14500 (phi_translate_1): Likewise.
14501 (phi_translate_set): Likewise. Insert all translated
14502 exprs for a value into the set, keeping possibly multiple
14503 expressions per value.
14504 (compute_antic_aux): Adjust for phi_translate changes.
14505 When intersecting union the expressions and prune those
14506 not in the final value set, keeping possibly multiple
14507 expressions per value. Do not use value-insertion
14508 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14509 all expressions. Add verification that the value-sets
14510 only shrink during iteration.
14511 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14512 (do_pre_regular_insertion): Likewise.
14513 (do_pre_partial_partial_insertion): Likewise.
14514
14515 2018-03-02 Richard Biener <rguenther@suse.de>
14516
14517 PR target/82005
14518 * config/darwin.c (saved_debug_info_level): New static global.
14519 (darwin_asm_lto_start): Disable debug info generation for LTO out.
14520 (darwin_asm_lto_end): Restore debug info generation settings.
14521
14522 2018-03-01 Martin Liska <mliska@suse.cz>
14523
14524 PR sanitizer/82484
14525 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14526 volatile arguments.
14527
14528 2018-03-01 Richard Biener <rguenther@suse.de>
14529
14530 PR debug/84645
14531 * dwarf2out.c (gen_variable_die): Properly handle late VLA
14532 type annotation with LTO when debug was disabled at compile-time.
14533
14534 2018-03-01 Matthew Fortune <mfortune@gmail.com>
14535
14536 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14537 XINT with INTVAL.
14538 (mips_final_postscan_insn): Likewise.
14539
14540 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
14541
14542 PR rtl-optimization/84528
14543 * alias.c (init_alias_target): Add commentary.
14544 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14545 a unique base value if the frame pointer is not eliminated
14546 to the stack pointer.
14547
14548 2018-03-01 Tom de Vries <tom@codesourcery.com>
14549
14550 PR rtl-optimization/83327
14551 * lra-int.h (hard_regs_spilled_into): Declare.
14552 * lra.c (hard_regs_spilled_into): Define.
14553 (init_reg_info): Init hard_regs_spilled_into.
14554 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14555 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14556 (process_bb_lives): Handle hard_regs_spilled_into.
14557 (lra_create_live_ranges_1): Before doing liveness propagation, clear
14558 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14559
14560 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
14561
14562 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14563 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14564 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14565 * config/rs6000/aix72.h: New file.
14566
14567 2018-02-28 Jakub Jelinek <jakub@redhat.com>
14568
14569 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14570 instead of warning_at with conditional singular and plural messages
14571 where possible.
14572
14573 PR target/52991
14574 * stor-layout.c (update_alignment_for_field): For
14575 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14576 && !DECL_PACKED (field), do the alignment update, just use
14577 only desired_align instead of MAX (type_align, desired_align)
14578 as the alignment.
14579 (place_field): Don't do known_align < desired_align handling
14580 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14581 is non-NULL, instead do it after rli->prev_field handling and
14582 only if not within a bitfield word. For DECL_PACKED (field)
14583 use type_align of BITS_PER_UNIT.
14584
14585 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14586
14587 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14588 superfluous parentheses and trailing spaces.
14589
14590 2018-02-28 Richard Biener <rguenther@suse.de>
14591
14592 PR tree-optimization/84584
14593 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14594 SCoPs with fake exit edge.
14595
14596 2018-02-28 Martin Liska <mliska@suse.cz>
14597
14598 PR testsuite/84597
14599 * timevar.c (timer::print): Fix format to properly print 100%
14600 values.
14601
14602 2018-02-28 Richard Biener <rguenther@suse.de>
14603
14604 PR middle-end/84607
14605 * genmatch.c (capture_info::walk_match): Do not mark
14606 captured expressions without operands as expr_p given
14607 they act more like predicates and should be subject to
14608 "lost tail" side-effect preserving.
14609
14610 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14611
14612 PR rtl-optimization/81611
14613 * auto-inc-dec.c (attempt_change): Move dead note from
14614 mem_insn if it's the next use of regno
14615 (find_address): Take address use of reg holding
14616 non-incremented value. Add parm to limit search to the named
14617 reg only.
14618 (merge_in_block): Attempt to use a mem insn that is the next
14619 use of the original regno.
14620
14621 2018-02-27 Martin Sebor <msebor@redhat.com>
14622
14623 PR c++/83871
14624 * doc/invoke.texi (-Wmissing-attributes): New option.
14625 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14626
14627 2018-02-27 Martin Sebor <msebor@redhat.com>
14628
14629 PR translation/84207
14630 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14631 n argument to unsigned HOST_WIDE_INT.
14632 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14633 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14634 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14635 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14636
14637 2018-02-27 Richard Biener <rguenther@suse.de>
14638
14639 PR tree-optimization/84512
14640 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14641 Do not use the estimate returned from record_stmt_cost for
14642 the scalar iteration cost but sum properly using add_stmt_cost.
14643
14644 2018-02-27 Richard Biener <rguenther@suse.de>
14645
14646 PR tree-optimization/84466
14647 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14648 Adjust last change to less strictly validate use operands.
14649
14650 2018-02-27 Martin Liska <mliska@suse.cz>
14651
14652 PR gcov-profile/84548
14653 * gcov.c (process_file): Allow partial overlap and consider it
14654 also as group functions.
14655 (output_lines): Properly calculate range of lines for a group.
14656
14657 2018-02-27 Martin Liska <mliska@suse.cz>
14658
14659 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14660 'ggc' suffixes. Change first column width.
14661 (timer::print): Fix formatting of the column.
14662
14663 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14664
14665 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14666 preserve inline entry blocks for the sake of debug inline
14667 entry point markers alone.
14668 (remove_unused_locals): Suggest in comments a better place to
14669 force the preservation of inline entry blocks that are
14670 otherwise unused, but do not preserve them.
14671
14672 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14673
14674 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14675
14676 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14677
14678 PR target/84039
14679 * config/i386/constraints.md (Bs): Replace
14680 ix86_indirect_branch_register with
14681 TARGET_INDIRECT_BRANCH_REGISTER.
14682 (Bw): Likewise.
14683 * config/i386/i386.md (indirect_jump): Likewise.
14684 (tablejump): Likewise.
14685 (*sibcall_memory): Likewise.
14686 (*sibcall_value_memory): Likewise.
14687 Peepholes of indirect call and jump via memory: Likewise.
14688 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14689 (*sibcall_value_GOT_32): Likewise.
14690 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14691 (GOT_memory_operand): Likewise.
14692 (call_insn_operand): Likewise.
14693 (sibcall_insn_operand): Likewise.
14694 (GOT32_symbol_operand): Likewise.
14695 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14696
14697 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14698
14699 PR rtl-optimization/83496
14700 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14701 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14702 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14703 redundant insn, if any.
14704 (relax_delay_slots): Likewise.
14705 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14706
14707 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14708
14709 PR tree-optimization/83965
14710 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14711 that grouped statements are part of a reduction chain. Return
14712 true if the statement is not marked as a reduction itself but
14713 is part of a group.
14714 (vect_recog_dot_prod_pattern): Don't check whether the statement
14715 is part of a group here.
14716 (vect_recog_sad_pattern): Likewise.
14717 (vect_recog_widen_sum_pattern): Likewise.
14718
14719 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14720
14721 PR debug/84545
14722 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14723
14724 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14725
14726 PR target/84530
14727 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14728 the bool argument.
14729 (ix86_output_indirect_function_return): New prototype.
14730 (ix86_split_simple_return_pop_internal): Likewise.
14731 * config/i386/i386.c (indirect_return_via_cx): New.
14732 (indirect_return_via_cx_bnd): Likewise.
14733 (indirect_thunk_name): Handle return va CX_REG.
14734 (output_indirect_thunk_function): Create alias for
14735 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14736 (ix86_output_indirect_jmp): Remove the bool argument.
14737 (ix86_output_indirect_function_return): New function.
14738 (ix86_split_simple_return_pop_internal): Likewise.
14739 * config/i386/i386.md (*indirect_jump): Don't pass false
14740 to ix86_output_indirect_jmp.
14741 (*tablejump_1): Likewise.
14742 (simple_return_pop_internal): Change it to define_insn_and_split.
14743 Call ix86_split_simple_return_pop_internal to split it for
14744 -mfunction-return=.
14745 (simple_return_indirect_internal): Call
14746 ix86_output_indirect_function_return instead of
14747 ix86_output_indirect_jmp.
14748
14749 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14750
14751 PR bootstrap/84405
14752 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14753 memset and value initialization afterwards.
14754
14755 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14756
14757 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14758
14759 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14760
14761 PR target/84521
14762 * common/config/aarch64/aarch64-common.c
14763 (aarch_option_optimization_table[]): Switch
14764 off fomit-frame-pointer
14765
14766 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14767 Chung-Ju Wu <jasonwucj@gmail.com>
14768
14769 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14770 volatile memory.
14771 (store_multiple): Ditto.
14772
14773 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14774
14775 * config.gcc: Add --with-cpu support for nds32 target.
14776 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14777 * config/nds32/nds32.opt: Add -mcpu= option.
14778
14779 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14780
14781 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14782 isel=yes): Warn for these deprecated options.
14783
14784 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14785
14786 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14787 ISA_2_5_MASKS_EMBEDDED.
14788
14789 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14790
14791 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14792 p->max as pointers rather than using iterative_hash_expr.
14793
14794 2018-02-23 Carl Love <cel@us.ibm.com>
14795
14796 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14797 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14798 BU_P8V_OVERLOAD_2.
14799 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14800 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14801 P8V_BUILTIN_VEC_VUNSIGNED2.
14802
14803 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14804
14805 PR target/81572
14806 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14807 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14808 LRA_UNKNOWN_ALT.
14809 * lra-constraints.c (curr_insn_transform): Set up
14810 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14811 LRA_UNKNOWN_ALT.
14812 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14813 * lra-eliminations.c (spill_pseudos): Ditto.
14814 (process_insn_for_elimination): Ditto.
14815 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14816 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14817 LRA_NON_CLOBBERED_ALT.
14818
14819 2018-02-22 Martin Sebor <msebor@redhat.com>
14820
14821 PR tree-optimization/84480
14822 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14823 to maybe_diag_stxncpy_trunc. Call it.
14824 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14825 from gimple_fold_builtin_strcpy. Print inlining stack.
14826 (handle_builtin_stxncpy): Print inlining stack.
14827 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14828
14829 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14830
14831 PR target/84176
14832 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14833 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14834 and -fcheck-pointer-bounds are used together.
14835 (indirect_thunk_prefix): New enum.
14836 (indirect_thunk_need_prefix): New function.
14837 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14838 "_nt" instead of "_bnd" for NOTRACK prefix.
14839 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14840 (output_indirect_thunk_function): Likewise.
14841 (): Likewise.
14842 (ix86_code_end): Update output_indirect_thunk_function calls.
14843 (ix86_output_indirect_branch_via_reg): Replace
14844 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14845 (ix86_output_indirect_branch_via_push): Likewise.
14846 (ix86_output_function_return): Likewise.
14847 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14848 incompatible with -fcf-protection=branch and
14849 -fcheck-pointer-bounds.
14850
14851 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14852
14853 PR target/83335
14854 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14855 Change gcc_assert call to output_operand_lossage.
14856
14857 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14858
14859 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14860
14861 2018-02-22 DJ Delorie <dj@redhat.com>
14862 Sebastian Perta <sebastian.perta@renesas.com>
14863 Oleg Endo <olegendo@gcc.gnu.org>
14864
14865 * config/rx/rx.c (rx_rtx_costs): New function.
14866 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14867
14868 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14869
14870 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14871
14872 2018-02-22 Martin Liska <mliska@suse.cz>
14873
14874 PR driver/83193
14875 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14876 Add "native" as a possible value.
14877
14878 2018-02-22 Martin Liska <mliska@suse.cz>
14879
14880 PR driver/83193
14881 * config/i386/i386.c (ix86_option_override_internal):
14882 Add "native" as a possible value for -march and -mtune.
14883
14884 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14885
14886 PR target/84502
14887 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14888 to all type variants.
14889
14890 PR tree-optimization/84503
14891 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14892 width as info->bitpos + info->bitsize - start.
14893 (merged_store_group::merge_overlapping): Simplify width computation.
14894 (check_no_overlap): New function.
14895 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14896 start + width and last_order of the group, fail if check_no_overlap
14897 fails.
14898 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14899 to group if check_no_overlap fails.
14900
14901 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14902
14903 * config/rs6000/altivec.md: Delete contraint arguments to
14904 define_expand, define_split, and define_peephole2, and in
14905 define_insn_and_split if always unused.
14906 * config/rs6000/darwin.md: Ditto.
14907 * config/rs6000/dfp.md: Ditto.
14908 * config/rs6000/rs6000.md: Ditto.
14909 * config/rs6000/sync.md: Ditto.
14910 * config/rs6000/vector.md: Ditto.
14911 * config/rs6000/vsx.md: Ditto.
14912
14913 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14914
14915 * config/rs6000/altivec.md: Write output control strings as braced
14916 blocks instead of double-quoted strings.
14917 * config/rs6000/darwin.md: Ditto.
14918 * config/rs6000/rs6000.md: Ditto.
14919 * config/rs6000/vector.md: Ditto.
14920 * config/rs6000/vsx.md: Ditto.
14921
14922 2018-02-21 Jason Merrill <jason@redhat.com>
14923
14924 PR c++/84314 - ICE with templates and fastcall attribute.
14925 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14926
14927 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14928
14929 * ipa-cp.c (determine_versionability): Fix comment typos.
14930
14931 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14932
14933 PR c/84229
14934 * ipa-cp.c (determine_versionability): Do not version functions caling
14935 va_arg_pack.
14936
14937 2018-02-21 Martin Liska <mliska@suse.cz>
14938
14939 PR driver/83193
14940 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14941 Add "native" as a possible value.
14942 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14943 the macro when native cpu detection is available.
14944
14945 2018-02-21 Martin Liska <mliska@suse.cz>
14946
14947 PR driver/83193
14948 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14949 Add "native" as a possible value.
14950 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14951 when native cpu detection is available.
14952
14953 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14954 Martin Sebor <msebor@redhat.com>
14955
14956 PR tree-optimization/84478
14957 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14958 false.
14959 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14960 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14961 support which is conservatively correct, for 2 only stay conservative
14962 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14963 argument to the 2 argument get_range_strlen, adjust 6 arg
14964 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14965 false.
14966 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14967 (gimple_fold_builtin_strlen): Pass true as last argument to
14968 get_range_strlen.
14969
14970 2018-02-20 Martin Sebor <msebor@redhat.com>
14971
14972 PR middle-end/84095
14973 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14974 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14975 (builtin_memref::builtin_memref): Factor out parts into
14976 set_base_and_offset and call it.
14977
14978 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14979
14980 PR middle-end/84406
14981 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14982 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14983 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14984 search at the associated MODE_INT.
14985
14986 2018-02-20 Jeff Law <law@redhat.com>
14987
14988 PR middle-end/82123
14989 PR tree-optimization/81592
14990 PR middle-end/79257
14991 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14992 for range data rather than using global data.
14993 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14994 range data rather than using global data.
14995 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14996 pass it to children as needed.
14997 (struct directive::fmtresult): Similarly.
14998 (struct directive::set_width): Similarly.
14999 (struct directive::set_precision): Similarly.
15000 (format_integer, format_directive, parse_directive): Similarly.
15001 (format_none): Accept unnamed vr_values parameter.
15002 (format_percent, format_floating, format_character): Similarly.
15003 (format_string, format_plain): Similarly.
15004 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15005 the EVRP range analyzer for range data rather than using global data.
15006 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15007 gimple-ssa-evrp-analyze.h
15008 (class sprintf_dom_walker): Add after_dom_children member function.
15009 Add evrp_range_analyzer member.
15010 (sprintf_dom_walker::before_dom_children): Call into the EVRP
15011 range analyzer as needed.
15012 (sprintf_dom_walker::after_dom_children): New member function.
15013 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15014 if not optimizing.
15015 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15016 (evrp_range_analyzer::pop_to_marker): Likewise.
15017
15018 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15019
15020 PR tree-optimization/84419
15021 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15022 with the required type if its current type is compatible but
15023 different.
15024
15025 2018-02-20 Jakub Jelinek <jakub@redhat.com>
15026
15027 PR middle-end/82004
15028 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15029 after vectorization.
15030
15031 2018-02-20 Martin Liska <mliska@suse.cz>
15032
15033 PR driver/83193
15034 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15035 possible values if we don't have a hint.
15036
15037 2018-02-20 Martin Liska <mliska@suse.cz>
15038
15039 PR c/84310
15040 PR target/79747
15041 * final.c (shorten_branches): Build align_tab array with one
15042 more element.
15043 * opts.c (finish_options): Add alignment option limit check.
15044 (MAX_CODE_ALIGN): Likewise.
15045 (MAX_CODE_ALIGN_VALUE): Likewise.
15046 * doc/invoke.texi: Document maximum allowed option value for
15047 all -falign-* options.
15048
15049 2018-02-19 Jakub Jelinek <jakub@redhat.com>
15050
15051 PR target/84146
15052 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15053 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15054 * var-tracking.c (emit_note_insn_var_location): Remove all references
15055 to NOTE_INSN_CALL_ARG_LOCATION.
15056 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15057 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15058 Use copy_rtx_if_shared.
15059 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15060 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15061 (dwarf2out_var_location): Remove handling of
15062 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15063 on call_insn.
15064 * final.c (final_scan_insn): Remove all references to
15065 NOTE_INSN_CALL_ARG_LOCATION.
15066 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
15067 before dumping final insns.
15068 * except.c (emit_note_eh_region_end): Remove all references to
15069 NOTE_INSN_CALL_ARG_LOCATION.
15070 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15071 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15072 * config/arc/arc.c (hwloop_optimize): Likewise.
15073 * config/arm/arm.c (create_fix_barrier): Likewise.
15074 * config/s390/s390.c (s390_chunkify_start): Likewise.
15075 * config/sh/sh.c (find_barrier): Likewise.
15076 * config/i386/i386.c (rest_of_insert_endbranch,
15077 ix86_seh_fixup_eh_fallthru): Likewise.
15078 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15079 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15080 * config/frv/frv.c (frv_function_prologue): Likewise.
15081 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
15082 reg note.
15083 (note_outside_basic_block_p): Remove all references to
15084 NOTE_INSN_CALL_ARG_LOCATION.
15085 * gengtype.c (adjust_field_rtx_def): Likewise.
15086 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15087 Likewise.
15088 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15089 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15090
15091 PR c++/84444
15092 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15093 is ADDR_EXPR.
15094
15095 PR tree-optimization/84452
15096 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15097 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15098 is NULL.
15099
15100 2018-02-19 Martin Liska <mliska@suse.cz>
15101
15102 PR sanitizer/82183
15103 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15104
15105 2018-02-19 Martin Liska <mliska@suse.cz>
15106 Richard Sandiford <richard.sandiford@linaro.org>
15107
15108 PR tree-optimization/82491
15109 * gimple-fold.c (get_base_constructor): Make earlier bail out
15110 to prevent ubsan.
15111
15112 2018-02-19 Carl Love <cel@us.ibm.com>
15113
15114 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15115 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15116 BU_P8V_OVERLOAD_1.
15117 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15118 P8V_BUILTIN_VEC_NEG.
15119
15120 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
15121
15122 * config/rl78/rl78.md (movdf): New define expand.
15123
15124 2018-02-19 Martin Liska <mliska@suse.cz>
15125
15126 PR other/80589
15127 * doc/invoke.texi: Fix typo.
15128 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15129
15130 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
15131
15132 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15133 handle rs6000_single_float and rs6000_double_float specially for
15134 e500 family CPUs.
15135
15136 2018-02-16 Jeff Law <law@redhat.com>
15137
15138 * config/rx/rx.c (add_pop_cfi_notes): New function.;
15139 (pop_regs): Use it.
15140
15141 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15142
15143 PR ipa/84425
15144 * ipa-inline.c (inline_small_functions): Fix a typo.
15145
15146 2018-02-16 Nathan Sidwell <nathan@acm.org>
15147
15148 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15149
15150 2018-02-16 Carl Love <cel@us.ibm.com>
15151
15152 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15153 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15154 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15155 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15156 expansion to P8V_BUILTIN_VEC_FLOAT2.
15157
15158 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
15159
15160 PR rtl-optimization/70023
15161 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15162 src_regno into account.
15163
15164 2018-02-16 Carl Love <cel@us.ibm.com>
15165
15166 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15167 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15168 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15169 * config/rs6000/rs6000.c: Remove case statements for
15170 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15171 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15172 and P9V_BUILTIN_VEC_VINSERT4B.
15173 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15174 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15175 * config/rs6000/vsx.md:
15176 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15177 vec_insert4b.
15178
15179 2018-02-16 Carl Love <cel@us.ibm.com>
15180
15181 * config/rs6000/altivec.h: Add builtin names vec_extract4b
15182 vec_insert4b.
15183 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15184 definitions.
15185 * config/rs6000/rs6000-c.c: Add the definitions for
15186 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15187 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15188 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15189 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
15190 definition for insert4b and define insn *insert3b_internal.
15191 * doc/extend.texi: Add documentation for vec_extract4b.
15192
15193 2018-02-16 Nathan Sidwell <nathan@acm.org>
15194
15195 * doc/extend.texi (Backwards Compatibility): Mention friend
15196 injection. Note for-scope is deprecated.
15197 * doc/invoke.texi (-ffriend-injection): Deprecate.
15198
15199 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
15200
15201 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15202 that moved to I2, also allow destinations that are a paradoxical
15203 subreg (instead of a normal reg).
15204
15205 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
15206
15207 PR target/83831
15208 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15209 to QImode.
15210
15211 2018-02-16 Richard Biener <rguenther@suse.de>
15212
15213 PR tree-optimization/84037
15214 PR tree-optimization/84016
15215 PR target/82862
15216 * config/i386/i386.c (ix86_builtin_vectorization_cost):
15217 Adjust vec_construct for the fact we need additional higher latency
15218 128bit inserts for AVX256 and AVX512 vector builds.
15219 (ix86_add_stmt_cost): Scale vector construction cost for
15220 elementwise loads.
15221
15222 2018-02-16 Richard Biener <rguenther@suse.de>
15223
15224 PR tree-optimization/84417
15225 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15226 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15227 (non_rewritable_lvalue_p): Likewise, use poly-ints.
15228
15229 2018-02-16 Martin Liska <mliska@suse.cz>
15230
15231 PR sanitizer/84307
15232 * internal-fn.def (ASAN_CHECK): Set proper flags.
15233 (ASAN_MARK): Likewise.
15234
15235 2018-02-16 Julia Koval <julia.koval@intel.com>
15236
15237 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15238 from PTA_CANNONLAKE.
15239
15240 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15241
15242 PR target/84272
15243 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15244 Use ++iter rather than iter++ for std::list iterators.
15245 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
15246 defer deleting them until all nodes in the forest are processed. Do
15247 free even leaf nodes. Change to_process into auto_vec.
15248
15249 PR bootstrap/84405
15250 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15251 * vec.h (vec_default_construct): Use memset instead of placement new
15252 if BROKEN_VALUE_INITIALIZATION is defined.
15253 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15254 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15255 is defined.
15256
15257 PR rtl-optimization/83723
15258 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15259 * lra.c (lra_substitute_pseudo): Likewise. If true, use
15260 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
15261 recursive calls.
15262 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15263 callers.
15264 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15265
15266 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
15267
15268 PR rtl-optimization/81443
15269 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15270 from inner REGs to paradoxical SUBREGs.
15271
15272 2018-02-16 Richard Biener <rguenther@suse.de>
15273
15274 PR tree-optimization/84399
15275 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15276 For operands we can analyze at their definition make sure we can
15277 analyze them at each use as well.
15278
15279 2018-02-16 Richard Biener <rguenther@suse.de>
15280
15281 PR tree-optimization/84190
15282 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15283 volatile accesses if the decl isn't volatile.
15284
15285 2018-02-15 Jason Merrill <jason@redhat.com>
15286
15287 PR c++/84314 - ICE with templates and fastcall attribute.
15288 * attribs.c (build_type_attribute_qual_variant): Don't clobber
15289 TYPE_CANONICAL on an existing type.
15290
15291 2018-02-15 Jakub Jelinek <jakub@redhat.com>
15292
15293 PR tree-optimization/84383
15294 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15295 dstoff nor call operand_equal_p if dstbase is NULL.
15296
15297 PR tree-optimization/84334
15298 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15299 also a CONSTANT_CLASS_P, punt.
15300
15301 2018-02-14 Jim Wilson <jimw@sifive.com>
15302
15303 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15304 first SMALL_OPERAND check. New local min_second_step. Move assert
15305 to where locals are set. Add TARGET_RVC support.
15306 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15307
15308 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
15309
15310 * doc/invoke.texi: Correct -Wformat-overflow code sample.
15311
15312 2018-02-14 Martin Sebor <msebor@redhat.com>
15313
15314 PR tree-optimization/83698
15315 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15316 arrays constrain the offset range to their bounds.
15317 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15318 (builtin_access::overlap): Avoid setting the size of overlap if it's
15319 already been set.
15320 (maybe_diag_overlap): Also consider arrays when deciding what values
15321 of offsets to include in diagnostics.
15322
15323 2018-02-14 Martin Sebor <msebor@redhat.com>
15324
15325 PR c/84108
15326 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15327 that correspond to the kind of a declaration.
15328
15329 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
15330
15331 PR target/83984
15332 * config/pa/pa.md: Load address of PIC label using the linkage table
15333 if the label is nonlocal.
15334
15335 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
15336
15337 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15338 warning message if user requests -maltivec=be.
15339 * doc/invoke.texi: Document deprecation of -maltivec=be.
15340
15341 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
15342
15343 PR target/84220
15344 * config/rs6000/rs6000-c.c: Update definitions for
15345 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15346 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15347
15348 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15349
15350 PR target/84239
15351 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15352 add _get_ssp intrinsics. Remove argument from
15353 __builtin_ia32_rdssp[d|q].
15354 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15355 * config/i386/i386-builtin.def: Remove argument from
15356 __builtin_ia32_rdssp[d|q].
15357 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15358 ix86_expand_special_args_builtin for _rdssp[d|q].
15359 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15360 Clear register before usage.
15361 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15362 Add documentation for new _get_ssp and _inc_ssp intrinsics.
15363
15364 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
15365
15366 PR tree-optimization/84357
15367 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15368 operand 1 of an ARRAY_REF too.
15369
15370 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
15371
15372 PR target/83831
15373 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15374 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15375 declarations.
15376 (set_of_reg): New struct.
15377 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15378 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15379 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15380 functions.
15381 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15382 Split into bitclr, bitset, bitinvert patterns if appropriate.
15383 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15384 use rx_fuse_in_memory_bitop.
15385 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15386 to named insn, correct maximum insn length.
15387
15388 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
15389
15390 PR target/79242
15391 * machmode.def: Define a complex mode for PARTIAL_INT.
15392 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15393 MODE_PARTIAL_INT.
15394 * doc/rtl.texi: Document CSPImode.
15395 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15396 handling.
15397 (msp430_hard_regno_nregs_with_padding): Likewise.
15398
15399 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
15400
15401 PR target/84279
15402 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15403
15404 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15405
15406 PR rtl-optimization/84169
15407 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15408 we generated a parallel as new i3 and we split that to new i2 and i3
15409 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15410 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15411 those to i2, not i1. Partially rewrite this scan code.
15412
15413 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15414
15415 PR c/82210
15416 * stor-layout.c (place_field): For variable length fields, adjust
15417 offset_align afterwards not just based on the field's alignment,
15418 but also on the size.
15419
15420 PR middle-end/84309
15421 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15422 of exps and logs in the use_exp2 case.
15423
15424 2018-02-13 Jeff Law <law@redhat.com>
15425
15426 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15427 entry for "vector".
15428
15429 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15430 ARGS as unused.
15431
15432 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15433
15434 PR debug/84342
15435 PR debug/84319
15436 * common.opt (gas-loc-support, gas-locview-support): New.
15437 (ginline-points, ginternal-reset-location-views): New.
15438 * doc/invoke.texi: Document them. Use @itemx where intended.
15439 (gvariable-location-views): Adjust.
15440 * target.def (reset_location_view): New.
15441 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15442 (TARGET_RESET_LOCATION_VIEW): New.
15443 * doc/tm.texi: Rebuilt.
15444 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15445 (dwarf2out_default_as_locview_support): New.
15446 (output_asm_line_debug_info): Use option variables.
15447 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15448 (output_loc_list): Likewise.
15449 (add_high_low_attributes): Check option variables.
15450 Don't output entry view attribute in strict mode.
15451 (gen_inlined_subroutine_die): Check option variables.
15452 (dwarf2out_inline_entry): Likewise.
15453 (init_sections_and_labels): Likewise.
15454 (dwarf2out_early_finish): Likewise.
15455 (maybe_reset_location_view): New, from...
15456 (dwarf2out_var_location): ... here. Call it.
15457 * debug.h (dwarf2out_default_as_loc_support): Declare.
15458 (dwarf2out_default_as_locview_support): Declare.
15459 * hooks.c (hook_int_rtx_insn_0): New.
15460 * hooks.h (hook_int_rtx_insn_0): Declare.
15461 * toplev.c (process_options): Take -gas-loc-support and
15462 -gas-locview-support from dwarf2out. Enable
15463 -gvariable-location-views by default only with locview
15464 assembler support. Enable -ginternal-reset-location-views by
15465 default only if the target defines the corresponding hook.
15466 Enable -ginline-points by default if location views are
15467 enabled; force it disabled if statement frontiers are
15468 disabled.
15469 * tree-inline.c (expand_call_inline): Check option variables.
15470 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15471
15472 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15473
15474 PR tree-optimization/84321
15475 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15476 handling. Also check whether the anti-range contains any values
15477 that satisfy the mask; switch to a VR_RANGE if not.
15478
15479 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15480
15481 PR sanitizer/84340
15482 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15483
15484 2018-02-13 Martin Jambor <mjambor@suse.cz>
15485
15486 PR c++/83990
15487 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15488 of call statements, also set location of a load to a temporary.
15489
15490 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15491
15492 * config/rl78/rl78.c (add_vector_labels): New function.
15493 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15494 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15495 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15496 which checks that no arguments are passed.
15497 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15498 * doc/extend.texi: Documentation for the new attribute.
15499
15500 2018-02-13 Andreas Schwab <schwab@suse.de>
15501
15502 * config/riscv/linux.h (CPP_SPEC): Define.
15503
15504 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15505
15506 PR target/84335
15507 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15508 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15509 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15510 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15511 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15512 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15513 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15514 temporarily for AES and PCLMUL builtins.
15515
15516 PR tree-optimization/84339
15517 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15518 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15519 Formatting fixes.
15520
15521 PR middle-end/84309
15522 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15523 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15524 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15525 inline function.
15526 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15527 inline function.
15528 * omp-simd-clone.h: New file.
15529 * omp-simd-clone.c: Include omp-simd-clone.h.
15530 (expand_simd_clones): No longer static.
15531 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15532 cgraph.h and omp-simd-clone.h.
15533 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15534 (vect_recog_widen_shift_pattern): Formatting fix.
15535 (vect_pattern_recog_1): Don't check optab for calls.
15536
15537 PR target/84336
15538 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15539 operands[2] into a REG before using gen_lowpart on it.
15540
15541 2018-02-12 Jeff Law <law@redhat.com>
15542
15543 PR target/83760
15544 * config/sh/sh.c (find_barrier): Consider a sibling call
15545 a barrier as well.
15546
15547 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15548 successfully back substituting a reg.
15549
15550 2018-02-12 Richard Biener <rguenther@suse.de>
15551
15552 PR tree-optimization/84037
15553 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15554 parameter, move visited init to caller.
15555 (vect_slp_analyze_operations): Separate cost from validity
15556 check, initialize visited once for all instances.
15557 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15558 for all instances.
15559 * tree-vect-stmts.c (vect_model_simple_cost): Make early
15560 out an assert.
15561 (vect_model_promotion_demotion_cost): Likewise.
15562 (vectorizable_bswap): Guard cost modeling with !slp_node
15563 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15564 SLP stmts.
15565 (vectorizable_call): Likewise.
15566 (vectorizable_conversion): Likewise.
15567 (vectorizable_assignment): Likewise.
15568 (vectorizable_shift): Likewise.
15569 (vectorizable_operation): Likewise.
15570 (vectorizable_store): Likewise.
15571 (vectorizable_load): Likewise.
15572 (vectorizable_condition): Likewise.
15573 (vectorizable_comparison): Likewise.
15574
15575 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
15576
15577 PR sanitizer/84307
15578 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15579 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15580 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15581
15582 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15583
15584 PR middle-end/83665
15585 * params.def (inline-min-speedup): Increase from 8 to 15.
15586 (max-inline-insns-auto): Decrease from 40 to 30.
15587 * ipa-split.c (consider_split): Add some buffer for function to
15588 be considered inlining candidate.
15589 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15590 default values.
15591
15592 2018-02-12 Richard Biener <rguenther@suse.de>
15593
15594 PR tree-optimization/84037
15595 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15596 matched stmts if we cannot swap the non-matched ones.
15597
15598 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15599
15600 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15601 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15602 _mm_maskz_scalef_round_ss): New intrinsics.
15603 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15604 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15605 __builtin_ia32_scalefss_round): Remove.
15606 (__builtin_ia32_scalefsd_mask_round,
15607 __builtin_ia32_scalefss_mask_round): New intrinsics.
15608 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15609 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15610 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15611 "<round_constraint>")): Changed to ...
15612 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15613 "<round_scalar_constraint>")): ... this.
15614 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15615 %0, %1, %2<round_op3>}"): Changed to ...
15616 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15617 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15618 %2<round_scalar_mask_op3>}"): ... this.
15619 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15620
15621 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15622
15623 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15624 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15625 (_mm_maskz_sqrt_round_ss): New intrinsics.
15626 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15627 (__builtin_ia32_sqrtsd_mask_round)
15628 (__builtin_ia32_sqrtss_mask_round): New builtins.
15629 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15630 (__builtin_ia32_sqrtss_round): Remove.
15631 (__builtin_ia32_sqrtsd_mask_round)
15632 (__builtin_ia32_sqrtss_mask_round): New builtins.
15633 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15634 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15635 ((match_operand:VF_128 1 "vector_operand"
15636 "xBm,<round_constraint>")): Changed to ...
15637 ((match_operand:VF_128 1 "vector_operand"
15638 "xBm,<round_scalar_constraint>")): ... this.
15639 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15640 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15641 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15642 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15643 %<iptr>1<round_scalar_mask_op3>}): ... this.
15644 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15645 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15646
15647 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15648
15649 PR target/84266
15650 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15651 Cast vec_cmpeq result to correct type.
15652 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15653 Cast vec_cmpgt result to correct type.
15654
15655 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15656
15657 * final.c (final_scan_insn_1): Renamed from...
15658 (final_scan_insn): ... this. New wrapper, to recover
15659 seen from the outermost call in recursive ones.
15660 * config/sparc/sparc.c (output_return): Drop seen from call.
15661 (output_sibcall): Likewise.
15662 * config/visium/visium.c (output_branch): Likewise.
15663
15664 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15665
15666 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15667 function label.
15668
15669 2018-02-10 Alan Modra <amodra@gmail.com>
15670
15671 PR target/84300
15672 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15673 Specify LR as an input.
15674
15675 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15676
15677 PR sanitizer/83987
15678 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15679 remove_member_access_dummy_vars): New functions.
15680 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15681 lower_omp_1, execute_lower_omp): Use them.
15682
15683 PR rtl-optimization/84308
15684 * shrink-wrap.c (spread_components): Release todo vector.
15685
15686 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15687
15688 PR rtl-optimization/57193
15689 * ira-color.c (struct allocno_color_data): Add member
15690 conflict_allocno_hard_prefs.
15691 (update_conflict_allocno_hard_prefs): New.
15692 (bucket_allocno_compare_func): Add a preference based on
15693 conflict_allocno_hard_prefs.
15694 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15695 (color_allocnos): Remove a dead code. Initiate
15696 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15697
15698 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15699
15700 PR target/84226
15701 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15702 constraint from =wa to wa. Avoid a subreg on the output operand,
15703 instead use a pseudo and subreg it in a move.
15704 (p9_xxbrd_<mode>): Changed to ...
15705 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15706 (p9_xxbrd_v2df): New expander.
15707 (p9_xxbrw_<mode>): Changed to ...
15708 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15709 (p9_xxbrw_v4sf): New expander.
15710
15711 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15712
15713 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15714
15715 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15716
15717 PR target/83926
15718 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15719 multiply in 32-bit mode.
15720 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15721 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15722 mode.
15723
15724 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15725
15726 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15727 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15728 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15729 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15730
15731 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15732
15733 PR lto/84213
15734 * dwarf2out.c (is_trivial_indirect_ref): New function.
15735 (dwarf2out_late_global_decl): Do not generate a location
15736 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15737 and that are not defined in the current unit.
15738
15739 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15740
15741 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15742 instead of a libcall for UNORDERED.
15743
15744 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15745
15746 PR target/82641
15747 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15748 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15749
15750 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15751
15752 PR target/PR84295
15753 * config/s390/s390.c (s390_set_current_function): Invoke
15754 s390_indirect_branch_settings also if fndecl didn't change.
15755
15756 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15757
15758 * config/rs6000/rs6000.md (blockage): Set length to zero.
15759
15760 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15761
15762 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15763
15764 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15765
15766 PR sanitizer/84285
15767 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15768 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15769 -static-lib*san.
15770
15771 PR debug/84252
15772 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15773 PARALLEL incoming that failed vt_get_decl_and_offset check.
15774
15775 PR middle-end/84237
15776 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15777 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15778 TREE_READONLY bit.
15779 (get_variable_section): For decls in named .bss* sections pass true as
15780 second argument to bss_initializer_p.
15781
15782 2018-02-09 Marek Polacek <polacek@redhat.com>
15783 Jakub Jelinek <jakub@redhat.com>
15784
15785 PR c++/83659
15786 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15787 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15788 Sync some changes from cxx_fold_indirect_ref.
15789
15790 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15791
15792 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15793 markers.
15794 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15795 (BLOCK_INLINE_ENTRY_LABEL): New.
15796 (dwarf2out_var_location): Disregard inline entry markers.
15797 (inline_entry_data): New struct.
15798 (inline_entry_data_hasher): New hashtable type.
15799 (inline_entry_data_hasher::hash): New.
15800 (inline_entry_data_hasher::equal): New.
15801 (inline_entry_data_table): New variable.
15802 (add_high_low_attributes): Add DW_AT_entry_pc and
15803 DW_AT_GNU_entry_view attributes if a pending entry is found
15804 in inline_entry_data_table. Add old entry_pc attribute only
15805 if debug nonbinding markers are disabled.
15806 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15807 markers are enabled.
15808 (block_within_block_p, dwarf2out_inline_entry): New.
15809 (dwarf2out_finish): Check that no entries remained in
15810 inline_entry_data_table.
15811 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15812 (final_scan_insn, notice_source_line): Likewise.
15813 (rest_of_clean_state): Skip inline entry markers.
15814 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15815 markers.
15816 * gimple.c (gimple_build_debug_inline_entry): New.
15817 * gimple.h (enum gimple_debug_subcode): Add
15818 GIMPLE_DEBUG_INLINE_ENTRY.
15819 (gimple_build_debug_inline_entry): Declare.
15820 (gimple_debug_inline_entry_p): New.
15821 (gimple_debug_nonbind_marker_p): Adjust.
15822 * insn-notes.def (INLINE_ENTRY): New.
15823 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15824 inline entry marker notes.
15825 (print_insn): Likewise.
15826 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15827 (INSN_DEBUG_MARKER_KIND): Likewise.
15828 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15829 * tree-inline.c (expand_call_inline): Build and insert
15830 debug_inline_entry stmt.
15831 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15832 inline entry blocks early, if nonbind markers are enabled.
15833 (dump_scope_block): Dump fragment info.
15834 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15835 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15836 (gimple_build_debug_inline_entry): New.
15837 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15838 Enable/disable inline entry points too.
15839 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15840 (DEBUG_INSN): Describe inline entry markers.
15841
15842 * common.opt (gvariable-location-views): New.
15843 (gvariable-location-views=incompat5): New.
15844 * config.in: Rebuilt.
15845 * configure: Rebuilt.
15846 * configure.ac: Test assembler for view support.
15847 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15848 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15849 * dwarf2out.c (var_loc_view): New typedef.
15850 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15851 (dwarf2out_locviews_in_attribute): New.
15852 (dwarf2out_locviews_in_loclist): New.
15853 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15854 (enum dw_line_info_opcode): Add LI_adv_address.
15855 (struct dw_line_info_table): Add view.
15856 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15857 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15858 (zero_view_p): New variable.
15859 (ZERO_VIEW_P): New macro.
15860 (output_asm_line_debug_info): New.
15861 (struct var_loc_node): Add view.
15862 (add_AT_view_list, AT_loc_list): New.
15863 (add_var_loc_to_decl): Add view param. Test it against last.
15864 (new_loc_list): Add view params. Record them.
15865 (AT_loc_list_ptr): Handle loc and view lists.
15866 (view_list_to_loc_list_val_node): New.
15867 (print_dw_val): Handle dw_val_class_view_list.
15868 (size_of_die): Likewise.
15869 (value_format): Likewise.
15870 (loc_list_has_views): New.
15871 (gen_llsym): Set vl_symbol too.
15872 (maybe_gen_llsym, skip_loc_list_entry): New.
15873 (dwarf2out_maybe_output_loclist_view_pair): New.
15874 (output_loc_list): Output view list or entries too.
15875 (output_view_list_offset): New.
15876 (output_die): Handle dw_val_class_view_list.
15877 (output_dwarf_version): New.
15878 (output_compilation_unit_header): Use it.
15879 (output_skeleton_debug_sections): Likewise.
15880 (output_rnglists, output_line_info): Likewise.
15881 (output_pubnames, output_aranges): Update version comments.
15882 (output_one_line_info_table): Output view numbers in asm comments.
15883 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15884 Call maybe_gen_llsym.
15885 (loc_list_from_tree_1): Adjust.
15886 (add_AT_location_description): Create view list attribute if
15887 needed, check it's absent otherwise.
15888 (convert_cfa_to_fb_loc_list): Adjust.
15889 (maybe_emit_file): Call output_asm_line_debug_info for test.
15890 (dwarf2out_var_location): Reset views as needed. Precompute
15891 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15892 attribute. Set view.
15893 (new_line_info_table): Reset next view.
15894 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15895 (dwarf2out_source_line): Likewise. Output view resets and labels to
15896 the assembler, or select appropriate line info opcodes.
15897 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15898 (optimize_string_length): Catch it. Adjust.
15899 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15900 dw_val_class_view_list, and remove it if no longer needed.
15901 (hash_loc_list): Hash view numbers.
15902 (loc_list_hasher::equal): Compare them.
15903 (optimize_location_lists): Check whether a view list symbol is
15904 needed, and whether the locview attribute is present, and
15905 whether they match. Remove the locview attribute if no longer
15906 needed.
15907 (index_location_lists): Call skip_loc_list_entry for test.
15908 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15909 Use output_dwarf_version.
15910 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15911 (struct dw_val_node): Add val_view_list.
15912 * final.c (SEEN_NEXT_VIEW): New.
15913 (set_next_view_needed): New.
15914 (clear_next_view_needed): New.
15915 (maybe_output_next_view): New.
15916 (final_start_function): Rename to...
15917 (final_start_function_1): ... this. Take pointer to FIRST,
15918 add SEEN parameter. Emit param bindings in the initial view.
15919 (final_start_function): Reintroduce SEEN-less interface.
15920 (final): Rename to...
15921 (final_1): ... this. Take SEEN parameter. Output final pending
15922 next view at the end.
15923 (final): Reintroduce seen-less interface.
15924 (final_scan_insn): Output pending next view before switching
15925 sections or ending a block. Mark the next view as needed when
15926 outputting variable locations. Notify debug backend of section
15927 changes, and of location view changes.
15928 (rest_of_handle_final): Adjust.
15929 * toplev.c (process_options): Autodetect value for debug variable
15930 location views option. Warn on incompat5 without -gdwarf-5.
15931 * doc/invoke.texi (gvariable-location-views): New.
15932 (gvariable-location-views=incompat5): New.
15933 (gno-variable-location-views): New.
15934
15935 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15936
15937 PR tree-optimization/84136
15938 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15939 that the result of find_edge is non-NULL.
15940
15941 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15942
15943 PR target/83008
15944 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15945 storing integer register in SImode. Fix cost of 256 and 512
15946 byte aligned SSE register store.
15947
15948 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15949
15950 * config/i386/i386.c (ix86_multiplication_cost): Fix
15951 multiplication cost for TARGET_AVX512DQ.
15952
15953 2018-02-08 Marek Polacek <polacek@redhat.com>
15954
15955 PR tree-optimization/84238
15956 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15957 get_range_strlen.
15958
15959 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15960
15961 PR tree-optimization/84265
15962 * tree-vect-stmts.c (vectorizable_store): Don't treat
15963 VMAT_CONTIGUOUS accesses as grouped.
15964 (vectorizable_load): Likewise.
15965
15966 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15967
15968 PR tree-optimization/81635
15969 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15970 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15971 (test_round_for_mask): New functions.
15972 (wide_int_cc_tests): Call test_round_for_mask.
15973 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15974 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15975 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15976 range returned by get_range_info.
15977
15978 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15979
15980 PR ipa/81360
15981 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15982 * symtab.c: Include builtins.h
15983 (symtab_node::output_to_lto_symbol_table_p): Move here
15984 from lto-streamer-out.c:output_symbol_p.
15985 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15986 (output_symbol_p): Move all logic to symtab.c
15987 (produce_symtab): Update.
15988
15989 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15990
15991 * config/s390/s390-opts.h (enum indirect_branch): Define.
15992 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15993 (s390_indirect_branch_via_thunk)
15994 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15995 (enum s390_indirect_branch_type): Define.
15996 * config/s390/s390.c (struct s390_frame_layout, struct
15997 machine_function): Remove.
15998 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15999 (indirect_branch_table_label_no, indirect_branch_table_name):
16000 Define variables.
16001 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16002 (enum s390_indirect_branch_option): Define.
16003 (s390_return_addr_from_memory): New function.
16004 (s390_handle_string_attribute): New function.
16005 (s390_attribute_table): Add new attribute handler.
16006 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16007 (s390_indirect_branch_via_thunk): New function.
16008 (s390_indirect_branch_via_inline_thunk): New function.
16009 (s390_function_ok_for_sibcall): When jumping via thunk disallow
16010 sibling call optimization for non z10 compiles.
16011 (s390_emit_call): Force indirect branch target to be a single
16012 register. Add r1 clobber for non-z10 compiles.
16013 (s390_emit_epilogue): Emit return jump via return_use expander.
16014 (s390_reorg): Handle JUMP_INSNs as execute targets.
16015 (s390_option_override_internal): Perform validity checks for the
16016 new command line options.
16017 (s390_indirect_branch_attrvalue): New function.
16018 (s390_indirect_branch_settings): New function.
16019 (s390_set_current_function): Invoke s390_indirect_branch_settings.
16020 (s390_output_indirect_thunk_function): New function.
16021 (s390_code_end): Implement target hook.
16022 (s390_case_values_threshold): Implement target hook.
16023 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16024 macros.
16025 * config/s390/s390.h (struct s390_frame_layout)
16026 (struct machine_function): Move here from s390.c.
16027 (TARGET_INDIRECT_BRANCH_NOBP_RET)
16028 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16029 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16030 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16031 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16032 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16033 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16034 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16035 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16036 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16037 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16038 (mnemonic attribute): Add values which aren't recognized
16039 automatically.
16040 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16041 pattern for branch conversion. Fix mnemonic attribute.
16042 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16043 indirect branch via thunk if requested.
16044 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16045 ("*indirect_jump"): Disable for branch conversion using out of
16046 line thunks.
16047 ("indirect_jump_via_thunk<mode>_z10")
16048 ("indirect_jump_via_thunk<mode>")
16049 ("indirect_jump_via_inlinethunk<mode>_z10")
16050 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16051 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16052 ("casesi_jump_via_inlinethunk<mode>_z10")
16053 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16054 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16055 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16056 ("*indirect2_jump"): Disable for branch conversion.
16057 ("casesi_jump"): Turn into expander and expand patterns for branch
16058 conversion.
16059 ("return_use"): New expander.
16060 ("*return"): Emit return via thunk and rename it to ...
16061 ("*return<mode>"): ... this one.
16062 * config/s390/s390.opt: Add new options and and enum for the
16063 option values.
16064
16065 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16066
16067 * lra-constraints.c (match_reload): Unconditionally use
16068 gen_lowpart_SUBREG, rather than selecting between that
16069 and equivalent gen_rtx_SUBREG code.
16070
16071 2018-02-08 Richard Biener <rguenther@suse.de>
16072
16073 PR tree-optimization/84233
16074 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16075 changed flag instead of boguously re-using phi_inserted.
16076
16077 2018-02-08 Martin Jambor <mjambor@suse.cz>
16078
16079 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16080 static local variables.
16081
16082 2018-02-08 Richard Biener <rguenther@suse.de>
16083
16084 PR tree-optimization/84278
16085 * tree-vect-stmts.c (vectorizable_store): When looking for
16086 smaller vector types to perform grouped strided loads/stores
16087 make sure the mode is supported by the target.
16088 (vectorizable_load): Likewise.
16089
16090 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16091
16092 * config/aarch64/aarch64.c (aarch64_components_for_bb):
16093 Increase LDP/STP opportunities by adding adjacent callee-saves.
16094
16095 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16096
16097 PR rtl-optimization/84068
16098 PR rtl-optimization/83459
16099 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16100
16101 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
16102
16103 PR tree-optimization/84224
16104 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16105 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16106 non-zero arguments.
16107
16108 2018-02-07 Iain Sandoe <iain@codesourcery.com>
16109
16110 PR target/84113
16111 * config/rs6000/altivec.md (*restore_world): Remove LR use.
16112 * config/rs6000/predicates.md (restore_world_operation): Adjust op
16113 count, remove one USE.
16114
16115 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
16116
16117 * doc/install.texi (Configuration): Document the
16118 --with-long-double-format={ibm,ieee} PowerPC configuration
16119 options.
16120
16121 PR target/84154
16122 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16123 Convert from define_expand to be define_insn_and_split. Rework
16124 float/double/_Float128 conversions to QI/HI/SImode to work with
16125 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
16126 conversions to QI/HImode types did a store and then a load to
16127 truncate the value. For conversions to VSX registers, don't split
16128 the insn, instead emit the code directly. Use the code iterator
16129 any_fix to combine signed and unsigned conversions.
16130 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16131 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16132 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16133 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16134 (fix_<mode>di2_hw): Likewise.
16135 (fixuns_<mode>di2_hw): Likewise.
16136 (fix_<mode>si2_hw): Likewise.
16137 (fixuns_<mode>si2_hw): Likewise.
16138 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16139 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16140 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16141 fix<uns>_trunc<SFDF:mode>si2_p8.
16142 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16143 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16144 (fix<uns>_<mode>_mem): Likewise.
16145 (fctiw<u>z_<mode>_mem): Likewise.
16146 (fix<uns>_<mode>_mem): Likewise.
16147 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16148 the register allocator from doing a direct move to the GPRs to do
16149 a store, and instead use the ISA 3.0 store byte/half-word from
16150 vector register instruction. For IEEE 128-bit floating point,
16151 also optimize stores of 32-bit ints.
16152 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16153
16154 2018-02-07 Alan Hayward <alan.hayward@arm.com>
16155
16156 * genextract.c (push_pathstr_operand): New function to support
16157 [a-zA-Z].
16158 (walk_rtx): Call push_pathstr_operand.
16159 (print_path): Support [a-zA-Z].
16160
16161 2018-02-07 Richard Biener <rguenther@suse.de>
16162
16163 PR tree-optimization/84037
16164 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16165 (cse_and_gimplify_to_preheader): Declare.
16166 (vect_get_place_in_interleaving_chain): Likewise.
16167 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16168 ivexpr_map.
16169 (_loop_vec_info::~_loop_vec_info): Delete it.
16170 (cse_and_gimplify_to_preheader): New function.
16171 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16172 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16173 (vectorizable_load): Likewise. For grouped stores always base
16174 the IV on the first element.
16175 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16176 condition before gimplifying.
16177
16178 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16179
16180 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16181 *DIV_EXPR and *MOD_EXPR.
16182
16183 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
16184
16185 PR target/84248
16186 * config/i386/i386.c (ix86_option_override_internal): Mask out
16187 the CF_SET bit when checking -fcf-protection.
16188
16189 2018-02-07 Tom de Vries <tom@codesourcery.com>
16190
16191 PR libgomp/84217
16192 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16193 enough.
16194
16195 2018-02-07 Richard Biener <rguenther@suse.de>
16196
16197 PR tree-optimization/84204
16198 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16199 this place.
16200
16201 PR tree-optimization/84205
16202 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16203 special-case isl_ast_op_zdiv_r.
16204
16205 PR tree-optimization/84223
16206 * graphite-scop-detection.c (gather_bbs::before_dom_children):
16207 Only add conditions from within the region.
16208 (gather_bbs::after_dom_children): Adjust.
16209
16210 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
16211
16212 PR target/84209
16213 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16214 * config/avr/avr.md: Only post-reload split REG-REG moves if
16215 either register is GENERAL_REG_P.
16216
16217 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16218
16219 PR tree-optimization/84235
16220 * tree-ssa-scopedtables.c
16221 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16222 if the subtraction is performed in floating point type where NaNs are
16223 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16224 build 1. Formatting fix.
16225
16226 2018-02-06 Jakub Jelinek <jakub@redhat.com>
16227
16228 PR target/84146
16229 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16230 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16231 and skip it regardless of bb boundaries. Use CALL_P macro,
16232 don't test INSN_P (insn) together with CALL_P or JUMP_P check
16233 unnecessarily, formatting fix.
16234
16235 2018-02-06 Michael Collison <michael.collison@arm.com>
16236
16237 * config/arm/thumb2.md:
16238 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16239 (*thumb_mov_notscc): Ditto.
16240
16241 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
16242
16243 PR target/84154
16244 * config/rs6000/rs6000.md (su code attribute): Use "u" for
16245 unsigned_fix, not "s".
16246
16247 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16248
16249 * configure.ac (gcc_fn_eh_frame_ro): New function.
16250 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16251 correct .eh_frame permissions.
16252 * configure: Regenerate.
16253
16254 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
16255
16256 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16257 irrelevant options.
16258
16259 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16260
16261 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16262 Display warning message for -mno-speculate-indirect-jumps.
16263
16264 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
16265
16266 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16267 Undocumented.
16268 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16269
16270 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
16271
16272 PR tree-optimization/84225
16273 * tree-eh.c (find_trapping_overflow): Only call
16274 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16275
16276 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16277
16278 PR target/84145
16279 * config/i386/i386.c: Reimplement the check of possible options
16280 -mibt/-mshstk conbination. Change error messages.
16281 * doc/invoke.texi: Fix a typo: remove extra '='.
16282
16283 2018-02-06 Marek Polacek <polacek@redhat.com>
16284
16285 PR tree-optimization/84228
16286 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16287
16288 2018-02-06 Tamar Christina <tamar.christina@arm.com>
16289
16290 PR target/82641
16291 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16292 emitted arch directives.
16293 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16294 __ARM_FEATURE_COPROC before changing architectures.
16295
16296 2018-02-06 Richard Biener <rguenther@suse.de>
16297
16298 * config/i386/i386.c (print_reg): Fix typo.
16299 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16300
16301 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
16302
16303 * configure: Regenerate.
16304
16305 2018-02-05 Martin Sebor <msebor@redhat.com>
16306
16307 PR tree-optimization/83369
16308 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16309 inlining context.
16310
16311 2018-02-05 Martin Liska <mliska@suse.cz>
16312
16313 * doc/invoke.texi: Cherry-pick upstream r323995.
16314
16315 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
16316
16317 * ira.c (ira_init_register_move_cost): Adjust comment.
16318
16319 2018-02-05 Martin Liska <mliska@suse.cz>
16320
16321 PR gcov-profile/84137
16322 * doc/gcov.texi: Fix typo in documentation.
16323
16324 2018-02-05 Martin Liska <mliska@suse.cz>
16325
16326 PR gcov-profile/83879
16327 * doc/gcov.texi: Document necessity of --dynamic-list-data when
16328 using dlopen functionality.
16329
16330 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
16331
16332 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16333 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16334 _mm_maskz_range_ss, _mm_mask_range_round_ss,
16335 _mm_maskz_range_round_ss): New intrinsics.
16336 (__builtin_ia32_rangesd128_round)
16337 (__builtin_ia32_rangess128_round): Remove.
16338 (__builtin_ia32_rangesd128_mask_round,
16339 __builtin_ia32_rangess128_mask_round): New builtins.
16340 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16341 __builtin_ia32_rangess128_round): Remove.
16342 (__builtin_ia32_rangesd128_mask_round,
16343 __builtin_ia32_rangess128_mask_round): New builtins.
16344 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16345 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16346 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16347 "<round_saeonly_constraint>")): Changed to ...
16348 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16349 "<round_saeonly_scalar_constraint>")): ... this.
16350 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16351 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16352 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16353 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16354 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16355
16356 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
16357
16358 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16359 options.
16360 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16361 Remove all values except native, 8540 and 8548.
16362
16363 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
16364
16365 * config/i386/i386.c (ix86_output_function_return): Pass
16366 INVALID_REGNUM, instead of -1, as invalid register number to
16367 indirect_thunk_name and output_indirect_thunk.
16368
16369 2018-02-02 Julia Koval <julia.koval@intel.com>
16370
16371 * config.gcc: Add -march=icelake.
16372 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16373 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16374 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16375 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16376 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16377 (processor_target_table): Add icelake.
16378 (ix86_option_override_internal): Handle new PTAs.
16379 (get_builtin_code_for_version): Handle icelake.
16380 (M_INTEL_COREI7_ICELAKE): New.
16381 (fold_builtin_cpu): Handle icelake.
16382 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16383 * doc/invoke.texi: Add -march=icelake.
16384
16385 2018-02-02 Julia Koval <julia.koval@intel.com>
16386
16387 * config/i386/i386.c (ix86_option_override_internal): Change flags type
16388 to wide_int_bitmask.
16389 * wide-int-bitmask.h: New.
16390
16391 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16392
16393 PR target/84066
16394 * config/i386/i386.md: Replace Pmode with word_mode in
16395 builtin_setjmp_setup and builtin_longjmp to support x32.
16396
16397 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
16398
16399 PR target/56010
16400 PR target/83743
16401 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16402 #include "opts.h".
16403 (rs6000_supported_cpu_names): New static variable.
16404 (linux_cpu_translation_table): Likewise.
16405 (elf_platform) <cpu>: Define new static variable and use it.
16406 Translate kernel AT_PLATFORM name to canonical name if needed.
16407 Error if platform name is unknown.
16408
16409 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16410
16411 PR target/84089
16412 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16413
16414 2018-02-01 Jeff Law <law@redhat.com>
16415
16416 PR target/84128
16417 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16418 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16419 the scratch if RELEASE_VIA_POP is false.
16420 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16421 If we have to save a temporary register, decrement SIZE appropriately.
16422 Pass new arguments to release_scratch_register_on_entry.
16423 (ix86_adjust_stack_and_probe): Likewise.
16424 (ix86_emit_probe_stack_range): Pass new arguments to
16425 release_scratch_register_on_entry.
16426
16427 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16428
16429 PR rtl-optimization/84157
16430 * combine.c (change_zero_ext): Use REG_P predicate in
16431 front of HARD_REGISTER_P predicate.
16432
16433 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16434
16435 * config/avr/avr.c (avr_option_override): Move disabling of
16436 -fdelete-null-pointer-checks to...
16437 * common/config/avr/avr-common.c (avr_option_optimization_table):
16438 ...here.
16439
16440 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16441
16442 PR tree-optimization/81635
16443 * tree-data-ref.c (split_constant_offset_1): For types that
16444 wrap on overflow, try to use range info to prove that wrapping
16445 cannot occur.
16446
16447 2018-02-01 Renlin Li <renlin.li@arm.com>
16448
16449 PR target/83370
16450 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16451 TAILCALL_ADDR_REGS.
16452 (aarch64_register_move_cost): Likewise.
16453 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16454 TAILCALL_ADDR_REGS.
16455 (REG_CLASS_NAMES): Likewise.
16456 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16457 TAILCALL_ADDR_REGS. Remove IP registers.
16458 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16459
16460 2018-02-01 Richard Biener <rguenther@suse.de>
16461
16462 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16463 for specifying RPO order and allow NULL for that.
16464 * domwalk.c (dom_walker::dom_walker): Likewise.
16465 (dom_walker::walk): Handle NULL RPO order.
16466 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16467 in RPO order.
16468 (rewrite_update_dom_walker): Likewise.
16469 (mark_def_dom_walker): Likewise.
16470
16471 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16472
16473 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16474 (aarch64_maybe_expand_sve_subreg_move): Declare.
16475 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16476 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16477 predicate.
16478 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16479 that are semantically a reverse operation.
16480 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16481 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16482 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16483 functions.
16484 (aarch64_can_change_mode_class): For big-endian, forbid changes
16485 between two SVE modes if they have different element sizes.
16486
16487 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16488
16489 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16490 the TImode handling for big-endian targets.
16491
16492 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16493
16494 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16495 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16496 not just bytes.
16497 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16498 Remove BSWAP handing for big-endian targets and use the form of
16499 LD1RQ appropariate for the mode.
16500
16501 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16502
16503 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16504 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16505 duplicated element.
16506
16507 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16508
16509 PR tearget/83845
16510 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16511 check for operands that need to go through aarch64_sve_reload_be.
16512
16513 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16514
16515 PR tree-optimization/81661
16516 PR tree-optimization/84117
16517 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16518 * tree-eh.c: Include gimplify.h.
16519 (find_trapping_overflow, replace_trapping_overflow,
16520 rewrite_to_non_trapping_overflow): New functions.
16521 * tree-vect-loop.c: Include tree-eh.h.
16522 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16523 * tree-data-ref.c: Include tree-eh.h.
16524 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16525
16526 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
16527
16528 PR rtl-optimization/84123
16529 * combine.c (change_zero_ext): Check if hard register satisfies
16530 can_change_dest_mode before calling gen_lowpart_SUBREG.
16531
16532 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
16533
16534 PR target/82444
16535 * ira.c (ira_init_register_move_cost): Remove assert.
16536
16537 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16538
16539 PR rtl-optimization/84071
16540 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16541 * doc/tm.texi: Regenerate.
16542
16543 2018-01-31 Richard Biener <rguenther@suse.de>
16544
16545 PR tree-optimization/84132
16546 * tree-data-ref.c (analyze_miv_subscript): Properly
16547 check whether evolution_function_is_affine_multivariate_p
16548 before calling gcd_of_steps_may_divide_p.
16549
16550 2018-01-31 Julia Koval <julia.koval@intel.com>
16551
16552 PR target/83618
16553 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16554 * config/i386/i386.md (rdpid_rex64) New.
16555 (rdpid): Make 32bit only.
16556
16557 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
16558
16559 PR lto/84105
16560 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16561 an IDENTIFIER_NODE for FUNCTION_TYPE's.
16562
16563 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16564
16565 Revert
16566 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16567
16568 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16569
16570 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16571
16572 PR rtl-optimization/84071
16573 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16574 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16575
16576 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16577
16578 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16579 (arc_attribute_table): Add 'aux' attribute.
16580 (arc_in_small_data_p): Consider aux like variables.
16581 (arc_is_aux_reg_p): New function.
16582 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16583 (arc_get_aux_arg): New function.
16584 (prepare_move_operands): Handle aux-register access.
16585 (arc_handle_aux_attribute): New function.
16586 * doc/extend.texi (ARC Variable attributes): Add subsection.
16587
16588 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16589
16590 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16591 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16592 (arc_attribute_table): Add 'uncached' attribute.
16593 (arc_print_operand): Print '.di' flag for uncached memory
16594 accesses.
16595 (arc_in_small_data_p): Do not consider for small data the uncached
16596 types.
16597 (arc_is_uncached_mem_p): New function.
16598 * config/arc/predicates.md (compact_store_memory_operand): Check
16599 for uncached memory accesses.
16600 (nonvol_nonimm_operand): Likewise.
16601 * doc/extend.texi (ARC Type Attribute): New subsection.
16602
16603 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16604
16605 PR c/84100
16606 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16607 falign-loops=): Add Optimization flag.
16608
16609 2018-01-30 Jeff Law <law@redhat.com>
16610
16611 PR target/84064
16612 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16613 INT_REGISTERS_SAVED. Check it prior to calling
16614 get_scratch_register_on_entry.
16615 (ix86_adjust_stack_and_probe): Similarly.
16616 (ix86_emit_probe_stack_range): Similarly.
16617 (ix86_expand_prologue): Corresponding changes.
16618
16619 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16620
16621 PR target/40411
16622 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16623 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16624
16625 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16626
16627 PR target/84112
16628 * lra-constraints.c (curr_insn_transform): Process AND in the
16629 address.
16630
16631 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16632
16633 PR rtl-optimization/83986
16634 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16635 dependence against last_pending_memory_flush in addition to
16636 pending_jump_insns.
16637
16638 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16639
16640 PR tree-optimization/81611
16641 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16642 copies.
16643
16644 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16645
16646 PR target/83758
16647 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16648 a reg rtx.
16649
16650 2018-01-30 Richard Biener <rguenther@suse.de>
16651 Jakub Jelinek <jakub@redhat.com>
16652
16653 PR tree-optimization/84111
16654 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16655 inner loops added during recursion, as they don't have up-to-date
16656 SSA form.
16657
16658 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16659
16660 PR ipa/81360
16661 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16662 (can_inline_edge_by_limits_p): ... here.
16663 (can_early_inline_edge_p, check_callers,
16664 update_caller_keys, update_callee_keys, recursive_inlining,
16665 add_new_edges_to_heap, speculation_useful_p,
16666 inline_small_functions,
16667 inline_small_functions, flatten_function,
16668 inline_to_all_callers_1): Update.
16669
16670 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16671
16672 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16673 zeros correctly.
16674
16675 2018-01-30 Richard Biener <rguenther@suse.de>
16676
16677 PR tree-optimization/83008
16678 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16679 invariant and constant vector uses in stmts when they need
16680 more than one stmt.
16681
16682 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16683
16684 PR bootstrap/84017
16685 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16686 * configure: Regenerate.
16687
16688 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16689
16690 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16691 pattern.
16692 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16693 Use gen_rtx_REG rather than gen_lowpart.
16694
16695 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16696
16697 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16698 rather than 0 when creating partial subregs.
16699
16700 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16701
16702 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16703 of usage.
16704
16705 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16706
16707 PR target/81550
16708 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16709 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16710 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16711 flags. This restores the settings used before the 2017-07-24.
16712 Turning off pre increment/decrement/modify allows IVOPTS to
16713 optimize DF/SF loops where the index is an int.
16714
16715 2018-01-29 Richard Biener <rguenther@suse.de>
16716 Kelvin Nilsen <kelvin@gcc.gnu.org>
16717
16718 PR bootstrap/80867
16719 * tree-vect-stmts.c (vectorizable_call): Don't call
16720 targetm.vectorize_builtin_md_vectorized_function if callee is
16721 NULL.
16722
16723 2018-01-22 Carl Love <cel@us.ibm.com>
16724
16725 * doc/extend.tex: Fix typo in second arg in
16726 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16727
16728 2018-01-29 Richard Biener <rguenther@suse.de>
16729
16730 PR tree-optimization/84086
16731 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16732 (flush_ssaname_freelist): When SSA names were released reset
16733 the SCEV hash table.
16734
16735 2018-01-29 Richard Biener <rguenther@suse.de>
16736
16737 PR tree-optimization/84057
16738 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16739 removed paths when removing edges.
16740
16741 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16742
16743 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16744 -mfunction-return=@var{choice}.
16745
16746 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16747
16748 PR diagnostic/84034
16749 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16750 Handle CR like TAB.
16751 (layout::print_source_line): Likewise.
16752 (test_get_line_width_without_trailing_whitespace): Add test cases.
16753
16754 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16755
16756 PR middle-end/84040
16757 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16758 debug insns.
16759
16760 2018-01-26 Jim Wilson <jimw@sifive.com>
16761
16762 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16763
16764 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16765 specified.
16766
16767 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16768
16769 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16770 and CMP + SUB-immediate -> SUBS.
16771
16772 2018-01-26 Martin Sebor <msebor@redhat.com>
16773
16774 PR tree-optimization/83896
16775 * tree-ssa-strlen.c (get_string_len): Rename...
16776 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16777 Avoid assuming length is constant.
16778 (handle_char_store): Use HOST_WIDE_INT for string length.
16779
16780 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16781
16782 PR target/81763
16783 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16784 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16785
16786 2018-01-26 Richard Biener <rguenther@suse.de>
16787
16788 PR rtl-optimization/84003
16789 * dse.c (record_store): Only record redundant stores when
16790 the earlier store aliases at least all accesses the later one does.
16791
16792 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16793
16794 PR rtl-optimization/83985
16795 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16796 REG_CFA_RESTORE insns.
16797 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16798 REG_CFA_RESTORE insns here.
16799
16800 PR c/83989
16801 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16802 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16803
16804 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16805
16806 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16807 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16808 (arc_init): Likewise.
16809 (arc_override_options): Likewise.
16810 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16811 value.
16812 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16813 support.
16814 * config/arc/arc.h (TARGET_DBNZ): Define.
16815 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16816 properly set the tune attribute.
16817 (dbnz): Use TARGET_DBNZ guard.
16818 * config/arc/arc.opt (mtune): Add core3 option.
16819
16820 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16821
16822 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16823 recognize new pic like addresses.
16824 (arc_delegitimize_address): Clean up.
16825
16826 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16827
16828 * config/arc/arc-arches.def: Option mrf16 valid for all
16829 architectures.
16830 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16831 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16832 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16833 * config/arc/arc-tables.opt: Regenerate.
16834 * config/arc/arc.c (arc_conditional_register_usage): Handle
16835 reduced register file case.
16836 (arc_file_start): Set must have build attributes.
16837 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16838 mrf16 option value.
16839 * config/arc/arc.opt (mrf16): Add new option.
16840 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16841 * config/arc/genmultilib.awk: Handle new mrf16 option.
16842 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16843 * config/arc/t-multilib: Regenerate.
16844 * doc/invoke.texi (ARC Options): Document mrf16 option.
16845
16846 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16847
16848 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16849 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16850 (arc_attribute_table): Add 'secure_call' attribute.
16851 (arc_print_operand): Print secure call operand.
16852 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16853 secure.
16854 (arc_is_secure_call_p): New function. * config/arc/arc.md
16855 (call_i): Add support for sjli instruction.
16856 (call_value_i): Likewise.
16857 * config/arc/constraints.md (Csc): New constraint.
16858
16859 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16860 John Eric Martin <John.Martin@emmicro-us.com>
16861
16862 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16863 * config/arc/arc.c (_arc_jli_section): New struct.
16864 (arc_jli_section): New type.
16865 (rc_jli_sections): New static variable.
16866 (arc_handle_jli_attribute): New function.
16867 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16868 (arc_file_end): New function.
16869 (TARGET_ASM_FILE_END): Define.
16870 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16871 (arc_add_jli_section): New function.
16872 (jli_call_scan): Likewise.
16873 (arc_reorg): Call jli_call_scan.
16874 (arc_output_addsi): Remove 'S' from printing asm operand.
16875 (arc_is_jli_call_p): New function.
16876 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16877 operand.
16878 (movhi_insn): Likewise.
16879 (movsi_insn): Likewise.
16880 (movsi_set_cc_insn): Likewise.
16881 (loadqi_update): Likewise.
16882 (load_zeroextendqisi_update): Likewise.
16883 (load_signextendqisi_update): Likewise.
16884 (loadhi_update): Likewise.
16885 (load_zeroextendhisi_update): Likewise.
16886 (load_signextendhisi_update): Likewise.
16887 (loadsi_update): Likewise.
16888 (loadsf_update): Likewise.
16889 (movsicc_insn): Likewise.
16890 (bset_insn): Likewise.
16891 (bxor_insn): Likewise.
16892 (bclr_insn): Likewise.
16893 (bmsk_insn): Likewise.
16894 (bicsi3_insn): Likewise.
16895 (cmpsi_cc_c_insn): Likewise.
16896 (movsi_ne): Likewise.
16897 (movsi_cond_exec): Likewise.
16898 (clrsbsi2): Likewise.
16899 (norm_f): Likewise.
16900 (normw): Likewise.
16901 (swap): Likewise.
16902 (divaw): Likewise.
16903 (flag): Likewise.
16904 (sr): Likewise.
16905 (kflag): Likewise.
16906 (ffs): Likewise.
16907 (ffs_f): Likewise.
16908 (fls): Likewise.
16909 (call_i): Remove 'S' asm letter, add jli instruction.
16910 (call_value_i): Likewise.
16911 * config/arc/arc.op (mjli-always): New option.
16912 * config/arc/constraints.md (Cji): New constraint.
16913 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16914 operand.
16915 (subsf3_fpx): Likewise.
16916 (mulsf3_fpx): Likewise.
16917 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16918 asm operand.
16919 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16920 function attrbutes.
16921 * doc/invoke.texi (ARC): Document mjli-always option.
16922
16923 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16924
16925 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16926 avoid addition with 0 and use incw and decw where possible.
16927
16928 2018-01-26 Richard Biener <rguenther@suse.de>
16929
16930 PR tree-optimization/81082
16931 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16932 association if it requires casting to unsigned.
16933 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16934 from fold_plusminus_mult_expr to catch important cases late when
16935 range info is available.
16936
16937 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16938
16939 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16940 * configure.ac (hidden_linkonce): New test.
16941 * configure: Regenerate.
16942 * config.in: Regenerate.
16943
16944 2018-01-26 Julia Koval <julia.koval@intel.com>
16945
16946 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16947 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16948 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16949 _mm_mask_bitshuffle_epi64_mask): Fix type.
16950 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16951 USI_FTYPE_V4DI_V4DI_USI): Remove.
16952 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16953 __builtin_ia32_vpshufbitqmb256_mask,
16954 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16955 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16956 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16957
16958 2018-01-26 Alan Modra <amodra@gmail.com>
16959
16960 PR target/84033
16961 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16962 UNSPEC_VBPERMQ. Sort other unspecs.
16963
16964 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16965
16966 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16967
16968 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16969
16970 PR middle-end/83055
16971 * predict.c (drop_profile): Do not push/pop cfun; update also
16972 node->count.
16973 (handle_missing_profiles): Fix logic looking for zero profiles.
16974
16975 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16976
16977 PR middle-end/83977
16978 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16979 on functions with #pragma omp declare simd or functions with simd
16980 attribute.
16981 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16982 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16983 Remove trailing \n from warning_at calls.
16984
16985 2018-01-25 Tom de Vries <tom@codesourcery.com>
16986
16987 PR target/84028
16988 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16989 for neutered workers.
16990
16991 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16992
16993 PR target/68467
16994 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16995 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16996
16997 2018-01-24 Jeff Law <law@redhat.com>
16998
16999 PR target/83994
17000 * i386.c (get_probe_interval): Move to earlier point.
17001 (ix86_compute_frame_layout): If -fstack-clash-protection and
17002 the frame is larger than the probe interval, then use pushes
17003 to save registers rather than reg->mem moves.
17004 (ix86_expand_prologue): Remove conditional for int_registers_saved
17005 assertion.
17006
17007 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
17008
17009 PR target/84014
17010 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17011 min/max for never referenced object.
17012
17013 2018-01-24 Jakub Jelinek <jakub@redhat.com>
17014
17015 PR middle-end/83977
17016 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17017 here.
17018 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17019 attributes from DECL_ATTRIBUTES (decl) without affecting
17020 DECL_ATTRIBUTES (current_function_decl).
17021 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17022 functions with non-NULL DECL_ABSTRACT_ORIGIN.
17023
17024 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
17025
17026 PR tree-optimization/83979
17027 * fold-const.c (fold_comparison): Use constant_boolean_node
17028 instead of boolean_{true,false}_node.
17029
17030 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
17031
17032 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17033 with zero counts.
17034
17035 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17036
17037 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17038 Simplify the clause that sets the length attribute.
17039 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17040 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17041 clause that sets the length attribute.
17042 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17043
17044 2018-01-24 Tom de Vries <tom@codesourcery.com>
17045
17046 PR target/83589
17047 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17048 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17049 Add strict parameter.
17050 (prevent_branch_around_nothing): Insert dummy insn between branch to
17051 label and label with no ptx insn inbetween.
17052 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17053
17054 2018-01-24 Tom de Vries <tom@codesourcery.com>
17055
17056 PR target/81352
17057 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17058 for neutered threads in warp.
17059 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17060
17061 2018-01-24 Richard Biener <rguenther@suse.de>
17062
17063 PR tree-optimization/83176
17064 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17065 operands.
17066
17067 2018-01-24 Richard Biener <rguenther@suse.de>
17068
17069 PR tree-optimization/82819
17070 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17071 code generating pluses that are no-ops in the target precision.
17072
17073 2018-01-24 Richard Biener <rguenther@suse.de>
17074
17075 PR middle-end/84000
17076 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17077
17078 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17079
17080 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17081 to merge probabilities.
17082 * predict.c (probably_never_executed): Also mark as cold functions
17083 with global 0 profile and guessed local profile.
17084 * profile-count.c (profile_probability::combine_with_count): New
17085 member function.
17086 * profile-count.h (profile_probability::operator*,
17087 profile_probability::operator*=, profile_probability::operator/,
17088 profile_probability::operator/=): Reduce precision to adjusted
17089 and set value to guessed on contradictory divisions.
17090 (profile_probability::combine_with_freq): Remove.
17091 (profile_probability::combine_wiht_count): Declare.
17092 (profile_count::force_nonzero):: Set to adjusted.
17093 (profile_count::probability_in):: Set quality to adjusted.
17094 * tree-ssa-tail-merge.c (replace_block_by): Use
17095 combine_with_count.
17096
17097 2018-01-23 Andrew Waterman <andrew@sifive.com>
17098 Jim Wilson <jimw@sifive.com>
17099
17100 * config/riscv/riscv.c (riscv_stack_boundary): New.
17101 (riscv_option_override): Set riscv_stack_boundary. Handle
17102 riscv_preferred_stack_boundary_arg.
17103 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17104 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17105 (STACK_BOUNDARY): Set to riscv_stack_boundary.
17106 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17107 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17108 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17109
17110 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
17111
17112 PR target/83905
17113 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17114 of struct ix86_frame.
17115 (ix86_expand_epilogue): Likewise. Add a local variable for
17116 the reg_save_offset field in struct ix86_frame.
17117
17118 2018-01-23 Bin Cheng <bin.cheng@arm.com>
17119
17120 PR tree-optimization/82604
17121 * tree-loop-distribution.c (enum partition_kind): New enum item
17122 PKIND_PARTIAL_MEMSET.
17123 (partition_builtin_p): Support above new enum item.
17124 (generate_code_for_partition): Ditto.
17125 (compute_access_range): Differentiate cases that equality can be
17126 proven at all loops, the innermost loops or no loops.
17127 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17128 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
17129 (finalize_partitions, distribute_loop): Don't fuse partition of
17130 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17131 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17132 parloop is enabled.
17133
17134 2018-01-23 Martin Liska <mliska@suse.cz>
17135
17136 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17137 order to ignore the predictor.
17138 (PRED_POLYMORPHIC_CALL): Likewise.
17139 (PRED_RECURSIVE_CALL): Likewise.
17140
17141 2018-01-23 Martin Liska <mliska@suse.cz>
17142
17143 * tree-profile.c (tree_profiling): Print function header to
17144 aware reader which function we are working on.
17145 * value-prof.c (gimple_find_values_to_profile): Do not print
17146 not interesting value histograms.
17147
17148 2018-01-23 Martin Liska <mliska@suse.cz>
17149
17150 * profile-count.h (enum profile_quality): Add
17151 profile_uninitialized as the first value. Do not number values
17152 as they are zero based.
17153 (profile_count::verify): Update sanity check.
17154 (profile_probability::verify): Likewise.
17155
17156 2018-01-23 Nathan Sidwell <nathan@acm.org>
17157
17158 * doc/invoke.texi (ffor-scope): Deprecate.
17159
17160 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17161
17162 PR tree-optimization/83510
17163 * domwalk.c (set_all_edges_as_executable): New function.
17164 (dom_walker::dom_walker): Convert bool param
17165 "skip_unreachable_blocks" to enum reachability. Move setup of
17166 edge flags to set_all_edges_as_executable and only do it when
17167 reachability is REACHABLE_BLOCKS.
17168 * domwalk.h (enum dom_walker::reachability): New enum.
17169 (dom_walker::dom_walker): Convert bool param
17170 "skip_unreachable_blocks" to enum reachability.
17171 (set_all_edges_as_executable): New decl.
17172 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
17173 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17174 "reachability".
17175 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17176 but converting true to REACHABLE_BLOCKS.
17177 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17178 * tree-vrp.c
17179 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17180 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17181 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17182 REACHABLE_BLOCKS.
17183 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17184 if check_all_array_refs will be called.
17185
17186 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17187
17188 * tree.c (selftest::test_location_wrappers): Add more test
17189 coverage.
17190
17191 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17192
17193 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17194 (selftest::test_bit_in_range): Likewise.
17195
17196 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17197
17198 PR testsuite/83888
17199 * doc/sourcebuild.texi (vect_float): Say that the selector
17200 only describes the situation when -funsafe-math-optimizations is on.
17201 (vect_float_strict): Document.
17202
17203 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17204
17205 PR tree-optimization/83965
17206 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17207 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17208 instead of checking only for a reduction.
17209 (vect_recog_widen_sum_pattern): Likewise.
17210
17211 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17212
17213 * predict.c (probably_never_executed): Only use precise profile info.
17214 (compute_function_frequency): Skip after inlining hack since we now
17215 have quality checking.
17216
17217 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17218
17219 * profile-count.h (profile_probability::very_unlikely,
17220 profile_probability::unlikely, profile_probability::even): Set
17221 precision to guessed.
17222
17223 2018-01-23 Richard Biener <rguenther@suse.de>
17224
17225 PR tree-optimization/83963
17226 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17227 Properly terminate dominator walk when crossing the exit edge not
17228 when visiting its source block.
17229
17230 2018-01-23 Jakub Jelinek <jakub@redhat.com>
17231
17232 PR c++/83918
17233 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17234 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17235
17236 2018-01-22 Jakub Jelinek <jakub@redhat.com>
17237
17238 PR tree-optimization/83957
17239 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
17240 semicolon after for body surrounded by braces.
17241
17242 PR tree-optimization/83081
17243 * profile-count.h (profile_probability::split): New method.
17244 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17245 Use profile_probability::split.
17246 (do_compare_rtx_and_jump): Fix adjustment of probabilities
17247 when splitting a single conditional jump into 2.
17248
17249 2018-01-22 David Malcolm <dmalcolm@redhat.com>
17250
17251 PR tree-optimization/69452
17252 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17253 decl.
17254
17255 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17256
17257 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17258 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17259 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17260
17261 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17262
17263 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17264 declaration.
17265 * config/rl78/rl78.md (movdi): New define_expand.
17266 * config/rl78/rl78.c (rl78_split_movdi): New function.
17267
17268 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
17269
17270 PR target/83862
17271 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17272 no longer used.
17273 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17274 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17275 128-bit to produce an UNSPEC move to get the double word with the
17276 signbit and then a shift directly to do signbit.
17277 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17278 implementation with a new version that just does either a direct
17279 move or a regular move. Move memory interface to separate insns.
17280 Move insns so they are next to the expander.
17281 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17282 with signbit move. Split big and little endian case.
17283 (signbit<mode>2_dm_mem_le): Likewise.
17284 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17285 (signbit<mode>2_dm2): Likewise.
17286
17287 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17288
17289 * config/rl78/rl78.md (anddi3): New define_expand.
17290
17291 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17292
17293 * config/rl78/rl78.md (umindi3): New define_expand.
17294
17295 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17296
17297 * config/rl78/rl78.md (smindi3): New define_expand.
17298
17299 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17300
17301 * config/rl78/rl78.md (smaxdi3): New define_expand.
17302
17303 2018-01-22 Carl Love <cel@us.ibm.com>
17304
17305 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17306 LVX_V1TI): Add macro expansion.
17307 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17308 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17309 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17310 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17311 Change check to determine if the instruction is a byte reversing
17312 entry. Fix typo in comment.
17313 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17314 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17315 Add def_builtin calls for new builtins.
17316 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17317 Add define_insn expansion.
17318
17319 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17320
17321 * config/rl78/rl78.md (umaxdi3): New define_expand.
17322
17323 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17324
17325 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17326 for non-QImode registers.
17327
17328 2018-01-22 Richard Biener <rguenther@suse.de>
17329
17330 PR tree-optimization/83963
17331 * graphite-scop-detection.c (scop_detection::get_sese): Delay
17332 including the loop exit block.
17333 (scop_detection::merge_sese): Likewise.
17334 (scop_detection::add_scop): Do it here instead.
17335
17336 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17337
17338 * doc/sourcebuild.texi (arm_softfloat): Document.
17339
17340 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
17341
17342 PR gcc/77734
17343 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17344 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17345 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17346
17347 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17348 David Edelsohn <dje.gcc@gmail.com>
17349
17350 PR target/83946
17351 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17352 Change "crset eq" to "crset 2".
17353 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17354 (*call_indirect_aix<mode>_nospec): Likewise.
17355 (*call_value_indirect_aix<mode>_nospec): Likewise.
17356 (*call_indirect_elfv2<mode>_nospec): Likewise.
17357 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17358 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17359 change assembly output from . to $.
17360 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17361 (indirect_jump<mode>_nospec): Change assembly output from . to $.
17362 (*tablejump<mode>_internal1_nospec): Likewise.
17363
17364 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
17365
17366 PR target/80870
17367 * config/sh/sh_optimize_sett_clrt.cc:
17368 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17369
17370 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
17371
17372 PR tree-optimization/83940
17373 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17374 offset_dt to vect_constant_def rather than vect_unknown_def_type.
17375 (vect_check_load_store_mask): Add a mask_dt_out parameter and
17376 use it to pass back the definition type.
17377 (vect_check_store_rhs): Likewise rhs_dt_out.
17378 (vect_build_gather_load_calls): Add a mask_dt argument and use
17379 it instead of a call to vect_is_simple_use.
17380 (vectorizable_store): Update calls to vect_check_load_store_mask
17381 and vect_check_store_rhs. Use the dt returned by the latter instead
17382 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
17383 instead of calls to vect_is_simple_use. Pass the scalar rather
17384 than the vector operand to vect_is_simple_use when handling
17385 second and subsequent copies of an rhs value.
17386 (vectorizable_load): Update calls to vect_check_load_store_mask
17387 and vect_build_gather_load_calls. Use the cached mask_dt and
17388 gs_info.offset_dt instead of calls to vect_is_simple_use.
17389
17390 2018-01-20 Jakub Jelinek <jakub@redhat.com>
17391
17392 PR middle-end/83945
17393 * tree-emutls.c: Include gimplify.h.
17394 (lower_emutls_2): New function.
17395 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17396 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17397 it before further processing.
17398
17399 PR target/83930
17400 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17401 UINTVAL (trueop1) instead of INTVAL (op1).
17402
17403 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17404
17405 PR debug/81570
17406 PR debug/83728
17407 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17408 INCOMING_FRAME_SP_OFFSET if not defined.
17409 (scan_trace): Add ENTRY argument. If true and
17410 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17411 emit a note to adjust the CFA offset.
17412 (create_cfi_notes): Adjust scan_trace callers.
17413 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17414 INCOMING_FRAME_SP_OFFSET in the CIE.
17415 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17416 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17417 Likewise.
17418 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17419 * doc/tm.texi: Regenerated.
17420
17421 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17422
17423 PR rtl-optimization/83147
17424 * lra-constraints.c (remove_inheritance_pseudos): Use
17425 lra_substitute_pseudo_within_insn.
17426
17427 2018-01-19 Tom de Vries <tom@codesourcery.com>
17428 Cesar Philippidis <cesar@codesourcery.com>
17429
17430 PR target/83920
17431 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17432
17433 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17434
17435 PR target/83790
17436 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17437 spaces for function labels.
17438
17439 2018-01-19 Martin Liska <mliska@suse.cz>
17440
17441 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17442 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17443 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17444 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17445 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17446 (PRED_CONST_RETURN): Change from 69 to 65.
17447 (PRED_NULL_RETURN): Change from 91 to 71.
17448 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17449 (PRED_LOOP_GUARD): Change from 66 to 73.
17450
17451 2018-01-19 Martin Liska <mliska@suse.cz>
17452
17453 * predict.c (predict_insn_def): Add new assert.
17454 (struct branch_predictor): Change type to signed integer.
17455 (test_prediction_value_range): Amend test to cover
17456 PROB_UNINITIALIZED.
17457 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17458 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17459 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17460 (PRED_LOOP_IV_COMPARE): Likewise.
17461 * predict.h (PROB_UNINITIALIZED): Define new constant.
17462
17463 2018-01-19 Martin Liska <mliska@suse.cz>
17464
17465 * predict.c (dump_prediction): Add new format for
17466 analyze_brprob.py script which is enabled with -details
17467 suboption.
17468 * profile-count.h (precise_p): New function.
17469
17470 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17471
17472 PR tree-optimization/83922
17473 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17474 there are no statements that need masking.
17475 (vect_active_double_reduction_p): New function.
17476 (vect_analyze_loop_operations): Use it when handling phis that
17477 are not in the loop header.
17478
17479 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17480
17481 PR tree-optimization/83914
17482 * tree-vect-loop.c (vectorizable_induction): Don't convert
17483 init_expr or apply the peeling adjustment for inductions
17484 that are nested within the vectorized loop.
17485
17486 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17487
17488 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17489 instead of NEG.
17490
17491 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17492
17493 PR sanitizer/81715
17494 PR testsuite/83882
17495 * function.h (gimplify_parameters): Add gimple_seq * argument.
17496 * function.c: Include gimple.h and options.h.
17497 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17498 for the added local temporaries if needed.
17499 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17500 if there are any parameter cleanups, wrap whole body into a
17501 try/finally with the cleanups.
17502
17503 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17504
17505 PR target/82964
17506 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17507 Use GET_MODE_CLASS for scalar floating point.
17508
17509 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17510
17511 PR ipa/82256
17512 patch by PaX Team
17513 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17514 Fix call of call_cgraph_insertion_hooks.
17515
17516 2018-01-18 Martin Sebor <msebor@redhat.com>
17517
17518 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17519
17520 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17521
17522 PR ipa/83619
17523 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17524 frequencies.
17525
17526 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
17527
17528 PR other/70268
17529 * common.opt: (-ffile-prefix-map): New option.
17530 * opts.c (common_handle_option): Defer it.
17531 * opts-global.c (handle_common_deferred_options): Handle it.
17532 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17533 * file-prefix-map.h: New file.
17534 (remap_debug_filename, add_debug_prefix_map): ...here.
17535 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17536 * final.c (debug_prefix_map, add_debug_prefix_map
17537 remap_debug_filename): Move to...
17538 * file-prefix-map.c: New file.
17539 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17540 generalize, get rid of alloca(), use strrchr() instead of strchr().
17541 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17542 Implement in terms of add_prefix_map().
17543 (remap_macro_filename, remap_debug_filename): Implement in term of
17544 remap_filename().
17545 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17546 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17547 * dbxout.c: Include file-prefix-map.h.
17548 * varasm.c: Likewise.
17549 * vmsdbgout.c: Likewise.
17550 * xcoffout.c: Likewise.
17551 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17552 * doc/cppopts.texi (-fmacro-prefix-map): Document.
17553 * doc/invoke.texi (-ffile-prefix-map): Document.
17554 (-fdebug-prefix-map): Update description.
17555
17556 2018-01-18 Martin Liska <mliska@suse.cz>
17557
17558 * config/i386/i386.c (indirect_thunk_name): Document that also
17559 lfence is emitted.
17560 (output_indirect_thunk): Document why both instructions
17561 (pause and lfence) are generated.
17562
17563 2018-01-18 Richard Biener <rguenther@suse.de>
17564
17565 PR tree-optimization/83887
17566 * graphite-scop-detection.c
17567 (scop_detection::get_nearest_dom_with_single_entry): Remove.
17568 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17569 (scop_detection::merge_sese): Re-implement with a flood-fill
17570 algorithm that properly finds a SESE region if it exists.
17571
17572 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17573
17574 PR c/61240
17575 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17576 pointer_diff optimizations use view_convert instead of convert.
17577
17578 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17579
17580 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17581 Generate different code for -mno-speculate-indirect-jumps.
17582 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17583 (*call_indirect_aix<mode>): Disable for
17584 -mno-speculate-indirect-jumps.
17585 (*call_indirect_aix<mode>_nospec): New define_insn.
17586 (*call_value_indirect_aix<mode>): Disable for
17587 -mno-speculate-indirect-jumps.
17588 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17589 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17590 -mno-speculate-indirect-jumps.
17591 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17592
17593 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17594
17595 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17596 long double type, set the flags for noting the default long double
17597 type, even if we don't pass or return a long double type.
17598
17599 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17600
17601 PR ipa/83051
17602 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17603 failure.
17604
17605 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17606
17607 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17608 support for merge[hl].
17609 (fold_mergehl_helper): New helper function.
17610 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17611 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17612 (altivec_vmrglw_direct): Add xxmrglw insn.
17613
17614 2018-01-17 Andrew Waterman <andrew@sifive.com>
17615
17616 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17617 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17618
17619 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17620
17621 PR lto/83121
17622 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17623 call the lto_location_cache before reading the
17624 DECL_SOURCE_LOCATION of the types.
17625
17626 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17627 Richard Sandiford <richard.sandiford@linaro.org>
17628
17629 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17630 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17631 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17632 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17633 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17634 Add declaration.
17635 * config/aarch64/constraints.md (aarch64_movti_operand):
17636 Limit immediates.
17637 * config/aarch64/predicates.md (Uti): Add new constraint.
17638
17639 2018-01-17 Carl Love <cel@us.ibm.com>
17640
17641 * config/rs6000/vsx.md (define_expand xl_len_r,
17642 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17643 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17644 lxvll.
17645 (define_expand, define_insn): Move the shift left from the
17646 define_insn to the define_expand for lxvl and stxvl instructions.
17647 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17648 and XL_LEN_R definitions to PURE.
17649
17650 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17651
17652 * config/i386/i386.c (indirect_thunk_name): Declare regno
17653 as unsigned int. Compare regno with INVALID_REGNUM.
17654 (output_indirect_thunk): Ditto.
17655 (output_indirect_thunk_function): Ditto.
17656 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17657 in the call to output_indirect_thunk_function.
17658
17659 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17660
17661 PR middle-end/83884
17662 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17663 rather than the size of inner_type to determine the stack slot size
17664 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17665
17666 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17667
17668 PR target/83546
17669 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17670 to PTA_SILVERMONT.
17671
17672 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17673
17674 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17675 endian Linux systems to optionally enable multilibs for selecting
17676 the long double type if the user configured an explicit type.
17677 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17678 have no long double multilibs if not defined.
17679 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17680 warn if the user used -mabi={ieee,ibm}longdouble and we built
17681 multilibs for long double.
17682 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17683 appropriate multilib option.
17684 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17685 multilib options.
17686 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17687 for building long double multilibs.
17688 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17689
17690 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17691
17692 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17693 copies.
17694
17695 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17696 64 bits.
17697 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17698 128 bits.
17699
17700 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17701 variables.
17702
17703 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17704 return value.
17705
17706 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17707
17708 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17709 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17710
17711 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17712
17713 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17714 different rtl trees depending on TARGET_64BIT.
17715 (rs6000_gen_lvx): Likewise.
17716
17717 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17718
17719 * config/visium/visium.md (nop): Tweak comment.
17720 (hazard_nop): Likewise.
17721
17722 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17723
17724 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17725 -mspeculate-indirect-jumps.
17726 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17727 for -mno-speculate-indirect-jumps.
17728 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17729 (*call_value_indirect_elfv2<mode>): Disable for
17730 -mno-speculate-indirect-jumps.
17731 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17732 (indirect_jump): Emit different RTL for
17733 -mno-speculate-indirect-jumps.
17734 (*indirect_jump<mode>): Disable for
17735 -mno-speculate-indirect-jumps.
17736 (*indirect_jump<mode>_nospec): New define_insn.
17737 (tablejump): Emit different RTL for
17738 -mno-speculate-indirect-jumps.
17739 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17740 (tablejumpsi_nospec): New define_expand.
17741 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17742 (tablejumpdi_nospec): New define_expand.
17743 (*tablejump<mode>_internal1): Disable for
17744 -mno-speculate-indirect-jumps.
17745 (*tablejump<mode>_internal1_nospec): New define_insn.
17746 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17747 option.
17748
17749 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17750
17751 * caller-save.c (insert_save): Drop unnecessary parameter. All
17752 callers updated.
17753
17754 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17755 Richard Biener <rguenth@suse.de>
17756
17757 PR libgomp/83590
17758 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17759 return early, inline manually is_gimple_sizepos. Make sure if we
17760 call gimplify_expr we don't end up with a gimple constant.
17761 * tree.c (variably_modified_type_p): Don't return true for
17762 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17763 * gimplify.h (is_gimple_sizepos): Remove.
17764
17765 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17766
17767 PR tree-optimization/83857
17768 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17769 vectorizable_live_operation for pure SLP statements.
17770 (vectorizable_live_operation): Handle PHIs.
17771
17772 2018-01-16 Richard Biener <rguenther@suse.de>
17773
17774 PR tree-optimization/83867
17775 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17776 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17777
17778 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17779
17780 PR c/83844
17781 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17782 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17783 If off is not INTEGER_CST, issue a may not be aligned warning
17784 rather than isn't aligned. Use isn%'t rather than isn't.
17785 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17786 into MULT_EXPR.
17787 <case MULT_EXPR>: Improve the case when bottom and one of the
17788 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17789 operand, in that case check if the other operand is multiple of
17790 bottom divided by the INTEGER_CST operand.
17791
17792 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17793
17794 PR target/83858
17795 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17796 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17797 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17798 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17799 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17800 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17801 (pa_function_arg_size): New function.
17802
17803 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17804
17805 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17806 in a separate statement.
17807
17808 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17809
17810 PR tree-optimization/83847
17811 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17812 group gathers and scatters.
17813
17814 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17815
17816 PR rtl-optimization/86620
17817 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17818
17819 PR rtl-optimization/83213
17820 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17821 to last if both are JUMP_INSNs.
17822
17823 PR tree-optimization/83843
17824 * gimple-ssa-store-merging.c
17825 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17826 store_immediate_info for bswap/nop orig_stores.
17827
17828 2018-01-15 Andrew Waterman <andrew@sifive.com>
17829
17830 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17831 !TARGET_MUL.
17832 <UDIV>: Increase cost if !TARGET_DIV.
17833
17834 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17835
17836 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17837 (define_attr "cr_logical_3op"): New.
17838 (cceq_ior_compare): Adjust.
17839 (cceq_ior_compare_complement): Adjust.
17840 (*cceq_rev_compare): Adjust.
17841 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17842 (is_cracked_insn): Adjust.
17843 (insn_must_be_first_in_group): Adjust.
17844 * config/rs6000/40x.md: Adjust.
17845 * config/rs6000/440.md: Adjust.
17846 * config/rs6000/476.md: Adjust.
17847 * config/rs6000/601.md: Adjust.
17848 * config/rs6000/603.md: Adjust.
17849 * config/rs6000/6xx.md: Adjust.
17850 * config/rs6000/7450.md: Adjust.
17851 * config/rs6000/7xx.md: Adjust.
17852 * config/rs6000/8540.md: Adjust.
17853 * config/rs6000/cell.md: Adjust.
17854 * config/rs6000/e300c2c3.md: Adjust.
17855 * config/rs6000/e500mc.md: Adjust.
17856 * config/rs6000/e500mc64.md: Adjust.
17857 * config/rs6000/e5500.md: Adjust.
17858 * config/rs6000/e6500.md: Adjust.
17859 * config/rs6000/mpc.md: Adjust.
17860 * config/rs6000/power4.md: Adjust.
17861 * config/rs6000/power5.md: Adjust.
17862 * config/rs6000/power6.md: Adjust.
17863 * config/rs6000/power7.md: Adjust.
17864 * config/rs6000/power8.md: Adjust.
17865 * config/rs6000/power9.md: Adjust.
17866 * config/rs6000/rs64.md: Adjust.
17867 * config/rs6000/titan.md: Adjust.
17868
17869 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17870
17871 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17872 ix86_indirect_branch_register logic.
17873
17874 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17875
17876 * config/i386/constraints.md (Bs): Update
17877 ix86_indirect_branch_register check. Don't check
17878 ix86_indirect_branch_register with GOT_memory_operand.
17879 (Bw): Likewise.
17880 * config/i386/predicates.md (GOT_memory_operand): Don't check
17881 ix86_indirect_branch_register here.
17882 (GOT32_symbol_operand): Likewise.
17883
17884 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17885
17886 * config/i386/predicates.md (constant_call_address_operand):
17887 Rewrite ix86_indirect_branch_register logic.
17888 (sibcall_insn_operand): Likewise.
17889
17890 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17891
17892 * config/i386/constraints.md (Bs): Replace
17893 ix86_indirect_branch_thunk_register with
17894 ix86_indirect_branch_register.
17895 (Bw): Likewise.
17896 * config/i386/i386.md (indirect_jump): Likewise.
17897 (tablejump): Likewise.
17898 (*sibcall_memory): Likewise.
17899 (*sibcall_value_memory): Likewise.
17900 Peepholes of indirect call and jump via memory: Likewise.
17901 * config/i386/i386.opt: Likewise.
17902 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17903 (GOT_memory_operand): Likewise.
17904 (call_insn_operand): Likewise.
17905 (sibcall_insn_operand): Likewise.
17906 (GOT32_symbol_operand): Likewise.
17907
17908 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17909
17910 PR middle-end/83837
17911 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17912 type rather than type addr's type points to.
17913 (expand_omp_atomic_mutex): Likewise.
17914 (expand_omp_atomic): Likewise.
17915
17916 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17917
17918 PR target/83839
17919 * config/i386/i386.c (output_indirect_thunk_function): Use
17920 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17921 for __x86_return_thunk.
17922
17923 2018-01-15 Richard Biener <rguenther@suse.de>
17924
17925 PR middle-end/83850
17926 * expmed.c (extract_bit_field_1): Fix typo.
17927
17928 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17929
17930 PR target/83687
17931 * config/arm/iterators.md (VF): New mode iterator.
17932 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17933 Remove integer-related logic from pattern.
17934 (neon_vabd<mode>_3): Likewise.
17935
17936 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17937
17938 PR middle-end/82694
17939 * common.opt (fstrict-overflow): No longer an alias.
17940 (fwrapv-pointer): New option.
17941 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17942 also for pointer types based on flag_wrapv_pointer.
17943 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17944 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17945 opts->x_flag_wrapv got set.
17946 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17947 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17948 POINTER_TYPE_OVERFLOW_UNDEFINED.
17949 * match.pd: Likewise in address comparison pattern.
17950 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17951
17952 2018-01-15 Richard Biener <rguenther@suse.de>
17953
17954 PR lto/83804
17955 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17956 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17957 Reset type names to their identifier if their TYPE_DECL doesn't
17958 have linkage (and thus is used for ODR and devirt).
17959 (save_debug_info_for_decl): Remove.
17960 (save_debug_info_for_type): Likewise.
17961 (add_tree_to_fld_list): Adjust.
17962 * tree-pretty-print.c (dump_generic_node): Make dumping of
17963 type names more robust.
17964
17965 2018-01-15 Richard Biener <rguenther@suse.de>
17966
17967 * BASE-VER: Bump to 8.0.1.
17968
17969 2018-01-14 Martin Sebor <msebor@redhat.com>
17970
17971 PR other/83508
17972 * builtins.c (check_access): Avoid warning when the no-warning bit
17973 is set.
17974
17975 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17976
17977 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17978 * ira-color (allocno_hard_regs_compare): Likewise.
17979
17980 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17981
17982 PR target/83013
17983 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17984 Use .pushsection/.popsection.
17985
17986 2018-01-14 Martin Sebor <msebor@redhat.com>
17987
17988 PR c++/81327
17989 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17990
17991 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17992
17993 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17994 entry from extra_headers.
17995 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17996 extra_headers, make the list bitwise identical to the i?86-*-* one.
17997
17998 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17999
18000 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18001 -mcmodel=large with -mindirect-branch=thunk,
18002 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18003 -mfunction-return=thunk-extern.
18004 * doc/invoke.texi: Document -mcmodel=large is incompatible with
18005 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18006 -mfunction-return=thunk and -mfunction-return=thunk-extern.
18007
18008 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18009
18010 * config/i386/i386.c (print_reg): Print the name of the full
18011 integer register without '%'.
18012 (ix86_print_operand): Handle 'V'.
18013 * doc/extend.texi: Document 'V' modifier.
18014
18015 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18016
18017 * config/i386/constraints.md (Bs): Disallow memory operand for
18018 -mindirect-branch-register.
18019 (Bw): Likewise.
18020 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18021 (GOT_memory_operand): Likewise.
18022 (call_insn_operand): Likewise.
18023 (sibcall_insn_operand): Likewise.
18024 (GOT32_symbol_operand): Likewise.
18025 * config/i386/i386.md (indirect_jump): Call convert_memory_address
18026 for -mindirect-branch-register.
18027 (tablejump): Likewise.
18028 (*sibcall_memory): Likewise.
18029 (*sibcall_value_memory): Likewise.
18030 Disallow peepholes of indirect call and jump via memory for
18031 -mindirect-branch-register.
18032 (*call_pop): Replace m with Bw.
18033 (*call_value_pop): Likewise.
18034 (*sibcall_pop_memory): Replace m with Bs.
18035 * config/i386/i386.opt (mindirect-branch-register): New option.
18036 * doc/invoke.texi: Document -mindirect-branch-register option.
18037
18038 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18039
18040 * config/i386/i386-protos.h (ix86_output_function_return): New.
18041 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18042 set function_return_type.
18043 (indirect_thunk_name): Add ret_p to indicate thunk for function
18044 return.
18045 (output_indirect_thunk_function): Pass false to
18046 indirect_thunk_name.
18047 (ix86_output_indirect_branch_via_reg): Likewise.
18048 (ix86_output_indirect_branch_via_push): Likewise.
18049 (output_indirect_thunk_function): Create alias for function
18050 return thunk if regno < 0.
18051 (ix86_output_function_return): New function.
18052 (ix86_handle_fndecl_attribute): Handle function_return.
18053 (ix86_attribute_table): Add function_return.
18054 * config/i386/i386.h (machine_function): Add
18055 function_return_type.
18056 * config/i386/i386.md (simple_return_internal): Use
18057 ix86_output_function_return.
18058 (simple_return_internal_long): Likewise.
18059 * config/i386/i386.opt (mfunction-return=): New option.
18060 (indirect_branch): Mention -mfunction-return=.
18061 * doc/extend.texi: Document function_return function attribute.
18062 * doc/invoke.texi: Document -mfunction-return= option.
18063
18064 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18065
18066 * config/i386/i386-opts.h (indirect_branch): New.
18067 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18068 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18069 with local indirect jump when converting indirect call and jump.
18070 (ix86_set_indirect_branch_type): New.
18071 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18072 (indirectlabelno): New.
18073 (indirect_thunk_needed): Likewise.
18074 (indirect_thunk_bnd_needed): Likewise.
18075 (indirect_thunks_used): Likewise.
18076 (indirect_thunks_bnd_used): Likewise.
18077 (INDIRECT_LABEL): Likewise.
18078 (indirect_thunk_name): Likewise.
18079 (output_indirect_thunk): Likewise.
18080 (output_indirect_thunk_function): Likewise.
18081 (ix86_output_indirect_branch_via_reg): Likewise.
18082 (ix86_output_indirect_branch_via_push): Likewise.
18083 (ix86_output_indirect_branch): Likewise.
18084 (ix86_output_indirect_jmp): Likewise.
18085 (ix86_code_end): Call output_indirect_thunk_function if needed.
18086 (ix86_output_call_insn): Call ix86_output_indirect_branch if
18087 needed.
18088 (ix86_handle_fndecl_attribute): Handle indirect_branch.
18089 (ix86_attribute_table): Add indirect_branch.
18090 * config/i386/i386.h (machine_function): Add indirect_branch_type
18091 and has_local_indirect_jump.
18092 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18093 to true.
18094 (tablejump): Likewise.
18095 (*indirect_jump): Use ix86_output_indirect_jmp.
18096 (*tablejump_1): Likewise.
18097 (simple_return_indirect_internal): Likewise.
18098 * config/i386/i386.opt (mindirect-branch=): New option.
18099 (indirect_branch): New.
18100 (keep): Likewise.
18101 (thunk): Likewise.
18102 (thunk-inline): Likewise.
18103 (thunk-extern): Likewise.
18104 * doc/extend.texi: Document indirect_branch function attribute.
18105 * doc/invoke.texi: Document -mindirect-branch= option.
18106
18107 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
18108
18109 PR ipa/83051
18110 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18111
18112 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
18113
18114 * ipa-inline.c (want_inline_small_function_p): Return false if
18115 inlining has already failed with CIF_FINAL_ERROR.
18116 (update_caller_keys): Call want_inline_small_function_p before
18117 can_inline_edge_p.
18118 (update_callee_keys): Likewise.
18119
18120 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
18121
18122 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18123 New function.
18124 (rs6000_quadword_masked_address_p): Likewise.
18125 (quad_aligned_load_p): Likewise.
18126 (quad_aligned_store_p): Likewise.
18127 (const_load_sequence_p): Add comment to describe the outer-most loop.
18128 (mimic_memory_attributes_and_flags): New function.
18129 (rs6000_gen_stvx): Likewise.
18130 (replace_swapped_aligned_store): Likewise.
18131 (rs6000_gen_lvx): Likewise.
18132 (replace_swapped_aligned_load): Likewise.
18133 (replace_swapped_load_constant): Capitalize argument name in
18134 comment describing this function.
18135 (rs6000_analyze_swaps): Add a third pass to search for vector loads
18136 and stores that access quad-word aligned addresses and replace
18137 with stvx or lvx instructions when appropriate.
18138 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18139 New function prototype.
18140 (rs6000_quadword_masked_address_p): Likewise.
18141 (rs6000_gen_lvx): Likewise.
18142 (rs6000_gen_stvx): Likewise.
18143 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18144 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18145 when memory address is aligned.
18146 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18147 this split to select lvx instruction when memory address is aligned.
18148 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18149 instruction when memory address is aligned.
18150 (*vsx_le_perm_load_v16qi): Likewise.
18151 (four unnamed splitters): Modify to select the stvx instruction
18152 when memory is aligned.
18153
18154 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
18155
18156 * predict.c (determine_unlikely_bbs): Handle correctly BBs
18157 which appears in the queue multiple times.
18158
18159 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18160 Alan Hayward <alan.hayward@arm.com>
18161 David Sherwood <david.sherwood@arm.com>
18162
18163 * tree-vectorizer.h (vec_lower_bound): New structure.
18164 (_loop_vec_info): Add check_nonzero and lower_bounds.
18165 (LOOP_VINFO_CHECK_NONZERO): New macro.
18166 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18167 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18168 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18169 fields. Make seg_len the distance travelled, not including the
18170 access size.
18171 (dr_direction_indicator): Declare.
18172 (dr_zero_step_indicator): Likewise.
18173 (dr_known_forward_stride_p): Likewise.
18174 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18175 tree-ssanames.h.
18176 (runtime_alias_check_p): Allow runtime alias checks with
18177 variable strides.
18178 (operator ==): Compare access_size and align.
18179 (prune_runtime_alias_test_list): Rework for new distinction between
18180 the access_size and seg_len.
18181 (create_intersect_range_checks_index): Likewise. Cope with polynomial
18182 segment lengths.
18183 (get_segment_min_max): New function.
18184 (create_intersect_range_checks): Use it.
18185 (dr_step_indicator): New function.
18186 (dr_direction_indicator): Likewise.
18187 (dr_zero_step_indicator): Likewise.
18188 (dr_known_forward_stride_p): Likewise.
18189 * tree-loop-distribution.c (data_ref_segment_size): Return
18190 DR_STEP * (niters - 1).
18191 (compute_alias_check_pairs): Update call to the dr_with_seg_len
18192 constructor.
18193 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18194 (vect_preserves_scalar_order_p): New function, split out from...
18195 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
18196 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18197 (vect_vfa_access_size): New function.
18198 (vect_vfa_align): Likewise.
18199 (vect_compile_time_alias): Take access_size_a and access_b arguments.
18200 (dump_lower_bound): New function.
18201 (vect_check_lower_bound): Likewise.
18202 (vect_small_gap_p): Likewise.
18203 (vectorizable_with_step_bound_p): Likewise.
18204 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18205 depencies if the vectorization factor is 1. Convert the checks
18206 for nonzero steps into checks on the bounds of DR_STEP. Try using
18207 a bunds check for variable steps if the minimum required step is
18208 relatively small. Update calls to the dr_with_seg_len
18209 constructor and to vect_compile_time_alias.
18210 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18211 function.
18212 (vect_loop_versioning): Call it.
18213 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18214 when retrying.
18215 (vect_estimate_min_profitable_iters): Account for any bounds checks.
18216
18217 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18218 Alan Hayward <alan.hayward@arm.com>
18219 David Sherwood <david.sherwood@arm.com>
18220
18221 * doc/sourcebuild.texi (vect_scatter_store): Document.
18222 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18223 optabs.
18224 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18225 Document.
18226 * genopinit.c (main): Add supports_vec_scatter_store and
18227 supports_vec_scatter_store_cached to target_optabs.
18228 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18229 IFN_MASK_SCATTER_STORE.
18230 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18231 functions.
18232 * internal-fn.h (internal_store_fn_p): Declare.
18233 (internal_fn_stored_value_index): Likewise.
18234 * internal-fn.c (scatter_store_direct): New macro.
18235 (expand_scatter_store_optab_fn): New function.
18236 (direct_scatter_store_optab_supported_p): New macro.
18237 (internal_store_fn_p): New function.
18238 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18239 IFN_MASK_SCATTER_STORE.
18240 (internal_fn_mask_index): Likewise.
18241 (internal_fn_stored_value_index): New function.
18242 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18243 for scatter stores.
18244 * optabs-query.h (supports_vec_scatter_store_p): Declare.
18245 * optabs-query.c (supports_vec_scatter_store_p): New function.
18246 * tree-vectorizer.h (vect_get_store_rhs): Declare.
18247 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18248 true for scatter stores.
18249 (vect_gather_scatter_fn_p): Handle scatter stores too.
18250 (vect_check_gather_scatter): Consider using scatter stores if
18251 supports_vec_scatter_store_p.
18252 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18253 scatter stores too.
18254 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18255 internal_fn_stored_value_index.
18256 (check_load_store_masking): Handle scatter stores too.
18257 (vect_get_store_rhs): Make public.
18258 (vectorizable_call): Use internal_store_fn_p.
18259 (vectorizable_store): Handle scatter store internal functions.
18260 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18261 when deciding whether the end of the group has been reached.
18262 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18263 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18264 (mask_scatter_store<mode>): New insns.
18265
18266 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18267 Alan Hayward <alan.hayward@arm.com>
18268 David Sherwood <david.sherwood@arm.com>
18269
18270 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18271 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18272 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18273 function.
18274 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18275 Use vect_truncate_gather_scatter_offset if we can't treat the
18276 operation as a normal gather load or scatter store.
18277 (get_group_load_store_type): Take the gather_scatter_info
18278 as argument. Try using a gather load or scatter store for
18279 single-element groups.
18280 (get_load_store_type): Update calls to get_group_load_store_type
18281 and vect_use_strided_gather_scatters_p.
18282
18283 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18284 Alan Hayward <alan.hayward@arm.com>
18285 David Sherwood <david.sherwood@arm.com>
18286
18287 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18288 optional tree argument.
18289 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18290 null target hooks.
18291 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18292 but continue to use the current value as a fallback.
18293 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18294 to compare the updates.
18295 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18296 (get_load_store_type): Use it when handling a strided access.
18297 (vect_get_strided_load_store_ops): New function.
18298 (vect_get_data_ptr_increment): Likewise.
18299 (vectorizable_load): Handle strided gather loads. Always pass
18300 a step to vect_create_data_ref_ptr and bump_vector_ptr.
18301
18302 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18303 Alan Hayward <alan.hayward@arm.com>
18304 David Sherwood <david.sherwood@arm.com>
18305
18306 * doc/md.texi (gather_load@var{m}): Document.
18307 (mask_gather_load@var{m}): Likewise.
18308 * genopinit.c (main): Add supports_vec_gather_load and
18309 supports_vec_gather_load_cached to target_optabs.
18310 * optabs-tree.c (init_tree_optimization_optabs): Use
18311 ggc_cleared_alloc to allocate target_optabs.
18312 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18313 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18314 functions.
18315 * internal-fn.h (internal_load_fn_p): Declare.
18316 (internal_gather_scatter_fn_p): Likewise.
18317 (internal_fn_mask_index): Likewise.
18318 (internal_gather_scatter_fn_supported_p): Likewise.
18319 * internal-fn.c (gather_load_direct): New macro.
18320 (expand_gather_load_optab_fn): New function.
18321 (direct_gather_load_optab_supported_p): New macro.
18322 (direct_internal_fn_optab): New function.
18323 (internal_load_fn_p): Likewise.
18324 (internal_gather_scatter_fn_p): Likewise.
18325 (internal_fn_mask_index): Likewise.
18326 (internal_gather_scatter_fn_supported_p): Likewise.
18327 * optabs-query.c (supports_at_least_one_mode_p): New function.
18328 (supports_vec_gather_load_p): Likewise.
18329 * optabs-query.h (supports_vec_gather_load_p): Declare.
18330 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18331 and memory_type field.
18332 (NUM_PATTERNS): Bump to 15.
18333 * tree-vect-data-refs.c: Include internal-fn.h.
18334 (vect_gather_scatter_fn_p): New function.
18335 (vect_describe_gather_scatter_call): Likewise.
18336 (vect_check_gather_scatter): Try using internal functions for
18337 gather loads. Recognize existing calls to a gather load function.
18338 (vect_analyze_data_refs): Consider using gather loads if
18339 supports_vec_gather_load_p.
18340 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18341 (vect_get_gather_scatter_offset_type): Likewise.
18342 (vect_convert_mask_for_vectype): Likewise.
18343 (vect_add_conversion_to_patterm): Likewise.
18344 (vect_try_gather_scatter_pattern): Likewise.
18345 (vect_recog_gather_scatter_pattern): New pattern recognizer.
18346 (vect_vect_recog_func_ptrs): Add it.
18347 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18348 internal_fn_mask_index and internal_gather_scatter_fn_p.
18349 (check_load_store_masking): Take the gather_scatter_info as an
18350 argument and handle gather loads.
18351 (vect_get_gather_scatter_ops): New function.
18352 (vectorizable_call): Check internal_load_fn_p.
18353 (vectorizable_load): Likewise. Handle gather load internal
18354 functions.
18355 (vectorizable_store): Update call to check_load_store_masking.
18356 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18357 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18358 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18359 (aarch64_gather_scale_operand_d): New predicates.
18360 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18361 (mask_gather_load<mode>): New insns.
18362
18363 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18364 Alan Hayward <alan.hayward@arm.com>
18365 David Sherwood <david.sherwood@arm.com>
18366
18367 * optabs.def (fold_left_plus_optab): New optab.
18368 * doc/md.texi (fold_left_plus_@var{m}): Document.
18369 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18370 * internal-fn.c (fold_left_direct): Define.
18371 (expand_fold_left_optab_fn): Likewise.
18372 (direct_fold_left_optab_supported_p): Likewise.
18373 * fold-const-call.c (fold_const_fold_left): New function.
18374 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18375 * tree-parloops.c (valid_reduction_p): New function.
18376 (gather_scalar_reductions): Use it.
18377 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18378 (vect_finish_replace_stmt): Declare.
18379 * tree-vect-loop.c (fold_left_reduction_fn): New function.
18380 (needs_fold_left_reduction_p): New function, split out from...
18381 (vect_is_simple_reduction): ...here. Accept reductions that
18382 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18383 (vect_force_simple_reduction): Also store the reduction type in
18384 the assignment's STMT_VINFO_REDUC_TYPE.
18385 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18386 (merge_with_identity): New function.
18387 (vect_expand_fold_left): Likewise.
18388 (vectorize_fold_left_reduction): Likewise.
18389 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
18390 scalar phi in place for it. Check for target support and reject
18391 cases that would reassociate the operation. Defer the transform
18392 phase to vectorize_fold_left_reduction.
18393 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18394 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18395 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18396
18397 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18398
18399 * tree-if-conv.c (predicate_mem_writes): Remove redundant
18400 call to ifc_temp_var.
18401
18402 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18403 Alan Hayward <alan.hayward@arm.com>
18404 David Sherwood <david.sherwood@arm.com>
18405
18406 * target.def (legitimize_address_displacement): Take the original
18407 offset as a poly_int.
18408 * targhooks.h (default_legitimize_address_displacement): Update
18409 accordingly.
18410 * targhooks.c (default_legitimize_address_displacement): Likewise.
18411 * doc/tm.texi: Regenerate.
18412 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18413 as an argument, moving assert of ad->disp == ad->disp_term to...
18414 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18415 Try calling targetm.legitimize_address_displacement before expanding
18416 the address rather than afterwards, and adjust for the new interface.
18417 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18418 Match the new hook interface. Handle SVE addresses.
18419 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18420 new hook interface.
18421
18422 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18423
18424 * Makefile.in (OBJS): Add early-remat.o.
18425 * target.def (select_early_remat_modes): New hook.
18426 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18427 * doc/tm.texi: Regenerate.
18428 * targhooks.h (default_select_early_remat_modes): Declare.
18429 * targhooks.c (default_select_early_remat_modes): New function.
18430 * timevar.def (TV_EARLY_REMAT): New timevar.
18431 * passes.def (pass_early_remat): New pass.
18432 * tree-pass.h (make_pass_early_remat): Declare.
18433 * early-remat.c: New file.
18434 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18435 function.
18436 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18437
18438 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18439 Alan Hayward <alan.hayward@arm.com>
18440 David Sherwood <david.sherwood@arm.com>
18441
18442 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18443 vfm1 with a bound_epilog parameter.
18444 (vect_do_peeling): Update calls accordingly, and move the prologue
18445 call earlier in the function. Treat the base bound_epilog as 0 for
18446 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18447 this base when peeling for gaps.
18448 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18449 with fully-masked loops.
18450 (vect_estimate_min_profitable_iters): Handle the single peeled
18451 iteration in that case.
18452
18453 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18454 Alan Hayward <alan.hayward@arm.com>
18455 David Sherwood <david.sherwood@arm.com>
18456
18457 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18458 single-element interleaving even if the size is not a power of 2.
18459 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18460 accesses for single-element interleaving if the group size is
18461 not a power of 2.
18462
18463 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18464 Alan Hayward <alan.hayward@arm.com>
18465 David Sherwood <david.sherwood@arm.com>
18466
18467 * doc/md.texi (fold_extract_last_@var{m}): Document.
18468 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18469 * optabs.def (fold_extract_last_optab): New optab.
18470 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18471 * internal-fn.c (fold_extract_direct): New macro.
18472 (expand_fold_extract_optab_fn): Likewise.
18473 (direct_fold_extract_optab_supported_p): Likewise.
18474 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18475 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18476 EXTRACT_LAST_REDUCTION.
18477 (get_initial_def_for_reduction): Do not create an initial vector
18478 for EXTRACT_LAST_REDUCTION reductions.
18479 (vectorizable_reduction): Leave the scalar phi in place for
18480 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18481 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18482 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18483 transform phase to vectorizable_condition.
18484 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18485 split out from...
18486 (vect_finish_stmt_generation): ...here.
18487 (vect_finish_replace_stmt): New function.
18488 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18489 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18490 pattern.
18491 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
18492
18493 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18494 Alan Hayward <alan.hayward@arm.com>
18495 David Sherwood <david.sherwood@arm.com>
18496
18497 * doc/md.texi (extract_last_@var{m}): Document.
18498 * optabs.def (extract_last_optab): New optab.
18499 * internal-fn.def (EXTRACT_LAST): New internal function.
18500 * internal-fn.c (cond_unary_direct): New macro.
18501 (expand_cond_unary_optab_fn): Likewise.
18502 (direct_cond_unary_optab_supported_p): Likewise.
18503 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18504 loops using EXTRACT_LAST.
18505 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18506 (extract_last_<mode>): ...this optab.
18507 (vec_extract<mode><Vel>): Update accordingly.
18508
18509 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18510 Alan Hayward <alan.hayward@arm.com>
18511 David Sherwood <david.sherwood@arm.com>
18512
18513 * target.def (empty_mask_is_expensive): New hook.
18514 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18515 * doc/tm.texi: Regenerate.
18516 * targhooks.h (default_empty_mask_is_expensive): Declare.
18517 * targhooks.c (default_empty_mask_is_expensive): New function.
18518 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18519 if the target says that empty masks are expensive.
18520 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18521 New function.
18522 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18523
18524 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18525 Alan Hayward <alan.hayward@arm.com>
18526 David Sherwood <david.sherwood@arm.com>
18527
18528 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18529 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18530 (vect_use_loop_mask_for_alignment_p): New function.
18531 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18532 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18533 niters_skip argument. Make sure that the first niters_skip elements
18534 of the first iteration are inactive.
18535 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18536 Update call to vect_set_loop_masks_directly.
18537 (get_misalign_in_elems): New function, split out from...
18538 (vect_gen_prolog_loop_niters): ...here.
18539 (vect_update_init_of_dr): Take a code argument that specifies whether
18540 the adjustment should be added or subtracted.
18541 (vect_update_init_of_drs): Likewise.
18542 (vect_prepare_for_masked_peels): New function.
18543 (vect_do_peeling): Skip prologue peeling if we're using a mask
18544 instead. Update call to vect_update_inits_of_drs.
18545 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18546 mask_skip_niters.
18547 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18548 alignment. Do not include the number of peeled iterations in
18549 the minimum threshold in that case.
18550 (vectorizable_induction): Adjust the start value down by
18551 LOOP_VINFO_MASK_SKIP_NITERS iterations.
18552 (vect_transform_loop): Call vect_prepare_for_masked_peels.
18553 Take the number of skipped iterations into account when calculating
18554 the loop bounds.
18555 * tree-vect-stmts.c (vect_gen_while_not): New function.
18556
18557 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18558 Alan Hayward <alan.hayward@arm.com>
18559 David Sherwood <david.sherwood@arm.com>
18560
18561 * doc/sourcebuild.texi (vect_fully_masked): Document.
18562 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18563 default value to 0.
18564 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18565 split out from...
18566 (vect_analyze_loop_2): ...here. Don't check the vectorization
18567 factor against the number of loop iterations if the loop is
18568 fully-masked.
18569
18570 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18571 Alan Hayward <alan.hayward@arm.com>
18572 David Sherwood <david.sherwood@arm.com>
18573
18574 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18575 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18576 (dump_groups): Update accordingly.
18577 (iv_use::mem_type): New member variable.
18578 (address_p): New function.
18579 (record_use): Add a mem_type argument and initialize the new
18580 mem_type field.
18581 (record_group_use): Add a mem_type argument. Use address_p.
18582 Remove obsolete null checks of base_object. Update call to record_use.
18583 (find_interesting_uses_op): Update call to record_group_use.
18584 (find_interesting_uses_cond): Likewise.
18585 (find_interesting_uses_address): Likewise.
18586 (get_mem_type_for_internal_fn): New function.
18587 (find_address_like_use): Likewise.
18588 (find_interesting_uses_stmt): Try find_address_like_use before
18589 calling find_interesting_uses_op.
18590 (addr_offset_valid_p): Use the iv mem_type field as the type
18591 of the addressed memory.
18592 (add_autoinc_candidates): Likewise.
18593 (get_address_cost): Likewise.
18594 (split_small_address_groups_p): Use address_p.
18595 (split_address_groups): Likewise.
18596 (add_iv_candidate_for_use): Likewise.
18597 (autoinc_possible_for_pair): Likewise.
18598 (rewrite_groups): Likewise.
18599 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18600 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18601 (get_alias_ptr_type_for_ptr_address): New function.
18602 (rewrite_use_address): Rewrite address uses in calls that were
18603 identified by find_address_like_use.
18604
18605 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18606 Alan Hayward <alan.hayward@arm.com>
18607 David Sherwood <david.sherwood@arm.com>
18608
18609 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18610 TARGET_MEM_REFs.
18611 * gimple-expr.h (is_gimple_addressable: Likewise.
18612 * gimple-expr.c (is_gimple_address): Likewise.
18613 * internal-fn.c (expand_call_mem_ref): New function.
18614 (expand_mask_load_optab_fn): Use it.
18615 (expand_mask_store_optab_fn): Likewise.
18616
18617 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18618 Alan Hayward <alan.hayward@arm.com>
18619 David Sherwood <david.sherwood@arm.com>
18620
18621 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18622 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18623 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18624 (cond_umax@var{mode}): Document.
18625 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18626 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18627 (cond_umin_optab, cond_umax_optab): New optabs.
18628 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18629 (COND_IOR, COND_XOR): New internal functions.
18630 * internal-fn.h (get_conditional_internal_fn): Declare.
18631 * internal-fn.c (cond_binary_direct): New macro.
18632 (expand_cond_binary_optab_fn): Likewise.
18633 (direct_cond_binary_optab_supported_p): Likewise.
18634 (get_conditional_internal_fn): New function.
18635 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18636 Cope with reduction statements that are vectorized as calls rather
18637 than assignments.
18638 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18639 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18640 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18641 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18642 (UNSPEC_COND_EOR): New unspecs.
18643 (optab): Add mappings for them.
18644 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18645 (sve_int_op, sve_fp_op): New int attributes.
18646
18647 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18648 Alan Hayward <alan.hayward@arm.com>
18649 David Sherwood <david.sherwood@arm.com>
18650
18651 * optabs.def (while_ult_optab): New optab.
18652 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18653 * internal-fn.def (WHILE_ULT): New internal function.
18654 * internal-fn.h (direct_internal_fn_supported_p): New override
18655 that takes two types as argument.
18656 * internal-fn.c (while_direct): New macro.
18657 (expand_while_optab_fn): New function.
18658 (convert_optab_supported_p): Likewise.
18659 (direct_while_optab_supported_p): New macro.
18660 * wide-int.h (wi::udiv_ceil): New function.
18661 * tree-vectorizer.h (rgroup_masks): New structure.
18662 (vec_loop_masks): New typedef.
18663 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18664 and fully_masked_p.
18665 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18666 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18667 (vect_max_vf): New function.
18668 (slpeel_make_loop_iterate_ntimes): Delete.
18669 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18670 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18671 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18672 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18673 internal-fn.h, stor-layout.h and optabs-query.h.
18674 (vect_set_loop_mask): New function.
18675 (add_preheader_seq): Likewise.
18676 (add_header_seq): Likewise.
18677 (interleave_supported_p): Likewise.
18678 (vect_maybe_permute_loop_masks): Likewise.
18679 (vect_set_loop_masks_directly): Likewise.
18680 (vect_set_loop_condition_masked): Likewise.
18681 (vect_set_loop_condition_unmasked): New function, split out from
18682 slpeel_make_loop_iterate_ntimes.
18683 (slpeel_make_loop_iterate_ntimes): Rename to..
18684 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18685 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18686 (vect_do_peeling): Update call accordingly.
18687 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18688 loops.
18689 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18690 mask_compare_type, can_fully_mask_p and fully_masked_p.
18691 (release_vec_loop_masks): New function.
18692 (_loop_vec_info): Use it to free the loop masks.
18693 (can_produce_all_loop_masks_p): New function.
18694 (vect_get_max_nscalars_per_iter): Likewise.
18695 (vect_verify_full_masking): Likewise.
18696 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18697 retries, and free the mask rgroups before retrying. Check loop-wide
18698 reasons for disallowing fully-masked loops. Make the final decision
18699 about whether use a fully-masked loop or not.
18700 (vect_estimate_min_profitable_iters): Do not assume that peeling
18701 for the number of iterations will be needed for fully-masked loops.
18702 (vectorizable_reduction): Disable fully-masked loops.
18703 (vectorizable_live_operation): Likewise.
18704 (vect_halve_mask_nunits): New function.
18705 (vect_double_mask_nunits): Likewise.
18706 (vect_record_loop_mask): Likewise.
18707 (vect_get_loop_mask): Likewise.
18708 (vect_transform_loop): Handle the case in which the final loop
18709 iteration might handle a partial vector. Call vect_set_loop_condition
18710 instead of slpeel_make_loop_iterate_ntimes.
18711 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18712 (check_load_store_masking): New function.
18713 (prepare_load_store_mask): Likewise.
18714 (vectorizable_store): Handle fully-masked loops.
18715 (vectorizable_load): Likewise.
18716 (supportable_widening_operation): Use vect_halve_mask_nunits for
18717 booleans.
18718 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18719 (vect_gen_while): New function.
18720 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18721 (aarch64_uqdec<mode>): New insn.
18722
18723 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18724 Alan Hayward <alan.hayward@arm.com>
18725 David Sherwood <david.sherwood@arm.com>
18726
18727 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18728 (reduc_xor_scal_optab): New optabs.
18729 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18730 (reduc_xor_scal_@var{m}): Document.
18731 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18732 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18733 internal functions.
18734 * fold-const-call.c (fold_const_call): Handle them.
18735 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18736 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18737 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18738 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18739 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18740 (UNSPEC_XORV): New unspecs.
18741 (optab): Add entries for them.
18742 (BITWISEV): New int iterator.
18743 (bit_reduc_op): New int attributes.
18744
18745 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18746 Alan Hayward <alan.hayward@arm.com>
18747 David Sherwood <david.sherwood@arm.com>
18748
18749 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18750 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18751 * optabs.def (vec_shl_insert_optab): New optab.
18752 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18753 (duplicate_and_interleave): Likewise.
18754 * tree-vect-loop.c: Include internal-fn.h.
18755 (neutral_op_for_slp_reduction): New function, split out from
18756 get_initial_defs_for_reduction.
18757 (get_initial_def_for_reduction): Handle option 2 for variable-length
18758 vectors by loading the neutral value into a vector and then shifting
18759 the initial value into element 0.
18760 (get_initial_defs_for_reduction): Replace the code argument with
18761 the neutral value calculated by neutral_op_for_slp_reduction.
18762 Use gimple_build_vector for constant-length vectors.
18763 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18764 but the first group_size elements have a neutral value.
18765 Use duplicate_and_interleave otherwise.
18766 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18767 Update call to get_initial_defs_for_reduction. Handle SLP
18768 reductions for variable-length vectors by creating one vector
18769 result for each scalar result, with the elements associated
18770 with other scalar results stubbed out with the neutral value.
18771 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18772 Require IFN_VEC_SHL_INSERT for double reductions on
18773 variable-length vectors, or SLP reductions that have
18774 a neutral value. Require can_duplicate_and_interleave_p
18775 support for variable-length unchained SLP reductions if there
18776 is no neutral value, such as for MIN/MAX reductions. Also require
18777 the number of vector elements to be a multiple of the number of
18778 SLP statements when doing variable-length unchained SLP reductions.
18779 Update call to vect_create_epilog_for_reduction.
18780 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18781 and remove initial values.
18782 (duplicate_and_interleave): Make public.
18783 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18784 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18785
18786 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18787 Alan Hayward <alan.hayward@arm.com>
18788 David Sherwood <david.sherwood@arm.com>
18789
18790 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18791 (can_duplicate_and_interleave_p): New function.
18792 (vect_get_and_check_slp_defs): Take the vector of statements
18793 rather than just the current one. Remove excess parentheses.
18794 Restriction rejectinon of vect_constant_def and vect_external_def
18795 for variable-length vectors to boolean types, or types for which
18796 can_duplicate_and_interleave_p is false.
18797 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18798 (duplicate_and_interleave): New function.
18799 (vect_get_constant_vectors): Use gimple_build_vector for
18800 constant-length vectors and suitable variable-length constant
18801 vectors. Use duplicate_and_interleave for other variable-length
18802 vectors. Don't defer the update when inserting new statements.
18803
18804 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18805 Alan Hayward <alan.hayward@arm.com>
18806 David Sherwood <david.sherwood@arm.com>
18807
18808 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18809 min_profitable_iters doesn't go negative.
18810
18811 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18812 Alan Hayward <alan.hayward@arm.com>
18813 David Sherwood <david.sherwood@arm.com>
18814
18815 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18816 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18817 * optabs.def (vec_mask_load_lanes_optab): New optab.
18818 (vec_mask_store_lanes_optab): Likewise.
18819 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18820 (MASK_STORE_LANES): Likewise.
18821 * internal-fn.c (mask_load_lanes_direct): New macro.
18822 (mask_store_lanes_direct): Likewise.
18823 (expand_mask_load_optab_fn): Handle masked operations.
18824 (expand_mask_load_lanes_optab_fn): New macro.
18825 (expand_mask_store_optab_fn): Handle masked operations.
18826 (expand_mask_store_lanes_optab_fn): New macro.
18827 (direct_mask_load_lanes_optab_supported_p): Likewise.
18828 (direct_mask_store_lanes_optab_supported_p): Likewise.
18829 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18830 parameter.
18831 (vect_load_lanes_supported): Likewise.
18832 * tree-vect-data-refs.c (strip_conversion): New function.
18833 (can_group_stmts_p): Likewise.
18834 (vect_analyze_data_ref_accesses): Use it instead of checking
18835 for a pair of assignments.
18836 (vect_store_lanes_supported): Take a masked_p parameter.
18837 (vect_load_lanes_supported): Likewise.
18838 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18839 vect_store_lanes_supported and vect_load_lanes_supported.
18840 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18841 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18842 parameter. Don't allow gaps for masked accesses.
18843 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18844 and vect_load_lanes_supported.
18845 (get_load_store_type): Take a masked_p parameter and update
18846 call to get_group_load_store_type.
18847 (vectorizable_store): Update call to get_load_store_type.
18848 Handle IFN_MASK_STORE_LANES.
18849 (vectorizable_load): Update call to get_load_store_type.
18850 Handle IFN_MASK_LOAD_LANES.
18851
18852 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18853 Alan Hayward <alan.hayward@arm.com>
18854 David Sherwood <david.sherwood@arm.com>
18855
18856 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18857 modes for SVE.
18858 * config/aarch64/aarch64-protos.h
18859 (aarch64_sve_struct_memory_operand_p): Declare.
18860 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18861 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18862 (VPRED, vpred): Handle SVE structure modes.
18863 * config/aarch64/constraints.md (Utx): New constraint.
18864 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18865 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18866 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18867 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18868 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18869 structure modes. Split into pieces after RA.
18870 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18871 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18872 New patterns.
18873 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18874 SVE structure modes.
18875 (aarch64_classify_address): Likewise.
18876 (sizetochar): Move earlier in file.
18877 (aarch64_print_operand): Handle SVE register lists.
18878 (aarch64_array_mode): New function.
18879 (aarch64_sve_struct_memory_operand_p): Likewise.
18880 (TARGET_ARRAY_MODE): Redefine.
18881
18882 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18883 Alan Hayward <alan.hayward@arm.com>
18884 David Sherwood <david.sherwood@arm.com>
18885
18886 * target.def (array_mode): New target hook.
18887 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18888 * doc/tm.texi: Regenerate.
18889 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18890 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18891 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18892 targetm.array_mode.
18893 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18894 type sizes.
18895
18896 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18897 Alan Hayward <alan.hayward@arm.com>
18898 David Sherwood <david.sherwood@arm.com>
18899
18900 * fold-const.c (fold_binary_loc): Check the argument types
18901 rather than the result type when testing for a vector operation.
18902
18903 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18904
18905 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18906 * doc/tm.texi: Regenerate.
18907
18908 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18909 Alan Hayward <alan.hayward@arm.com>
18910 David Sherwood <david.sherwood@arm.com>
18911
18912 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18913 (sve): Document new AArch64 extension.
18914 * doc/md.texi (w): Extend the description of the AArch64
18915 constraint to include SVE vectors.
18916 (Upl, Upa): Document new AArch64 predicate constraints.
18917 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18918 enum.
18919 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18920 (msve-vector-bits=): New option.
18921 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18922 SVE when these are disabled.
18923 (sve): New extension.
18924 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18925 modes. Adjust their number of units based on aarch64_sve_vg.
18926 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18927 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18928 aarch64_addr_query_type.
18929 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18930 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18931 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18932 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18933 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18934 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18935 (aarch64_simd_imm_zero_p): Delete.
18936 (aarch64_check_zero_based_sve_index_immediate): Declare.
18937 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18938 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18939 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18940 (aarch64_sve_float_mul_immediate_p): Likewise.
18941 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18942 rather than an rtx.
18943 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18944 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18945 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18946 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18947 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18948 (aarch64_regmode_natural_size): Likewise.
18949 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18950 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18951 left one place.
18952 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18953 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18954 for VG and the SVE predicate registers.
18955 (V_ALIASES): Add a "z"-prefixed alias.
18956 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18957 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18958 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18959 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18960 (REG_CLASS_NAMES): Add entries for them.
18961 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18962 and the predicate registers.
18963 (aarch64_sve_vg): Declare.
18964 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18965 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18966 (REGMODE_NATURAL_SIZE): Define.
18967 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18968 SVE macros.
18969 * config/aarch64/aarch64.c: Include cfgrtl.h.
18970 (simd_immediate_info): Add a constructor for series vectors,
18971 and an associated step field.
18972 (aarch64_sve_vg): New variable.
18973 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18974 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18975 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18976 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18977 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18978 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18979 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18980 (aarch64_get_mask_mode): New functions.
18981 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18982 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18983 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18984 predicate modes and predicate registers. Explicitly restrict
18985 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18986 to store a vector mode if it is recognized by
18987 aarch64_classify_vector_mode.
18988 (aarch64_regmode_natural_size): New function.
18989 (aarch64_hard_regno_caller_save_mode): Return the original mode
18990 for predicates.
18991 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18992 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18993 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18994 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18995 functions.
18996 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18997 does not overlap dest if the function is frame-related. Handle
18998 SVE constants.
18999 (aarch64_split_add_offset): New function.
19000 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19001 them aarch64_add_offset.
19002 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19003 and update call to aarch64_sub_sp.
19004 (aarch64_add_cfa_expression): New function.
19005 (aarch64_expand_prologue): Pass extra temporary registers to the
19006 functions above. Handle the case in which we need to emit new
19007 DW_CFA_expressions for registers that were originally saved
19008 relative to the stack pointer, but now have to be expressed
19009 relative to the frame pointer.
19010 (aarch64_output_mi_thunk): Pass extra temporary registers to the
19011 functions above.
19012 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
19013 IP0 and IP1 values for SVE frames.
19014 (aarch64_expand_vec_series): New function.
19015 (aarch64_expand_sve_widened_duplicate): Likewise.
19016 (aarch64_expand_sve_const_vector): Likewise.
19017 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19018 Handle SVE constants. Use emit_move_insn to move a force_const_mem
19019 into the register, rather than emitting a SET directly.
19020 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19021 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19022 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19023 (offset_9bit_signed_scaled_p): New functions.
19024 (aarch64_replicate_bitmask_imm): New function.
19025 (aarch64_bitmask_imm): Use it.
19026 (aarch64_cannot_force_const_mem): Reject expressions involving
19027 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
19028 (aarch64_classify_index): Handle SVE indices, by requiring
19029 a plain register index with a scale that matches the element size.
19030 (aarch64_classify_address): Handle SVE addresses. Assert that
19031 the mode of the address is VOIDmode or an integer mode.
19032 Update call to aarch64_classify_symbol.
19033 (aarch64_classify_symbolic_expression): Update call to
19034 aarch64_classify_symbol.
19035 (aarch64_const_vec_all_in_range_p): New function.
19036 (aarch64_print_vector_float_operand): Likewise.
19037 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
19038 "vN" for FP registers with SVE modes. Handle (const ...) vectors
19039 and the FP immediates 1.0 and 0.5.
19040 (aarch64_print_address_internal): Handle SVE addresses.
19041 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19042 (aarch64_regno_regclass): Handle predicate registers.
19043 (aarch64_secondary_reload): Handle big-endian reloads of SVE
19044 data modes.
19045 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19046 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19047 (aarch64_convert_sve_vector_bits): New function.
19048 (aarch64_override_options): Use it to handle -msve-vector-bits=.
19049 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19050 rather than an rtx.
19051 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19052 Handle SVE vector and predicate modes. Accept VL-based constants
19053 that need only one temporary register, and VL offsets that require
19054 no temporary registers.
19055 (aarch64_conditional_register_usage): Mark the predicate registers
19056 as fixed if SVE isn't available.
19057 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19058 Return true for SVE vector and predicate modes.
19059 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19060 rather than an unsigned int. Handle SVE modes.
19061 (aarch64_preferred_simd_mode): Update call accordingly. Handle
19062 SVE modes.
19063 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19064 if SVE is enabled.
19065 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19066 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19067 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19068 (aarch64_sve_float_mul_immediate_p): New functions.
19069 (aarch64_sve_valid_immediate): New function.
19070 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19071 Explicitly reject structure modes. Check for INDEX constants.
19072 Handle PTRUE and PFALSE constants.
19073 (aarch64_check_zero_based_sve_index_immediate): New function.
19074 (aarch64_simd_imm_zero_p): Delete.
19075 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19076 vector modes. Accept constants in the range of CNT[BHWD].
19077 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19078 ask for an Advanced SIMD mode.
19079 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19080 (aarch64_simd_vector_alignment): Handle SVE predicates.
19081 (aarch64_vectorize_preferred_vector_alignment): New function.
19082 (aarch64_simd_vector_alignment_reachable): Use it instead of
19083 the vector size.
19084 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19085 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19086 functions.
19087 (MAX_VECT_LEN): Delete.
19088 (expand_vec_perm_d): Add a vec_flags field.
19089 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19090 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19091 (aarch64_evpc_ext): Don't apply a big-endian lane correction
19092 for SVE modes.
19093 (aarch64_evpc_rev): Rename to...
19094 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
19095 (aarch64_evpc_rev_global): New function.
19096 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19097 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19098 MAX_VECT_LEN.
19099 (aarch64_evpc_sve_tbl): New function.
19100 (aarch64_expand_vec_perm_const_1): Update after rename of
19101 aarch64_evpc_rev. Handle SVE permutes too, trying
19102 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19103 than aarch64_evpc_tbl.
19104 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19105 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19106 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19107 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19108 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19109 (aarch64_expand_sve_vcond): New functions.
19110 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19111 of aarch64_vector_mode_p.
19112 (aarch64_dwarf_poly_indeterminate_value): New function.
19113 (aarch64_compute_pressure_classes): Likewise.
19114 (aarch64_can_change_mode_class): Likewise.
19115 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19116 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19117 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19118 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19119 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19120 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19121 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19122 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19123 constraints.
19124 (Dn, Dl, Dr): Accept const as well as const_vector.
19125 (Dz): Likewise. Compare against CONST0_RTX.
19126 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19127 of "vector" where appropriate.
19128 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19129 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19130 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19131 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19132 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19133 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19134 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19135 (v_int_equiv): Extend to SVE modes.
19136 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19137 mode attributes.
19138 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19139 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19140 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19141 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19142 (SVE_COND_FP_CMP): New int iterators.
19143 (perm_hilo): Handle the new unpack unspecs.
19144 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19145 attributes.
19146 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19147 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19148 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19149 (aarch64_equality_operator, aarch64_constant_vector_operand)
19150 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19151 (aarch64_sve_nonimmediate_operand): Likewise.
19152 (aarch64_sve_general_operand): Likewise.
19153 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19154 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19155 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19156 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19157 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19158 (aarch64_sve_float_arith_immediate): Likewise.
19159 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19160 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19161 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19162 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19163 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19164 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19165 (aarch64_sve_float_arith_operand): Likewise.
19166 (aarch64_sve_float_arith_with_sub_operand): Likewise.
19167 (aarch64_sve_float_mul_operand): Likewise.
19168 (aarch64_sve_vec_perm_operand): Likewise.
19169 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19170 (aarch64_mov_operand): Accept const_poly_int and const_vector.
19171 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19172 as well as const_vector.
19173 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19174 in file. Use CONST0_RTX and CONSTM1_RTX.
19175 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
19176 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19177 Use aarch64_simd_imm_zero.
19178 * config/aarch64/aarch64-sve.md: New file.
19179 * config/aarch64/aarch64.md: Include it.
19180 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19181 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19182 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19183 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19184 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19185 (sve): New attribute.
19186 (enabled): Disable instructions with the sve attribute unless
19187 TARGET_SVE.
19188 (movqi, movhi): Pass CONST_POLY_INT operaneds through
19189 aarch64_expand_mov_immediate.
19190 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19191 CNT[BHSD] immediates.
19192 (movti): Split CONST_POLY_INT moves into two halves.
19193 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19194 Split additions that need a temporary here if the destination
19195 is the stack pointer.
19196 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19197 (*add<mode>3_poly_1): New instruction.
19198 (set_clobber_cc): New expander.
19199
19200 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19201
19202 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19203 parameter and use it instead of GET_MODE_SIZE (innermode). Use
19204 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19205 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19206 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
19207 Change innermode from fixed_mode_size to machine_mode.
19208 (simplify_subreg): Update call accordingly. Handle a constant-sized
19209 subreg of a variable-length CONST_VECTOR.
19210
19211 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19212 Alan Hayward <alan.hayward@arm.com>
19213 David Sherwood <david.sherwood@arm.com>
19214
19215 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19216 (add_offset_to_base): New function, split out from...
19217 (create_mem_ref): ...here. When handling a scale other than 1,
19218 check first whether the address is valid without the offset.
19219 Add it into the base if so, leaving the index and scale as-is.
19220
19221 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19222
19223 PR c++/83778
19224 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19225 fold_for_warn before checking if arg2 is INTEGER_CST.
19226
19227 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
19228
19229 * config/rs6000/predicates.md (load_multiple_operation): Delete.
19230 (store_multiple_operation): Delete.
19231 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19232 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19233 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19234 guarded by TARGET_STRING.
19235 (rs6000_output_load_multiple): Delete.
19236 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19237 OPTION_MASK_STRING / TARGET_STRING handling.
19238 (print_operand) <'N', 'O'>: Add comment that these are unused now.
19239 (const rs6000_opt_masks) <"string">: Change mask to 0.
19240 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19241 (MASK_STRING): Delete.
19242 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19243 parts. Simplify.
19244 (load_multiple): Delete.
19245 (*ldmsi8): Delete.
19246 (*ldmsi7): Delete.
19247 (*ldmsi6): Delete.
19248 (*ldmsi5): Delete.
19249 (*ldmsi4): Delete.
19250 (*ldmsi3): Delete.
19251 (store_multiple): Delete.
19252 (*stmsi8): Delete.
19253 (*stmsi7): Delete.
19254 (*stmsi6): Delete.
19255 (*stmsi5): Delete.
19256 (*stmsi4): Delete.
19257 (*stmsi3): Delete.
19258 (movmemsi_8reg): Delete.
19259 (corresponding unnamed define_insn): Delete.
19260 (movmemsi_6reg): Delete.
19261 (corresponding unnamed define_insn): Delete.
19262 (movmemsi_4reg): Delete.
19263 (corresponding unnamed define_insn): Delete.
19264 (movmemsi_2reg): Delete.
19265 (corresponding unnamed define_insn): Delete.
19266 (movmemsi_1reg): Delete.
19267 (corresponding unnamed define_insn): Delete.
19268 * config/rs6000/rs6000.opt (mno-string): New.
19269 (mstring): Replace by deprecation warning stub.
19270 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19271
19272 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19273
19274 * regrename.c (regrename_do_replace): If replacing the same
19275 reg multiple times, try to reuse last created gen_raw_REG.
19276
19277 PR debug/81155
19278 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19279 main to workaround a bug in GDB.
19280
19281 2018-01-12 Tom de Vries <tom@codesourcery.com>
19282
19283 PR target/83737
19284 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19285
19286 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
19287
19288 PR rtl-optimization/80481
19289 * ira-color.c (get_cap_member): New function.
19290 (allocnos_conflict_by_live_ranges_p): Use it.
19291 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19292 (setup_slot_coalesced_allocno_live_ranges): Ditto.
19293
19294 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
19295
19296 PR target/83628
19297 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19298 (*saddl_se_1): Ditto.
19299 (*ssubsi_1): Ditto.
19300 (*ssubl_se_1): Ditto.
19301
19302 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19303
19304 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19305 rather than wi::to_widest for DR_INITs.
19306 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19307 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19308 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19309 INTEGER_CSTs.
19310 (vect_analyze_group_access_1): Note that here.
19311
19312 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19313
19314 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19315 polynomial type sizes.
19316
19317 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19318
19319 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19320 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19321 (gimple_add_tmp_var): Likewise.
19322
19323 2018-01-12 Martin Liska <mliska@suse.cz>
19324
19325 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19326 (gimple_alloc_sizes): Likewise.
19327 (dump_gimple_statistics): Use PRIu64 in printf format.
19328 * gimple.h: Change uint64_t to int.
19329
19330 2018-01-12 Martin Liska <mliska@suse.cz>
19331
19332 * tree-core.h: Use uint64_t instead of int.
19333 * tree.c (tree_node_counts): Likewise.
19334 (tree_node_sizes): Likewise.
19335 (dump_tree_statistics): Use PRIu64 in printf format.
19336
19337 2018-01-12 Martin Liska <mliska@suse.cz>
19338
19339 * Makefile.in: As qsort_chk is implemented in vec.c, add
19340 vec.o to linkage of gencfn-macros.
19341 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19342 passing the info to record_node_allocation_statistics.
19343 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19344 and pass the info.
19345 * ggc-common.c (struct ggc_usage): Add operator== and use
19346 it in operator< and compare function.
19347 * mem-stats.h (struct mem_usage): Likewise.
19348 * vec.c (struct vec_usage): Remove operator< and compare
19349 function. Can be simply inherited.
19350
19351 2018-01-12 Martin Jambor <mjambor@suse.cz>
19352
19353 PR target/81616
19354 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19355 * tree-ssa-math-opts.c: Include domwalk.h.
19356 (convert_mult_to_fma_1): New function.
19357 (fma_transformation_info): New type.
19358 (fma_deferring_state): Likewise.
19359 (cancel_fma_deferring): New function.
19360 (result_of_phi): Likewise.
19361 (last_fma_candidate_feeds_initial_phi): Likewise.
19362 (convert_mult_to_fma): Added deferring logic, split actual
19363 transformation to convert_mult_to_fma_1.
19364 (math_opts_dom_walker): New type.
19365 (math_opts_dom_walker::after_dom_children): New method, body moved
19366 here from pass_optimize_widening_mul::execute, added deferring logic
19367 bits.
19368 (pass_optimize_widening_mul::execute): Moved most of code to
19369 math_opts_dom_walker::after_dom_children.
19370 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19371 * config/i386/i386.c (ix86_option_override_internal): Added
19372 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19373
19374 2018-01-12 Richard Biener <rguenther@suse.de>
19375
19376 PR debug/83157
19377 * dwarf2out.c (gen_variable_die): Do not reset old_die for
19378 inline instance vars.
19379
19380 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
19381
19382 PR target/81819
19383 * config/rx/rx.c (rx_is_restricted_memory_address):
19384 Handle SUBREG case.
19385
19386 2018-01-12 Richard Biener <rguenther@suse.de>
19387
19388 PR tree-optimization/80846
19389 * target.def (split_reduction): New target hook.
19390 * targhooks.c (default_split_reduction): New function.
19391 * targhooks.h (default_split_reduction): Declare.
19392 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19393 target requests first reduce vectors by combining low and high
19394 parts.
19395 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19396 (get_vectype_for_scalar_type_and_size): Export.
19397 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19398 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19399 * doc/tm.texi: Regenerate.
19400 * config/i386/i386.c (ix86_split_reduction): Implement
19401 TARGET_VECTORIZE_SPLIT_REDUCTION.
19402
19403 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19404
19405 PR target/83368
19406 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19407 in PIC mode except for TARGET_VXWORKS_RTP.
19408 * config/sparc/sparc.c: Include cfgrtl.h.
19409 (TARGET_INIT_PIC_REG): Define.
19410 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19411 (sparc_pic_register_p): New predicate.
19412 (sparc_legitimate_address_p): Use it.
19413 (sparc_legitimize_pic_address): Likewise.
19414 (sparc_delegitimize_address): Likewise.
19415 (sparc_mode_dependent_address_p): Likewise.
19416 (gen_load_pcrel_sym): Remove 4th parameter.
19417 (load_got_register): Adjust call to above. Remove obsolete stuff.
19418 (sparc_expand_prologue): Do not call load_got_register here.
19419 (sparc_flat_expand_prologue): Likewise.
19420 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19421 (sparc_use_pseudo_pic_reg): New function.
19422 (sparc_init_pic_reg): Likewise.
19423 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19424 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19425
19426 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19427
19428 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19429 Add item for branch_cost.
19430
19431 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19432
19433 PR rtl-optimization/83565
19434 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19435 not extend the result to a larger mode for rotate operations.
19436 (num_sign_bit_copies1): Likewise.
19437
19438 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19439
19440 PR target/40411
19441 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19442 -symbolic.
19443 Use values-Xc.o for -pedantic.
19444 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19445
19446 2018-01-12 Martin Liska <mliska@suse.cz>
19447
19448 PR ipa/83054
19449 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19450 New function.
19451 (possible_polymorphic_call_targets): Use it.
19452 (ipa_devirt): Likewise.
19453
19454 2018-01-12 Martin Liska <mliska@suse.cz>
19455
19456 * profile-count.h (enum profile_quality): Use 0 as invalid
19457 enum value of profile_quality.
19458
19459 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19460
19461 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19462 -mext-string options.
19463
19464 2018-01-12 Richard Biener <rguenther@suse.de>
19465
19466 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19467 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19468 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19469 Likewise.
19470 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19471
19472 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19473
19474 * configure.ac (--with-long-double-format): Add support for the
19475 configuration option to change the default long double format on
19476 PowerPC systems.
19477 * config.gcc (powerpc*-linux*-*): Likewise.
19478 * configure: Regenerate.
19479 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19480 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19481 used without modification.
19482
19483 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19484
19485 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19486 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19487 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19488 MISC_BUILTIN_SPEC_BARRIER.
19489 (rs6000_init_builtins): Likewise.
19490 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19491 enum value.
19492 (speculation_barrier): New define_insn.
19493 * doc/extend.texi: Document __builtin_speculation_barrier.
19494
19495 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19496
19497 PR target/83203
19498 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19499 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19500 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19501 iterators.
19502 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19503 integral modes instead of "ss" and "sd".
19504 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19505 vectors with 32-bit and 64-bit elements.
19506 (vecdupssescalarmodesuffix): New mode attribute.
19507 (vec_dup<mode>): Use it.
19508
19509 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19510
19511 PR target/83330
19512 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19513 frame if argument is passed on stack.
19514
19515 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19516
19517 PR target/82682
19518 * ree.c (combine_reaching_defs): Optimize also
19519 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19520 reg2=any_extend(exp); reg1=reg2;, formatting fix.
19521
19522 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19523
19524 PR middle-end/83189
19525 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19526
19527 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19528
19529 PR middle-end/83718
19530 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19531 after they are computed.
19532
19533 2018-01-11 Bin Cheng <bin.cheng@arm.com>
19534
19535 PR tree-optimization/83695
19536 * gimple-loop-linterchange.cc
19537 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19538 reset cached scev information after interchange.
19539 (pass_linterchange::execute): Remove call to scev_reset_htab.
19540
19541 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19542
19543 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19544 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19545 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19546 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19547 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19548 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19549 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19550 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19551 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19552 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19553 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19554 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19555 (V_lane_reg): Likewise.
19556 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19557 New define_expand.
19558 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19559 (vfmal_lane_low<mode>_intrinsic,
19560 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19561 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19562 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19563 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19564 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19565 vfmsl_lane_high<mode>_intrinsic): New define_insns.
19566
19567 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19568
19569 * config/arm/arm-cpus.in (fp16fml): New feature.
19570 (ALL_SIMD): Add fp16fml.
19571 (armv8.2-a): Add fp16fml as an option.
19572 (armv8.3-a): Likewise.
19573 (armv8.4-a): Add fp16fml as part of fp16.
19574 * config/arm/arm.h (TARGET_FP16FML): Define.
19575 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19576 when appropriate.
19577 * config/arm/arm-modes.def (V2HF): Define.
19578 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19579 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19580 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19581 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19582 vfmsl_low, vfmsl_high): New set of builtins.
19583 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19584 (vfml_op): New code attribute.
19585 (VFMLHALVES): New int iterator.
19586 (VFML, VFMLSEL): New mode attributes.
19587 (V_reg): Define mapping for V2HF.
19588 (V_hi, V_lo): New mode attributes.
19589 (VF_constraint): Likewise.
19590 (vfml_half, vfml_half_selector): New int attributes.
19591 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19592 define_expand.
19593 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19594 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19595 New define_insn.
19596 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19597 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19598 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19599 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19600 documentation.
19601 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19602 Document new effective target and option set.
19603
19604 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19605
19606 * config/arm/arm-cpus.in (armv8_4): New feature.
19607 (ARMv8_4a): New fgroup.
19608 (armv8.4-a): New arch.
19609 * config/arm/arm-tables.opt: Regenerate.
19610 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19611 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19612 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19613 Add matching rules for -march=armv8.4-a and extensions.
19614 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19615
19616 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19617
19618 PR target/81821
19619 * config/rx/rx.md (BW): New mode attribute.
19620 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19621
19622 2018-01-11 Richard Biener <rguenther@suse.de>
19623
19624 PR tree-optimization/83435
19625 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19626 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19627 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19628
19629 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19630 Alan Hayward <alan.hayward@arm.com>
19631 David Sherwood <david.sherwood@arm.com>
19632
19633 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19634 field.
19635 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19636 (aarch64_print_address_internal): Use it to check for a zero offset.
19637
19638 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19639 Alan Hayward <alan.hayward@arm.com>
19640 David Sherwood <david.sherwood@arm.com>
19641
19642 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19643 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19644 Return a poly_int64 rather than a HOST_WIDE_INT.
19645 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19646 rather than a HOST_WIDE_INT.
19647 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19648 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19649 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19650 final_offset from HOST_WIDE_INT to poly_int64.
19651 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19652 to_constant when getting the number of units in an Advanced SIMD
19653 mode.
19654 (aarch64_builtin_vectorized_function): Check for a constant number
19655 of units.
19656 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19657 GET_MODE_SIZE.
19658 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19659 attribute instead of GET_MODE_NUNITS.
19660 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19661 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19662 GET_MODE_SIZE for fixed-size registers.
19663 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19664 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19665 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19666 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19667 (aarch64_print_operand, aarch64_print_address_internal)
19668 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19669 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19670 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19671 Handle polynomial GET_MODE_SIZE.
19672 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19673 wider than SImode without modification.
19674 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19675 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19676 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19677 passing and returning SVE modes.
19678 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19679 rather than GEN_INT.
19680 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19681 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19682 (aarch64_allocate_and_probe_stack_space): Likewise.
19683 (aarch64_layout_frame): Cope with polynomial offsets.
19684 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19685 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19686 polynomial offsets.
19687 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19688 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19689 poly_int64 rather than a HOST_WIDE_INT.
19690 (aarch64_get_separate_components, aarch64_process_components)
19691 (aarch64_expand_prologue, aarch64_expand_epilogue)
19692 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19693 (aarch64_anchor_offset): New function, split out from...
19694 (aarch64_legitimize_address): ...here.
19695 (aarch64_builtin_vectorization_cost): Handle polynomial
19696 TYPE_VECTOR_SUBPARTS.
19697 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19698 GET_MODE_NUNITS.
19699 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19700 number of elements from the PARALLEL rather than the mode.
19701 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19702 rather than GET_MODE_BITSIZE.
19703 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19704 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19705 (aarch64_expand_vec_perm_const_1): Handle polynomial
19706 d->perm.length () and d->perm elements.
19707 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19708 Apply to_constant to d->perm elements.
19709 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19710 polynomial CONST_VECTOR_NUNITS.
19711 (aarch64_move_pointer): Take amount as a poly_int64 rather
19712 than an int.
19713 (aarch64_progress_pointer): Avoid temporary variable.
19714 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19715 the mode attribute instead of GET_MODE.
19716
19717 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19718 Alan Hayward <alan.hayward@arm.com>
19719 David Sherwood <david.sherwood@arm.com>
19720
19721 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19722 x exists before using it.
19723 (aarch64_add_constant_internal): Rename to...
19724 (aarch64_add_offset_1): ...this. Replace regnum with separate
19725 src and dest rtxes. Handle the case in which they're different,
19726 including when the offset is zero. Replace scratchreg with an rtx.
19727 Use 2 additions if there is no spare register into which we can
19728 move a 16-bit constant.
19729 (aarch64_add_constant): Delete.
19730 (aarch64_add_offset): Replace reg with separate src and dest
19731 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19732 Use aarch64_add_offset_1.
19733 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19734 an rtx rather than an int. Take the delta as a poly_int64
19735 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19736 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19737 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19738 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19739 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19740 and aarch64_add_sp.
19741 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19742 aarch64_add_constant.
19743
19744 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19745
19746 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19747 Use scalar_float_mode.
19748
19749 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19750
19751 * config/aarch64/aarch64-simd.md
19752 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19753 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19754 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19755 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19756 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19757 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19758 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19759 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19760 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19761 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19762
19763 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19764
19765 PR target/83514
19766 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19767 targ_options->x_arm_arch_string is non NULL.
19768
19769 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19770
19771 * config/aarch64/aarch64.h
19772 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19773
19774 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19775
19776 PR target/82096
19777 * expmed.c (emit_store_flag_force): Swap if const op0
19778 and change VOIDmode to mode of op0.
19779
19780 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19781
19782 PR rtl-optimization/83761
19783 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19784 than bytes to mode_for_size.
19785
19786 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19787
19788 PR middle-end/83189
19789 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19790 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19791 profile.
19792
19793 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19794
19795 PR middle-end/83575
19796 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19797 when in layout mode.
19798 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19799 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19800 partition fixup.
19801
19802 2018-01-10 Michael Collison <michael.collison@arm.com>
19803
19804 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19805 * config/aarch64/aarch64-option-extension.def: Add
19806 AARCH64_OPT_EXTENSION of 'fp16fml'.
19807 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19808 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19809 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19810 * config/aarch64/constraints.md (Ui7): New constraint.
19811 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19812 (VFMLA_SEL_W): Ditto.
19813 (f16quad): Ditto.
19814 (f16mac1): Ditto.
19815 (VFMLA16_LOW): New int iterator.
19816 (VFMLA16_HIGH): Ditto.
19817 (UNSPEC_FMLAL): New unspec.
19818 (UNSPEC_FMLSL): Ditto.
19819 (UNSPEC_FMLAL2): Ditto.
19820 (UNSPEC_FMLSL2): Ditto.
19821 (f16mac): New code attribute.
19822 * config/aarch64/aarch64-simd-builtins.def
19823 (aarch64_fmlal_lowv2sf): Ditto.
19824 (aarch64_fmlsl_lowv2sf): Ditto.
19825 (aarch64_fmlalq_lowv4sf): Ditto.
19826 (aarch64_fmlslq_lowv4sf): Ditto.
19827 (aarch64_fmlal_highv2sf): Ditto.
19828 (aarch64_fmlsl_highv2sf): Ditto.
19829 (aarch64_fmlalq_highv4sf): Ditto.
19830 (aarch64_fmlslq_highv4sf): Ditto.
19831 (aarch64_fmlal_lane_lowv2sf): Ditto.
19832 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19833 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19834 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19835 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19836 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19837 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19838 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19839 (aarch64_fmlal_lane_highv2sf): Ditto.
19840 (aarch64_fmlsl_lane_highv2sf): Ditto.
19841 (aarch64_fmlal_laneq_highv2sf): Ditto.
19842 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19843 (aarch64_fmlalq_lane_highv4sf): Ditto.
19844 (aarch64_fmlsl_lane_highv4sf): Ditto.
19845 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19846 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19847 * config/aarch64/aarch64-simd.md:
19848 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19849 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19850 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19851 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19852 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19853 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19854 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19855 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19856 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19857 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19858 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19859 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19860 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19861 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19862 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19863 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19864 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19865 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19866 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19867 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19868 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19869 (vfmlsl_low_u32): Ditto.
19870 (vfmlalq_low_u32): Ditto.
19871 (vfmlslq_low_u32): Ditto.
19872 (vfmlal_high_u32): Ditto.
19873 (vfmlsl_high_u32): Ditto.
19874 (vfmlalq_high_u32): Ditto.
19875 (vfmlslq_high_u32): Ditto.
19876 (vfmlal_lane_low_u32): Ditto.
19877 (vfmlsl_lane_low_u32): Ditto.
19878 (vfmlal_laneq_low_u32): Ditto.
19879 (vfmlsl_laneq_low_u32): Ditto.
19880 (vfmlalq_lane_low_u32): Ditto.
19881 (vfmlslq_lane_low_u32): Ditto.
19882 (vfmlalq_laneq_low_u32): Ditto.
19883 (vfmlslq_laneq_low_u32): Ditto.
19884 (vfmlal_lane_high_u32): Ditto.
19885 (vfmlsl_lane_high_u32): Ditto.
19886 (vfmlal_laneq_high_u32): Ditto.
19887 (vfmlsl_laneq_high_u32): Ditto.
19888 (vfmlalq_lane_high_u32): Ditto.
19889 (vfmlslq_lane_high_u32): Ditto.
19890 (vfmlalq_laneq_high_u32): Ditto.
19891 (vfmlslq_laneq_high_u32): Ditto.
19892 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19893 (AARCH64_FL_FOR_ARCH8_4): New.
19894 (AARCH64_ISA_F16FML): New ISA flag.
19895 (TARGET_F16FML): New feature flag for fp16fml.
19896 (doc/invoke.texi): Document new fp16fml option.
19897
19898 2018-01-10 Michael Collison <michael.collison@arm.com>
19899
19900 * config/aarch64/aarch64-builtins.c:
19901 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19902 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19903 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19904 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19905 (AARCH64_ISA_SHA3): New ISA flag.
19906 (TARGET_SHA3): New feature flag for sha3.
19907 * config/aarch64/iterators.md (sha512_op): New int attribute.
19908 (CRYPTO_SHA512): New int iterator.
19909 (UNSPEC_SHA512H): New unspec.
19910 (UNSPEC_SHA512H2): Ditto.
19911 (UNSPEC_SHA512SU0): Ditto.
19912 (UNSPEC_SHA512SU1): Ditto.
19913 * config/aarch64/aarch64-simd-builtins.def
19914 (aarch64_crypto_sha512hqv2di): New builtin.
19915 (aarch64_crypto_sha512h2qv2di): Ditto.
19916 (aarch64_crypto_sha512su0qv2di): Ditto.
19917 (aarch64_crypto_sha512su1qv2di): Ditto.
19918 (aarch64_eor3qv8hi): Ditto.
19919 (aarch64_rax1qv2di): Ditto.
19920 (aarch64_xarqv2di): Ditto.
19921 (aarch64_bcaxqv8hi): Ditto.
19922 * config/aarch64/aarch64-simd.md:
19923 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19924 (aarch64_crypto_sha512su0qv2di): Ditto.
19925 (aarch64_crypto_sha512su1qv2di): Ditto.
19926 (aarch64_eor3qv8hi): Ditto.
19927 (aarch64_rax1qv2di): Ditto.
19928 (aarch64_xarqv2di): Ditto.
19929 (aarch64_bcaxqv8hi): Ditto.
19930 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19931 (vsha512h2q_u64): Ditto.
19932 (vsha512su0q_u64): Ditto.
19933 (vsha512su1q_u64): Ditto.
19934 (veor3q_u16): Ditto.
19935 (vrax1q_u64): Ditto.
19936 (vxarq_u64): Ditto.
19937 (vbcaxq_u16): Ditto.
19938 * config/arm/types.md (crypto_sha512): New type attribute.
19939 (crypto_sha3): Ditto.
19940 (doc/invoke.texi): Document new sha3 option.
19941
19942 2018-01-10 Michael Collison <michael.collison@arm.com>
19943
19944 * config/aarch64/aarch64-builtins.c:
19945 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19946 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19947 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19948 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19949 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19950 (AARCH64_ISA_SM4): New ISA flag.
19951 (TARGET_SM4): New feature flag for sm4.
19952 * config/aarch64/aarch64-simd-builtins.def
19953 (aarch64_sm3ss1qv4si): Ditto.
19954 (aarch64_sm3tt1aq4si): Ditto.
19955 (aarch64_sm3tt1bq4si): Ditto.
19956 (aarch64_sm3tt2aq4si): Ditto.
19957 (aarch64_sm3tt2bq4si): Ditto.
19958 (aarch64_sm3partw1qv4si): Ditto.
19959 (aarch64_sm3partw2qv4si): Ditto.
19960 (aarch64_sm4eqv4si): Ditto.
19961 (aarch64_sm4ekeyqv4si): Ditto.
19962 * config/aarch64/aarch64-simd.md:
19963 (aarch64_sm3ss1qv4si): Ditto.
19964 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19965 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19966 (aarch64_sm4eqv4si): Ditto.
19967 (aarch64_sm4ekeyqv4si): Ditto.
19968 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19969 (sm3part_op): Ditto.
19970 (CRYPTO_SM3TT): Ditto.
19971 (CRYPTO_SM3PART): Ditto.
19972 (UNSPEC_SM3SS1): New unspec.
19973 (UNSPEC_SM3TT1A): Ditto.
19974 (UNSPEC_SM3TT1B): Ditto.
19975 (UNSPEC_SM3TT2A): Ditto.
19976 (UNSPEC_SM3TT2B): Ditto.
19977 (UNSPEC_SM3PARTW1): Ditto.
19978 (UNSPEC_SM3PARTW2): Ditto.
19979 (UNSPEC_SM4E): Ditto.
19980 (UNSPEC_SM4EKEY): Ditto.
19981 * config/aarch64/constraints.md (Ui2): New constraint.
19982 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19983 * config/arm/types.md (crypto_sm3): New type attribute.
19984 (crypto_sm4): Ditto.
19985 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19986 (vsm3tt1aq_u32): Ditto.
19987 (vsm3tt1bq_u32): Ditto.
19988 (vsm3tt2aq_u32): Ditto.
19989 (vsm3tt2bq_u32): Ditto.
19990 (vsm3partw1q_u32): Ditto.
19991 (vsm3partw2q_u32): Ditto.
19992 (vsm4eq_u32): Ditto.
19993 (vsm4ekeyq_u32): Ditto.
19994 (doc/invoke.texi): Document new sm4 option.
19995
19996 2018-01-10 Michael Collison <michael.collison@arm.com>
19997
19998 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19999 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20000 (AARCH64_FL_FOR_ARCH8_4): New.
20001 (AARCH64_FL_V8_4): New flag.
20002 (doc/invoke.texi): Document new armv8.4-a option.
20003
20004 2018-01-10 Michael Collison <michael.collison@arm.com>
20005
20006 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20007 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20008 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20009 * config/aarch64/aarch64-option-extension.def: Add
20010 AARCH64_OPT_EXTENSION of 'sha2'.
20011 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20012 (crypto): Disable sha2 and aes if crypto disabled.
20013 (crypto): Enable aes and sha2 if enabled.
20014 (simd): Disable sha2 and aes if simd disabled.
20015 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20016 New flags.
20017 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20018 (TARGET_SHA2): New feature flag for sha2.
20019 (TARGET_AES): New feature flag for aes.
20020 * config/aarch64/aarch64-simd.md:
20021 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20022 conditional on TARGET_AES.
20023 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20024 (aarch64_crypto_sha1hsi): Make pattern conditional
20025 on TARGET_SHA2.
20026 (aarch64_crypto_sha1hv4si): Ditto.
20027 (aarch64_be_crypto_sha1hv4si): Ditto.
20028 (aarch64_crypto_sha1su1v4si): Ditto.
20029 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20030 (aarch64_crypto_sha1su0v4si): Ditto.
20031 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20032 (aarch64_crypto_sha256su0v4si): Ditto.
20033 (aarch64_crypto_sha256su1v4si): Ditto.
20034 (doc/invoke.texi): Document new aes and sha2 options.
20035
20036 2018-01-10 Martin Sebor <msebor@redhat.com>
20037
20038 PR tree-optimization/83781
20039 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20040 as string arrays.
20041
20042 2018-01-11 Martin Sebor <msebor@gmail.com>
20043 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20044
20045 PR tree-optimization/83501
20046 PR tree-optimization/81703
20047
20048 * tree-ssa-strlen.c (get_string_cst): Rename...
20049 (get_string_len): ...to this. Handle global constants.
20050 (handle_char_store): Adjust.
20051
20052 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
20053 Jim Wilson <jimw@sifive.com>
20054
20055 * config/riscv/riscv-protos.h (riscv_output_return): New.
20056 * config/riscv/riscv.c (struct machine_function): New naked_p field.
20057 (riscv_attribute_table, riscv_output_return),
20058 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20059 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20060 (riscv_compute_frame_info): Only compute frame->mask if not a naked
20061 function.
20062 (riscv_expand_prologue): Add early return for naked function.
20063 (riscv_expand_epilogue): Likewise.
20064 (riscv_function_ok_for_sibcall): Return false for naked function.
20065 (riscv_set_current_function): New.
20066 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20067 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20068 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20069 * doc/extend.texi (RISC-V Function Attributes): New.
20070
20071 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20072
20073 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20074 check for 128-bit long double before checking TCmode.
20075 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20076 128-bit long doubles before checking TFmode or TCmode.
20077 (FLOAT128_IBM_P): Likewise.
20078
20079 2018-01-10 Martin Sebor <msebor@redhat.com>
20080
20081 PR tree-optimization/83671
20082 * builtins.c (c_strlen): Unconditionally return zero for the empty
20083 string.
20084 Use -Warray-bounds for warnings.
20085 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20086 for non-constant array indices with COMPONENT_REF, arrays of
20087 arrays, and pointers to arrays.
20088 (gimple_fold_builtin_strlen): Determine and set length range for
20089 non-constant character arrays.
20090
20091 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
20092
20093 PR middle-end/81897
20094 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20095 empty blocks.
20096
20097 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
20098
20099 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20100
20101 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20102
20103 PR target/83399
20104 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20105 VECTOR_MEM_ALTIVEC_OR_VSX_P.
20106 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20107 indexed_or_indirect_operand predicate.
20108 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20109 (*vsx_le_perm_load_v8hi): Likewise.
20110 (*vsx_le_perm_load_v16qi): Likewise.
20111 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20112 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20113 (*vsx_le_perm_store_v8hi): Likewise.
20114 (*vsx_le_perm_store_v16qi): Likewise.
20115 (eight unnamed splitters): Likewise.
20116
20117 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20118
20119 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20120 * config/rs6000/emmintrin.h: Likewise.
20121 * config/rs6000/mmintrin.h: Likewise.
20122 * config/rs6000/xmmintrin.h: Likewise.
20123
20124 2018-01-10 David Malcolm <dmalcolm@redhat.com>
20125
20126 PR c++/43486
20127 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20128 "public_flag".
20129 * tree.c (tree_nop_conversion): Return true for location wrapper
20130 nodes.
20131 (maybe_wrap_with_location): New function.
20132 (selftest::check_strip_nops): New function.
20133 (selftest::test_location_wrappers): New function.
20134 (selftest::tree_c_tests): Call it.
20135 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20136 (maybe_wrap_with_location): New decl.
20137 (EXPR_LOCATION_WRAPPER_P): New macro.
20138 (location_wrapper_p): New inline function.
20139 (tree_strip_any_location_wrapper): New inline function.
20140
20141 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
20142
20143 PR target/83735
20144 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20145 stack_realign_offset for the largest alignment of stack slot
20146 actually used.
20147 (ix86_find_max_used_stack_alignment): New function.
20148 (ix86_finalize_stack_frame_flags): Use it. Set
20149 max_used_stack_alignment if we don't realign stack.
20150 * config/i386/i386.h (machine_function): Add
20151 max_used_stack_alignment.
20152
20153 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
20154
20155 * config/arm/arm.opt (-mbranch-cost): New option.
20156 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20157 account.
20158
20159 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
20160
20161 PR target/83629
20162 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20163 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20164
20165 2018-01-10 Richard Biener <rguenther@suse.de>
20166
20167 PR debug/83765
20168 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20169 early out so it also covers the case where we have a non-NULL
20170 origin.
20171
20172 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20173
20174 PR tree-optimization/83753
20175 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20176 for non-strided grouped accesses if the number of elements is 1.
20177
20178 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20179
20180 PR target/81616
20181 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20182 * i386.h (TARGET_USE_GATHER): Define.
20183 * x86-tune.def (X86_TUNE_USE_GATHER): New.
20184
20185 2018-01-10 Martin Liska <mliska@suse.cz>
20186
20187 PR bootstrap/82831
20188 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20189 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20190 partitioning.
20191 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20192 CLEANUP_NO_PARTITIONING is not set.
20193
20194 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20195
20196 * doc/rtl.texi: Remove documentation of (const ...) wrappers
20197 for vectors, as a partial revert of r254296.
20198 * rtl.h (const_vec_p): Delete.
20199 (const_vec_duplicate_p): Don't test for vector CONSTs.
20200 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20201 * expmed.c (make_tree): Likewise.
20202
20203 Revert:
20204 * common.md (E, F): Use CONSTANT_P instead of checking for
20205 CONST_VECTOR.
20206 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20207 checking for CONST_VECTOR.
20208
20209 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20210
20211 PR middle-end/83575
20212 * predict.c (force_edge_cold): Handle in more sane way edges
20213 with no prediction.
20214
20215 2018-01-09 Carl Love <cel@us.ibm.com>
20216
20217 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20218 V4SI, V4SF types.
20219 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20220 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20221 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20222 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
20223 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20224 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
20225 * config/rs6000/rs6000-protos.h: Add extern defition for
20226 rs6000_generate_float2_double_code.
20227 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20228 function.
20229 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20230 (float2_v2df): Add define_expand.
20231
20232 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
20233
20234 PR target/83628
20235 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20236 op_mode in the force_to_mode call.
20237
20238 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20239
20240 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20241 instead of checking each element individually.
20242 (aarch64_evpc_uzp): Likewise.
20243 (aarch64_evpc_zip): Likewise.
20244 (aarch64_evpc_ext): Likewise.
20245 (aarch64_evpc_rev): Likewise.
20246 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20247 instead of checking each element individually. Return true without
20248 generating rtl if
20249 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20250 whether all selected elements come from the same input, instead of
20251 checking each element individually. Remove calls to gen_rtx_REG,
20252 start_sequence and end_sequence and instead assert that no rtl is
20253 generated.
20254
20255 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20256
20257 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20258 order of HIGH and CONST checks.
20259
20260 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20261
20262 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20263 if the destination isn't an SSA_NAME.
20264
20265 2018-01-09 Richard Biener <rguenther@suse.de>
20266
20267 PR tree-optimization/83668
20268 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20269 move prologue...
20270 (canonicalize_loop_form): ... here, renamed from ...
20271 (canonicalize_loop_closed_ssa_form): ... this and amended to
20272 swap successor edges for loop exit blocks to make us use
20273 the RPO order we need for initial schedule generation.
20274
20275 2018-01-09 Joseph Myers <joseph@codesourcery.com>
20276
20277 PR tree-optimization/64811
20278 * match.pd: When optimizing comparisons with Inf, avoid
20279 introducing or losing exceptions from comparisons with NaN.
20280
20281 2018-01-09 Martin Liska <mliska@suse.cz>
20282
20283 PR sanitizer/82517
20284 * asan.c (shadow_mem_size): Add gcc_assert.
20285
20286 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
20287
20288 Don't save registers in main().
20289
20290 PR target/83738
20291 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20292 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20293 * config/avr/avr.c (avr_set_current_function): Don't error if
20294 naked, OS_task or OS_main are specified at the same time.
20295 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20296 OS_main.
20297 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20298 attribute.
20299 * common/config/avr/avr-common.c (avr_option_optimization_table):
20300 Switch on -mmain-is-OS_task for optimizing compilations.
20301
20302 2018-01-09 Richard Biener <rguenther@suse.de>
20303
20304 PR tree-optimization/83572
20305 * graphite.c: Include cfganal.h.
20306 (graphite_transform_loops): Connect infinite loops to exit
20307 and remove fake edges at the end.
20308
20309 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20310
20311 * ipa-inline.c (edge_badness): Revert accidental checkin.
20312
20313 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20314
20315 PR ipa/80763
20316 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20317 symbols; not inline clones.
20318
20319 2018-01-09 Jakub Jelinek <jakub@redhat.com>
20320
20321 PR target/83507
20322 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20323 hard registers. Formatting fixes.
20324
20325 PR preprocessor/83722
20326 * gcc.c (try_generate_repro): Pass
20327 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20328 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20329 do_report_bug.
20330
20331 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
20332 Kito Cheng <kito.cheng@gmail.com>
20333
20334 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20335 (riscv_leaf_function_p): Delete.
20336 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20337
20338 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20339
20340 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20341 function.
20342 (do_ifelse): New function.
20343 (do_isel): New function.
20344 (do_sub3): New function.
20345 (do_add3): New function.
20346 (do_load_mask_compare): New function.
20347 (do_overlap_load_compare): New function.
20348 (expand_compare_loop): New function.
20349 (expand_block_compare): Call expand_compare_loop() when appropriate.
20350 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20351 option description.
20352 (-mblock-compare-inline-loop-limit): New option.
20353
20354 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20355
20356 PR target/83677
20357 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20358 Reverse order of second and third operands in first alternative.
20359 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20360 of first and second elements in UNSPEC_VPERMR vector.
20361 (altivec_expand_vec_perm_le): Likewise.
20362
20363 2018-01-08 Jeff Law <law@redhat.com>
20364
20365 PR rtl-optimizatin/81308
20366 * tree-switch-conversion.c (cfg_altered): New file scoped static.
20367 (process_switch): If group_case_labels makes a change, then set
20368 cfg_altered.
20369 (pass_convert_switch::execute): If a switch is converted, then
20370 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
20371
20372 PR rtl-optimization/81308
20373 * recog.c (split_all_insns): Conditionally cleanup the CFG after
20374 splitting insns.
20375
20376 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
20377
20378 PR target/83663 - Revert r255946
20379 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20380 generation for cases where splatting a value is not useful.
20381 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20382 across a vec_duplicate and a paradoxical subreg forming a vector
20383 mode to a vec_concat.
20384
20385 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20386
20387 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20388 -march=armv8.3-a variants.
20389 * config/arm/t-multilib: Likewise.
20390 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
20391
20392 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20393
20394 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20395 to generate rtl.
20396 (cceq_ior_compare_complement): Give it a name so I can use it, and
20397 change boolean_or_operator predicate to boolean_operator so it can
20398 be used to generate a crand.
20399 (eqne): New code iterator.
20400 (bd/bd_neg): New code_attrs.
20401 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20402 a single define_insn.
20403 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20404 decrement (bdnzt/bdnzf/bdzt/bdzf).
20405 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20406 with the new names of the branch decrement patterns, and added the
20407 names of the branch decrement conditional patterns.
20408
20409 2018-01-08 Richard Biener <rguenther@suse.de>
20410
20411 PR tree-optimization/83563
20412 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20413 cache.
20414
20415 2018-01-08 Richard Biener <rguenther@suse.de>
20416
20417 PR middle-end/83713
20418 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20419
20420 2018-01-08 Richard Biener <rguenther@suse.de>
20421
20422 PR tree-optimization/83685
20423 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20424 references to abnormals.
20425
20426 2018-01-08 Richard Biener <rguenther@suse.de>
20427
20428 PR lto/83719
20429 * dwarf2out.c (output_indirect_strings): Handle empty
20430 skeleton_debug_str_hash.
20431 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20432
20433 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20434
20435 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20436 (emit_store_direct): Likewise.
20437 (arc_trampoline_adjust_address): Likewise.
20438 (arc_asm_trampoline_template): New function.
20439 (arc_initialize_trampoline): Use asm_trampoline_template.
20440 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20441 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20442 * config/arc/arc.md (flush_icache): Delete pattern.
20443
20444 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20445
20446 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20447 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20448 munaligned-access.
20449
20450 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20451
20452 PR target/83681
20453 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20454 by not USED_FOR_TARGET.
20455 (make_pass_resolve_sw_modes): Likewise.
20456
20457 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20458
20459 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20460 USED_FOR_TARGET.
20461
20462 2018-01-08 Richard Biener <rguenther@suse.de>
20463
20464 PR middle-end/83580
20465 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20466
20467 2018-01-08 Richard Biener <rguenther@suse.de>
20468
20469 PR middle-end/83517
20470 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20471
20472 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20473
20474 PR middle-end/81897
20475 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20476 basic blocks with a small number of successors.
20477 (convert_control_dep_chain_into_preds): Improve handling of
20478 forwarder blocks.
20479 (dump_predicates): Split apart into...
20480 (dump_pred_chain): ...here...
20481 (dump_pred_info): ...and here.
20482 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20483 (can_chain_union_be_invalidated_p): Improve check for invalidation
20484 of paths.
20485 (uninit_uses_cannot_happen): Avoid unnecessary if
20486 convert_control_dep_chain_into_preds yielded nothing.
20487
20488 2018-01-06 Martin Sebor <msebor@redhat.com>
20489
20490 PR tree-optimization/83640
20491 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20492 subtracting negative offset from size.
20493 (builtin_access::overlap): Adjust offset bounds of the access to fall
20494 within the size of the object if possible.
20495
20496 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20497
20498 PR rtl-optimization/83699
20499 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20500 extract_bit_field_as_subreg to cases in which the extracted
20501 value is also a vector.
20502
20503 * lra-constraints.c (process_alt_operands): Test for the equivalence
20504 substitutions when detecting a possible reload cycle.
20505
20506 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20507
20508 PR debug/83480
20509 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20510 by default if flag_selective_schedling{,2}. Formatting fixes.
20511
20512 PR rtl-optimization/83682
20513 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20514 if it has non-VECTOR_MODE element mode.
20515 (vec_duplicate_p): Likewise.
20516
20517 PR middle-end/83694
20518 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20519 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20520
20521 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20522
20523 PR target/83604
20524 * config/i386/i386-builtin.def
20525 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20526 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20527 Require also OPTION_MASK_ISA_AVX512F in addition to
20528 OPTION_MASK_ISA_GFNI.
20529 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20530 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20531 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20532 to OPTION_MASK_ISA_GFNI.
20533 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20534 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20535 OPTION_MASK_ISA_AVX512BW.
20536 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20537 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20538 addition to OPTION_MASK_ISA_GFNI.
20539 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20540 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20541 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20542 to OPTION_MASK_ISA_GFNI.
20543 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20544 a requirement for all ISAs rather than any of them with a few
20545 exceptions.
20546 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20547 processing.
20548 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20549 bitmasks to be enabled with 3 exceptions, instead of requiring any
20550 enabled ISA with lots of exceptions.
20551 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20552 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20553 Change avx512bw in isa attribute to avx512f.
20554 * config/i386/sgxintrin.h: Add license boilerplate.
20555 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
20556 to __AVX512F__ and __AVX512VL to __AVX512VL__.
20557 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20558 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20559 defined.
20560 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20561 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20562 temporarily sse2 rather than sse if not enabled already.
20563
20564 PR target/83604
20565 * config/i386/sse.md (VI248_VLBW): Rename to ...
20566 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
20567 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20568 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20569 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20570 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20571 mode iterator instead of VI248_VLBW.
20572
20573 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
20574
20575 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20576 (record_modified): Skip clobbers; add debug output.
20577 (param_change_prob): Use sreal frequencies.
20578
20579 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20580
20581 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20582 punt for user-aligned variables.
20583
20584 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20585
20586 * tree-chrec.c (chrec_contains_symbols): Return true for
20587 POLY_INT_CST.
20588
20589 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20590
20591 PR target/82439
20592 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20593 of (x|y) == x for BICS pattern.
20594
20595 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20596
20597 PR tree-optimization/83605
20598 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20599 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20600 can throw.
20601
20602 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20603
20604 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20605 * config/epiphany/rtems.h: New file.
20606
20607 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20608 Uros Bizjak <ubizjak@gmail.com>
20609
20610 PR target/83554
20611 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20612 QIreg_operand instead of register_operand predicate.
20613 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20614 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20615 comments instead of -fmitigate[-_]rop.
20616
20617 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20618
20619 PR bootstrap/81926
20620 * cgraphunit.c (symbol_table::compile): Switch to text_section
20621 before calling assembly_start debug hook.
20622 * run-rtl-passes.c (run_rtl_passes): Likewise.
20623 Include output.h.
20624
20625 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20626
20627 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20628 range_int_cst_p rather than !symbolic_range_p before calling
20629 extract_range_from_multiplicative_op_1.
20630
20631 2018-01-04 Jeff Law <law@redhat.com>
20632
20633 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20634 redundant test in assertion.
20635
20636 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20637
20638 * doc/rtl.texi: Document machine_mode wrapper classes.
20639
20640 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20641
20642 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20643 using tree_to_uhwi.
20644
20645 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20646
20647 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20648 the VEC_PERM_EXPR fold to fail.
20649
20650 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20651
20652 PR debug/83585
20653 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20654 to switched_sections.
20655
20656 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20657
20658 PR target/83680
20659 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20660 test for d.testing.
20661
20662 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20663
20664 PR target/83387
20665 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20666 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20667
20668 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20669
20670 PR debug/83666
20671 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20672 is BLKmode and bitpos not zero or mode change is needed.
20673
20674 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20675
20676 PR target/83675
20677 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20678 TARGET_VIS2.
20679
20680 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20681
20682 PR target/83628
20683 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20684 instead of MULT rtx. Update all corresponding splitters.
20685 (*saddl_se): Ditto.
20686 (*ssub<modesuffix>): Ditto.
20687 (*ssubl_se): Ditto.
20688 (*cmp_sadd_di): Update split patterns.
20689 (*cmp_sadd_si): Ditto.
20690 (*cmp_sadd_sidi): Ditto.
20691 (*cmp_ssub_di): Ditto.
20692 (*cmp_ssub_si): Ditto.
20693 (*cmp_ssub_sidi): Ditto.
20694 * config/alpha/predicates.md (const23_operand): New predicate.
20695 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20696 Look for ASHIFT, not MULT inner operand.
20697 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20698
20699 2018-01-04 Martin Liska <mliska@suse.cz>
20700
20701 PR gcov-profile/83669
20702 * gcov.c (output_intermediate_file): Add version to intermediate
20703 gcov file.
20704 * doc/gcov.texi: Document new field 'version' in intermediate
20705 file format. Fix location of '-k' option of gcov command.
20706
20707 2018-01-04 Martin Liska <mliska@suse.cz>
20708
20709 PR ipa/82352
20710 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20711
20712 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20713
20714 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20715
20716 2018-01-03 Martin Sebor <msebor@redhat.com>
20717
20718 PR tree-optimization/83655
20719 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20720 checking calls with invalid arguments.
20721
20722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20723
20724 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20725 (vectorizable_mask_load_store): Delete.
20726 (vectorizable_call): Return false for masked loads and stores.
20727 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20728 instead of gimple_assign_rhs1.
20729 (vectorizable_load): Handle IFN_MASK_LOAD.
20730 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20731
20732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20733
20734 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20735 split out from..,
20736 (vectorizable_mask_load_store): ...here.
20737 (vectorizable_load): ...and here.
20738
20739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20740
20741 * tree-vect-stmts.c (vect_build_all_ones_mask)
20742 (vect_build_zero_merge_argument): New functions, split out from...
20743 (vectorizable_load): ...here.
20744
20745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20746
20747 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20748 split out from...
20749 (vectorizable_mask_load_store): ...here.
20750 (vectorizable_store): ...and here.
20751
20752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20753
20754 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20755 split out from...
20756 (vectorizable_mask_load_store): ...here.
20757
20758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20759
20760 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20761 (vect_model_store_cost): Take a vec_load_store_type instead of a
20762 vect_def_type.
20763 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20764 (vect_model_store_cost): Take a vec_load_store_type instead of a
20765 vect_def_type.
20766 (vectorizable_mask_load_store): Update accordingly.
20767 (vectorizable_store): Likewise.
20768 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20769
20770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20771
20772 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20773 IFN_MASK_LOAD calls here rather than...
20774 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20775
20776 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20777 Alan Hayward <alan.hayward@arm.com>
20778 David Sherwood <david.sherwood@arm.com>
20779
20780 * expmed.c (extract_bit_field_1): For vector extracts,
20781 fall back to extract_bit_field_as_subreg if vec_extract
20782 isn't available.
20783
20784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20785 Alan Hayward <alan.hayward@arm.com>
20786 David Sherwood <david.sherwood@arm.com>
20787
20788 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20789 they are variable or constant sized.
20790 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20791 slots for constant-sized data.
20792
20793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20794 Alan Hayward <alan.hayward@arm.com>
20795 David Sherwood <david.sherwood@arm.com>
20796
20797 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20798 handling COND_EXPRs with boolean comparisons, try to find a better
20799 basis for the mask type than the boolean itself.
20800
20801 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20802
20803 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20804 is calculated and how it can be overridden.
20805 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20806 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20807 if defined.
20808 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20809 if nonzero.
20810
20811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20812 Alan Hayward <alan.hayward@arm.com>
20813 David Sherwood <david.sherwood@arm.com>
20814
20815 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20816 Remove the mode argument.
20817 (aarch64_simd_valid_immediate): Remove the mode and inverse
20818 arguments.
20819 * config/aarch64/iterators.md (bitsize): New iterator.
20820 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20821 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20822 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20823 aarch64_simd_valid_immediate.
20824 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20825 (aarch64_reg_or_bic_imm): Likewise.
20826 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20827 with an insn_type enum and msl with a modifier_type enum.
20828 Replace element_width with a scalar_mode. Change the shift
20829 to unsigned int. Add constructors for scalar_float_mode and
20830 scalar_int_mode elements.
20831 (aarch64_vect_float_const_representable_p): Delete.
20832 (aarch64_can_const_movi_rtx_p)
20833 (aarch64_simd_scalar_immediate_valid_for_move)
20834 (aarch64_simd_make_constant): Update call to
20835 aarch64_simd_valid_immediate.
20836 (aarch64_advsimd_valid_immediate_hs): New function.
20837 (aarch64_advsimd_valid_immediate): Likewise.
20838 (aarch64_simd_valid_immediate): Remove mode and inverse
20839 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20840 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20841 and aarch64_float_const_representable_p on the result.
20842 (aarch64_output_simd_mov_immediate): Remove mode argument.
20843 Update call to aarch64_simd_valid_immediate and use of
20844 simd_immediate_info.
20845 (aarch64_output_scalar_simd_mov_immediate): Update call
20846 accordingly.
20847
20848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20849 Alan Hayward <alan.hayward@arm.com>
20850 David Sherwood <david.sherwood@arm.com>
20851
20852 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20853 (mode_nunits): Likewise CONST_MODE_NUNITS.
20854 * machmode.def (ADJUST_NUNITS): Document.
20855 * genmodes.c (mode_data::need_nunits_adj): New field.
20856 (blank_mode): Update accordingly.
20857 (adj_nunits): New variable.
20858 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20859 parameter.
20860 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20861 listed in adj_nunits.
20862 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20863 listed in adj_nunits. Don't emit case statements for such modes.
20864 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20865 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20866 nothing if adj_nunits is nonnull.
20867 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20868 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20869 (emit_mode_fbit): Update use of print_maybe_const_decl.
20870 (emit_move_size): Likewise. Treat the array as non-const
20871 if adj_nunits.
20872 (emit_mode_adjustments): Handle adj_nunits.
20873
20874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20875
20876 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20877 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20878 (VECTOR_MODES): Use it.
20879 (make_vector_modes): Take the prefix as an argument.
20880
20881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20882 Alan Hayward <alan.hayward@arm.com>
20883 David Sherwood <david.sherwood@arm.com>
20884
20885 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20886 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20887 for MODE_VECTOR_BOOL.
20888 * machmode.def (VECTOR_BOOL_MODE): Document.
20889 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20890 (make_vector_bool_mode): New function.
20891 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20892 MODE_VECTOR_BOOL.
20893 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20894 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20895 Likewise.
20896 * stor-layout.c (int_mode_for_mode): Likewise.
20897 * tree.c (build_vector_type_for_mode): Likewise.
20898 * varasm.c (output_constant_pool_2): Likewise.
20899 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20900 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20901 for MODE_VECTOR_BOOL.
20902 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20903 of mode class checks.
20904 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20905 instead of a list of mode class checks.
20906 (expand_vector_scalar_condition): Likewise.
20907 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20908
20909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20910 Alan Hayward <alan.hayward@arm.com>
20911 David Sherwood <david.sherwood@arm.com>
20912
20913 * machmode.h (mode_size): Change from unsigned short to
20914 poly_uint16_pod.
20915 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20916 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20917 or if measurement_type is not polynomial.
20918 (fixed_size_mode::includes_p): Check for constant-sized modes.
20919 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20920 return a poly_uint16 rather than an unsigned short.
20921 (emit_mode_size): Change the type of mode_size from unsigned short
20922 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20923 (emit_mode_adjustments): Cope with polynomial vector sizes.
20924 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20925 for GET_MODE_SIZE.
20926 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20927 for GET_MODE_SIZE.
20928 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20929 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20930 * caller-save.c (setup_save_areas): Likewise.
20931 (replace_reg_with_saved_mem): Likewise.
20932 * calls.c (emit_library_call_value_1): Likewise.
20933 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20934 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20935 (gen_lowpart_for_combine): Likewise.
20936 * convert.c (convert_to_integer_1): Likewise.
20937 * cse.c (equiv_constant, cse_insn): Likewise.
20938 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20939 (cselib_subst_to_values): Likewise.
20940 * dce.c (word_dce_process_block): Likewise.
20941 * df-problems.c (df_word_lr_mark_ref): Likewise.
20942 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20943 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20944 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20945 (rtl_for_decl_location): Likewise.
20946 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20947 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20948 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20949 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20950 (expand_expr_real_1): Likewise.
20951 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20952 (pad_below): Likewise.
20953 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20954 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20955 * ira.c (get_subreg_tracking_sizes): Likewise.
20956 * ira-build.c (ira_create_allocno_objects): Likewise.
20957 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20958 (ira_sort_regnos_for_alter_reg): Likewise.
20959 * ira-costs.c (record_operand_costs): Likewise.
20960 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20961 (resolve_simple_move): Likewise.
20962 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20963 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20964 (lra_constraints): Likewise.
20965 (CONST_POOL_OK_P): Reject variable-sized modes.
20966 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20967 (add_pseudo_to_slot, lra_spill): Likewise.
20968 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20969 * optabs-query.c (get_best_extraction_insn): Likewise.
20970 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20971 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20972 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20973 * recog.c (offsettable_address_addr_space_p): Likewise.
20974 * regcprop.c (maybe_mode_change): Likewise.
20975 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20976 * regrename.c (build_def_use): Likewise.
20977 * regstat.c (dump_reg_info): Likewise.
20978 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20979 (find_reloads, find_reloads_subreg_address): Likewise.
20980 * reload1.c (eliminate_regs_1): Likewise.
20981 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20982 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20983 (simplify_binary_operation_1, simplify_subreg): Likewise.
20984 * targhooks.c (default_function_arg_padding): Likewise.
20985 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20986 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20987 (verify_gimple_assign_ternary): Likewise.
20988 * tree-inline.c (estimate_move_cost): Likewise.
20989 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20990 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20991 (get_address_cost_ainc): Likewise.
20992 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20993 (vect_supportable_dr_alignment): Likewise.
20994 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20995 (vectorizable_reduction): Likewise.
20996 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20997 (vectorizable_operation, vectorizable_load): Likewise.
20998 * tree.c (build_same_sized_truth_vector_type): Likewise.
20999 * valtrack.c (cleanup_auto_inc_dec): Likewise.
21000 * var-tracking.c (emit_note_insn_var_location): Likewise.
21001 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21002 (ADDR_VEC_ALIGN): Likewise.
21003
21004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21005 Alan Hayward <alan.hayward@arm.com>
21006 David Sherwood <david.sherwood@arm.com>
21007
21008 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21009 unsigned short.
21010 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21011 or if measurement_type is polynomial.
21012 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21013 * combine.c (make_extraction): Likewise.
21014 * dse.c (find_shift_sequence): Likewise.
21015 * dwarf2out.c (mem_loc_descriptor): Likewise.
21016 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21017 (extract_bit_field, extract_low_bits): Likewise.
21018 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21019 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21020 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21021 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21022 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21023 * reload.c (find_reloads): Likewise.
21024 * reload1.c (alter_reg): Likewise.
21025 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21026 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21027 * tree-if-conv.c (predicate_mem_writes): Likewise.
21028 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21029 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21030 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21031 * valtrack.c (dead_debug_insert_temp): Likewise.
21032 * varasm.c (mergeable_constant_section): Likewise.
21033 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21034
21035 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21036 Alan Hayward <alan.hayward@arm.com>
21037 David Sherwood <david.sherwood@arm.com>
21038
21039 * expr.c (expand_assignment): Cope with polynomial mode sizes
21040 when assigning to a CONCAT.
21041
21042 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21043 Alan Hayward <alan.hayward@arm.com>
21044 David Sherwood <david.sherwood@arm.com>
21045
21046 * machmode.h (mode_precision): Change from unsigned short to
21047 poly_uint16_pod.
21048 (mode_to_precision): Return a poly_uint16 rather than an unsigned
21049 short.
21050 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21051 or if measurement_type is not polynomial.
21052 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
21053 in which the mode is already known to be a scalar_int_mode.
21054 * genmodes.c (emit_mode_precision): Change the type of mode_precision
21055 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
21056 initializer.
21057 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21058 for GET_MODE_PRECISION.
21059 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21060 for GET_MODE_PRECISION.
21061 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21062 as polynomial.
21063 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21064 (expand_field_assignment, make_extraction): Likewise.
21065 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21066 (get_last_value): Likewise.
21067 * convert.c (convert_to_integer_1): Likewise.
21068 * cse.c (cse_insn): Likewise.
21069 * expr.c (expand_expr_real_1): Likewise.
21070 * lra-constraints.c (simplify_operand_subreg): Likewise.
21071 * optabs-query.c (can_atomic_load_p): Likewise.
21072 * optabs.c (expand_atomic_load): Likewise.
21073 (expand_atomic_store): Likewise.
21074 * ree.c (combine_reaching_defs): Likewise.
21075 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21076 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21077 * tree.h (type_has_mode_precision_p): Likewise.
21078 * ubsan.c (instrument_si_overflow): Likewise.
21079
21080 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21081 Alan Hayward <alan.hayward@arm.com>
21082 David Sherwood <david.sherwood@arm.com>
21083
21084 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21085 polynomial numbers of units.
21086 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21087 (valid_vector_subparts_p): New function.
21088 (build_vector_type): Remove temporary shim and take the number
21089 of units as a poly_uint64 rather than an int.
21090 (build_opaque_vector_type): Take the number of units as a
21091 poly_uint64 rather than an int.
21092 * tree.c (build_vector_from_ctor): Handle polynomial
21093 TYPE_VECTOR_SUBPARTS.
21094 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21095 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21096 (build_vector_from_val): If the number of units is variable,
21097 use build_vec_duplicate_cst for constant operands and
21098 VEC_DUPLICATE_EXPR otherwise.
21099 (make_vector_type): Remove temporary is_constant ().
21100 (build_vector_type, build_opaque_vector_type): Take the number of
21101 units as a poly_uint64 rather than an int.
21102 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21103 VECTOR_CST_NELTS.
21104 * cfgexpand.c (expand_debug_expr): Likewise.
21105 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21106 (store_constructor, expand_expr_real_1): Likewise.
21107 (const_scalar_mask_from_tree): Likewise.
21108 * fold-const-call.c (fold_const_reduction): Likewise.
21109 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21110 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21111 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21112 (fold_relational_const): Likewise.
21113 (native_interpret_vector): Likewise. Change the size from an
21114 int to an unsigned int.
21115 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21116 TYPE_VECTOR_SUBPARTS.
21117 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21118 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21119 duplicating a non-constant operand into a variable-length vector.
21120 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21121 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21122 * ipa-icf.c (sem_variable::equals): Likewise.
21123 * match.pd: Likewise.
21124 * omp-simd-clone.c (simd_clone_subparts): Likewise.
21125 * print-tree.c (print_node): Likewise.
21126 * stor-layout.c (layout_type): Likewise.
21127 * targhooks.c (default_builtin_vectorization_cost): Likewise.
21128 * tree-cfg.c (verify_gimple_comparison): Likewise.
21129 (verify_gimple_assign_binary): Likewise.
21130 (verify_gimple_assign_ternary): Likewise.
21131 (verify_gimple_assign_single): Likewise.
21132 * tree-pretty-print.c (dump_generic_node): Likewise.
21133 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21134 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21135 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21136 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21137 (vect_shift_permute_load_chain): Likewise.
21138 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21139 (expand_vector_condition, optimize_vector_constructor): Likewise.
21140 (lower_vec_perm, get_compute_type): Likewise.
21141 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21142 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21143 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21144 (vect_recog_mask_conversion_pattern): Likewise.
21145 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21146 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21147 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21148 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21149 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21150 (vectorizable_shift, vectorizable_operation, vectorizable_store)
21151 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21152 (supportable_widening_operation): Likewise.
21153 (supportable_narrowing_operation): Likewise.
21154 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21155 Likewise.
21156 * varasm.c (output_constant): Likewise.
21157
21158 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21159 Alan Hayward <alan.hayward@arm.com>
21160 David Sherwood <david.sherwood@arm.com>
21161
21162 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21163 so that both the length == 3 and length != 3 cases set up their
21164 own permute vectors. Add comments explaining why we know the
21165 number of elements is constant.
21166 (vect_permute_load_chain): Likewise.
21167
21168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21169 Alan Hayward <alan.hayward@arm.com>
21170 David Sherwood <david.sherwood@arm.com>
21171
21172 * machmode.h (mode_nunits): Change from unsigned char to
21173 poly_uint16_pod.
21174 (ONLY_FIXED_SIZE_MODES): New macro.
21175 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21176 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21177 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21178 New typedefs.
21179 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21180 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21181 or if measurement_type is not polynomial.
21182 * genmodes.c (ZERO_COEFFS): New macro.
21183 (emit_mode_nunits_inline): Make mode_nunits_inline return a
21184 poly_uint16.
21185 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21186 Use ZERO_COEFFS when emitting initializers.
21187 * data-streamer.h (bp_pack_poly_value): New function.
21188 (bp_unpack_poly_value): Likewise.
21189 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21190 for GET_MODE_NUNITS.
21191 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21192 for GET_MODE_NUNITS.
21193 * tree.c (make_vector_type): Remove temporary shim and make
21194 the real function take the number of units as a poly_uint64
21195 rather than an int.
21196 (build_vector_type_for_mode): Handle polynomial nunits.
21197 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21198 * emit-rtl.c (const_vec_series_p_1): Likewise.
21199 (gen_rtx_CONST_VECTOR): Likewise.
21200 * fold-const.c (test_vec_duplicate_folding): Likewise.
21201 * genrecog.c (validate_pattern): Likewise.
21202 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21203 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21204 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21205 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21206 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21207 * rtlanal.c (subreg_get_info): Likewise.
21208 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21209 (vect_grouped_load_supported): Likewise.
21210 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21211 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21212 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21213 (simplify_const_unary_operation, simplify_binary_operation_1)
21214 (simplify_const_binary_operation, simplify_ternary_operation)
21215 (test_vector_ops_duplicate, test_vector_ops): Likewise.
21216 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21217 instead of CONST_VECTOR_NUNITS.
21218 * varasm.c (output_constant_pool_2): Likewise.
21219 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21220 explicit-encoded elements in the XVEC for variable-length vectors.
21221
21222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21223
21224 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21225
21226 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21227 Alan Hayward <alan.hayward@arm.com>
21228 David Sherwood <david.sherwood@arm.com>
21229
21230 * coretypes.h (fixed_size_mode): Declare.
21231 (fixed_size_mode_pod): New typedef.
21232 * builtins.h (target_builtins::x_apply_args_mode)
21233 (target_builtins::x_apply_result_mode): Change type to
21234 fixed_size_mode_pod.
21235 * builtins.c (apply_args_size, apply_result_size, result_vector)
21236 (expand_builtin_apply_args_1, expand_builtin_apply)
21237 (expand_builtin_return): Update accordingly.
21238
21239 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21240
21241 * cse.c (hash_rtx_cb): Hash only the encoded elements.
21242 * cselib.c (cselib_hash_rtx): Likewise.
21243 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21244 CONST_VECTOR encoding.
21245
21246 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21247 Jeff Law <law@redhat.com>
21248
21249 PR target/83641
21250 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21251 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21252 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21253 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21254
21255 PR target/83641
21256 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21257 explicitly probe *sp in a noreturn function if there were any callee
21258 register saves or frame pointer is needed.
21259
21260 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21261
21262 PR debug/83621
21263 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21264 BLKmode for ternary, binary or unary expressions.
21265
21266 PR debug/83645
21267 * var-tracking.c (delete_vta_debug_insn): New inline function.
21268 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21269 insns from get_insns () to NULL instead of each bb separately.
21270 Use delete_vta_debug_insn. No longer static.
21271 (vt_debug_insns_local, variable_tracking_main_1): Adjust
21272 delete_vta_debug_insns callers.
21273 * rtl.h (delete_vta_debug_insns): Declare.
21274 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21275 instead of variable_tracking_main.
21276
21277 2018-01-03 Martin Sebor <msebor@redhat.com>
21278
21279 PR tree-optimization/83603
21280 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21281 arguments past the endof the argument list in functions declared
21282 without a prototype.
21283 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21284 Avoid checking when arguments are null.
21285
21286 2018-01-03 Martin Sebor <msebor@redhat.com>
21287
21288 PR c/83559
21289 * doc/extend.texi (attribute const): Fix a typo.
21290 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21291 issuing -Wsuggest-attribute for void functions.
21292
21293 2018-01-03 Martin Sebor <msebor@redhat.com>
21294
21295 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21296 offset_int::from instead of wide_int::to_shwi.
21297 (maybe_diag_overlap): Remove assertion.
21298 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21299 * gimple-ssa-sprintf.c (format_directive): Same.
21300 (parse_directive): Same.
21301 (sprintf_dom_walker::compute_format_length): Same.
21302 (try_substitute_return_value): Same.
21303
21304 2018-01-03 Jeff Law <law@redhat.com>
21305
21306 PR middle-end/83654
21307 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21308 non-constant residual for zero at runtime and avoid probing in
21309 that case. Reorganize code for trailing problem to mirror handling
21310 of the residual.
21311
21312 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21313
21314 PR tree-optimization/83501
21315 * tree-ssa-strlen.c (get_string_cst): New.
21316 (handle_char_store): Call get_string_cst.
21317
21318 2018-01-03 Martin Liska <mliska@suse.cz>
21319
21320 PR tree-optimization/83593
21321 * tree-ssa-strlen.c: Include tree-cfg.h.
21322 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21323 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21324 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21325 to false.
21326 (strlen_dom_walker::before_dom_children): Call
21327 gimple_purge_dead_eh_edges. Dump tranformation with details
21328 dump flags.
21329 (strlen_dom_walker::before_dom_children): Update call by adding
21330 new argument cleanup_eh.
21331 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21332
21333 2018-01-03 Martin Liska <mliska@suse.cz>
21334
21335 PR ipa/83549
21336 * cif-code.def (VARIADIC_THUNK): New enum value.
21337 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21338 thunks.
21339
21340 2018-01-03 Jan Beulich <jbeulich@suse.com>
21341
21342 * sse.md (mov<mode>_internal): Tighten condition for when to use
21343 vmovdqu<ssescalarsize> for TI and OI modes.
21344
21345 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21346
21347 Update copyright years.
21348
21349 2018-01-03 Martin Liska <mliska@suse.cz>
21350
21351 PR ipa/83594
21352 * ipa-visibility.c (function_and_variable_visibility): Skip
21353 functions with noipa attribure.
21354
21355 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21356
21357 * gcc.c (process_command): Update copyright notice dates.
21358 * gcov-dump.c (print_version): Ditto.
21359 * gcov.c (print_version): Ditto.
21360 * gcov-tool.c (print_version): Ditto.
21361 * gengtype.c (create_file): Ditto.
21362 * doc/cpp.texi: Bump @copying's copyright year.
21363 * doc/cppinternals.texi: Ditto.
21364 * doc/gcc.texi: Ditto.
21365 * doc/gccint.texi: Ditto.
21366 * doc/gcov.texi: Ditto.
21367 * doc/install.texi: Ditto.
21368 * doc/invoke.texi: Ditto.
21369
21370 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21371
21372 * vector-builder.h (vector_builder::m_full_nelts): Change from
21373 unsigned int to poly_uint64.
21374 (vector_builder::full_nelts): Update prototype accordingly.
21375 (vector_builder::new_vector): Likewise.
21376 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21377 (vector_builder::operator ==): Likewise.
21378 (vector_builder::finalize): Likewise.
21379 * int-vector-builder.h (int_vector_builder::int_vector_builder):
21380 Take the number of elements as a poly_uint64 rather than an
21381 unsigned int.
21382 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21383 from unsigned int to poly_uint64.
21384 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21385 (vec_perm_indices::new_vector): Likewise.
21386 (vec_perm_indices::length): Likewise.
21387 (vec_perm_indices::nelts_per_input): Likewise.
21388 (vec_perm_indices::input_nelts): Likewise.
21389 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21390 number of elements per input as a poly_uint64 rather than an
21391 unsigned int. Use the original encoding for variable-length
21392 vectors, rather than clamping each individual element.
21393 For the second and subsequent elements in each pattern,
21394 clamp the step and base before clamping their sum.
21395 (vec_perm_indices::series_p): Handle polynomial element counts.
21396 (vec_perm_indices::all_in_range_p): Likewise.
21397 (vec_perm_indices_to_tree): Likewise.
21398 (vec_perm_indices_to_rtx): Likewise.
21399 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21400 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21401 (tree_vector_builder::new_binary_operation): Handle polynomial
21402 element counts. Return false if we need to know the number
21403 of elements at compile time.
21404 * fold-const.c (fold_vec_perm): Punt if the number of elements
21405 isn't known at compile time.
21406
21407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21408
21409 * vec-perm-indices.h (vec_perm_builder): Change element type
21410 from HOST_WIDE_INT to poly_int64.
21411 (vec_perm_indices::element_type): Update accordingly.
21412 (vec_perm_indices::clamp): Handle polynomial element_types.
21413 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21414 (vec_perm_indices::all_in_range_p): Likewise.
21415 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21416 than shwi trees.
21417 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21418 polynomial vec_perm_indices element types.
21419 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21420 * fold-const.c (fold_vec_perm): Likewise.
21421 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21422 * tree-vect-generic.c (lower_vec_perm): Likewise.
21423 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21424 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21425 element type to HOST_WIDE_INT.
21426
21427 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21428 Alan Hayward <alan.hayward@arm.com>
21429 David Sherwood <david.sherwood@arm.com>
21430
21431 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21432 rather than an int. Use plus_constant.
21433 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21434 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21435
21436 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21437 Alan Hayward <alan.hayward@arm.com>
21438 David Sherwood <david.sherwood@arm.com>
21439
21440 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21441 a HOST_WIDE_INT to a poly_int64.
21442
21443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21444 Alan Hayward <alan.hayward@arm.com>
21445 David Sherwood <david.sherwood@arm.com>
21446
21447 * calls.c (load_register_parameters): Cope with polynomial
21448 mode sizes. Require a constant size for BLKmode parameters
21449 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21450 forces a parameter to be padded at the lsb end in order to
21451 fill a complete number of words, require the parameter size
21452 to be ordered wrt UNITS_PER_WORD.
21453
21454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21455 Alan Hayward <alan.hayward@arm.com>
21456 David Sherwood <david.sherwood@arm.com>
21457
21458 * reload1.c (spill_stack_slot_width): Change element type
21459 from unsigned int to poly_uint64_pod.
21460 (alter_reg): Treat mode sizes as polynomial.
21461
21462 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21463 Alan Hayward <alan.hayward@arm.com>
21464 David Sherwood <david.sherwood@arm.com>
21465
21466 * reload.c (complex_word_subreg_p): New function.
21467 (reload_inner_reg_of_subreg, push_reload): Use it.
21468
21469 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21470 Alan Hayward <alan.hayward@arm.com>
21471 David Sherwood <david.sherwood@arm.com>
21472
21473 * lra-constraints.c (process_alt_operands): Reject matched
21474 operands whose sizes aren't ordered.
21475 (match_reload): Refer to this check here.
21476
21477 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21478 Alan Hayward <alan.hayward@arm.com>
21479 David Sherwood <david.sherwood@arm.com>
21480
21481 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21482 that the mode size is in the set {1, 2, 4, 8, 16}.
21483
21484 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21485 Alan Hayward <alan.hayward@arm.com>
21486 David Sherwood <david.sherwood@arm.com>
21487
21488 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21489 Use plus_constant instead of gen_rtx_PLUS.
21490
21491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21492 Alan Hayward <alan.hayward@arm.com>
21493 David Sherwood <david.sherwood@arm.com>
21494
21495 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21496 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21497 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21498 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21499 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21500 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21501 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21502 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21503 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21504 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21505 a poly_int64.
21506 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21507 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21508 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21509 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21510 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21511 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21512 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21513 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21514 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21515 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21516 function.
21517 * expr.c (emit_move_resolve_push): Treat the input and result
21518 of PUSH_ROUNDING as a poly_int64.
21519 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21520 (emit_push_insn): Likewise.
21521 * lra-eliminations.c (mark_not_eliminable): Likewise.
21522 * recog.c (push_operand): Likewise.
21523 * reload1.c (elimination_effects): Likewise.
21524 * rtlanal.c (nonzero_bits1): Likewise.
21525 * calls.c (store_one_arg): Likewise. Require the padding to be
21526 known at compile time.
21527
21528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21529 Alan Hayward <alan.hayward@arm.com>
21530 David Sherwood <david.sherwood@arm.com>
21531
21532 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21533 Use plus_constant instead of gen_rtx_PLUS.
21534
21535 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21536 Alan Hayward <alan.hayward@arm.com>
21537 David Sherwood <david.sherwood@arm.com>
21538
21539 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21540 rather than an int.
21541
21542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21543 Alan Hayward <alan.hayward@arm.com>
21544 David Sherwood <david.sherwood@arm.com>
21545
21546 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21547 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21548 via stack temporaries. Treat the mode size as polynomial too.
21549
21550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21551 Alan Hayward <alan.hayward@arm.com>
21552 David Sherwood <david.sherwood@arm.com>
21553
21554 * expr.c (expand_expr_real_2): When handling conversions involving
21555 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21556 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
21557 as a poly_uint64 too.
21558
21559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21560 Alan Hayward <alan.hayward@arm.com>
21561 David Sherwood <david.sherwood@arm.com>
21562
21563 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21564
21565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21566 Alan Hayward <alan.hayward@arm.com>
21567 David Sherwood <david.sherwood@arm.com>
21568
21569 * combine.c (can_change_dest_mode): Handle polynomial
21570 REGMODE_NATURAL_SIZE.
21571 * expmed.c (store_bit_field_1): Likewise.
21572 * expr.c (store_constructor): Likewise.
21573 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21574 and polynomial REGMODE_NATURAL_SIZE.
21575 (gen_lowpart_common): Likewise.
21576 * reginfo.c (record_subregs_of_mode): Likewise.
21577 * rtlanal.c (read_modify_subreg_p): Likewise.
21578
21579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21580 Alan Hayward <alan.hayward@arm.com>
21581 David Sherwood <david.sherwood@arm.com>
21582
21583 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21584 numbers of elements.
21585
21586 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21587 Alan Hayward <alan.hayward@arm.com>
21588 David Sherwood <david.sherwood@arm.com>
21589
21590 * match.pd: Cope with polynomial numbers of vector elements.
21591
21592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21593 Alan Hayward <alan.hayward@arm.com>
21594 David Sherwood <david.sherwood@arm.com>
21595
21596 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21597 in a POINTER_PLUS_EXPR.
21598
21599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21600 Alan Hayward <alan.hayward@arm.com>
21601 David Sherwood <david.sherwood@arm.com>
21602
21603 * omp-simd-clone.c (simd_clone_subparts): New function.
21604 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21605 (ipa_simd_modify_function_body): Likewise.
21606
21607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21608 Alan Hayward <alan.hayward@arm.com>
21609 David Sherwood <david.sherwood@arm.com>
21610
21611 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21612 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21613 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21614 (expand_vector_condition, vector_element): Likewise.
21615 (subparts_gt): New function.
21616 (get_compute_type): Use subparts_gt.
21617 (count_type_subparts): Delete.
21618 (expand_vector_operations_1): Use subparts_gt instead of
21619 count_type_subparts.
21620
21621 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21622 Alan Hayward <alan.hayward@arm.com>
21623 David Sherwood <david.sherwood@arm.com>
21624
21625 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21626 (vect_compile_time_alias): ...this new function. Do the calculation
21627 on poly_ints rather than trees.
21628 (vect_prune_runtime_alias_test_list): Update call accordingly.
21629
21630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21631 Alan Hayward <alan.hayward@arm.com>
21632 David Sherwood <david.sherwood@arm.com>
21633
21634 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21635 numbers of units.
21636 (vect_schedule_slp_instance): Likewise.
21637
21638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21639 Alan Hayward <alan.hayward@arm.com>
21640 David Sherwood <david.sherwood@arm.com>
21641
21642 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21643 constant and extern definitions for variable-length vectors.
21644 (vect_get_constant_vectors): Note that the number of units
21645 is known to be constant.
21646
21647 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21648 Alan Hayward <alan.hayward@arm.com>
21649 David Sherwood <david.sherwood@arm.com>
21650
21651 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21652 of units as polynomial. Choose between WIDE and NARROW based
21653 on multiple_p.
21654
21655 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21656 Alan Hayward <alan.hayward@arm.com>
21657 David Sherwood <david.sherwood@arm.com>
21658
21659 * tree-vect-stmts.c (simd_clone_subparts): New function.
21660 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21661
21662 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21663 Alan Hayward <alan.hayward@arm.com>
21664 David Sherwood <david.sherwood@arm.com>
21665
21666 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21667 vectors as polynomial. Use build_index_vector for
21668 IFN_GOMP_SIMD_LANE.
21669
21670 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21671 Alan Hayward <alan.hayward@arm.com>
21672 David Sherwood <david.sherwood@arm.com>
21673
21674 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21675 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21676 for variable-length vectors.
21677 (vectorizable_mask_load_store): Treat the number of units as
21678 polynomial, asserting that it is constant if the condition has
21679 already been enforced.
21680 (vectorizable_store, vectorizable_load): Likewise.
21681
21682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21683 Alan Hayward <alan.hayward@arm.com>
21684 David Sherwood <david.sherwood@arm.com>
21685
21686 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21687 of units as polynomial. Punt if we can't tell at compile time
21688 which vector contains the final result.
21689
21690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21691 Alan Hayward <alan.hayward@arm.com>
21692 David Sherwood <david.sherwood@arm.com>
21693
21694 * tree-vect-loop.c (vectorizable_induction): Treat the number
21695 of units as polynomial. Punt on SLP inductions. Use an integer
21696 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21697 cast of such a series for variable-length floating-point
21698 reductions.
21699
21700 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21701 Alan Hayward <alan.hayward@arm.com>
21702 David Sherwood <david.sherwood@arm.com>
21703
21704 * tree.h (build_index_vector): Declare.
21705 * tree.c (build_index_vector): New function.
21706 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21707 of units as polynomial, forcibly converting it to a constant if
21708 vectorizable_reduction has already enforced the condition.
21709 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21710 to create a {1,2,3,...} vector.
21711 (vectorizable_reduction): Treat the number of units as polynomial.
21712 Choose vectype_in based on the largest scalar element size rather
21713 than the smallest number of units. Enforce the restrictions
21714 relied on above.
21715
21716 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21717 Alan Hayward <alan.hayward@arm.com>
21718 David Sherwood <david.sherwood@arm.com>
21719
21720 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21721 number of units as polynomial.
21722
21723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21724 Alan Hayward <alan.hayward@arm.com>
21725 David Sherwood <david.sherwood@arm.com>
21726
21727 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21728 * target.def (autovectorize_vector_sizes): Return the vector sizes
21729 by pointer, using vector_sizes rather than a bitmask.
21730 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21731 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21732 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21733 Likewise.
21734 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21735 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21736 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21737 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21738 * omp-general.c (omp_max_vf): Likewise.
21739 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21740 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21741 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21742 * tree-vect-slp.c (vect_slp_bb): Likewise.
21743 * doc/tm.texi: Regenerate.
21744 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21745 to a poly_uint64.
21746 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21747 the vector size as a poly_uint64 rather than an unsigned int.
21748 (current_vector_size): Change from an unsigned int to a poly_uint64.
21749 (get_vectype_for_scalar_type): Update accordingly.
21750 * tree.h (build_truth_vector_type): Take the size and number of
21751 units as a poly_uint64 rather than an unsigned int.
21752 (build_vector_type): Add a temporary overload that takes
21753 the number of units as a poly_uint64 rather than an unsigned int.
21754 * tree.c (make_vector_type): Likewise.
21755 (build_truth_vector_type): Take the number of units as a poly_uint64
21756 rather than an unsigned int.
21757
21758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21759 Alan Hayward <alan.hayward@arm.com>
21760 David Sherwood <david.sherwood@arm.com>
21761
21762 * target.def (get_mask_mode): Take the number of units and length
21763 as poly_uint64s rather than unsigned ints.
21764 * targhooks.h (default_get_mask_mode): Update accordingly.
21765 * targhooks.c (default_get_mask_mode): Likewise.
21766 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21767 * doc/tm.texi: Regenerate.
21768
21769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21770 Alan Hayward <alan.hayward@arm.com>
21771 David Sherwood <david.sherwood@arm.com>
21772
21773 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21774 * omp-general.c (omp_max_vf): Likewise.
21775 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21776 (expand_omp_simd): Handle polynomial safelen.
21777 * omp-low.c (omplow_simd_context): Add a default constructor.
21778 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21779 (lower_rec_simd_input_clauses): Update accordingly.
21780 (lower_rec_input_clauses): Likewise.
21781
21782 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21783 Alan Hayward <alan.hayward@arm.com>
21784 David Sherwood <david.sherwood@arm.com>
21785
21786 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21787 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21788 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21789 (vect_analyze_slp_cost): Likewise.
21790 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21791 (vect_model_load_cost): Likewise.
21792
21793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21794 Alan Hayward <alan.hayward@arm.com>
21795 David Sherwood <david.sherwood@arm.com>
21796
21797 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21798 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21799 from an unsigned int * to a poly_uint64_pod *.
21800 (calculate_unrolling_factor): New function.
21801 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21802
21803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21804 Alan Hayward <alan.hayward@arm.com>
21805 David Sherwood <david.sherwood@arm.com>
21806
21807 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21808 from an unsigned int to a poly_uint64.
21809 (_loop_vec_info::slp_unrolling_factor): Likewise.
21810 (_loop_vec_info::vectorization_factor): Change from an int
21811 to a poly_uint64.
21812 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21813 (vect_get_num_vectors): New function.
21814 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21815 (vect_get_num_copies): Use vect_get_num_vectors.
21816 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21817 to an unsigned int *.
21818 (vect_analyze_data_refs): Change min_vf from an int * to a
21819 poly_uint64 *.
21820 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21821 than an unsigned HOST_WIDE_INT.
21822 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21823 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21824 to an unsigned int *.
21825 (vect_analyze_data_ref_dependences): Likewise.
21826 (vect_compute_data_ref_alignment): Handle polynomial vf.
21827 (vect_enhance_data_refs_alignment): Likewise.
21828 (vect_prune_runtime_alias_test_list): Likewise.
21829 (vect_shift_permute_load_chain): Likewise.
21830 (vect_supportable_dr_alignment): Likewise.
21831 (dependence_distance_ge_vf): Take the vectorization factor as a
21832 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21833 (vect_analyze_data_refs): Change min_vf from an int * to a
21834 poly_uint64 *.
21835 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21836 vfm1 as a poly_uint64 rather than an int. Make the same change
21837 for the returned bound_scalar.
21838 (vect_gen_vector_loop_niters): Handle polynomial vf.
21839 (vect_do_peeling): Likewise. Update call to
21840 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21841 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21842 be constant.
21843 * tree-vect-loop.c (vect_determine_vectorization_factor)
21844 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21845 (vect_get_known_peeling_cost): Likewise.
21846 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21847 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21848 (vect_transform_loop): Likewise. Use the lowest possible VF when
21849 updating the upper bounds of the loop.
21850 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21851 rather than an int.
21852 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21853 polynomial unroll factors.
21854 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21855 (vect_make_slp_decision): Likewise.
21856 (vect_supported_load_permutation_p): Likewise, and polynomial
21857 vf too.
21858 (vect_analyze_slp_cost): Handle polynomial vf.
21859 (vect_slp_analyze_node_operations): Likewise.
21860 (vect_slp_analyze_bb_1): Likewise.
21861 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21862 than an unsigned HOST_WIDE_INT.
21863 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21864 (vectorizable_load): Handle polynomial vf.
21865 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21866 a poly_uint64.
21867 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21868
21869 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21870 Alan Hayward <alan.hayward@arm.com>
21871 David Sherwood <david.sherwood@arm.com>
21872
21873 * match.pd: Handle bit operations involving three constants
21874 and try to fold one pair.
21875
21876 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21877
21878 * tree-vect-loop-manip.c: Include gimple-fold.h.
21879 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21880 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21881 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21882 Add a path that uses a step of VF instead of 1, but disable it
21883 for now.
21884 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21885 and niters_no_overflow parameters. Update calls to
21886 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21887 Create a new SSA name if the latter choses to use a ste other
21888 than zero, and return it via niters_vector_mult_vf_var.
21889 * tree-vect-loop.c (vect_transform_loop): Update calls to
21890 vect_do_peeling, vect_gen_vector_loop_niters and
21891 slpeel_make_loop_iterate_ntimes.
21892 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21893 (vect_gen_vector_loop_niters): Update declarations after above changes.
21894
21895 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21896
21897 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21898 128-bit round to integer instructions.
21899 (ceil<mode>2): Likewise.
21900 (btrunc<mode>2): Likewise.
21901 (round<mode>2): Likewise.
21902
21903 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21904
21905 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21906 unaligned VSX load/store on P8/P9.
21907 (expand_block_clear): Allow the use of unaligned VSX
21908 load/store on P8/P9.
21909
21910 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21911
21912 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21913 New function.
21914 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21915 swap associated with both a load and a store.
21916
21917 2018-01-02 Andrew Waterman <andrew@sifive.com>
21918
21919 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21920 * config/riscv/riscv.md (clear_cache): Use it.
21921
21922 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21923
21924 * web.c: Remove out-of-date comment.
21925
21926 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21927
21928 * expr.c (fixup_args_size_notes): Check that any existing
21929 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21930 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21931 (emit_single_push_insn): ...here.
21932
21933 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21934
21935 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21936 (const_vector_encoded_nelts): New function.
21937 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21938 (const_vector_int_elt, const_vector_elt): Declare.
21939 * emit-rtl.c (const_vector_int_elt_1): New function.
21940 (const_vector_elt): Likewise.
21941 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21942 of CONST_VECTOR_ELT.
21943
21944 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21945
21946 * expr.c: Include rtx-vector-builder.h.
21947 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21948 directly on the tree encoding.
21949 (const_vector_from_tree): Likewise.
21950 * optabs.c: Include rtx-vector-builder.h.
21951 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21952 sequence of "u" values.
21953 * vec-perm-indices.c: Include rtx-vector-builder.h.
21954 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21955 directly on the vec_perm_indices encoding.
21956
21957 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21958
21959 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21960 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21961 * rtx-vector-builder.h: New file.
21962 * rtx-vector-builder.c: Likewise.
21963 * rtl.h (rtx_def::u2): Add a const_vector field.
21964 (CONST_VECTOR_NPATTERNS): New macro.
21965 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21966 (CONST_VECTOR_DUPLICATE_P): Likewise.
21967 (CONST_VECTOR_STEPPED_P): Likewise.
21968 (CONST_VECTOR_ENCODED_ELT): Likewise.
21969 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21970 (unwrap_const_vec_duplicate): Likewise.
21971 (const_vec_series_p): Check for a non-duplicated vector encoding.
21972 Say that the function only returns true for integer vectors.
21973 * emit-rtl.c: Include rtx-vector-builder.h.
21974 (gen_const_vec_duplicate_1): Delete.
21975 (gen_const_vector): Call gen_const_vec_duplicate instead of
21976 gen_const_vec_duplicate_1.
21977 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21978 (gen_const_vec_duplicate): Use rtx_vector_builder.
21979 (gen_const_vec_series): Likewise.
21980 (gen_rtx_CONST_VECTOR): Likewise.
21981 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21982 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21983 Build a new vector rather than modifying a CONST_VECTOR in-place.
21984 (handle_special_swappables): Update call accordingly.
21985 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21986 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21987 Build a new vector rather than modifying a CONST_VECTOR in-place.
21988 (handle_special_swappables): Update call accordingly.
21989
21990 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21991
21992 * simplify-rtx.c (simplify_const_binary_operation): Use
21993 CONST_VECTOR_ELT instead of XVECEXP.
21994
21995 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21996
21997 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21998 the selector elements to be different from the data elements
21999 if the selector is a VECTOR_CST.
22000 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22001 ssizetype for the selector.
22002
22003 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22004
22005 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22006 before testing each element individually.
22007 * tree-vect-generic.c (lower_vec_perm): Likewise.
22008
22009 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22010
22011 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22012 * selftest-run-tests.c (selftest::run_tests): Call it.
22013 * vector-builder.h (vector_builder::operator ==): New function.
22014 (vector_builder::operator !=): Likewise.
22015 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22016 (vec_perm_indices::all_from_input_p): New function.
22017 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22018 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22019 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22020 instead of reading the VECTOR_CST directly. Detect whether both
22021 vector inputs are the same before constructing the vec_perm_indices,
22022 and update the number of inputs argument accordingly. Use the
22023 utility functions added above. Only construct sel2 if we need to.
22024
22025 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22026
22027 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22028 the broadcast of the low byte.
22029 (expand_mult_highpart): Use an explicit encoding for the permutes.
22030 * optabs-query.c (can_mult_highpart_p): Likewise.
22031 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22032 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22033 (vectorizable_bswap): Likewise.
22034 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22035 explicit encoding for the power-of-2 permutes.
22036 (vect_permute_store_chain): Likewise.
22037 (vect_grouped_load_supported): Likewise.
22038 (vect_permute_load_chain): Likewise.
22039
22040 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22041
22042 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22043 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22044 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22045 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22046 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22047 (vect_gen_perm_mask_any): Likewise.
22048
22049 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22050
22051 * int-vector-builder.h: New file.
22052 * vec-perm-indices.h: Include int-vector-builder.h.
22053 (vec_perm_indices): Redefine as an int_vector_builder.
22054 (auto_vec_perm_indices): Delete.
22055 (vec_perm_builder): Redefine as a stand-alone class.
22056 (vec_perm_indices::vec_perm_indices): New function.
22057 (vec_perm_indices::clamp): Likewise.
22058 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22059 (vec_perm_indices::new_vector): New function.
22060 (vec_perm_indices::new_expanded_vector): Update for new
22061 vec_perm_indices class.
22062 (vec_perm_indices::rotate_inputs): New function.
22063 (vec_perm_indices::all_in_range_p): Operate directly on the
22064 encoded form, without computing elided elements.
22065 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22066 encoding. Update for new vec_perm_indices class.
22067 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22068 the given vec_perm_builder.
22069 (expand_vec_perm_var): Update vec_perm_builder constructor.
22070 (expand_mult_highpart): Use vec_perm_builder instead of
22071 auto_vec_perm_indices.
22072 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22073 vec_perm_indices instead of auto_vec_perm_indices. Use a single
22074 or double series encoding as appropriate.
22075 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22076 vec_perm_indices instead of auto_vec_perm_indices.
22077 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22078 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22079 (vect_permute_store_chain): Likewise.
22080 (vect_grouped_load_supported): Likewise.
22081 (vect_permute_load_chain): Likewise.
22082 (vect_shift_permute_load_chain): Likewise.
22083 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22084 (vect_transform_slp_perm_load): Likewise.
22085 (vect_schedule_slp_instance): Likewise.
22086 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22087 (vectorizable_mask_load_store): Likewise.
22088 (vectorizable_bswap): Likewise.
22089 (vectorizable_store): Likewise.
22090 (vectorizable_load): Likewise.
22091 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22092 vec_perm_indices instead of auto_vec_perm_indices. Use
22093 tree_to_vec_perm_builder to read the vector from a tree.
22094 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22095 vec_perm_builder instead of a vec_perm_indices.
22096 (have_whole_vector_shift): Use vec_perm_builder and
22097 vec_perm_indices instead of auto_vec_perm_indices. Leave the
22098 truncation to calc_vec_perm_mask_for_shift.
22099 (vect_create_epilog_for_reduction): Likewise.
22100 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22101 from auto_vec_perm_indices to vec_perm_indices.
22102 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22103 instead of changing individual elements.
22104 (aarch64_vectorize_vec_perm_const): Use new_vector to install
22105 the vector in d.perm.
22106 * config/arm/arm.c (expand_vec_perm_d::perm): Change
22107 from auto_vec_perm_indices to vec_perm_indices.
22108 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22109 instead of changing individual elements.
22110 (arm_vectorize_vec_perm_const): Use new_vector to install
22111 the vector in d.perm.
22112 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22113 Update vec_perm_builder constructor.
22114 (rs6000_expand_interleave): Likewise.
22115 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22116 (rs6000_expand_interleave): Likewise.
22117
22118 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22119
22120 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22121 to qimode could truncate the indices.
22122 * optabs.c (expand_vec_perm_var): Likewise.
22123
22124 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22125
22126 * Makefile.in (OBJS): Add vec-perm-indices.o.
22127 * vec-perm-indices.h: New file.
22128 * vec-perm-indices.c: Likewise.
22129 * target.h (vec_perm_indices): Replace with a forward class
22130 declaration.
22131 (auto_vec_perm_indices): Move to vec-perm-indices.h.
22132 * optabs.h: Include vec-perm-indices.h.
22133 (expand_vec_perm): Delete.
22134 (selector_fits_mode_p, expand_vec_perm_var): Declare.
22135 (expand_vec_perm_const): Declare.
22136 * target.def (vec_perm_const_ok): Replace with...
22137 (vec_perm_const): ...this new hook.
22138 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22139 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22140 * doc/tm.texi: Regenerate.
22141 * optabs.def (vec_perm_const): Delete.
22142 * doc/md.texi (vec_perm_const): Likewise.
22143 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22144 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22145 expand_vec_perm for constant permutation vectors. Assert that
22146 the mode of variable permutation vectors is the integer equivalent
22147 of the mode that is being permuted.
22148 * optabs-query.h (selector_fits_mode_p): Declare.
22149 * optabs-query.c: Include vec-perm-indices.h.
22150 (selector_fits_mode_p): New function.
22151 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22152 is defined, instead of checking whether the vec_perm_const_optab
22153 exists. Use targetm.vectorize.vec_perm_const instead of
22154 targetm.vectorize.vec_perm_const_ok. Check whether the indices
22155 fit in the vector mode before using a variable permute.
22156 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22157 vec_perm_indices instead of an rtx.
22158 (expand_vec_perm): Replace with...
22159 (expand_vec_perm_const): ...this new function. Take the selector
22160 as a vec_perm_indices rather than an rtx. Also take the mode of
22161 the selector. Update call to shift_amt_for_vec_perm_mask.
22162 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22163 Use vec_perm_indices::new_expanded_vector to expand the original
22164 selector into bytes. Check whether the indices fit in the vector
22165 mode before using a variable permute.
22166 (expand_vec_perm_var): Make global.
22167 (expand_mult_highpart): Use expand_vec_perm_const.
22168 * fold-const.c: Includes vec-perm-indices.h.
22169 * tree-ssa-forwprop.c: Likewise.
22170 * tree-vect-data-refs.c: Likewise.
22171 * tree-vect-generic.c: Likewise.
22172 * tree-vect-loop.c: Likewise.
22173 * tree-vect-slp.c: Likewise.
22174 * tree-vect-stmts.c: Likewise.
22175 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22176 Delete.
22177 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22178 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22179 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22180 (aarch64_vectorize_vec_perm_const): ...this new function.
22181 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22182 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22183 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22184 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22185 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22186 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22187 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22188 into...
22189 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
22190 check for NEON modes.
22191 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22192 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22193 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22194 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22195 into...
22196 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
22197 the old VEC_PERM_CONST conditions.
22198 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22199 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22200 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22201 (ia64_vectorize_vec_perm_const_ok): Merge into...
22202 (ia64_vectorize_vec_perm_const): ...this new function.
22203 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22204 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22205 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22206 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22207 * config/mips/mips.c (mips_expand_vec_perm_const)
22208 (mips_vectorize_vec_perm_const_ok): Merge into...
22209 (mips_vectorize_vec_perm_const): ...this new function.
22210 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22211 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22212 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22213 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22214 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22215 (rs6000_expand_vec_perm_const): Delete.
22216 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22217 Delete.
22218 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22219 (altivec_expand_vec_perm_const_le): Take each operand individually.
22220 Operate on constant selectors rather than rtxes.
22221 (altivec_expand_vec_perm_const): Likewise. Update call to
22222 altivec_expand_vec_perm_const_le.
22223 (rs6000_expand_vec_perm_const): Delete.
22224 (rs6000_vectorize_vec_perm_const_ok): Delete.
22225 (rs6000_vectorize_vec_perm_const): New function.
22226 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22227 an element count and rtx array.
22228 (rs6000_expand_extract_even): Update call accordingly.
22229 (rs6000_expand_interleave): Likewise.
22230 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22231 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22232 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22233 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22234 (rs6000_expand_vec_perm_const): Delete.
22235 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22236 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22237 (altivec_expand_vec_perm_const_le): Take each operand individually.
22238 Operate on constant selectors rather than rtxes.
22239 (altivec_expand_vec_perm_const): Likewise. Update call to
22240 altivec_expand_vec_perm_const_le.
22241 (rs6000_expand_vec_perm_const): Delete.
22242 (rs6000_vectorize_vec_perm_const_ok): Delete.
22243 (rs6000_vectorize_vec_perm_const): New function. Remove stray
22244 reference to the SPE evmerge intructions.
22245 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22246 an element count and rtx array.
22247 (rs6000_expand_extract_even): Update call accordingly.
22248 (rs6000_expand_interleave): Likewise.
22249 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22250 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22251 new function.
22252 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22253
22254 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22255
22256 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22257 vector mode and that that mode matches the mode of the data
22258 being permuted.
22259 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22260 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
22261 directly using expand_vec_perm_1 when forcing selectors into
22262 registers.
22263 (expand_vec_perm_var): New function, split out from expand_vec_perm.
22264
22265 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22266
22267 * optabs-query.h (can_vec_perm_p): Delete.
22268 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22269 * optabs-query.c (can_vec_perm_p): Split into...
22270 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22271 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22272 particular selector is valid.
22273 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22274 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22275 (vect_grouped_load_supported): Likewise.
22276 (vect_shift_permute_load_chain): Likewise.
22277 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22278 (vect_transform_slp_perm_load): Likewise.
22279 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22280 (vectorizable_bswap): Likewise.
22281 (vect_gen_perm_mask_checked): Likewise.
22282 * fold-const.c (fold_ternary_loc): Likewise. Don't take
22283 implementations of variable permutation vectors into account
22284 when deciding which selector to use.
22285 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22286 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22287 with a false third argument.
22288 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22289 to test whether the constant selector is valid and can_vec_perm_var_p
22290 to test whether a variable selector is valid.
22291
22292 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22293
22294 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22295 * optabs-query.c (can_vec_perm_p): Likewise.
22296 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22297 instead of vec_perm_indices.
22298 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22299 (vect_gen_perm_mask_checked): Likewise,
22300 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22301 (vect_gen_perm_mask_checked): Likewise,
22302
22303 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22304
22305 * optabs-query.h (qimode_for_vec_perm): Declare.
22306 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22307 (qimode_for_vec_perm): ...this new function.
22308 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22309
22310 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22311
22312 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22313 does not have a conditional at the top.
22314
22315 2018-01-02 Richard Biener <rguenther@suse.de>
22316
22317 * ipa-inline.c (big_speedup_p): Fix expression.
22318
22319 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22320
22321 PR target/81616
22322 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22323 for generic 4->6.
22324
22325 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22326
22327 PR target/81616
22328 Generic tuning.
22329 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22330 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22331 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22332 cond_taken_branch_cost 3->4.
22333
22334 2018-01-01 Jakub Jelinek <jakub@redhat.com>
22335
22336 PR tree-optimization/83581
22337 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22338 TODO_cleanup_cfg if any changes have been made.
22339
22340 PR middle-end/83608
22341 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22342 convert_modes if target mode has the right side, but different mode
22343 class.
22344
22345 PR middle-end/83609
22346 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22347 last argument when extracting from CONCAT. If either from_real or
22348 from_imag is NULL, use expansion through memory. If result is not
22349 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22350 the parts directly to inner mode, if even that fails, use expansion
22351 through memory.
22352
22353 PR middle-end/83623
22354 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22355 check for bswap in mode rather than HImode and use that in expand_unop
22356 too.
22357 \f
22358 Copyright (C) 2018 Free Software Foundation, Inc.
22359
22360 Copying and distribution of this file, with or without modification,
22361 are permitted in any medium without royalty provided the copyright
22362 notice and this notice are preserved.