[c++] Don't emit exception tables for UI_NONE
[gcc.git] / gcc / ChangeLog
1 2018-08-03 Tom de Vries <tdevries@suse.de>
2
3 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
4 UI_NONE.
5 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
6 * except.c (output_function_exception_table): Do early exit if
7 targetm_common.except_unwind_info (&global_options) == UI_NONE.
8
9 2018-08-03 Martin Liska <mliska@suse.cz>
10
11 * predict.c (dump_prediction): Change to 2 digits
12 in fraction part.
13
14 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
15
16 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
17 neon_dup_q to...
18 (falkor_am_1_gtov_gtov): ... a new insn reservation.
19
20 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
21
22 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
23 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
24 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
25 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
26 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
27
28 2018-08-02 David Malcolm <dmalcolm@redhat.com>
29
30 * diagnostic-show-locus.c (diagnostic_show_locus): Use
31 pp_take_prefix when saving the existing prefix.
32 * diagnostic.c (diagnostic_append_note): Likewise.
33 * langhooks.c (lhd_print_error_function): Likewise.
34 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
35 param's type. Free the existing prefix.
36 (pp_take_prefix): New function.
37 (pretty_printer::pretty_printer): Drop the prefix parameter.
38 Rename the length parameter to match the comment.
39 (pretty_printer::~pretty_printer): Free the prefix.
40 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
41 parameter.
42 (struct pretty_printer): Drop the "const" from "prefix" field's
43 type and clarify memory management.
44 (pp_set_prefix): Drop the "const" from the 2nd param.
45 (pp_take_prefix): New decl.
46
47 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
48
49 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
50 for word_mode_ok here instead of passing as argument.
51 (expand_block_compare): Change select_block_compare_mode() call.
52 (expand_strncmp_gpr_sequence): New function.
53 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
54
55 2018-08-02 Jeff Law <law@redhat.com>
56
57 PR target/86790
58 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
59 Define to speculation_safe_value_not_needed.
60
61 PR target/86784
62 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
63 Define to speculation_safe_value_not_needed.
64
65 2018-08-02 Tom de Vries <tdevries@suse.de>
66
67 PR target/86660
68 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
69 function. Return UI_TARGET unconditionally.
70 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
71 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
72
73 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
74
75 * genemit.c (print_overload_test): Fix typo.
76
77 2018-08-02 Richard Biener <rguenther@suse.de>
78
79 PR c++/86763
80 * class.c (layout_class_type): Copy TYPE_TYPELESS_STORAGE
81 to the CLASSTYPE_AS_BASE.
82
83 2018-08-02 Richard Biener <rguenther@suse.de>
84
85 PR tree-optimization/86816
86 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
87 which checks for value availability before querying it.
88 (gvn_uses_equal): Use it.
89 (same_succ_hash): Likewise.
90 (gimple_equal_p): Likewise.
91
92 2018-08-02 Nick Clifton <nickc@redhat.com>
93
94 PR target/86813
95 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
96 Define to speculation_safe_value_not_needed.
97
98 PR target/86810
99 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
100 Define to speculation_safe_value_not_needed.
101
102 PR target/86810
103 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
104 Define to speculation_safe_value_not_needed.
105
106 PR target/86803
107 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
108 Define to speculation_safe_value_not_needed.
109
110 PR target/86797
111 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
112 Define to speculation_safe_value_not_needed.
113
114 PR target/86791
115 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
116 Define to speculation_safe_value_not_needed.
117
118 PR target/86789
119 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
120 Define to speculation_safe_value_not_needed.
121
122 PR target/86787
123 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
124 Define to speculation_safe_value_not_needed.
125
126 PR target/86782
127 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
128 speculation_safe_value_not_needed.
129
130 PR target/86781
131 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
132 to speculation_safe_value_not_needed.
133
134 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
135
136 * doc/md.texi: Expand the documentation of instruction names
137 to mention port-local uses. Document '@' in pattern names.
138 * read-md.h (overloaded_instance, overloaded_name): New structs.
139 (mapping): Declare.
140 (md_reader::handle_overloaded_name): New member function.
141 (md_reader::get_overloads): Likewise.
142 (md_reader::m_first_overload): New member variable.
143 (md_reader::m_next_overload_ptr): Likewise.
144 (md_reader::m_overloads_htab): Likewise.
145 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
146 m_next_overload_ptr and m_overloads_htab.
147 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
148 (get_mode_token, get_code_token, get_int_token): New functions.
149 (map_attr_string): Add an optional argument that passes back
150 the associated iterator.
151 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
152 (md_reader::handle_overloaded_name, add_overload_instance): New
153 functions.
154 (apply_iterators): Handle '@' names. Report an error if '@'
155 is used without iterators.
156 (initialize_iterators): Initialize the new iterator_group fields.
157 * genopinit.c (handle_overloaded_code_for)
158 (handle_overloaded_gen): New functions.
159 (main): Use them to print declarations of maybe_code_for_* and
160 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
161 * genemit.c (print_overload_arguments, print_overload_test)
162 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
163 (main): Use it to print definitions of maybe_code_for_* and
164 maybe_gen_* functions.
165 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
166 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
167 instead of explicit mode checks.
168 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
169 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
170 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
171 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
172 (aarch64_expand_compare_and_swap): Likewise
173 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
174 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
175 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
176 (aarch64_constant_pool_reload_icode): Delete.
177 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
178 instead of aarch64_constant_pool_reload_icode. Use
179 code_for_aarch64_reload_mov instead of explicit mode checks.
180 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
181 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
182 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
183 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
184 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
185 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
186 (aarch64_atomic_load_op_code): Delete.
187 (aarch64_emit_atomic_load_op): Likewise.
188 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
189 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
190 instead of aarch64_emit_atomic_load_op.
191 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
192 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
193 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
194 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
195 character before the pattern name.
196 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
197 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
198 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
199 (aarch64_frecps<mode>): Likewise.
200 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
201 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
202 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
203 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
204 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
205
206 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
207
208 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
209 Allow HFmode constants if TARGET_FP_F16INST.
210
211 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
212
213 PR target/86014
214 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
215 No longer check last store for clobber of address register.
216
217 2018-08-02 Martin Liska <mliska@suse.cz>
218
219 PR gcov-profile/86817
220 * gcov.c (process_all_functions): New function.
221 (main): Call it.
222 (process_file): Move functions processing to
223 process_all_functions.
224
225 2018-08-02 David Malcolm <dmalcolm@redhat.com>
226
227 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
228 "const" to the "gimple *" and "rtx_insn *" parameters.
229 * dumpfile.h (dump_user_location_t::dump_user_location_t):
230 Likewise.
231 (dump_location_t::dump_location_t): Likewise.
232
233 2018-08-01 Martin Sebor <msebor@redhat.com>
234
235 PR tree-optimization/86650
236 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
237 rather than a "gcall *". Directly pass the data of interest
238 to percent_K_format, rather than building a temporary CALL_EXPR
239 to hold it.
240 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
241 (gimple_fold_builtin_strncat): Adjust.
242 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
243 gcall* argument with gimple*.
244 * gimple-ssa-warn-restrict.c (check_call): Same.
245 (wrestrict_dom_walker::before_dom_children): Same.
246 (builtin_access::builtin_access): Same.
247 (check_bounds_or_overlap): Same
248 (maybe_diag_overlap): Same.
249 (maybe_diag_offset_bounds): Same.
250 * tree-diagnostic.c (default_tree_printer): Move usage of
251 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
252 to this callsite.
253 * tree-pretty-print.c (percent_K_format): Add argument.
254 * tree-pretty-print.h: Add argument.
255 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
256 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
257 (maybe_diag_stxncpy_trunc): Same.
258 (handle_builtin_stxncpy): Same.
259 (handle_builtin_strcat): Same.
260
261 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
262
263 * match.pd: Optimise pointer range checks.
264
265 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
266
267 PR tree-optimization/86758
268 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
269 to remove pattern statements.
270
271 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
272
273 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
274 result of dfs_enumerate_from when constructing stmt_vec_infos,
275 instead of additionally calling get_loop_body.
276
277 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
278
279 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
280 parameter.
281 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
282 When creating an iv, assert that the step is not known to be zero.
283 (vect_setup_realignment): Update call accordingly.
284 * tree-vect-stmts.c (vectorizable_store): Likewise.
285 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
286
287 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
288
289 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
290 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
291 (vectorizable_reduction): Likewise.
292 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
293 (vect_detect_hybrid_slp_stmts): Likewise.
294 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
295
296 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
297
298 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
299 (wide_int_set_zero_nonzero_bits): ...this.
300 (zero_nonzero_bits_from_vr): Rename to...
301 (vrp_set_zero_nonzero_bits): ...this.
302 (extract_range_from_multiplicative_op_1): Abstract wide int
303 code...
304 (wide_int_range_multiplicative_op): ...here.
305 (extract_range_from_binary_expr_1): Extract wide int binary
306 operations into their own functions.
307 (wide_int_range_lshift): New.
308 (wide_int_range_can_optimize_bit_op): New.
309 (wide_int_range_shift_undefined_p): New.
310 (wide_int_range_bit_xor): New.
311 (wide_int_range_bit_ior): New.
312 (wide_int_range_bit_and): New.
313 (wide_int_range_trunc_mod): New.
314 (extract_range_into_wide_ints): New.
315 (vrp_shift_undefined_p): New.
316 (extract_range_from_multiplicative_op): New.
317 (vrp_can_optimize_bit_op): New.
318 * tree-vrp.h (value_range::dump): New.
319 (wide_int_range_multiplicative_op): New.
320 (wide_int_range_lshift):New.
321 (wide_int_range_shift_undefined_p): New.
322 (wide_int_range_bit_xor): New.
323 (wide_int_range_bit_ior): New.
324 (wide_int_range_bit_and): New.
325 (wide_int_range_trunc_mod): New.
326 (zero_nonzero_bits_from_bounds): Rename to...
327 (wide_int_set_zero_nonzero_bits): ...this.
328 (zero_nonzero_bits_from_vr): Rename to...
329 (vrp_set_zero_nonzero_bits): ...this.
330 (range_easy_mask_min_max): Rename to...
331 (wide_int_range_can_optimize_bit_op): this.
332 * vr-values.c (simplify_bit_ops_using_ranges): Rename
333 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
334
335 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
336
337 * tree-vectorizer.h (vect_orig_stmt): New function.
338 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
339 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
340 (vect_create_epilog_for_reduction): Likewise.
341 (vectorizable_live_operation): Likewise.
342 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
343 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
344 * tree-vect-stmts.c (vectorizable_call): Likewise.
345 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
346
347 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
348
349 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
350 argument.
351 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
352 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
353 (vect_transform_loop): Likewise.
354 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
355
356 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
357
358 * tree-vectorizer.h (vect_schedule_slp): Return void.
359 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
360 (vect_schedule_slp): Likewise.
361
362 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
363
364 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
365 argument.
366 (vect_transform_loop): Update calls accordingly. Schedule SLP
367 instances before the main loop, if any exist.
368
369 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
370
371 PR tree-optimization/86749
372 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
373 If the lhs is used in a COND_EXPR, check that it is being used
374 as the "then" or "else" value.
375
376 2018-08-01 Tom de Vries <tdevries@suse.de>
377
378 PR target/86800
379 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
380 speculation_safe_value_not_needed.
381
382 2018-08-01 Richard Biener <rguenther@suse.de>
383
384 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
385 as base and offset.
386
387 2018-08-01 Martin Liska <mliska@suse.cz>
388
389 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
390 format how successful transformation is dumped.
391 (gimple_mod_pow2_value_transform): Likewise.
392 (gimple_mod_subtract_transform): Likewise.
393 (gimple_stringops_transform): Likewise.
394
395 2018-08-01 Martin Liska <mliska@suse.cz>
396
397 PR value-prof/35543
398 * value-prof.c (interesting_stringop_to_profile_p):
399 Simplify the code and add BUILT_IN_MEMMOVE.
400 (gimple_stringops_transform): Likewise.
401
402 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
403
404 * config/aarch64/aarch64-simd.md
405 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
406 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
407 use GPI iterator instead of SI mode.
408
409 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
410
411 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
412 rs6000_speculation_barrier.
413 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
414 new barrier pattern name.
415
416 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
417
418 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
419 (speculation_barrier): New insn.
420
421 2018-08-01 Richard Biener <rguenther@suse.de>
422
423 PR bootstrap/86724
424 * graphite.h: Include isl/id.h and isl/space.h to allow build
425 with ISL 0.20.
426
427 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
428
429 PR target/86651
430 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
431 mode for COFF targets.
432 * defaults.h (TARGET_COFF): Define.
433 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
434 TARGET_COFF): Define.
435 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
436 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
437 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
438
439 2018-07-31 Alexandre Oliva <oliva@adacore.com>
440
441 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
442 * gimple-streamer-out.c (output_bb): Save it.
443 * lto-streamer-in.c (input_struct_function_base): Restore
444 instance discriminator if available. Create map on demand.
445 * lto-streamer-out.c (output_struct_function_base): Save it if
446 available.
447 * final.c (decl_to_instance_map): Document LTO strategy.
448
449 2018-07-31 Alexandre Oliva <oliva@adacore.com>
450 Olivier Hainque <hainque@adacore.com>
451
452 * debug.h (decl_to_instance_map_t): New type.
453 (decl_to_instance_map): Declare.
454 (maybe_create_decl_to_instance_map): New inline function.
455 * final.c (bb_discriminator, last_bb_discriminator): New statics,
456 to track basic block discriminators.
457 (final_start_function_1): Initialize them.
458 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
459 bb_discriminator.
460 (decl_to_instance_map): New variable.
461 (map_decl_to_instance, maybe_set_discriminator): New functions.
462 (notice_source_line): Set discriminator.
463
464 2018-07-31 Ian Lance Taylor <iant@golang.org>
465
466 * targhooks.c (default_have_speculation_safe_value): Add
467 ATTRIBUTE_UNUSED.
468
469 2018-07-31 David Malcolm <dmalcolm@redhat.com>
470
471 * dump-context.h: Include "pretty-print.h".
472 (dump_context::refresh_dumps_are_enabled): New decl.
473 (dump_context::emit_item): New decl.
474 (class dump_context): Add fields "m_test_pp" and
475 "m_test_pp_flags".
476 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
477 (temp_dump_context::get_dumped_text): New decl.
478 (class temp_dump_context): Add field "m_pp".
479 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
480 (dump_context::refresh_dumps_are_enabled): ...and add a test for
481 m_test_pp.
482 (set_dump_file): Update for above change.
483 (set_alt_dump_file): Likewise.
484 (dump_loc): New overload, taking a pretty_printer *.
485 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
486 to any test pretty-printer.
487 (make_item_for_dump_gimple_stmt): New function, adapted from
488 optinfo::add_gimple_stmt.
489 (dump_context::dump_gimple_stmt): Call it, and use the result,
490 eliminating the direct usage of dump_file and alt_dump_file in
491 favor of indirectly using them via emit_item.
492 (make_item_for_dump_gimple_expr): New function, adapted from
493 optinfo::add_gimple_expr.
494 (dump_context::dump_gimple_expr): Call it, and use the result,
495 eliminating the direct usage of dump_file and alt_dump_file in
496 favor of indirectly using them via emit_item.
497 (make_item_for_dump_generic_expr): New function, adapted from
498 optinfo::add_tree.
499 (dump_context::dump_generic_expr): Call it, and use the result,
500 eliminating the direct usage of dump_file and alt_dump_file in
501 favor of indirectly using them via emit_item.
502 (make_item_for_dump_printf_va): New function, adapted from
503 optinfo::add_printf_va.
504 (make_item_for_dump_printf): New function.
505 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
506 and use the result, eliminating the direct usage of dump_file and
507 alt_dump_file in favor of indirectly using them via emit_item.
508 (make_item_for_dump_dec): New function.
509 (dump_context::dump_dec): Call it, and use the result,
510 eliminating the direct usage of dump_file and alt_dump_file in
511 favor of indirectly using them via emit_item.
512 (make_item_for_dump_symtab_node): New function, adapted from
513 optinfo::add_symtab_node.
514 (dump_context::dump_symtab_node): Call it, and use the result,
515 eliminating the direct usage of dump_file and alt_dump_file in
516 favor of indirectly using them via emit_item.
517 (dump_context::begin_scope): Reimplement, avoiding direct usage
518 of dump_file and alt_dump_file in favor of indirectly using them
519 via emit_item.
520 (dump_context::emit_item): New member function.
521 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
522 Set up test pretty-printer on the underlying context. Call
523 refresh_dumps_are_enabled.
524 (temp_dump_context::~temp_dump_context): Call
525 refresh_dumps_are_enabled.
526 (temp_dump_context::get_dumped_text): New member function.
527 (selftest::verify_dumped_text): New function.
528 (ASSERT_DUMPED_TEXT_EQ): New macro.
529 (selftest::test_capture_of_dump_calls): Run all tests twice, with
530 and then without optinfo enabled. Add uses of
531 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
532 * dumpfile.h: Update comment for the dump_* API.
533 * optinfo-emit-json.cc
534 (selftest::test_building_json_from_dump_calls): Update for new
535 param for temp_dump_context ctor.
536 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
537 and "m_owned" field.
538 (optinfo_item::~optinfo_item): Likewise.
539 (optinfo::add_item): New member function.
540 (optinfo::emit): Update comment.
541 (optinfo::add_string): Delete.
542 (optinfo::add_printf): Delete.
543 (optinfo::add_printf_va): Delete.
544 (optinfo::add_gimple_stmt): Delete.
545 (optinfo::add_gimple_expr): Delete.
546 (optinfo::add_tree): Delete.
547 (optinfo::add_symtab_node): Delete.
548 (optinfo::add_dec): Delete.
549 * optinfo.h (class dump_context): New forward decl.
550 (optinfo::add_item): New decl.
551 (optinfo::add_string): Delete.
552 (optinfo::add_printf): Delete.
553 (optinfo::add_printf_va): Delete.
554 (optinfo::add_gimple_stmt): Delete.
555 (optinfo::add_gimple_expr): Delete.
556 (optinfo::add_tree): Delete.
557 (optinfo::add_symtab_node): Delete.
558 (optinfo::add_dec): Delete.
559 (optinfo::add_poly_int): Delete.
560 (optinfo_item::optinfo_item): Remove "owned" param.
561 (class optinfo_item): Remove field "m_owned".
562
563 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
564
565 PR middle-end/86705
566 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
567 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
568 requested variable alignment.
569 (expand_one_ssa_partition): Likewise.
570 (expand_one_var): Likewise.
571
572 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
573
574 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
575 to speculation_safe_value_not_needed.
576
577 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
578
579 * targhooks.h (speculation_safe_value_not_needed): New prototype.
580 * targhooks.c (speculation_safe_value_not_needed): New function.
581 * target.def (have_speculation_safe_value): Update documentation.
582 * doc/tm.texi: Regenerated.
583
584 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
585
586 * config/aarch64/iterators.md (ALLI_TI): New iterator.
587 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
588 expand.
589 (despeculate_copy<ALLI:mode>_insn): New insn.
590 (despeculate_copyti_insn): New insn.
591 (despeculate_simple<ALLI:mode>): New insn
592 (despeculate_simpleti): New insn.
593 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
594 function.
595 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
596 aarch64_speculation_safe_value.
597 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
598
599 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
600
601 * config/aarch64/aarch64-speculation.cc: New file.
602 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
603 before pass_reorder_blocks.
604 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
605 prototype.
606 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
607 X14 and X15 when tracking speculation.
608 * config/aarch64/aarch64.md (register name constants): Add
609 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
610 (unspec): Add UNSPEC_SPECULATION_TRACKER.
611 (speculation_barrier): New insn attribute.
612 (cmp<mode>): Allow SP in comparisons.
613 (speculation_tracker): New insn.
614 (speculation_barrier): Add speculation_barrier attribute.
615 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
616 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
617 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
618
619 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
620
621 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
622 aarch64_track_speculation is true.
623 (tb<optab><mode>1): Likewise.
624 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
625 generate CB[N]Z when tracking speculation.
626 (aarch64_split_compare_and_swap): Likewise.
627 (aarch64_split_atomic_op): Likewise.
628
629 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
630
631 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
632
633 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
634
635 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
636 (speculation_barrier): New insn.
637
638 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
639
640 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
641 * config/arm/arm.md (speculation_barrier): New expand.
642 (speculation_barrier_insn): New pattern.
643
644 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
645
646 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
647 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
648 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
649 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
650 list.
651 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
652 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
653 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
654 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
655 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
656 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
657 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
658 * builtins.c (expand_speculation_safe_value): New function.
659 (expand_builtin): Call it.
660 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
661 * doc/extend.texi: Document __builtin_speculation_safe_value.
662 * doc/md.texi: Document "speculation_barrier" pattern.
663 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
664 TARGET_HAVE_SPECULATION_SAFE_VALUE.
665 * doc/tm.texi: Regenerated.
666 * target.def (have_speculation_safe_value, speculation_safe_value): New
667 hooks.
668 * targhooks.c (default_have_speculation_safe_value): New function.
669 (default_speculation_safe_value): New function.
670 * targhooks.h (default_have_speculation_safe_value): Add prototype.
671 (default_speculation_safe_value): Add prototype.
672
673 2018-07-31 David Malcolm <dmalcolm@redhat.com>
674
675 * dump-context.h (dump_context::dump_loc): New decl.
676 * dumpfile.c (dump_context::dump_loc): New member function.
677 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
678 and dump_gimple_stmt.
679 (dump_context::dump_gimple_expr_loc): Likewise, using
680 dump_gimple_expr.
681 (dump_context::dump_generic_expr_loc): Likewise, using
682 dump_generic_expr.
683 (dump_context::dump_printf_loc_va): Likewise, using
684 dump_printf_va.
685 (dump_context::begin_scope): Explicitly using the global function
686 "dump_loc", rather than the member function.
687
688 2018-07-31 Martin Sebor <msebor@redhat.com>
689
690 PR tree-optimization/86741
691 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
692
693 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
694
695 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
696 depend on whether prefetch instructions will be emitted or not.
697 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
698 will be emitted or not.
699 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
700 (TARGET_SETMEM_PFD): New macros.
701
702 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
703
704 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
705 (NULL_STMT_VEC_INFO): Delete.
706 (stmt_vec_info::operator*): Likewise.
707 (stmt_vec_info::operator gimple *): Likewise.
708 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
709 of NULL_STMT_VEC_INFO.
710 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
711 (vect_reassociating_reduction_p): Likewise.
712 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
713 (vectorizable_store): Likewise.
714 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
715 (vec_info::free_stmt_vec_infos): Likewise.
716
717 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
718
719 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
720 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
721
722 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
723
724 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
725 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
726 (vec_info::free_stmt_vec_info): New private member functions.
727 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
728 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
729 * tree-parloops.c (gather_scalar_reductions): Remove calls to
730 set_stmt_vec_info_vec and free_stmt_vec_infos.
731 * tree-vect-loop.c (_loop_vec_info): Remove call to
732 set_stmt_vec_info_vec.
733 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
734 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
735 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
736 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
737 (vec_info::free_stmt_vec_info): ...these new functions. Remove
738 assignments in {vec_info::,}new_stmt_vec_info that are redundant
739 with the clearing in the xcalloc.
740 (stmt_vec_info_vec): Delete.
741 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
742 (vectorize_loops): Likewise.
743 (vec_info::~vec_info): Remove argument from call to
744 free_stmt_vec_infos.
745 (vec_info::add_stmt): Remove vinfo argument from call to
746 new_stmt_vec_info.
747
748 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
749
750 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
751 rather than a gimple stmt.
752 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
753 information for pattern statements when passed the original
754 statement; instead wait to be passed the pattern statement itself.
755 Don't call set_vinfo_for_stmt here.
756 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
757 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
758 stmt_vec_infos here.
759 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
760 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
761 stmt_vec_infos entry.
762
763 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
764
765 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
766 * tree-vectorizer.c (vec_info::replace_stmt): New function.
767 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
768 * tree-vect-stmts.c (vectorizable_call): Likewise.
769 (vectorizable_simd_clone_call): Likewise.
770
771 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
772
773 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
774 * tree-vectorizer.c (vec_info::remove_stmt): New function.
775 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
776 * tree-vect-loop.c (vect_transform_loop): Likewise.
777 * tree-vect-slp.c (vect_schedule_slp): Likewise.
778 * tree-vect-stmts.c (vect_remove_stores): Likewise.
779
780 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
781
782 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
783 (vect_dr_stmt): Delete.
784 * tree-vectorizer.c (vec_info::lookup_dr): New function.
785 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
786 of DR_VECT_AUX.
787 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
788 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
789 (vect_verify_datarefs_alignment, vect_peeling_supportable)
790 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
791 (vect_analyze_data_refs): Likewise.
792 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
793 argument.
794 (vect_find_same_alignment_drs): Likewise.
795 (vect_slp_analyze_node_dependences): Update calls accordingly.
796 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
797 instead of DR_VECT_AUX.
798 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
799 of a vector data references. Use vec_info::lookup_dr instead of
800 DR_VECT_AUX.
801 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
802 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
803 instead of DR_VECT_AUX.
804
805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
806
807 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
808 dr_vec_info.
809 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
810 accordingly.
811 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
812 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
813 (vect_gen_prolog_loop_niters): Likewise.
814
815 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
816
817 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
818 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
819 (vect_known_alignment_in_bytes, vect_dr_behavior)
820 (vect_get_scalar_dr_size): Take references as dr_vec_infos
821 instead of data_references. Update calls to other routines for
822 which the same change has been made.
823 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
824 dr_vec_infos instead of stmt_vec_infos.
825 (vect_analyze_data_ref_dependence): Update call accordingly.
826 (vect_slp_analyze_data_ref_dependence)
827 (vect_record_base_alignments): Use DR_VECT_AUX.
828 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
829 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
830 (vector_alignment_reachable_p, vect_get_data_access_cost)
831 (vect_peeling_supportable, vect_analyze_group_access_1)
832 (vect_analyze_group_access, vect_analyze_data_ref_access)
833 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
834 (vect_compile_time_alias, vect_small_gap_p)
835 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
836 (vect_supportable_dr_alignment): Take references as dr_vec_infos
837 instead of data_references. Update calls to other routines for
838 which the same change has been made.
839 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
840 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
841 (vect_slp_analyze_and_verify_node_alignment)
842 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
843 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
844 (vect_setup_realignment): Use dr_vec_infos. Update calls after
845 above changes.
846 (_vect_peel_info::dr): Replace with...
847 (_vect_peel_info::dr_info): ...this new field.
848 (vect_peeling_hash_get_most_frequent)
849 (vect_peeling_hash_choose_best_peeling): Update accordingly.
850 (vect_peeling_hash_get_lowest_cost):
851 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
852 routines for which the same change has been made.
853 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
854 data_reference.
855 * tree-vect-loop-manip.c (get_misalign_in_elems)
856 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
857 above changes.
858 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
859 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
860 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
861 (get_group_load_store_type, get_negative_load_store_type)
862 (vect_get_data_ptr_increment, vectorizable_store)
863 (vectorizable_load): Likewise.
864 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
865 Update calls to other routines for which the same change has been made.
866
867 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
868
869 * tree-vectorizer.h (vec_info::move_dr): New member function.
870 (dataref_aux): Rename to...
871 (dr_vec_info): ...this and add "dr" and "stmt" fields.
872 (_stmt_vec_info::dr_aux): Update accordingly.
873 (_stmt_vec_info::data_ref_info): Delete.
874 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
875 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
876 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
877 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
878 of data_ref.
879 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
880 (STMT_VINFO_DR_INFO): New macro.
881 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
882 (set_dr_misalignment): Update after rename of dataref_aux.
883 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
884 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
885 initialization of STMT_VINFO_DATA_REF.
886 * tree-vectorizer.c (vec_info::move_dr): New function.
887 * tree-vect-patterns.c (vect_recog_bool_pattern)
888 (vect_recog_mask_conversion_pattern)
889 (vect_recog_gather_scatter_pattern): Use it.
890 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
891 the "dr" and "stmt" fields of dr_vec_info instead of
892 STMT_VINFO_DATA_REF.
893
894 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
895
896 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
897 (is_pattern_stmt_p): Use it.
898 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
899 on pattern statements.
900
901 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
902
903 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
904 original stmt as a stmt_vec_info rather than a gimple stmt.
905 (vect_pattern_recog_1): Take the statement directly as a
906 stmt_vec_info, rather than via a gimple_stmt_iterator.
907 Update call to vect_mark_pattern_stmts.
908 (vect_pattern_recog): Update calls accordingly.
909
910 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
911
912 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
913 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
914 a vect_def_type for the first argument.
915 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
916 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
917 operand if it isn't defined by a vectorized statement.
918 (vect_build_gather_load_calls): Remove the mask_dt argument and
919 update calls to vect_get_vec_def_for_stmt_copy.
920 (vectorizable_bswap): Likewise the dt argument.
921 (vectorizable_call): Update calls to vectorizable_bswap and
922 vect_get_vec_def_for_stmt_copy.
923 (vectorizable_simd_clone_call, vectorizable_assignment)
924 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
925 (vectorizable_comparison): Update calls to
926 vect_get_vec_def_for_stmt_copy.
927 (vectorizable_store): Likewise. Remove now-unnecessary calls to
928 vect_is_simple_use.
929 (vect_get_loop_based_defs): Remove dt argument and update call
930 to vect_get_vec_def_for_stmt_copy.
931 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
932 and vect_get_vec_def_for_stmt_copy.
933 (vectorizable_load): Update calls to vect_build_gather_load_calls
934 and vect_get_vec_def_for_stmt_copy.
935 * tree-vect-loop.c (vect_create_epilog_for_reduction)
936 (vectorizable_reduction, vectorizable_live_operation): Update calls
937 to vect_get_vec_def_for_stmt_copy.
938
939 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
940
941 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
942 and gimple stmt arguments with a stmt_vec_info.
943 (vect_record_base_alignments): Update calls accordingly.
944 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
945 and gimple stmt arguments with a stmt_vec_info.
946 (vect_build_slp_tree_1): Remove vinfo argument and update call
947 to vect_record_max_nunits.
948 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
949 and vect_record_max_nunits.
950
951 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
952
953 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
954 file and take a stmt_vec_info instead of a gimple stmt.
955 (supportable_widening_operation, vect_finish_replace_stmt)
956 (vect_finish_stmt_generation, vect_get_store_rhs)
957 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
958 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
959 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
960 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
961 (vect_create_data_ref_ptr, bump_vector_ptr)
962 (vect_permute_store_chain, vect_setup_realignment)
963 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
964 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
965 (vectorizable_reduction, vectorizable_induction)
966 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
967 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
968 than gimple stmts as arguments.
969 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
970 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
971 (can_group_stmts_p, vect_check_gather_scatter)
972 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
973 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
974 (vect_permute_load_chain, vect_shift_permute_load_chain)
975 (vect_transform_grouped_load)
976 (vect_record_grouped_load_vectors): Likewise.
977 * tree-vect-loop.c (vect_fixup_reduc_chain)
978 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
979 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
980 (vectorizable_reduction, vectorizable_induction)
981 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
982 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
983 (vect_get_load_store_mask): Likewise.
984 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
985 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
986 * tree-vect-stmts.c (vect_mark_relevant)
987 (is_simple_and_all_uses_invariant)
988 (exist_non_indexing_operands_for_use_p, process_use)
989 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
990 (vect_get_vec_def_for_operand, vect_get_vec_defs)
991 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
992 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
993 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
994 (get_negative_load_store_type, get_load_store_type)
995 (vect_check_load_store_mask, vect_check_store_rhs)
996 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
997 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
998 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
999 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1000 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1001 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1002 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1003 (supportable_widening_operation): Likewise.
1004
1005 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1006
1007 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1008 a stmt_vec_info instead of a gcall.
1009 (vect_check_gather_scatter): Update call accordingly.
1010 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1011 of a gphi.
1012 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1013 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1014 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1015 instead of a gimple stmt.
1016 (vect_transform_loop): Update calls accordingly.
1017 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1018 stmt_vec_infos instead of gimple stmts.
1019 (vect_analyze_slp_instance): Update use accordingly.
1020 * tree-vect-stmts.c (read_vector_array, write_vector_array)
1021 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1022 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1023 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1024 (vect_gen_widened_results_half, vect_get_loop_based_defs)
1025 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1026 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1027 down to subroutines.
1028
1029 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1030
1031 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1032 of the worklist from a vector of gimple stmts to a vector of
1033 stmt_vec_infos.
1034 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1035 (vect_mark_stmts_to_be_vectorized): Likewise
1036
1037 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1038
1039 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1040 statement before passing it to vect_analyze_stmt.
1041 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1042 the chain of phi vector definitions. Track the exit phi via its
1043 stmt_vec_info.
1044 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1045 STMT_VINFO_REDUC_DEF.
1046 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1047 stmt_vec_infos to handle the statement chains.
1048 (vect_get_slp_defs): Record the first statement in the node
1049 using a stmt_vec_info.
1050 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1051 statements here and pass their stmt_vec_info down to subroutines.
1052 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1053 down to vect_finish_stmt_generation.
1054 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1055 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1056 stmt_vec_infos to subroutines.
1057 (vect_remove_stores): Use stmt_vec_infos to handle the statement
1058 chains.
1059
1060 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1061
1062 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1063 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1064 (vect_permute_store_chain, vect_setup_realignment)
1065 (vect_permute_load_chain, vect_shift_permute_load_chain)
1066 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1067 stmts internally, and when passing values to other vectorizer routines.
1068 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1069 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
1070 (vect_analyze_loop_operations, get_initial_def_for_reduction)
1071 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
1072 (vectorizable_reduction, vectorizable_induction)
1073 (vectorizable_live_operation, vect_transform_loop_stmt)
1074 (vect_transform_loop): Likewise.
1075 * tree-vect-patterns.c (vect_reassociating_reduction_p)
1076 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
1077 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
1078 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1079 (vect_slp_analyze_node_operations_1): Likewise.
1080 * tree-vect-stmts.c (vect_mark_relevant, process_use)
1081 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
1082 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
1083 (vect_finish_stmt_generation_1, get_group_load_store_type)
1084 (get_load_store_type, vect_build_gather_load_calls)
1085 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1086 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1087 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1088 (vectorizable_store, vectorizable_load, vectorizable_condition)
1089 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
1090 (supportable_widening_operation): Likewise.
1091 (vect_get_vector_types_for_stmt): Likewise.
1092 * tree-vectorizer.h (vect_dr_behavior): Likewise.
1093
1094 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1095
1096 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1097 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
1098 (vect_permute_store_chain, vect_permute_load_chain)
1099 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
1100 repeated stmt_vec_info lookups.
1101 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
1102 (vect_update_ivs_after_vectorizer): Likewise.
1103 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
1104 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1105 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
1106 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1107 (vect_bb_slp_scalar_cost): Likewise.
1108 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
1109
1110 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1111
1112 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
1113 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
1114 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
1115 to get gassigns and gcalls, rather than operating on generc gimple
1116 stmts.
1117 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
1118 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
1119 (vectorizable_load, vect_analyze_stmt): Likewise.
1120 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
1121
1122 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1123
1124 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
1125 return stmt_vec_infos rather than gimple stmts. Do not accept
1126 null arguments.
1127 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
1128 of a gimple stmt.
1129 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1130 Update use of get_later_stmt.
1131 (vect_get_constant_vectors): Update call accordingly.
1132 (vect_schedule_slp_instance): Likewise
1133 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
1134 (vect_slp_analyze_instance_dependence): Likewise.
1135 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
1136
1137 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1138
1139 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
1140 (stmt_info_for_cost::stmt_info): ...this new field.
1141 (add_stmt_costs): Update accordingly.
1142 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1143 (vect_get_known_peeling_cost): Likewise.
1144 (vect_estimate_min_profitable_iters): Likewise.
1145 * tree-vect-stmts.c (record_stmt_cost): Likewise.
1146
1147 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1148
1149 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
1150 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1151 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1152 accordingly.
1153 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
1154
1155 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1156
1157 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
1158 a gimple stmt to a stmt_vec_info.
1159 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1160
1161 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1162
1163 * tree-vectorizer.h (vec_info::grouped_stores): Change from
1164 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1165 (_loop_vec_info::reduction_chains): Likewise.
1166 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
1167 accordingly.
1168 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1169
1170 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1171
1172 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
1173 a gimple stmt to a stmt_vec_info.
1174 (_stmt_vec_info::next_element): Likewise.
1175 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
1176 (vect_slp_analyze_and_verify_node_alignment)
1177 (vect_analyze_group_access_1, vect_analyze_group_access)
1178 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
1179 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
1180 (vect_supportable_dr_alignment): Update accordingly.
1181 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
1182 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
1183 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
1184 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
1185 * tree-vect-slp.c (vect_build_slp_tree_1)
1186 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
1187 (vect_split_slp_store_group, vect_analyze_slp_instance)
1188 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
1189 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
1190 (get_group_load_store_type, get_load_store_type)
1191 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
1192 (vect_transform_stmt, vect_remove_stores): Likewise.
1193
1194 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1195
1196 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
1197 than a gimple stmt.
1198 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
1199 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
1200 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
1201 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
1202 (vector_alignment_reachable_p, vect_get_data_access_cost)
1203 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
1204 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
1205 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1206 (vect_analyze_group_access_1, vect_analyze_group_access)
1207 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
1208 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
1209 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
1210 result of vect_dr_stmt and use the stmt_vec_info instead of
1211 the associated gimple stmt.
1212 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1213 (vect_gen_prolog_loop_niters): Likewise.
1214 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1215
1216 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1217
1218 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
1219 to a vec<stmt_vec_info>.
1220 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
1221 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
1222 vec<stmt_vec_info>.
1223 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
1224 to a vec<stmt_vec_info>.
1225 (bst_traits::value_type, bst_traits::value_type): Likewise.
1226 (bst_traits::hash): Update accordingly.
1227 (vect_get_and_check_slp_defs): Change the stmts parameter from
1228 a vec<gimple *> to a vec<stmt_vec_info>.
1229 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
1230 (vect_build_slp_tree): Likewise.
1231 (vect_build_slp_tree_2): Likewise. Update uses of
1232 SLP_TREE_SCALAR_STMTS.
1233 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
1234 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
1235 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
1236 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
1237 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
1238 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
1239 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
1240 (vect_get_constant_vectors, vect_get_slp_defs)
1241 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
1242 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
1243 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
1244 instead of gimple stmts.
1245 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
1246 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
1247 (vect_slp_analyze_instance_dependence): Update uses of
1248 SLP_TREE_SCALAR_STMTS.
1249 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1250 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
1251 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
1252 (get_initial_defs_for_reduction): Likewise.
1253 (vect_create_epilog_for_reduction): Likewise.
1254 (vectorize_fold_left_reduction): Likewise.
1255 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
1256 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
1257 (can_vectorize_live_stmts): Likewise.
1258
1259 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1260
1261 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
1262 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
1263 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
1264 than gimple stmts.
1265 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
1266 of a gimple stmt.
1267 (gather_scalar_reductions): Update after above interface changes.
1268 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
1269 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
1270 than gimple stmts.
1271 (vect_force_simple_reduction): Likewise.
1272 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
1273 LOOP_VINFO_REDUCTIONS.
1274 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1275
1276 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1277
1278 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
1279 a gimple stmt to a stmt_vec_info.
1280 * tree-vect-loop.c (vect_active_double_reduction_p)
1281 (vect_force_simple_reduction, vectorizable_reduction): Update
1282 accordingly.
1283
1284 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1285
1286 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
1287 vec<gimple *> to a vec<stmt_vec_info>.
1288 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
1289 the reduction_phis argument from a vec<gimple *> to a
1290 vec<stmt_vec_info>.
1291 (vectorizable_reduction): Likewise the phis local variable that
1292 is passed to vect_create_epilog_for_reduction. Update for new type
1293 of SLP_TREE_VEC_STMTS.
1294 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
1295 (vectorizable_live_operation): Likewise.
1296 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
1297 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
1298
1299 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1300
1301 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
1302 a gimple stmt to a stmt_vec_info.
1303 (vectorizable_condition, vectorizable_live_operation)
1304 (vectorizable_reduction, vectorizable_induction): Pass back the
1305 vectorized statement as a stmt_vec_info.
1306 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
1307 use of STMT_VINFO_VEC_STMT.
1308 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
1309 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
1310 as stmt_vec_infos rather than gimple stmts.
1311 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
1312 to a stmt_vec_info.
1313 (vectorizable_live_operation): Likewise.
1314 (vectorizable_reduction, vectorizable_induction): Likewise,
1315 updating use of STMT_VINFO_VEC_STMT.
1316 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
1317 of STMT_VINFO_VEC_STMT.
1318 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
1319 (vectorizable_simd_clone_call, vectorizable_conversion)
1320 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1321 (vectorizable_store, vectorizable_load, vectorizable_condition)
1322 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
1323 from a gimple stmt to a stmt_vec_info.
1324 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
1325 pointer to a stmt_vec_info to the vectorizable_* routines.
1326
1327 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1328
1329 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
1330 a gimple stmt to a stmt_vec_info.
1331 (is_pattern_stmt_p): Update accordingly.
1332 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
1333 (vect_record_grouped_load_vectors): Likewise.
1334 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1335 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
1336 (vect_model_reduction_cost): Likewise.
1337 (vect_create_epilog_for_reduction): Likewise.
1338 (vectorizable_reduction, vectorizable_induction): Likewise.
1339 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1340 Return the stmt_vec_info for the pattern statement.
1341 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
1342 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
1343 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1344 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
1345 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1346 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
1347 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
1348 (free_stmt_vec_info, vect_is_simple_use): Likewise.
1349
1350 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1351
1352 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
1353 (vect_finish_stmt_generation): Likewise.
1354 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1355 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
1356 (vect_build_gather_load_calls): Use the return value of the above
1357 functions instead of a separate call to vinfo_for_stmt. Use narrow
1358 scopes for the input gimple stmt and wider scopes for the associated
1359 stmt_vec_info. Use vec_info::lookup_def when setting these
1360 stmt_vec_infos from an SSA_NAME definition.
1361 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1362 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1363 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1364 (vectorizable_store, vectorizable_load, vectorizable_condition)
1365 (vectorizable_comparison): Likewise.
1366 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
1367 (vectorizable_reduction): Likewise.
1368
1369 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1370
1371 * tree-vectorizer.h (vect_is_simple_use): Add an optional
1372 stmt_vec_info * parameter before the optional gimple **.
1373 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1374 (process_use, vect_get_vec_def_for_operand_1): Update callers.
1375 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
1376 * tree-vect-loop.c (vectorizable_reduction): Likewise.
1377 (vectorizable_live_operation): Likewise.
1378 * tree-vect-patterns.c (type_conversion_p): Likewise.
1379 (vect_look_through_possible_promotion): Likewise.
1380 (vect_recog_rotate_pattern): Likewise.
1381 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1382
1383 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1384
1385 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
1386 a typedef to a wrapper class.
1387 (NULL_STMT_VEC_INFO): New macro.
1388 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
1389 (stmt_vec_info::operator*): New function.
1390 (stmt_vec_info::operator gimple *): Likewise.
1391 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
1392 (add_stmt_costs): Likewise.
1393 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
1394 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
1395 (vect_get_known_peeling_cost): Likewise.
1396 (vect_estimate_min_profitable_iters): Likewise.
1397 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1398 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
1399 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1400 (vectorizable_store, free_stmt_vec_infos): Likewise.
1401 (new_stmt_vec_info): Change return type of xcalloc to
1402 _stmt_vec_info *.
1403
1404 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1405
1406 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
1407 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
1408 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
1409 a single_imm_use-based sequence.
1410 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
1411
1412 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1413
1414 * tree-vectorizer.h (vec_info::lookup_def): Declare.
1415 * tree-vectorizer.c (vec_info::lookup_def): New function.
1416 * tree-vect-patterns.c (vect_get_internal_def): Use it.
1417 (vect_widened_op_tree): Likewise.
1418 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1419 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
1420 (vectorizable_reduction): Likewise.
1421 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
1422 of a gimple *.
1423 (vect_is_slp_reduction): Update calls accordingly. Use
1424 vec_info::lookup_def.
1425 (vect_is_simple_reduction): Likewise
1426 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
1427
1428 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1429
1430 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
1431 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
1432 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
1433 of vinfo_for_stmt.
1434 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
1435 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
1436 (vect_update_vf_for_slp, vect_analyze_loop_operations)
1437 (vect_is_slp_reduction, vectorizable_induction)
1438 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
1439 * tree-vect-patterns.c (vect_init_pattern_stmt):
1440 (vect_determine_min_output_precision_1, vect_determine_precisions)
1441 (vect_pattern_recog): Likewise.
1442 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
1443 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
1444 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
1445 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
1446 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
1447 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
1448 info field from a loop to a loop_vec_info.
1449
1450 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1451
1452 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
1453 (vec_info::add_stmt): Declare.
1454 * tree-vectorizer.c (vec_info::add_stmt): New function.
1455 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
1456 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
1457 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
1458 (vectorizable_induction): Likewise.
1459 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
1460 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1461 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
1462 (vectorizable_load): Likewise.
1463 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1464 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
1465 (vect_recog_gather_scatter_pattern): Likewise.
1466 (append_pattern_def_seq): Likewise. Remove a check that is
1467 performed by add_stmt itself.
1468
1469 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1470
1471 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
1472 which make_ssa_name was called with new_stmt before new_stmt
1473 had been created.
1474
1475 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1476
1477 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
1478 split out from...
1479 (vect_is_slp_reduction): ...here...
1480 (vect_is_simple_reduction): ...and here. Remove repetition of tests
1481 that are already known to be false.
1482
1483 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1484
1485 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
1486 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
1487 STMT_VINFO_NUM_SLP_USES when it's true.
1488 (vect_free_slp_instance): Add a final_p parameter and pass it to
1489 vect_free_slp_tree.
1490 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
1491 (vect_analyze_slp_instance): Likewise.
1492 (vect_slp_analyze_operations): Likewise.
1493 (vect_slp_analyze_bb_1): Likewise.
1494 * tree-vectorizer.c (vec_info): Likewise.
1495 * tree-vect-loop.c (vect_transform_loop): Likewise.
1496
1497 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1498
1499 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1500 function is not called for second and subsequent members of
1501 a reduction group.
1502
1503 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
1504
1505 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
1506 cases for nested loops from here to ...
1507 (vect_create_epilog_for_reduction): ...here. Only call
1508 vect_is_simple_use for inner-loop reductions.
1509
1510 2018-07-31 Martin Liska <mliska@suse.cz>
1511
1512 PR gcov-profile/85338
1513 PR gcov-profile/85350
1514 PR gcov-profile/85372
1515 * profile.c (struct location_triplet): New.
1516 (struct location_triplet_hash): Likewise.
1517 (output_location): Do not output a BB that
1518 is already recorded for a line.
1519 (branch_prob): Use streamed_locations.
1520
1521 2018-07-31 Martin Liska <mliska@suse.cz>
1522
1523 PR gcov-profile/85370
1524 * coverage.c (coverage_begin_function): Do not mark target
1525 clones as artificial functions.
1526
1527 2018-07-31 Martin Liska <mliska@suse.cz>
1528
1529 PR gcov-profile/83813
1530 PR gcov-profile/84758
1531 PR gcov-profile/85217
1532 PR gcov-profile/85332
1533 * profile.c (branch_prob): Do not record GOTO expressions
1534 for GIMPLE statements which locations are already streamed.
1535
1536 2018-07-31 Olivier Hainque <hainque@adacore.com>
1537
1538 * gcc.c (handle_spec_function): Accept a soft_matched_part
1539 argument, as do_spec_1. Pass it down to ...
1540 (eval_spec_function): Accept a soft_matched_part argument,
1541 and pass it down to ...
1542 (do_spec_2): Accept a soft_matched_part argument, and pass
1543 it down to do_spec_1.
1544 (do_spec_1): Pass soft_matched_part to handle_spec_function.
1545 (handle_braces): Update call to handle_spec_function.
1546 (driver::set_up_specs): Update calls to do_spec_2.
1547 (compare_debug_dump_opt_spec_function): Likewise.
1548 (compare_debug_self_opt_spec_function): Likewise.
1549
1550 2018-07-31 Olivier Hainque <hainque@adacore.com>
1551
1552 * common.opt (nolibc): New option.
1553 * doc/invoke.texi (Link Options): Document it.
1554 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
1555 * config/alpha/linux.h: Likewise.
1556 * config/arc/elf.h: Likewise.
1557 * config/arm/uclinux-elf.h: Likewise.
1558 * config/arm/unknown-elf.h: Likewise.
1559 * config/avr/avrlibc.h: Likewise.
1560 * config/bfin/bfin.h: Likewise.
1561 * config/bfin/linux.h: Likewise.
1562 * config/bfin/uclinux.h: Likewise.
1563 * config/darwin.h: Likewise.
1564 * config/darwin10.h: Likewise.
1565 * config/darwin12.h: Likewise.
1566 * config/gnu-user.h: Likewise.
1567 * config/lm32/uclinux-elf.h: Likewise.
1568 * config/pa/pa-hpux11.h: Likewise.
1569 * config/pa/pa64-hpux.h: Likewise.
1570 * config/sparc/sparc.h: Likewise.
1571
1572 2018-07-31 Olivier Hainque <hainque@adacore.com>
1573
1574 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
1575 undefined variables.
1576
1577 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1578
1579 PR target/86640
1580 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
1581 instead of GEN_INT.
1582
1583 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1584
1585 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
1586 terminated string literal.
1587
1588 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
1589
1590 PR rtl-optimization/85160
1591 * combine.c (is_just_move): New function.
1592 (try_combine): Allow combining two instructions into two if neither of
1593 the original instructions was a move.
1594
1595 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
1596
1597 PR target/86673
1598 * doc/extend.texi (Global Register Variables): Discourage use of type
1599 qualifiers.
1600 (Local Register Variables): Likewise.
1601
1602 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
1603
1604 PR tree-optimization/86506
1605 * hwint.h (ceil_log2): Resync with hwint.c implementation.
1606
1607 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
1608
1609 PR target/86547
1610 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
1611 hard_regno, make sure no insn between `from` and `to` clobbers it.
1612
1613 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
1614 Tom de Vries <tdevries@suse.de>
1615
1616 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
1617 (PTX_DEFAULT_RUNTIME_DIM): ... this.
1618 (nvptx_goacc_validate_dims): Set default worker and gang dims to
1619 PTX_DEFAULT_RUNTIME_DIM.
1620 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
1621
1622 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
1623
1624 * config/pa/pa.c (pa_output_addr_vec): Align address table.
1625 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
1626 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
1627
1628 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
1629
1630 * config/rs6000/constraints.md (wG constraint): Delete, no longer
1631 used.
1632 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
1633 predicate to reflect toc fusion has been deleted.
1634 (toc_fusion_mem_raw): Delete, no longer used.
1635 (toc_fusion_mem_wrapped): Likewise.
1636 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
1637 fusion mask bit.
1638 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
1639 Delete, no longer used.
1640 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
1641 meant to be used for toc fusion.
1642 (rs6000_debug_print_mode): Delete toc fusion debugging.
1643 (rs6000_debug_reg_global): Likewise.
1644 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1645 fusion and secondary reload support that were never used.
1646 (rs6000_option_override_internal): Delete TOC fusion, that was only
1647 partially defined, and it did not work unless you also used the
1648 -mcmodel= switch.
1649 (rs6000_legitimate_address_p): Delete TOC fusion support.
1650 (rs6000_opt_masks): Likewise.
1651 (fusion_wrap_memory_address): Delete function, no longer used.
1652 (fusion_split_address); Delete TOC fusion support.
1653 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1654 longer used with toc fusion being deleted.
1655 (TARGET_TOC_FUSION_FP): Likewise.
1656 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1657 UNSPEC.
1658 (toc fusion spliter): Delete TOC fusion support.
1659 (toc_fusionload_<mode>): Likewise.
1660 (toc_fusionload_di): Likewise.
1661 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1662 longer needs to be named. Rename predicate to delete TOC fusion.
1663 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1664 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1665 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1666 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1667 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1668
1669 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1670
1671 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1672 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1673 __int128 in built-in function prototypes.
1674 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1675 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1676
1677 2018-07-27 Martin Sebor <msebor@redhat.com>
1678
1679 PR tree-optimization/86696
1680 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1681 types, including enums.
1682 (handle_char_store): Be prepared for the above function to fail.
1683
1684 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1685
1686 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1687 when optimization level is lower than 2 or optimize for size.
1688
1689 2018-07-26 Martin Sebor <msebor@redhat.com>
1690
1691 PR tree-optimization/86043
1692 PR tree-optimization/86042
1693 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1694 (get_string_cst_length): Rename...
1695 (get_min_string_length): ...to this. Add argument.
1696 (handle_char_store): Extend to handle multi-character stores by
1697 MEM_REF.
1698 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1699 * tree.h (initializer_zerop): Add argument.
1700
1701 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1702
1703 PR middle-end/86660
1704 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1705 declare target to variables if they have always,{to,from,tofrom} map
1706 kinds.
1707
1708 2018-07-26 Martin Liska <mliska@suse.cz>
1709
1710 PR lto/86548
1711 * lto-wrapper.c: Add linker_output as prefix
1712 for ltrans_output_file.
1713
1714 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1715
1716 PR rtl-optimization/85805
1717 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1718 value for hard registers if that was written in the same mode.
1719
1720 2018-07-26 Martin Liska <mliska@suse.cz>
1721
1722 PR gcov-profile/86536
1723 * gcov.c (format_gcov): Use printf format %.*f directly
1724 and do not handle special values.
1725
1726 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1727
1728 * common/config/arc/arc-common.c (arc_option_optimization_table):
1729 Update default optimizations for size.
1730
1731 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1732
1733 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1734 * config/arc/constraints.md (CfZ): New constraint.
1735 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1736 (subsf3_fpu): Likewise.
1737 (cmpsf_fpu): Likewise.
1738 (cmpsf_fpu_uneq): Likewise.
1739
1740 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1741
1742 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1743 accesses as well.
1744 (arc_is_uncached_mem_p): uncached applies to both the variable and
1745 the pointer.
1746
1747 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1748
1749 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1750 register names.
1751
1752 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1753
1754 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1755 field "m_scopes" from vec to auto_vec.
1756
1757 2018-07-25 Martin Liska <mliska@suse.cz>
1758
1759 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1760 return type.
1761
1762 2018-07-25 Richard Biener <rguenther@suse.de>
1763
1764 PR debug/86654
1765 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1766 special wrt context_die late.
1767 (gen_subprogram_die): Re-use DIEs in local scope.
1768
1769 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1770
1771 PR tree-optimization/86644
1772 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1773
1774 2018-07-25 Martin Liska <mliska@suse.cz>
1775
1776 PR middle-end/86645
1777 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1778 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1779
1780 2018-07-25 Martin Liska <mliska@suse.cz>
1781
1782 PR sanitizer/79635
1783 * params.def: Explain ASan abbreviation and provide
1784 a documentation link.
1785
1786 2018-07-24 Martin Sebor <msebor@redhat.com>
1787
1788 PR tree-optimization/86622
1789 PR tree-optimization/86532
1790 * builtins.h (string_length): Declare.
1791 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1792 (check_access): Be prepared for non-constant length ranges.
1793 (string_length): Make extern.
1794 * expr.c (string_constant): Only handle the minor non-constant
1795 array index. Use string_constant to compute the length of
1796 a generic string constant.
1797
1798 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1799
1800 PR tree-optimization/86618
1801 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1802 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1803
1804 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1805
1806 PR tree-optimization/86636
1807 * json.cc (json::object::set): Fix comment. Add assertions.
1808 (json::array::append): Move here from json.h. Add comment and an
1809 assertion.
1810 (json::string::string): Likewise.
1811 * json.h (json::array::append): Move to json.cc.
1812 (json::string::string): Likewise.
1813 * optinfo-emit-json.cc
1814 (optrecord_json_writer::impl_location_to_json): Assert that we
1815 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1816 wrapper around it. Expand the location once, rather than three
1817 times.
1818 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1819 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1820 wrappers.
1821 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1822 places. Fix some overlong lines.
1823
1824 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1825
1826 * config/aarch64/aarch64-simd.md
1827 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1828 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1829 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1830 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1831 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1832 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1833 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1834 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1835 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1836
1837 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1838
1839 PR middle-end/86627
1840 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1841 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1842 and abs_d == d, do the power of two handling if profitable.
1843
1844 2018-07-24 Richard Biener <rguenther@suse.de>
1845
1846 * match.pd: Add BIT_FIELD_REF canonicalizations.
1847
1848 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1849
1850 PR c/86617
1851 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1852
1853 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1854
1855 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1856 terminated STRING_CST object.
1857
1858 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1859
1860 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1861
1862 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1863
1864 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1865 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1866 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1867 the elements into a register.
1868 (rs6000_split_v4si_init_di_reg): Delete.
1869 (rs6000_split_v4si_init): Delete.
1870 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1871 (vsx_init_v4si): Rewrite as a define_expand.
1872
1873 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1874
1875 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1876 zero_extend argument from memory): New.
1877
1878 2018-07-22 Martin Sebor <msebor@redhat.com>
1879
1880 PR bootstrap/86621
1881 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1882 diagnosing calls with unknown arguments unless -Walloca-larger-than
1883 is restricted to less than PTRDIFF_MAX bytes.
1884
1885 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1886
1887 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1888
1889 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1890
1891 * pretty-print.c (text_info::set_location): Remove redundant
1892 "line_table" parameter from call to rich_location::set_range.
1893
1894 2018-07-20 Martin Sebor <msebor@redhat.com>
1895
1896 PR middle-end/82063
1897 * builtins.c (expand_builtin_alloca): Adjust.
1898 * calls.c (alloc_max_size): Simplify.
1899 * cgraphunit.c (cgraph_node::expand): Adjust.
1900 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1901 variables.
1902 (frame_larger_than_size): Same.
1903 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1904 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1905 Initialize.
1906 * doc/invoke.texi (GCC Command Options): Document option arguments.
1907 Explain byte-size arguments and suffixes.
1908 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1909 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1910 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1911 * doc/options.texi (UInteger): Expand.
1912 (Host_Wide_Int, ByteSize): Document new properties.
1913 * final.c (final_start_function_1): Include sizes in an error message.
1914 * function.c (frame_offset_overflow): Same.
1915 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1916 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1917 Diagnose unbounded alloca calls only for limits of less than
1918 PTRDIFF_MAX.
1919 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1920 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1921 for alloca(0).
1922 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1923 only for limits of less than PTRDIFF_MAX.
1924 * langhooks-def.h (lhd_handle_option): Change function argument
1925 to HOST_WIDE_INT.
1926 * langhooks.c (lhd_handle_option): Same.
1927 * langhooks.h (handle_option): Same.
1928 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1929 ByteSize flags.
1930 (var_type, var_type_struct): Same.
1931 (var_set): Handle ByteSize flag.
1932 * optc-gen.awk: Add comments to output to ease debugging. Make
1933 use of HOST_WIDE_INT where appropriate.
1934 * opts-gen-save.awk: Use %lx to format unsigned long.
1935 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1936 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1937 arguments. Parse bytes-size suffixes.
1938 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1939 (enum_value_to_arg): Same.
1940 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1941 (handle_option): Adjust.
1942 (generate_option): Change function argument to HOST_WIDE_INT.
1943 (cmdline_handle_error): Adjust.
1944 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1945 (set_option): Change function argument to HOST_WIDE_INT.
1946 (option_enabled): Handle cl_host_wide_int.
1947 (get_option_state): Handle CLVC_SIZE.
1948 (control_warning_option): Same.
1949 * opts.c (common_handle_option): Change function argument to
1950 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1951 OPT_Wvla_larger_than_.
1952 * opts.h (enum cl_var_type): Add an enumerator.
1953 * stor-layout.c (layout_decl): Print a more meaningful warning.
1954 * toplev.c (output_stack_usage): Adjust.
1955
1956 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1957
1958 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1959 call to inline_expand_builtin_string_cmp.
1960 (expand_builtin_strcmp): Likewise.
1961 (expand_builtin_strncmp): Likewise.
1962 (inline_string_cmp): Delete the last parameter, change char_type_node
1963 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1964 two operands.
1965 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1966 the inlining expansion on target where the type of the call has same or
1967 narrower precision than unsigned char.
1968
1969 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1970
1971 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1972 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1973 * common.opt (fsave-optimization-record): New option.
1974 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1975 * doc/invoke.texi (-fsave-optimization-record): New option.
1976 * dumpfile.c: Include "optinfo-emit-json.h".
1977 (struct kv_pair): Move to coretypes.h.
1978 (optgroup_options): Make non-static.
1979 (dump_context::end_scope): Call
1980 optimization_records_maybe_pop_dump_scope.
1981 * dumpfile.h (optgroup_options): New decl.
1982 * json.cc: New file.
1983 * json.h: New file.
1984 * optinfo-emit-json.cc: New file.
1985 * optinfo-emit-json.h: New file.
1986 * optinfo.cc: Include "optinfo-emit-json.h".
1987 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1988 (optinfo_enabled_p): Check optimization_records_enabled_p.
1989 (optinfo_wants_inlining_info_p): Likewise.
1990 * optinfo.h: Update comment.
1991 * profile-count.c (profile_quality_as_string): New function.
1992 * profile-count.h (profile_quality_as_string): New decl.
1993 (profile_count::quality): New accessor.
1994 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1995 and optinfo_emit_json_cc_tests.
1996 * selftest.h (selftest::json_cc_tests): New decl.
1997 (selftest::optinfo_emit_json_cc_tests): New decl.
1998 * toplev.c: Include "optinfo-emit-json.h".
1999 (compile_file): Call optimization_records_finish.
2000 (do_compile): Call optimization_records_start.
2001 * tree-ssa-live.c: Include optinfo.h.
2002 (remove_unused_scope_block_p): Retain inlining information if
2003 optinfo_wants_inlining_info_p returns true.
2004
2005 2018-07-20 Richard Biener <rguenther@suse.de>
2006
2007 PR debug/86585
2008 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2009 to cover -flto-partition=none.
2010
2011 2018-07-20 Martin Liska <mliska@suse.cz>
2012
2013 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2014 (get_decl_source_range): Remove unused function.
2015
2016 2018-07-20 Richard Biener <rguenther@suse.de>
2017
2018 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2019 (struct vn_phi_s): Likewise.
2020 (struct vn_reference_s): Likewise.
2021 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2022 for searching the slot of an entry known to be in the hash itself.
2023 (vn_phi_hasher::equal): Likewise.
2024 (vn_reference_hasher::equal): Likewise.
2025 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2026 globals.
2027 (optimistic_info, current_info): Remove, keeping only valid_info.
2028 (vn_reference_lookup_1): Remove fallback lookup.
2029 (vn_reference_lookup_2): Likewise.
2030 (vn_nary_op_lookup_1): Likewise.
2031 (vn_phi_lookup): Likewise.
2032 (vn_nary_build_or_lookup_1): Make sure to not chain the built
2033 hash element.
2034 (vn_reference_insert): Adjust, chain the inserted hash element
2035 at last_inserted_ref.
2036 (vn_reference_insert_pieces): Likewise.
2037 (visit_reference_op_call): Likewise.
2038 (vn_nary_op_insert_into): Chain the inserted hash element at
2039 last_inserted_nary.
2040 (vn_nary_op_insert_pieces): Adjust.
2041 (vn_nary_op_insert): Likewise.
2042 (vn_nary_op_insert_stmt): Likewise.
2043 (vn_phi_insert): Adjust, chain the inserted hash element at
2044 last_inserted_phi.
2045 (process_scc): Remove clearing and copying the optimistic
2046 table. Instead remove elements inserted during an optimistic
2047 iteration from the single table we maintain.
2048 (init_scc_vn): Adjust.
2049 (free_scc_vn): Likewise.
2050 (sccvn_dom_walker::record_cond): Likewise.
2051 (sccvn_dom_walker::after_dom_children): Likewise.
2052
2053 2018-07-19 Martin Sebor <msebor@redhat.com>
2054
2055 PR tree-optimization/84047
2056 PR tree-optimization/83776
2057 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2058 (check_array_bounds): Call it.
2059
2060 2018-07-19 Martin Sebor <msebor@redhat.com>
2061
2062 * align.h (align_flags): Use member initialization.
2063
2064 2018-07-19 David Malcolm <dmalcolm@redhat.com>
2065
2066 * Makefile.in (OBJS): Add optinfo.o.
2067 * coretypes.h (class symtab_node): New forward decl.
2068 (struct cgraph_node): New forward decl.
2069 (class varpool_node): New forward decl.
2070 * dump-context.h: New file.
2071 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
2072 "tree-pass.h".
2073 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
2074 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
2075 (set_alt_dump_file): Likewise.
2076 (dump_context::~dump_context): New dtor.
2077 (dump_gimple_stmt): Move implementation to...
2078 (dump_context::dump_gimple_stmt): ...this new member function.
2079 Add the stmt to any pending optinfo, creating one if need be.
2080 (dump_gimple_stmt_loc): Move implementation to...
2081 (dump_context::dump_gimple_stmt_loc): ...this new member function.
2082 Start a new optinfo and add the stmt to it.
2083 (dump_gimple_expr): Move implementation to...
2084 (dump_context::dump_gimple_expr): ...this new member function.
2085 Add the stmt to any pending optinfo, creating one if need be.
2086 (dump_gimple_expr_loc): Move implementation to...
2087 (dump_context::dump_gimple_expr_loc): ...this new member function.
2088 Start a new optinfo and add the stmt to it.
2089 (dump_generic_expr): Move implementation to...
2090 (dump_context::dump_generic_expr): ...this new member function.
2091 Add the tree to any pending optinfo, creating one if need be.
2092 (dump_generic_expr_loc): Move implementation to...
2093 (dump_context::dump_generic_expr_loc): ...this new member
2094 function. Add the tree to any pending optinfo, creating one if
2095 need be.
2096 (dump_printf): Move implementation to...
2097 (dump_context::dump_printf_va): ...this new member function. Add
2098 the text to any pending optinfo, creating one if need be.
2099 (dump_printf_loc): Move implementation to...
2100 (dump_context::dump_printf_loc_va): ...this new member function.
2101 Start a new optinfo and add the stmt to it.
2102 (dump_dec): Move implementation to...
2103 (dump_context::dump_dec): ...this new member function. Add the
2104 value to any pending optinfo, creating one if need be.
2105 (dump_context::dump_symtab_node): New member function.
2106 (dump_context::get_scope_depth): New member function.
2107 (dump_context::begin_scope): New member function.
2108 (dump_context::end_scope): New member function.
2109 (dump_context::ensure_pending_optinfo): New member function.
2110 (dump_context::begin_next_optinfo): New member function.
2111 (dump_context::end_any_optinfo): New member function.
2112 (dump_context::s_current): New global.
2113 (dump_context::s_default): New global.
2114 (dump_scope_depth): Delete global.
2115 (dumpfile_ensure_any_optinfo_are_flushed): New function.
2116 (dump_symtab_node): New function.
2117 (get_dump_scope_depth): Reimplement in terms of dump_context.
2118 (dump_begin_scope): Likewise.
2119 (dump_end_scope): Likewise.
2120 (selftest::temp_dump_context::temp_dump_context): New ctor.
2121 (selftest::temp_dump_context::~temp_dump_context): New dtor.
2122 (selftest::verify_item): New function.
2123 (ASSERT_IS_TEXT): New macro.
2124 (ASSERT_IS_TREE): New macro.
2125 (ASSERT_IS_GIMPLE): New macro.
2126 (selftest::test_capture_of_dump_calls): New test.
2127 (selftest::dumpfile_c_tests): Call it.
2128 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
2129 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
2130 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
2131 descriptive comment.
2132 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
2133 (dump_node, dump_bb): Move these unrelated decls.
2134 (class dump_manager): Add leading comment.
2135 * optinfo.cc: New file.
2136 * optinfo.h: New file.
2137
2138 2018-07-19 Michael Collison <michael.collison@arm.com>
2139 Richard Henderson <rth@redhat.com>
2140
2141 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
2142 (subti): Handle op1 zero.
2143 (subvti4, usub4ti4): New.
2144 (*sub<GPI>3_compare1_imm): New.
2145 (sub<GPI>3_carryinCV): New.
2146 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
2147 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2148
2149 2018-07-19 Michael Collison <michael.collison@arm.com>
2150 Richard Henderson <rth@redhat.com>
2151
2152 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
2153 (addti3): Create simpler code if low part is already known to be 0.
2154 (addvti4, uaddvti4): New.
2155 (*add<GPI>3_compareC_cconly_imm): New.
2156 (*add<GPI>3_compareC_cconly): New.
2157 (*add<GPI>3_compareC_imm): New.
2158 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
2159 handle constants within this pattern..
2160 (*add<GPI>3_compareV_cconly_imm): New.
2161 (*add<GPI>3_compareV_cconly): New.
2162 (*add<GPI>3_compareV_imm): New.
2163 (add<GPI>3_compareV): New.
2164 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
2165 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
2166 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
2167 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
2168 with 'comparison' operator.
2169 (*add<GPI>3_compareV_cconly_imm): Ditto.
2170 (*add<GPI>3_compareV_cconly): Ditto.
2171 (*add<GPI>3_compareV_imm): Ditto.
2172 (add<GPI>3_compareV): Ditto.
2173 (add<mode>3_carryinC): Ditto.
2174 (*add<mode>3_carryinC_zero): Ditto.
2175 (*add<mode>3_carryinC): Ditto.
2176 (add<mode>3_carryinV): Ditto.
2177 (*add<mode>3_carryinV_zero): Ditto.
2178 (*add<mode>3_carryinV): Ditto.
2179
2180 2018-07-19 Michael Collison <michael.collison@arm.com>
2181 Richard Henderson <rth@redhat.com>
2182
2183 * config/aarch64/aarch64-modes.def (CC_V): New.
2184 * config/aarch64/aarch64-protos.h
2185 (aarch64_addti_scratch_regs): Declare
2186 (aarch64_subvti_scratch_regs): Declare.
2187 (aarch64_expand_subvti): Declare.
2188 (aarch64_gen_unlikely_cbranch): Declare
2189 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
2190 for signed overflow using CC_Vmode.
2191 (aarch64_get_condition_code_1): Handle CC_Vmode.
2192 (aarch64_gen_unlikely_cbranch): New function.
2193 (aarch64_addti_scratch_regs): New function.
2194 (aarch64_subvti_scratch_regs): New function.
2195 (aarch64_expand_subvti): New function.
2196
2197 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2198
2199 * config/aarch64/aarch64-option-extensions.def: New entry for profile
2200 extension.
2201 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
2202 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
2203 extension.
2204
2205 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2206
2207 PR target/83009
2208 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
2209 address check not strict.
2210
2211 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
2212
2213 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
2214 Umq with Umn.
2215 (store_pair_lanes<mode>): Likewise.
2216 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
2217 enum value 'ADDR_QUERY_LDP_STP_N'.
2218 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
2219 (aarch64_print_address_internal): Add declaration.
2220 (aarch64_print_ldpstp_address): Remove.
2221 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
2222 (aarch64_print_operand): Change printing of 'y'.
2223 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
2224 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
2225 'true' rather than '1'.
2226 * config/aarch64/constraints.md (Uml): Likewise.
2227 (Uml): Rename to Umn.
2228 (Umq): Remove.
2229
2230 2018-07-19 Richard Biener <rguenther@suse.de>
2231
2232 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
2233 a trailing array.
2234 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
2235 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
2236 (vn_reference_hasher): Likewise.
2237 (struct vn_tables_s): Remove obstack and alloc-pool members.
2238 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
2239 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
2240 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
2241 (vn_reference_insert_pieces): Likewise.
2242 (alloc_vn_nary_op_noinit): Adjust.
2243 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
2244 (vn_phi_eq): Adjust.
2245 (shared_lookup_phiargs): Remove.
2246 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
2247 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
2248 (visit_reference_op_call): Likewise.
2249 (copy_nary, copy_phi, copy_reference): Remove.
2250 (process_scc): Rewind the obstack when iterating. Do not
2251 copy the elements to valid_info but just move them from one
2252 hashtable to the other.
2253 (allocate_vn_table): Adjust.
2254 (free_vn_table): Likewise.
2255 (init_scc_vn): Likewise.
2256 (free_scc_vn): Likewise.
2257
2258 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
2259
2260 PR target/86560
2261 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
2262 indirect_return as function type attribute.
2263 (ix86_attribute_table): Change indirect_return to function
2264 type attribute.
2265 * doc/extend.texi: Update indirect_return attribute.
2266
2267 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
2268
2269 * wide-int.h (widest2_int): New.
2270 * gimple-fold.c (arith_overflowed_p): Use it.
2271 * tree.h (widest2_int_cst): New.
2272 * tree-vrp.c (wide_int_binop_overflow): Rename from
2273 vrp_int_const_binop.
2274 Rewrite to work on trees.
2275 (extract_range_from_multiplicative_op_1): Abstract code to...
2276 (wide_int_range_min_max): ...here.
2277 (wide_int_range_cross_product): ...and here.
2278 (extract_range_from_binary_expr_1): Abstract overflow code to...
2279 (wide_int_range_mult_wrapping): ...here.
2280 * tree-vrp.h (wide_int_range_cross_product): New.
2281 (wide_int_range_mult_wrapping): New.
2282
2283 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
2284 Julia Koval <julia.koval@intel.com>
2285
2286 * config/i386/x86-tune-costs.h (skylake_memcpy,
2287 skylake_memset): Replace rep_prefix with unrolling for size 512.
2288
2289 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
2290
2291 PR middle-end/86544
2292 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
2293 in last stmt.
2294
2295 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
2296
2297 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
2298 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
2299 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
2300 previously known as "PowerPC AltiVec Built-in Functions". Move
2301 some material to new subsubsections "PowerPC AltiVec Built-in
2302 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
2303 ISA 2.07".
2304 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
2305 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
2306 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
2307 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2308
2309 2018-07-18 Richard Biener <rguenther@suse.de>
2310
2311 PR tree-optimization/86557
2312 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
2313 EXACT_DIV_EXPR.
2314
2315 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
2316
2317 * config/s390/s390.c (s390_function_profiler): Generate CFI.
2318
2319 2018-07-17 Jeff Law <law@redhat.com>
2320
2321 * config/arm/arm.c (get_label_padding): Update for recent
2322 changes to label_to_alignment.
2323
2324 PR tree-optimization/86010
2325 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
2326
2327 * config/mips/mips.c (vr4130_align_insns): Update for recent
2328 changes to label_to_alignment.
2329
2330 * config/frv/frv.c (frv_label_align): Update for recent changes
2331 to label_to_alignment.
2332
2333 * config/nios2/nios2.c (nios2_label_align): Update for recent
2334 changes which dropped ALIGN_LABELS_LOG.
2335
2336 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
2337
2338 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
2339 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2340
2341 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
2342
2343 * config/arc/arc.c (arc_label_align): Use align_labels instead of
2344 deprecated align_labels_log.
2345
2346 2018-07-17 Richard Biener <rguenther@suse.de>
2347
2348 PR lto/86456
2349 * dwarf2out.c (init_sections_and_labels): Always generate
2350 a debug_line_str_section for early LTO debug.
2351 (dwarf2out_finish): Reset debug_line_str_hash output early.
2352 Bump counter for extra dwarf5 .debug_loc labels to not conflict
2353 with fat LTO part.
2354 (dwarf2out_early_finish): Output debug_line_str.
2355
2356 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2357
2358 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
2359 index register on z196 or later.
2360
2361 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
2362
2363 * config/s390/s390.c (s390_default_align): Set default function
2364 alignment to 16.
2365 (s390_override_options_after_change): Call s390_default align.
2366 (s390_option_override_internal): Call s390_default_align.
2367 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2368
2369 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2370
2371 PR middle-end/86542
2372 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
2373 to _looptemp_ clauses, other than the first two.
2374
2375 2018-07-17 Martin Liska <mliska@suse.cz>
2376
2377 * opts.c: Do not enable OPT_falign_* for -Os.
2378
2379 2018-07-17 Martin Liska <mliska@suse.cz>
2380
2381 * align.h (MAX_CODE_ALIGN): New.
2382 (MAX_CODE_ALIGN_VALUE): New.
2383 * common/config/i386/i386-common.c (ix86_handle_option):
2384 (MAX_CODE_ALIGN): Moved to align.h.
2385 * final.c (MAX_CODE_ALIGN): Likewise.
2386 * opts.c (parse_and_check_align_values):
2387 (MAX_CODE_ALIGN): Likewise.
2388 (MAX_CODE_ALIGN_VALUE): Likewise.
2389
2390 2018-07-17 Martin Liska <mliska@suse.cz>
2391
2392 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
2393 in order to fulfil coding style.
2394 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
2395 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2396 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2397 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
2398 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
2399 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
2400 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
2401 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
2402 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2403
2404 2018-07-17 Martin Liska <mliska@suse.cz>
2405
2406 * align.h: New file.
2407 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
2408 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
2409 align_flags of label_to_alignment.
2410 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
2411 class.
2412 * config/m68k/m68k.c: Do not use removed align_labels_value and
2413 align_loops_value.
2414 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
2415 (LOOP_ALIGN): Likewise.
2416 (LABEL_ALIGN): Likewise.
2417 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2418 Remove not used macro.
2419 (rs6000_loop_align): Change return type to align_flags.
2420 (rs6000_loop_align_max_skip): Remove.
2421 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
2422 Change return type to align_flags.
2423 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
2424 Remove not used macro.
2425 (rs6000_loop_align): Change return type to align_flags.
2426 (rs6000_loop_align_max_skip): Remove.
2427 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
2428 * config/rx/rx-protos.h (rx_align_for_label): Make it
2429 static function.
2430 * config/rx/rx.c (rx_align_for_label): Change return type
2431 to align_flags.
2432 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
2433 macro definitions.
2434 into align_flags class.
2435 (LABEL_ALIGN): Likewise.
2436 (LOOP_ALIGN): Likewise.
2437 * config/s390/s390.c (s390_label_align): Use align_flags
2438 class member.
2439 (s390_asm_output_function_label): Likewise.
2440 * config/sh/sh.c (sh_override_options_after_change):
2441 Use align_flags class directly without macros.
2442 (find_barrier): Likewise.
2443 (barrier_align): Likewise.
2444 (sh_loop_align): Likewise.
2445 * config/spu/spu.c (spu_option_override):
2446 Use align_flags_tuple::get_value instead of removed macros.
2447 (spu_sched_init): Likewise.
2448 * config/spu/spu.h (GTY): Likewise.
2449 * config/visium/visium.c (visium_option_override):
2450 Set "8" as default secondary alignment.
2451 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
2452 in order to guarantee secondary alignment of 8.
2453 * coretypes.h: Include align.h header file.
2454 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
2455 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
2456 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
2457 * doc/tm.texi.in: Likewise.
2458 * final.c (struct label_alignment): Remove not used structure.
2459 (LABEL_ALIGN): Change type to align_flags.
2460 (LOOP_ALIGN): Likewise.
2461 (JUMP_ALIGN): Likewise.
2462 (default_loop_align_max_skip): Remove.
2463 (default_label_align_max_skip): Likewise.
2464 (default_jump_align_max_skip): Likewise.
2465 (default_label_align_after_barrier_max_skip):
2466 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
2467 (LABEL_TO_MAX_SKIP): Remove.
2468 (label_to_alignment): Return align_flags type instead of integer.
2469 (label_to_max_skip): Remove.
2470 (align_fuzz): Use align_flags type.
2471 (compute_alignments): Use align_flags type and use align_flags::max
2472 to combine multiple alignments.
2473 (grow_label_align): Grow vec instead of C array.
2474 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
2475 (shorten_branches): Use align_flags type and use align_flags::max
2476 to combine multiple alignments.
2477 (final_scan_insn_1): Remove usage of secondary alignment that comes
2478 from label alignment, but instead use proper secondary alignment
2479 which is computed in grow_label_align.
2480 * flags.h (struct align_flags_tuple): Move to align.h.
2481 (struct align_flags): Likewise.
2482 (state_align_loops): Rename to align_loops.
2483 (state_align_jumps): Rename to align_jumps.
2484 (state_align_labels): Rename to align_labels.
2485 (state_align_functions): Rename to align_functions.
2486 (align_loops_log): Remove.
2487 (align_jumps_log): Remove.
2488 (align_labels_log): Remove.
2489 (align_functions_log): Remove.
2490 (align_loops_max_skip): Remove.
2491 (align_jumps_max_skip): Remove.
2492 (align_labels_max_skip): Remove.
2493 (align_functions_max_skip): Remove.
2494 (align_loops_value): Remove.
2495 (align_jumps_value): Remove.
2496 (align_labels_value): Remove.
2497 (align_functions_value): Remove.
2498 * output.h (label_to_alignment): Change return type to align_flags.
2499 (label_to_max_skip): Remove.
2500 * target.def: Remove loop_align_max_skip, label_align_max_skip,
2501 jump_align_max_skip macros.
2502 * targhooks.h (default_loop_align_max_skip): Remove.
2503 (default_label_align_max_skip): Likewise.
2504 (default_jump_align_max_skip): Likewise.
2505 (default_label_align_after_barrier_max_skip): Remove.
2506 * toplev.c (read_log_maxskip): Use ::normalize function.
2507 (parse_N_M): Remove not used argument and also call ::normalize.
2508 (parse_alignment_opts): Do not pass unused arguments.
2509 * varasm.c (assemble_start_function): Use directly align_functions
2510 instead of removed macros.
2511 * system.h: Do not poison removed macros.
2512
2513 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2514
2515 PR middle-end/86539
2516 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
2517 and cond temporaries don't have reference type if iterator has
2518 pointer type. For init use &for_pre_body instead of pre_p if
2519 for_pre_body is non-empty.
2520
2521 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2522
2523 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
2524 double-double modes to SFmode directly directly.
2525 (trunc<mode>sf2_fprs): Delete.
2526
2527 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2528
2529 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
2530 for conversions between IFmode and the decimal floating point modes.
2531 (init_float128_ieee): Use the correct names for conversions between
2532 KFmode and the decimal floating point modes.
2533
2534 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
2535
2536 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
2537 for the conversions between TDmode and IFmode.
2538 (init_float128_ieee): Use more correct names for the conversions
2539 between TDmode and KFmode.
2540
2541 2018-07-16 Jakub Jelinek <jakub@redhat.com>
2542
2543 PR tree-optimization/86526
2544 * builtins.c (expand_builtin_memcmp): Formatting fixes.
2545 (inline_expand_builtin_string_cmp): Likewise.
2546 (inline_string_cmp): Likewise. Use c_readstr instead of
2547 builtin_memcpy_read_str. Add unit_mode temporary.
2548
2549 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2550
2551 PR middle-end/86528
2552 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
2553 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2554
2555 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
2556
2557 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
2558 Alphabetize prototypes of built-in functions, separating out
2559 built-in functions that are listed in this section but should be
2560 described elsewhere.
2561
2562 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
2563
2564 PR target/86511
2565 * expmed.c (emit_store_flag): Do not emit setcc followed by a
2566 conditional move when trapping comparison was split to a
2567 non-trapping one (and vice versa).
2568
2569 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2570
2571 * config/s390/s390.c (s390_function_profiler): Generate nops
2572 instead of profiler call sequences.
2573 * config/s390/s390.opt: Add the new option.
2574
2575 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2576
2577 * config/s390/s390.c (s390_function_profiler): Generate
2578 __mcount_loc section.
2579 * config/s390/s390.opt: Add the new option.
2580
2581 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
2582
2583 * common.opt: Add the new warning.
2584 * config/s390/s390.c (s390_function_profiler): Emit "brasl
2585 %r0,__fentry__" when -mfentry is specified.
2586 (s390_option_override_internal): Disallow -mfentry for 31-bit
2587 CPUs.
2588 * config/s390/s390.opt: Add the new option.
2589
2590 2018-07-16 Richard Biener <rguenther@suse.de>
2591
2592 PR lto/86523
2593 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
2594 for function-local FUNCTION_DECL and RESULT_DECL immediately.
2595
2596 2018-07-16 Martin Liska <mliska@suse.cz>
2597
2598 PR ipa/86529
2599 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
2600 to ::get_create.
2601
2602 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2603
2604 * config/arc/arcHS.md: Update ARCHS scheduling rules.
2605
2606 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
2607
2608 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
2609 for ARCHS4x.
2610 * config/arc/arc-cpus.def (hs4x): New cpu.
2611 (hs4xd): Likewise.
2612 * config/arc/arc-tables.opt: Regenerate.
2613 * config/arc/arc.c (arc_sched_issue_rate): New function.
2614 (TARGET_SCHED_ISSUE_RATE): Define.
2615 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
2616 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
2617 fpu_cvt.
2618 (attr tune): Add ARCHS4x tune values.
2619 (attr tune_dspmpy): Define.
2620 (*tst): Correct instruction type.
2621 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
2622 * config/arc/arcHS4x.md: New file.
2623 * config/arc/fpu.md: Update instruction type attributes.
2624 * config/arc/t-multilib: Regenerate.
2625
2626 2018-07-16 Tom de Vries <tdevries@suse.de>
2627
2628 PR debug/86455
2629 * var-tracking.c (vt_initialize): Fix pre_dec handling.
2630
2631 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2632
2633 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
2634 early clobber.
2635
2636 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
2637
2638 PR tree-optimization/86514
2639 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
2640 conversion to a boolean type from a type with greater precision.
2641
2642 2018-07-16 Tom de Vries <tdevries@suse.de>
2643
2644 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2645 dump_flags request TDF_SLIM.
2646
2647 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2648
2649 * fold-const.c (int_const_binop_1): Abstract...
2650 (wide_int_binop): ...wide int code here.
2651 (poly_int_binop): ...poly int code here.
2652 Abstract the rest of int_const_binop_1 into int_const_binop.
2653 * fold-const.h (wide_int_binop): New.
2654 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2655 Remove useless PLUS/MINUS_EXPR case.
2656 (zero_nonzero_bits_from_vr): Move wide int code...
2657 (zero_nonzero_bits_from_bounds): ...here.
2658 (extract_range_from_binary_expr_1): Move mask optimization code...
2659 (range_easy_mask_min_max): ...here.
2660 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2661 (range_easy_mask_min_max): New.
2662
2663 2018-07-15 Jeff Law <law@redhat.com>
2664
2665 PR target/85993
2666 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2667 block.
2668
2669 2018-07-14 Jim Wilson <jimw@sifive.com>
2670
2671 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2672
2673 2018-07-14 Paul Koning <ni1d@arrl.net>
2674
2675 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2676
2677 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2678
2679 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2680 copying section.
2681
2682 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2683 Steve Munroe <munroesj52@gmail.com>
2684
2685 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2686 (_mm_andnot_si128): Likewise.
2687 (_mm_or_si128): Likewise.
2688 (_mm_xor_si128): Likewise.
2689
2690 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2691
2692 PR middle-end/78809
2693 * builtins.c (expand_builtin_memcmp): Inline the calls first
2694 when result_eq is false.
2695 (expand_builtin_strcmp): Inline the calls first.
2696 (expand_builtin_strncmp): Likewise.
2697 (inline_string_cmp): New routine. Expand a string compare
2698 call by using a sequence of char comparison.
2699 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2700 a call to str(n)cmp/memcmp.
2701 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2702 New option.
2703 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2704
2705 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2706
2707 * config/arm/driver-arm.c: Include arm-native.h.
2708 (host_detect_local_cpu): Use auto-generated data tables.
2709 (vendors, arm_cpu_table): Delete. Move part information to ...
2710 * config/arm/arm-cpus.in: ... here.
2711 * config/arm/parsecpu.awk (gen_native): New function.
2712 (vendor, part): New CPU fields.
2713 (END): Add support for building the native CPU detection tables.
2714 * config/arm/t-arm (arm-native.h): Add build rule.
2715 (driver-arm.o): Add dependency on arm-native.h.
2716
2717 2018-07-13 Richard Biener <rguenther@suse.de>
2718
2719 PR middle-end/85974
2720 * match.pd (addr1 - addr2): Allow either of the operand to
2721 have a conversion.
2722
2723 2018-07-13 Tom de Vries <tdevries@suse.de>
2724
2725 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2726 in remap_ssa_name.
2727
2728 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2729
2730 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2731 arrays instead of numbered variables.
2732
2733 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2734
2735 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2736 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2737
2738 2018-07-13 Richard Biener <rguenther@suse.de>
2739
2740 PR debug/86452
2741 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2742 instead of get_context_die.
2743
2744 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2745 Richard Biener <rguenther@suse.de>
2746
2747 PR middle-end/86489
2748 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2749 that the loop latch destination where phi is defined.
2750
2751 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2752
2753 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2754 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2755 (riscv_set_current_function): Extract getting interrupt type to new
2756 function.
2757 (riscv_get_interrupt_type): New function.
2758 (riscv_merge_decl_attributes): New function, checking interrupt type is
2759 same.
2760 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2761
2762 2018-07-12 Paul Koning <ni1d@arrl.net>
2763
2764 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2765 directive.
2766
2767 2018-07-12 Paul Koning <ni1d@arrl.net>
2768
2769 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2770 zero reference, add doloop_end instead.
2771 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2772 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2773 detail for doloop_end.
2774
2775 2018-07-12 Martin Sebor <msebor@redhat.com>
2776
2777 PR c/86453
2778 * attribs.c (decl_attributes): Reject conflicting attributes before
2779 calling attribute handlers.
2780
2781 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2782
2783 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2784 parameter.
2785 (gcc::dump_manager::get_dump_file_name): likewise.
2786 (dump_begin): Likewise.
2787 * dumpfile.h (dump_begin): Update prototype.
2788 (gcc::dump_manager::get_dump_file_name,
2789 gcc::dump_manager::get_dump_file_name): Update prototype.
2790
2791 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2792
2793 * internal-fn.h (vectorizable_internal_fn_p): New function.
2794 * tree-vect-slp.c (compatible_calls_p): Likewise.
2795 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2796 to internal functions.
2797 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2798
2799 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2800
2801 * fold-const.h (inverse_conditions_p): Declare.
2802 * fold-const.c (inverse_conditions_p): New function.
2803 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2804 that test the inverse condition of a conditional internal function.
2805 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2806 * internal-fn.c (internal_fn_mask_index): Handle conditional
2807 internal functions.
2808 (vectorized_internal_fn_supported_p): New function.
2809 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2810 (any_pred_load_store): Replace with...
2811 (need_to_predicate): ...this new variable.
2812 (redundant_ssa_names): New variable.
2813 (ifcvt_can_use_mask_load_store): Move initial checks to...
2814 (ifcvt_can_predicate): ...this new function. Handle tree codes
2815 for which a conditional internal function exists.
2816 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2817 instead of ifcvt_can_use_mask_load_store. Update after variable
2818 name change.
2819 (predicate_load_or_store): New function, split out from
2820 predicate_mem_writes.
2821 (check_redundant_cond_expr): New function.
2822 (value_available_p): Likewise.
2823 (predicate_rhs_code): Likewise.
2824 (predicate_mem_writes): Rename to...
2825 (predicate_statements): ...this. Use predicate_load_or_store
2826 and predicate_rhs_code.
2827 (combine_blocks, tree_if_conversion): Update after above name changes.
2828 (ifcvt_local_dce): Handle redundant_ssa_names.
2829 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2830 general conditional functions.
2831 * tree-vect-stmts.c (vectorizable_call): Likewise.
2832
2833 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2834 Alan Hayward <alan.hayward@arm.com>
2835 David Sherwood <david.sherwood@arm.com>
2836
2837 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2838 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2839 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2840 plus and minus and convert them into IFN_COND_FMA-based sequences.
2841 (convert_mult_to_fma): Handle conditional plus and minus.
2842
2843 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2844
2845 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2846 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2847 (cond_fnms_optab): New optabs.
2848 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2849 internal functions.
2850 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2851 * internal-fn.h (get_conditional_internal_fn): Declare.
2852 (get_unconditional_internal_fn): Likewise.
2853 * internal-fn.c (cond_ternary_direct): New macro.
2854 (expand_cond_ternary_optab_fn): Likewise.
2855 (direct_cond_ternary_optab_supported_p): Likewise.
2856 (FOR_EACH_COND_FN_PAIR): Likewise.
2857 (get_conditional_internal_fn): New function.
2858 (get_unconditional_internal_fn): Likewise.
2859 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2860 (gimple_match_op::gimple_match_op): Add a new overload for 5
2861 operands.
2862 (gimple_match_op::set_op): Likewise.
2863 (gimple_resimplify5): Declare.
2864 * genmatch.c (decision_tree::gen): Generate simplifications for
2865 5 operands.
2866 * gimple-match-head.c (gimple_simplify): Define an overload for
2867 5 operands. Handle calls with 5 arguments in the top-level overload.
2868 (convert_conditional_op): Handle conversions from unconditional
2869 internal functions to conditional ones.
2870 (gimple_resimplify5): New function.
2871 (build_call_internal): Pass a fifth operand.
2872 (maybe_push_res_to_seq): Likewise.
2873 (try_conditional_simplification): Try converting conditional
2874 internal functions to unconditional internal functions.
2875 Handle 3-operand unconditional forms.
2876 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2877 Define ternary equivalents of the current rules for binary conditional
2878 internal functions.
2879 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2880 ternary operations.
2881 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2882 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2883 (optab): Handle them.
2884 (SVE_COND_FP_TERNARY): New int iterator.
2885 (sve_fmla_op, sve_fmad_op): New int attributes.
2886 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2887 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2888 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2889
2890 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2891
2892 * target.def (preferred_else_value): New target hook.
2893 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2894 * doc/tm.texi: Regenerate.
2895 * targhooks.h (default_preferred_else_value): Declare.
2896 * targhooks.c (default_preferred_else_value): New function.
2897 * internal-fn.h (conditional_internal_fn_code): Declare.
2898 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2899 (get_conditional_internal_fn): Use it.
2900 (conditional_internal_fn_code): New function.
2901 * gimple-match.h (gimple_match_cond): New struct.
2902 (gimple_match_op): Add a cond member function.
2903 (gimple_match_op::gimple_match_op): Update all forms to take a
2904 gimple_match_cond.
2905 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2906 for the suboperation, but don't specify a particular else_value.
2907 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2908 (visit_nary_op, visit_reference_op_load): Pass
2909 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2910 * gimple-match-head.c: Include tree-eh.h
2911 (convert_conditional_op): New function.
2912 (maybe_resimplify_conditional_op): Likewise.
2913 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2914 (gimple_resimplify2): Likewise.
2915 (gimple_resimplify3): Likewise.
2916 (gimple_resimplify4): Likewise.
2917 (maybe_push_res_to_seq): Return null for conditional operations.
2918 (try_conditional_simplification): New function.
2919 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2920 constructor.
2921 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2922 IFN_COND_* call.
2923 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2924 function.
2925 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2926
2927 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2928
2929 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2930 DECL_FCONTEXT
2931 (hash_tree): Do not hash DECL_FCONTEXT
2932 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2933 Do not stream DECL_FCONTEXT.
2934 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2935 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2936
2937 2018-07-12 Richard Biener <rguenther@suse.de>
2938
2939 PR debug/86462
2940 * dwarf2out.c (gen_block_die): Only output blocks when they have
2941 at least one !DECL_IGNORED_P variable.
2942
2943 2018-07-12 Richard Biener <rguenther@suse.de>
2944
2945 PR target/84829
2946 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2947 Remove -mieee-fp handling.
2948
2949 2018-07-12 Richard Biener <rguenther@suse.de>
2950
2951 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2952 left-over from last patch.
2953
2954 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2955
2956 PR tree-optimization/86492
2957 * gimple-ssa-store-merging.c
2958 (imm_store_chain_info::coalesce_immediate_stores): Call
2959 check_no_overlap even for the merge_overlapping case. Formatting fix.
2960
2961 2018-07-12 Richard Biener <rguenther@suse.de>
2962
2963 PR middle-end/86479
2964 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2965 move possibly trapping operations into the conditional.
2966
2967 2018-07-12 Richard Biener <rguenther@suse.de>
2968
2969 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2970 (vn_lookup_simplify_result): Remove recursion limit applied
2971 here.
2972 (vn_nary_build_or_lookup_1): Adjust.
2973 (try_to_simplify): Likewise.
2974 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2975 here.
2976 (gimple_resimplify2): Likewise.
2977 (gimple_resimplify3): Likewise.
2978 (gimple_resimplify4): Likewise.
2979
2980 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2981
2982 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2983 Use __mmask64 type instead of __mmask8 for __M argument.
2984 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2985 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2986 __U argument.
2987 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2988 __mmask16 for __M argument.
2989 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2990 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2991 to __mmask16 instead of __mmask8.
2992 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2993 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2994 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2995 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2996 instead of __mmask16 for __U argument.
2997 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2998 __mmask16 instead of __mmask8 for __U argument.
2999 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3000 __U argument.
3001 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3002 __mmask16.
3003 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3004 argument.
3005 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3006 __U argument.
3007 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3008 __mmask16.
3009 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3010 of __mmask16.
3011 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3012 __U argument.
3013 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3014 __U argument.
3015 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3016 __U argument.
3017 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3018 __U argument.
3019 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3020 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3021 return type as well as __M argument type and all casts from __mmask8
3022 to __mmask32.
3023 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3024 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3025 return type as well as __M argument type and all casts from __mmask8
3026 to __mmask16.
3027 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3028 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3029 return type as well as __M argument type and all casts from __mmask8
3030 to __mmask32.
3031 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3032 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3033 return type as well as __M argument type and all casts from __mmask8
3034 to __mmask16.
3035 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3036 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3037 __mmask16.
3038
3039 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
3040
3041 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3042 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3043 for __U argument.
3044
3045 2018-07-11 Paul Koning <ni1d@arrl.net>
3046
3047 * doc/md.texi (define_subst): Document how multiple occurrences of
3048 the same argument in the replacement pattern are handled.
3049
3050 2018-07-11 Paul Koning <ni1d@arrl.net>
3051
3052 * doc/extend.texi (Common Variable Attributes): Move "mode" into
3053 alphabetical order.
3054 (Common Type Attributes): Add "mode" attribute.
3055
3056 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
3057
3058 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3059 stream DECL_ORIGINAL_TYPE.
3060 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3061 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3062 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3063 Do not walk original type.
3064 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3065 external decls.
3066 (write_ts_decl_non_common_tree_pointers): Do not stream
3067 DECL_ORIGINAL_TYPE
3068 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
3069 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
3070
3071 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3072
3073 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
3074 thread twice from the same starting edge.
3075
3076 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
3077
3078 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
3079 * gimple.c (gimple_call_nonnull_result_p): ...here...
3080 (gimple_call_nonnull_arg): ...and here.
3081 * gimple.h (gimple_call_nonnull_result_p): New.
3082 (gimple_call_nonnull_arg): New.
3083
3084 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
3085
3086 * config/arm/arm-cpus.in: Move information from fpu field of each
3087 cpu definition to the isa field.
3088 * config/arm/parsecpu.awk (fpu): Delete match rule.
3089 (gen_comm_data): Don't add bits from the CPU's FPU entry.
3090
3091 2018-07-11 Richard Biener <rguenther@suse.de>
3092
3093 PR debug/86457
3094 * dwarf2out.c (init_sections_and_labels): Use
3095 output_asm_line_debug_info consistently.
3096 (dwarf2out_early_finish): Likewise.
3097 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3098 type units.
3099
3100 2018-07-11 Richard Biener <rguenther@suse.de>
3101
3102 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
3103 Rework father_bb setting in a way to avoid propagating constants
3104 multiple times on a loop body.
3105
3106 2018-07-10 Mark Wielaard <mark@klomp.org>
3107
3108 PR debug/86459
3109 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
3110
3111 2018-07-10 Richard Biener <rguenther@suse.de>
3112
3113 * hash-map.h (hash_map::iterator::operator*): Return
3114 references to key and value.
3115
3116 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3117
3118 PR c++/86443
3119 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
3120 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
3121 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
3122 (gimplify_omp_for): For composite loops, move outer
3123 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
3124 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
3125 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
3126 TREE_LIST for both the original class iterator and the "last" helper
3127 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
3128 loop, remember has_decl_expr from outer composite loops for the
3129 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
3130
3131 2018-07-09 Martin Sebor <msebor@redhat.com>
3132
3133 PR middle-end/77357
3134 PR middle-end/86428
3135 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
3136 accessing implicitly initialized array elements.
3137 * expr.c (string_constant): Handle string initializers of
3138 character arrays within aggregates.
3139 * gimple-fold.c (fold_array_ctor_reference): Add argument.
3140 Store element offset. As a special case, handle zero size.
3141 (fold_nonarray_ctor_reference): Same.
3142 (fold_ctor_reference): Add argument. Store subobject offset.
3143 * gimple-fold.h (fold_ctor_reference): Add argument.
3144
3145 2018-07-09 Paul Koning <ni1d@arrl.net>
3146
3147 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
3148 (pdp11_insn_cost): New function.
3149 (pdp11_md_asm_adjust): New function.
3150 (TARGET_INVALID_WITHIN_DOLOOP): Define.
3151 (pdp11_rtx_costs): Update to match machine better.
3152 (output_addr_const_pdp11): Correct format mismatch warnings.
3153 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
3154 * config/pdp11/pdp11.md: General change to add base_cost and/or
3155 length attributes for use by new pdp11_insn_cost function.
3156 (MIN_BRANCH): Correct definition.
3157 (MIN_SOB): Ditto.
3158 (doloop_end): Use standard pattern name for looping pattern.
3159 (doloop_end_nocc): New.
3160 (movsf): Add another constraint alternative.
3161 (zero_extendqihi2): Add constraint alternatives for not in place
3162 extend.
3163 (zero_extendhisi2): Remove.
3164 (shift patterns): Add CC handling variants.
3165 (bswaphi2): New.
3166 (bswapsi2): New.
3167 (rothi3): New.
3168 (define_peephole2): New peephole to recognize mov that sets CC for
3169 subsequent test.
3170
3171 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3172
3173 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
3174 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
3175 wi::add.
3176
3177 2018-07-09 Jakub Jelinek <jakub@redhat.com>
3178
3179 PR c/86420
3180 * real.c (real_nextafter): Return true if result is denormal.
3181
3182 2018-07-09 Martin Liska <mliska@suse.cz>
3183
3184 * common.opt: Add back wrongly removed attribute.
3185
3186 2018-07-09 Richard Biener <rguenther@suse.de>
3187
3188 PR debug/86413
3189 * dwarf2out.c (gen_block_die): For an early generated DIE
3190 always output high/low PC attributes.
3191
3192 2018-07-09 Tom de Vries <tdevries@suse.de>
3193
3194 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
3195 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
3196 onto VAR_DECL with abstract origin.
3197
3198 2018-07-07 Jim Wilson <jimw@sifive.com>
3199
3200 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
3201
3202 2018-07-07 Tom de Vries <tdevries@suse.de>
3203
3204 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
3205
3206 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
3207
3208 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
3209 overflow_type.
3210 (combine_bound): Use wide-int overflow calculation instead of
3211 rolling our own.
3212 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
3213 overflow_type.
3214 * fold-const.c (int_const_binop_2): Same.
3215 (extract_muldiv_1): Same.
3216 (fold_div_compare): Same.
3217 (fold_abs_const): Same.
3218 * match.pd: Same.
3219 * poly-int.h (add): Same.
3220 (sub): Same.
3221 (neg): Same.
3222 (mul): Same.
3223 * predict.c (predict_iv_comparison): Same.
3224 * profile-count.c (slow_safe_scale_64bit): Same.
3225 * simplify-rtx.c (simplify_const_binary_operation): Same.
3226 * tree-chrec.c (tree_fold_binomial): Same.
3227 * tree-data-ref.c (split_constant_offset_1): Same.
3228 * tree-if-conv.c (idx_within_array_bound): Same.
3229 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
3230 * tree-ssa-phiopt.c (minmax_replacement): Same.
3231 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
3232 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
3233 * vr-values.c (vr_values::adjust_range_with_scev): Same.
3234 * wide-int.cc (wi::add_large): Same.
3235 (wi::mul_internal): Same.
3236 (wi::sub_large): Same.
3237 (wi::divmod_internal): Same.
3238 * wide-int.h: Change overflow type to overflow_type for neg, add,
3239 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
3240 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
3241 mul_internal, divmod_internal.
3242 (overflow_type): New enum.
3243 (accumulate_overflow): New.
3244
3245 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3246
3247 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
3248 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
3249
3250 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3251
3252 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
3253 argument is checked for zero before entering loop, avoid checking again.
3254
3255 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
3256
3257 * gimplify.h (generic_expr_could_trap_p): Set as global function.
3258 * gimplify.h (generic_expr_could_trap_p): Likwise.
3259 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
3260
3261 2018-07-06 Jakub Jelinek <jakub@redhat.com>
3262
3263 PR tree-optimization/86401
3264 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
3265 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
3266 (fold_bit_and_mask): ... here. New helper function for match.pd.
3267 * fold-const.h (fold_bit_and_mask): Declare.
3268 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
3269
3270 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3271
3272 PR target/86324
3273 * target.def (translate_mode_attribute): New hook.
3274 * targhooks.h (default_translate_mode_attribute): Declare.
3275 * targhooks.c (default_translate_mode_attribute): New function.
3276 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
3277 * doc/tm.texi: Regenerate.
3278 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
3279 (rs6000_translate_mode_attribute): New function.
3280
3281 2018-07-06 Paul Koning <ni1d@arrl.net>
3282
3283 * doc/md.texi (define_split): Document DONE and FAIL.
3284 (define_peephole2): Ditto.
3285
3286 2018-07-05 Jeff Law <law@redhat.com>
3287
3288 PR tree-optimization/86010
3289 * tree-ssa-dse.c (compute_trims): More aggressively trim at
3290 both the head and tail of mem* and str* calls.
3291
3292 2018-07-05 Jim Wilson <jimw@sifive.com>
3293
3294 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
3295
3296 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
3297
3298 * config/aarch64/aarch64-simd.md: correct flags text for
3299 MIN_EXPR replacement.
3300
3301 2018-07-05 James Clarke <jrtc27@jrtc27.com>
3302
3303 * configure: Regenerated.
3304
3305 2018-07-05 Carl Love <cel@us.ibm.com>
3306
3307 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3308 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3309 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3310 VSX_BUILTIN_DOUBLEL_V4SF.
3311
3312 2018-07-05 Martin Sebor <msebor@redhat.com>
3313
3314 PR c++/86400
3315 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3316 than its domain to compute its the upper bound of a char array.
3317
3318 2018-07-05 Nathan Sidwell <nathan@acm.org>
3319
3320 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
3321 * doc/cpp.texi: Update comment.
3322 * doc/tm.texi: Rebuilt.
3323 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
3324 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
3325 * doc/extend.texi (Backwards Compatibility): Clarify it is system
3326 headers affected by extern "C".
3327 * system.h: Poison NO_IMPLICIT_EXTERN_C.
3328 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
3329 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
3330 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
3331 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
3332 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
3333 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
3334 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
3335 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
3336 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
3337 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
3338 config/sparc/sp64-elf.h, config/spu/spu.h,
3339 config/stormy16/stormy16.h, config/v850/v850.h,
3340 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
3341 define NO_IMPLICIT_EXTERN_C.
3342 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
3343
3344 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3345
3346 PR target/84711
3347 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3348 instead of GET_MODE_SIZE when comparing Units.
3349
3350 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3351
3352 PR target/84711
3353 * rtlanal.c (set_noop_p): Constrain on mode change,
3354 include hard-reg-set.h
3355
3356 2018-07-05 Tamar Christina <tamar.christina@arm.com>
3357
3358 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
3359
3360 2018-07-05 Jakub Jelinek <jakub@redhat.com>
3361
3362 Revert
3363 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3364
3365 PR sanitizer/84250
3366 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3367 libasan.
3368 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3369
3370 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
3371
3372 PR sanitizer/84250
3373 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
3374 libasan.
3375 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
3376
3377 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
3378
3379 PR middle-end/86380
3380 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
3381
3382 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
3383
3384 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
3385 neg_*_op* variables.
3386
3387 2018-07-04 Martin Liska <mliska@suse.cz>
3388
3389 * tree-switch-conversion.c: Define
3390 max_ratio_for_speed and max_ratio_for_size constants.
3391
3392 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3393 Martin Liska <mliska@suse.cz>
3394
3395 PR middle-end/66240
3396 PR target/45996
3397 PR c/84100
3398 * common.opt: Rename align options with 'str_' prefix.
3399 * common/config/i386/i386-common.c (set_malign_value): New
3400 function.
3401 (ix86_handle_option): Use it to set -falign-* options/
3402 * config/aarch64/aarch64-protos.h (struct tune_params): Change
3403 type from int to string.
3404 * config/aarch64/aarch64.c: Update default values from int
3405 to string.
3406 * config/alpha/alpha.c (alpha_override_options_after_change):
3407 Likewise.
3408 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
3409 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3410 max skip conditionally.
3411 * config/i386/freebsd.h (SUBALIGN_LOG): New.
3412 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3413 max skip conditionally.
3414 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3415 max skip conditionally.
3416 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
3417 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3418 max skip conditionally.
3419 * config/i386/i386.c (struct ptt): Change type from int to
3420 string.
3421 (ix86_default_align): Set default values.
3422 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
3423 max skip conditionally.
3424 * config/i386/iamcu.h (SUBALIGN_LOG): New.
3425 (ASM_OUTPUT_MAX_SKIP_ALIGN):
3426 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
3427 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3428 max skip conditionally.
3429 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
3430 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
3431 * config/i386/x86-64.h (SUBALIGN_LOG): New.
3432 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
3433 max skip conditionally.
3434 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3435 * config/ia64/ia64.c (ia64_option_override): Set default values
3436 for alignment options.
3437 * config/m68k/m68k.c: Handle new str_align_* options.
3438 * config/mips/mips.c (mips_set_compression_mode): Change
3439 type of constants.
3440 (mips_option_override): Set default values for options.
3441 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3442 Likewise.
3443 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3444 Likewise.
3445 * config/rx/rx.c (rx_option_override): Likewise.
3446 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
3447 (LABEL_ALIGN): Use align_labels_log.
3448 (LOOP_ALIGN): Use align_loops_align.
3449 * config/s390/s390.c (s390_asm_output_function_label): Use new
3450 macros.
3451 * config/sh/sh.c (sh_override_options_after_change):
3452 Change type of constants.
3453 * config/spu/spu.c (spu_sched_init): Likewise.
3454 * config/sparc/sparc.c (sparc_option_override): Set default
3455 values for options.
3456 * config/visium/visium.c (visium_option_override): Likewise.
3457 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
3458 emit p2align format with last argument if it's not needed.
3459 * doc/invoke.texi: Document extended format of -falign-*.
3460 * final.c: Use align_labels alignment.
3461 * flags.h (struct target_flag_state): Change type to use
3462 align_flags.
3463 (struct align_flags_tuple): New.
3464 (struct align_flags): Likewise.
3465 (align_loops_log): Redefine macro to use new types.
3466 (align_loops_max_skip): Redefine macro to use new types.
3467 (align_jumps_log): Redefine macro to use new types.
3468 (align_jumps_max_skip): Redefine macro to use new types.
3469 (align_labels_log): Redefine macro to use new types.
3470 (align_labels_max_skip): Redefine macro to use new types.
3471 (align_functions_log): Redefine macro to use new types.
3472 (align_loops): Redefine macro to use new types.
3473 (align_jumps): Redefine macro to use new types.
3474 (align_labels): Redefine macro to use new types.
3475 (align_functions): Redefine macro to use new types.
3476 (align_functions_max_skip): Redefine macro to use new types.
3477 (align_loops_value): New macro.
3478 (align_jumps_value): New macro.
3479 (align_labels_value): New macro.
3480 (align_functions_value): New macro.
3481 * function.c (invoke_set_current_function_hook): Propagate
3482 alignment values from flags to global variables default in
3483 topleev.h.
3484 * ipa-icf.c (sem_function::equals_wpa): Use
3485 cl_optimization_option_eq instead of memcmp.
3486 * lto-streamer.h (cl_optimization_stream_out): Support streaming
3487 of string types.
3488 (cl_optimization_stream_in): Likewise.
3489 * optc-save-gen.awk: Support strings in cl_optimization.
3490 * opth-gen.awk: Likewise.
3491 * opts.c (finish_options): Remove error checking of invalid
3492 value ranges.
3493 (MAX_CODE_ALIGN): Remove.
3494 (MAX_CODE_ALIGN_VALUE): Likewise.
3495 (parse_and_check_align_values): New function.
3496 (check_alignment_argument): Likewise.
3497 (common_handle_option): Use check_alignment_argument.
3498 * opts.h (parse_and_check_align_values): Declare.
3499 * toplev.c (init_alignments): Remove.
3500 (read_log_maxskip): New.
3501 (parse_N_M): Likewise.
3502 (parse_alignment_opts): Likewise.
3503 (backend_init_target): Remove usage of init_alignments.
3504 * toplev.h (parse_alignment_opts): Declare.
3505 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
3506 argument.
3507 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
3508 * tree.c (cl_option_hasher::equal): New.
3509 * varasm.c: Use new global macros.
3510
3511 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
3512
3513 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
3514 Use a simpler align directive also if MAXSKIP = ALIGN-1.
3515 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3516 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3517 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3518 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3519 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
3520 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
3521 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
3522 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3523 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3524 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3525 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3526
3527 2018-07-04 Martin Liska <mliska@suse.cz>
3528 Jonathan Wakely <jwakely@redhat.com>
3529
3530 * coverage.c: Use correct type.
3531 * doc/invoke.texi: Language correction.
3532
3533 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
3534
3535 PR target/85620
3536 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
3537 ENDBRANCH for non-tail call which may return via indirect branch.
3538 * doc/extend.texi: Document indirect_return attribute.
3539
3540 2018-07-03 Martin Sebor <msebor@redhat.com>
3541
3542 PR tree-optimization/86274
3543 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3544 precondition.
3545 (format_floating): Correct handling of infinities and NaNs.
3546
3547 2018-07-03 Martin Sebor <msebor@redhat.com>
3548
3549 * print-tree.c (print_real_cst): New function.
3550 (print_node_brief): Call it.
3551 (print_node): Ditto.
3552
3553 2018-07-03 Jeff Law <law@redhat.com>
3554
3555 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
3556 into a single pattern.
3557
3558 * config/h8300/h8300.md (ors code_iterator): New.
3559 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
3560 a single pattern and single splitter.
3561 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
3562 (iorqi3_1, xorqi3_1): Likewise.
3563 (iorqi3, xorqi3 expanders): Similarly.
3564
3565 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
3566 (movmd_internal) into a single pattern using the P mode iterator.
3567 (movmd splitters): Similarly.
3568 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
3569 (movsd splitters): Similarly.
3570
3571 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
3572 ADDB, ADDW and ADDL into a single ADD attribute which selects the
3573 right table based on the size of the operand.
3574 * config/h8300/h8300.md (length_table): Corresponding changes. All
3575 references to "addb", "addw" and "addl" changed to "add".
3576 (btst patterns): Merge two variants into a single pattern.
3577 (tstqi, tsthi): Likewise.
3578 (addhi3_incdec, addsi3_incdec): Likewise.
3579 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
3580 (mulhi3, mulsi3): Likewise.
3581 (udivhi3, udivsi3): Likewise.
3582 (divhi3, divsi3): Likewise.
3583 (andorqi3, andorhi3, andorsi3): Likewise.
3584
3585 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
3586
3587 PR target/85694
3588 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
3589 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
3590
3591 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3592
3593 PR tree-optimization/85694
3594 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
3595 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
3596 UNSPEC_URHADD.
3597 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
3598 (<u>avg<mode>3_ceil): New patterns.
3599
3600 2018-07-03 David Malcolm <dmalcolm@redhat.com>
3601
3602 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
3603 scan-tree-dump directive.
3604 * gcc.dg/vect/slp-perm-2.c: Likewise.
3605 * gcc.dg/vect/slp-perm-3.c: Likewise.
3606 * gcc.dg/vect/slp-perm-5.c: Likewise.
3607 * gcc.dg/vect/slp-perm-6.c: Likewise.
3608 * gcc.dg/vect/slp-perm-7.c: Likewise.
3609 * gcc.dg/vect/slp-perm-8.c: Likewise.
3610
3611 2018-07-03 Marek Polacek <polacek@redhat.com>
3612
3613 PR middle-end/86202
3614 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3615
3616 2018-07-03 Richard Biener <rguenther@suse.de>
3617
3618 PR ipa/86389
3619 * tree-ssa-structalias.c (find_func_clobbers): Properly
3620 handle indirect calls.
3621
3622 2018-07-03 Jeff Law <law@redhat.com>
3623
3624 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
3625 (shifts): New code iterator.
3626 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
3627 expander. Fix HImode handling on H8/SX.
3628 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
3629 (subqi3, subhi3, subsi3 expanders): Likewise.
3630 (andqi3, andhi3, andsi3 expanders): Likewise.
3631 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
3632 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
3633 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
3634 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
3635 (zero_extendqihi2, zero_extendqisi2): Likewise.
3636 (extendqihi2, extendqisi2): Likewise.
3637 (rotlqi3, rotlhi3, rotlsi3): Likewise.
3638 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
3639 (rotlqi3_1, rotlhi3_1): Likewise.
3640 (logicalhi3_sn, logicalsi3_sn): Likewise.
3641 (logicalhi3, logicalsi3): Likewise.
3642
3643 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3644
3645 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3646 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3647 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3648 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3649 type to append_pattern_def_seq instead of creating a stmt_vec_info
3650 directly.
3651 (build_mask_conversion): Likewise. Remove vinfo argument.
3652 (vect_add_conversion_to_patterm): Likewise, renaming to...
3653 (vect_add_conversion_to_pattern): ...this.
3654 (vect_recog_mask_conversion_pattern): Update call to
3655 build_mask_conversion. Pass the vector type to
3656 append_pattern_def_seq here too.
3657 (vect_recog_gather_scatter_pattern): Update call to
3658 vect_add_conversion_to_pattern.
3659
3660 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3661
3662 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3663 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3664 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3665 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3666 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3667 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3668 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3669 append_pattern_def_seq instead of new_pattern_def_seq.
3670 (vect_recog_divmod_pattern): Do both of the above.
3671 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3672 is null.
3673
3674 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3675
3676 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3677 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3678 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3679 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3680 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3681 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3682 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3683 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3684 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3685 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3686 parameter with a single stmt_vec_info.
3687 (vect_recog_func_ptr): Likewise.
3688 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3689 (vect_try_gather_scatter_pattern): ...this.
3690 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3691 the stmt_vec_info of the statement to be matched. Don't clear
3692 STMT_VINFO_RELATED_STMT.
3693 (vect_pattern_recog): Update call accordingly.
3694
3695 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3696
3697 PR tree-optimization/85694
3698 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3699 (uavgM3_ceil): Document new optabs.
3700 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3701 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3702 functions.
3703 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3704 (savg_ceil_optab): New optabs.
3705 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3706 (vect_vect_recog_func_ptrs): Add it.
3707 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3708 constant directly from the associated lhs.
3709
3710 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3711
3712 * tree-vect-patterns.c (vect_split_statement): New function.
3713 (vect_convert_input): Use it to try to split an existing cast.
3714
3715 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3716
3717 * poly-int.h (print_hex): New function.
3718 * dumpfile.h (dump_dec, dump_hex): Declare.
3719 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3720 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3721 min_input_precision, operation_precision and operation_sign.
3722 * tree-vect-patterns.c (vect_get_range_info): New function.
3723 (vect_same_loop_or_bb_p, vect_single_imm_use)
3724 (vect_operation_fits_smaller_type): Delete.
3725 (vect_look_through_possible_promotion): Add an optional
3726 single_use_p parameter.
3727 (vect_recog_over_widening_pattern): Rewrite to use new
3728 stmt_vec_info infomration. Handle one operation at a time.
3729 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3730 (vect_truncatable_operation_p, vect_set_operation_type)
3731 (vect_set_min_input_precision): New functions.
3732 (vect_determine_min_output_precision_1): Likewise.
3733 (vect_determine_min_output_precision): Likewise.
3734 (vect_determine_precisions_from_range): Likewise.
3735 (vect_determine_precisions_from_users): Likewise.
3736 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3737 (vect_vect_recog_func_ptrs): Put over_widening first.
3738 Add cast_forwprop.
3739 (vect_pattern_recog): Call vect_determine_precisions.
3740
3741 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3742
3743 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3744 statements that have been replaced by further pattern statements.
3745 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3746
3747 2018-07-03 Richard Biener <rguenther@suse.de>
3748
3749 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3750 always set *dt. Dump vectype in vectype overload.
3751 * dumpfile.h (dump_gimple_expr): New function.
3752 (dump_gimple_expr_loc): Likewise.
3753 * dumpfile.c (dump_gimple_expr): New function.
3754 (dump_gimple_expr_loc): Likewise.
3755
3756 2018-07-02 Jeff Law <law@redhat.com>
3757
3758 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3759 the H8/300, H8/300H and H8/S variants into a single pattern.
3760 (movhi_h8300, movqi_h8300hs): Similarly.
3761 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3762 (QHI mode iterator): New.
3763
3764 * config/h8300/h8300.md: Remove trailing whitespace.
3765
3766 2018-07-02 Jim Wilson <jimw@sifive.com>
3767
3768 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3769 instead of emit_insn for interrupt returns.
3770 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3771 (riscv_sret, riscv_uret): Likewise.
3772
3773 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3774
3775 * pretty-print.c (selftest::test_pp_format): Move save and restore
3776 of quotes to class auto_fix_quotes, and add an instance.
3777 * selftest.c: Include "intl.h".
3778 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3779 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3780 * selftest.h (selftest::auto_fix_quotes): New class.
3781
3782 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3783
3784 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3785 (aarch64_sve_prepare_conditional_op): Remove.
3786 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3787 Allow aarch64_simd_reg_or_zero as select operand; remove
3788 the aarch64_sve_prepare_conditional_op call.
3789 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3790 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3791 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3792 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3793 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3794 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3795 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3796 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3797 and a splitters to match all of the *_any patterns.
3798 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3799
3800 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3801 (SVE_COND_FP_BINARY_REV): Remove.
3802 (sve_int_op_rev, sve_fp_op_rev): New.
3803 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3804 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3805 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3806 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3807 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3808 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3809 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3810 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3811 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3812
3813 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3814 Remove match_dup 1 from the inner unspec.
3815 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3816
3817 * config/aarch64/aarch64.md (movprfx): New attr.
3818 (length): Default movprfx to 8.
3819 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3820 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3821 (*<su>mul<SVE_I>3_highpart): Likewise.
3822 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3823 (*v<ASHIFT><SVE_I>3): Likewise.
3824 (*<su><MAXMIN><SVE_I>3): Likewise.
3825 (*<su><MAXMIN><SVE_F>3): Likewise.
3826 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3827 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3828 (*div<SVE_F>4): Likewise.
3829
3830 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3831
3832 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3833 in dump string.
3834
3835 2018-07-02 Richard Biener <rguenther@suse.de>
3836
3837 PR tree-optimization/86363
3838 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3839 memset argument refers to a non-variable address.
3840
3841 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3842
3843 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3844 {PLUS,MINUS}_EXPR code to...
3845 (adjust_symbolic_bound): ...here,
3846 (combine_bound): ...here,
3847 (set_value_range_with_overflow): ...and here.
3848
3849 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3850
3851 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3852 code...
3853 (extract_range_from_abs_expr): ...here.
3854
3855 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3856
3857 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3858 -fno-omit-frame-pointer when not optimizing.
3859
3860 2018-07-02 Martin Liska <mliska@suse.cz>
3861
3862 PR ipa/86279
3863 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3864 (propagate_nothrow): Likewise.
3865
3866 2018-07-02 Martin Liska <mliska@suse.cz>
3867
3868 PR ipa/86323
3869 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3870
3871 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3872
3873 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3874 function in r262149, changing "loc" param from source_location to
3875 const dump_location_t &.
3876 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3877 declaration, as above.
3878
3879 2018-07-01 Paul Koning <ni1d@arrl.net>
3880
3881 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3882 -munit-asm, -mgnu-asm, -mdec-asm.
3883 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3884 (pdp11_output_labelref): New.
3885 (pdp11_output_def): New.
3886 (pdp11_output_addr_vec_elt): New.
3887 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3888 %# and %@ format codes.
3889 (pdp11_option_override): New.
3890 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3891 (pdp11_output_ident): New.
3892 (pdp11_asm_named_section): New.
3893 (pdp11_asm_init_sections): New.
3894 (pdp11_file_start): New.
3895 (pdp11_file_end): New.
3896 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3897 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3898 %o, like %c but octal.
3899 (pdp11_option_override): New.
3900 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3901 -mdec-asm.
3902 (DATA_SECTION_ASM_OP): Ditto.
3903 (READONLY_DATA_SECTION_ASM_OP): New.
3904 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3905 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3906 (ASM_OUTPUT_LABELREF): Ditto.
3907 (ASM_OUTPUT_DEF): Ditto.
3908 (ASM_OUTPUT_EXTERNAL): New.
3909 (ASM_OUTPUT_SOURCE_FILENAME): New.
3910 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3911 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3912 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3913 %# and %@ format codes.
3914 * config/pdp11/pdp11.opt (mgnu-asm): New.
3915 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3916 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3917 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3918
3919 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3920
3921 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3922 dereferencing path[] beyond its length.
3923 (debug_path): New.
3924 (debug_all_paths): New.
3925 (rewire_first_differing_edge): New.
3926 (adjust_paths_after_duplication): New.
3927 (duplicate_thread_path): Call adjust_paths_after_duplication.
3928 Add new argument.
3929 (thread_through_all_blocks): Add new argument to
3930 duplicate_thread_path.
3931
3932 2018-06-30 Jim Wilson <jimw@sifive.com>
3933
3934 * config/riscv/predicates.md (p2m1_shift_operand): New.
3935 (high_mask_shift_operand): New.
3936 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3937 pattern using p2m1_shift_operand.
3938 (lshsi3_zero_extend_3+2): New combiner pattern using
3939 high_mask_shift_operand.
3940
3941 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3942
3943 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3944 split out from...
3945 (vect_recog_rotate_pattern): ...here.
3946 (vect_convert_input): Try to insert casts of invariants in the
3947 preheader.
3948 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3949 preheader to be empty.
3950
3951 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3952
3953 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3954 vector type. If given, install it in the new statement's
3955 STMT_VINFO_VECTYPE.
3956 (vect_element_precision): New function.
3957 (vect_unpromoted_value): New struct.
3958 (vect_unpromoted_value::vect_unpromoted_value): New function.
3959 (vect_unpromoted_value::set_op): Likewise.
3960 (vect_look_through_possible_promotion): Likewise.
3961 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3962 (vect_widened_op_tree, vect_convert_input): Likewise.
3963 (vect_convert_inputs, vect_convert_output): Likewise.
3964 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3965 to handle the optional cast of the multiplication result and
3966 vect_widened_op_tree to detect the widened multiplication itself.
3967 Do not require the input and output of promotion casts to have
3968 the same sign, but base the signedness of the operation on the
3969 input rather than the result. If the pattern includes two
3970 promotions, check that those promotions have the same sign.
3971 Do not restrict the MULT_EXPR handling to a double-width result;
3972 handle quadruple-width results and wider. Use vect_convert_inputs
3973 to convert the inputs to the common type.
3974 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3975 to handle the optional cast of the ABS result. Also allow a sign
3976 change or a sign extension between the ABS and MINUS.
3977 Use vect_widened_op_tree to detect the widened subtraction and use
3978 vect_convert_inputs to convert the inputs to the common type.
3979 (vect_handle_widen_op_by_const): Delete.
3980 (vect_recog_widen_op_pattern): New function.
3981 (vect_recog_widen_mult_pattern): Use it.
3982 (vect_recog_widen_shift_pattern): Likewise.
3983 (vect_recog_widen_sum_pattern): Use
3984 vect_look_through_possible_promotion to handle the promoted
3985 PLUS_EXPR operand.
3986
3987 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3988
3989 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3990 the containing gimple_seq *.
3991 * gimple-iterator.h (gsi_for_stmt): Declare it.
3992 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3993 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3994 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3995 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3996 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3997 checks.
3998 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3999 split out from...
4000 (vect_mark_pattern_stmts): ...here. Handle cases in which the
4001 statement being replaced is part of an existing pattern
4002 definition sequence, inserting the new pattern statements before
4003 the original one.
4004 (vect_pattern_recog_1): Don't return a bool. If the statement
4005 is already part of a pattern, instead apply pattern matching
4006 to the pattern definition statements. Don't clear the
4007 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4008 (vect_pattern_recog): Don't break after the first match;
4009 continue processing the pattern definition statements instead.
4010 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4011
4012 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4013
4014 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4015 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4016 (vect_recog_widen_sum_pattern): Use it.
4017
4018 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4019
4020 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4021 phi is not a pattern statement and has not been replaced by
4022 a pattern statement.
4023 * tree-vect-patterns.c (type_conversion_p): Don't check
4024 STMT_VINFO_IN_PATTERN_P.
4025 (vect_recog_vector_vector_shift_pattern): Likewise.
4026 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4027 the pattern statement rather than the original statement; check
4028 directly for a WIDEN_MULT_EXPR here.
4029 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4030 vect_is_simple_use to return the pattern statement rather
4031 than the original statement; use is_pattern_stmt_p to check
4032 for such a pattern statement.
4033 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4034 to return the pattern statement rather than the original statement;
4035 don't do the same transformation here.
4036 (vect_is_simple_use): If the defining statement has been replaced
4037 by a pattern statement, return the pattern statement instead.
4038 Remove the corresponding (local) transformation from the vectype
4039 overload.
4040
4041 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
4042
4043 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4044 end and default to null.
4045 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4046 (vectorizable_reduction): Update calls accordingly, dropping the
4047 gimple ** argument if the passed-back statement isn't needed.
4048 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4049 (vect_recog_rotate_pattern): Likewise.
4050 (vect_recog_mask_conversion_pattern): Likewise.
4051 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4052 (vect_mask_constant_operand_p): Likewise.
4053 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4054 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4055 (get_group_load_store_type, get_load_store_type): Likewise.
4056 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4057 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4058 (vectorizable_conversion, vectorizable_assignment): Likewise.
4059 (vectorizable_shift, vectorizable_operation): Likewise.
4060 (vectorizable_store, vect_is_simple_cond): Likewise.
4061 (vectorizable_condition, vectorizable_comparison): Likewise.
4062 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4063 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4064 and move it to the end. Cope with null def_stmt_outs.
4065
4066 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4067
4068 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
4069
4070 2018-06-29 Jeff Law <law@redhat.com>
4071
4072 * config/v850/v850.c (v850_legitimate_address_p): Handle large
4073 displacements for TARGET_V850E2V3 and newer.
4074 (TARGET_LRA_P): Remove. Defaults to LRA now.
4075 * config/v850/v850.md (sign23byte_load): Remove.
4076 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
4077 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
4078
4079 2018-06-29 Martin Liska <mliska@suse.cz>
4080
4081 PR lto/85759
4082 * coverage.c (coverage_init): Mangle full path name.
4083 * doc/invoke.texi: Document the change.
4084 * gcov-io.c (mangle_path): New.
4085 * gcov-io.h (mangle_path): Likewise.
4086 * gcov.c (mangle_name): Use mangle_path for path mangling.
4087
4088 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4089
4090 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
4091 if starting source register is not even.
4092
4093 2018-06-29 Martin Liska <mliska@suse.cz>
4094
4095 PR tree-optimization/86263
4096 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
4097 Make edge redirection.
4098
4099 2018-06-29 David Malcolm <dmalcolm@redhat.com>
4100
4101 * dumpfile.c (dump_loc): Add indentation based on scope depth.
4102 (dump_scope_depth): New variable.
4103 (get_dump_scope_depth): New function.
4104 (dump_begin_scope): New function.
4105 (dump_end_scope): New function.
4106 * dumpfile.h (get_dump_scope_depth): New declaration.
4107 (dump_begin_scope): New declaration.
4108 (dump_end_scope): New declaration.
4109 (class auto_dump_scope): New class.
4110 (AUTO_DUMP_SCOPE): New macro.
4111 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
4112 AUTO_DUMP_SCOPE.
4113
4114 2018-06-29 Richard Biener <rguenther@suse.de>
4115
4116 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
4117 compute_all_dependences succeeds.
4118 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
4119 exceed --param loop-max-datarefs-for-datadeps.
4120
4121 2018-06-29 Jakub Jelinek <jakub@redhat.com>
4122
4123 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
4124
4125 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
4126
4127 PR target/86348
4128 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
4129 alternative 0 in preferred_for_speed attribute.
4130
4131 2018-06-28 Paul Koning <ni1d@arrl.net>
4132
4133 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
4134 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
4135 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
4136 * config/pdp11/pdp11.md: Correct "length" attribute calculation
4137 for shift insn patterns.
4138
4139 2018-06-28 David Malcolm <dmalcolm@redhat.com>
4140
4141 * cgraph.c (cgraph_node::get_body): Replace assignments to
4142 "dump_file" with calls to set_dump_file.
4143 * dumpfile.c (alt_dump_file): Make static, and group with...
4144 (alt_flags): ...this definition.
4145 (dumps_are_enabled): New variable.
4146 (refresh_dumps_are_enabled): New function.
4147 (set_dump_file): New function.
4148 (set_alt_dump_file): New function.
4149 (gcc::dump_manager::dump_start): Replace assignments to
4150 "dump_file" and "alt_dump_file" with calls to set_dump_file and
4151 set_alt_dump_file.
4152 (gcc::dump_manager::dump_finish): Likewise.
4153 * dumpfile.h (alt_dump_file): Delete decl.
4154 (dumps_are_enabled): New variable decl.
4155 (set_dump_file): New function decl.
4156 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
4157 global.
4158 * tree-nested.c (lower_nested_functions): Replace assignments to
4159 "dump_file" with calls to set_dump_file.
4160
4161 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4162
4163 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
4164 goto_locus of each outgoing edge of each basic block.
4165
4166 2018-06-28 Richard Biener <rguenther@suse.de>
4167
4168 * dwarf2out.c (decl_scope_table): Remove.
4169 (push_decl_scope): Likewise.
4170 (pop_decl_scope): Likewise.
4171 (gen_type_die_for_member): Do not call push/pop_decl_scope.
4172 (gen_struct_or_union_type_die): Likewise.
4173 (gen_tagged_type_die): Likewise.
4174 (dwarf2out_init): Do not initialize decl_scope_table.
4175 (dwarf2out_c_finalize): Do not free it.
4176
4177 2018-06-28 Richard Biener <rguenther@suse.de>
4178
4179 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
4180 deciding whether to not re-use a DIE.
4181
4182 2018-06-28 Richard Biener <rguenther@suse.de>
4183
4184 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
4185 DW_AT_abstract_origin attribute.
4186
4187 2018-06-28 Martin Liska <mliska@suse.cz>
4188
4189 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4190 Use newly introduced constants.
4191 * tree-switch-conversion.h (struct jump_table_cluster):
4192 Define max_ratio_for_size and max_ratio_for_speed.
4193
4194 2018-06-28 Martin Liska <mliska@suse.cz>
4195
4196 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4197 Add new checking assert to catch invalid state.
4198 (jump_table_cluster::can_be_handled): Handle single case
4199 clusters.
4200 (jump_table_cluster::is_beneficial): Bail out for such case.
4201 (bit_test_cluster::find_bit_tests):
4202 Add new checking assert to catch invalid state.
4203 (bit_test_cluster::can_be_handled): Handle single case
4204 clusters.
4205 (bit_test_cluster::is_beneficial): Bail out for such case.
4206 (switch_decision_tree::analyze_switch_statement):
4207 Fix comment.
4208
4209 2018-06-28 Martin Liska <mliska@suse.cz>
4210
4211 * common.opt: Introduce -completion option.
4212 * gcc.c (driver_handle_option): Handle it.
4213 (driver::main): Print completions if completion
4214 is set.
4215 * opt-suggestions.c (option_proposer::get_completions):
4216 New function.
4217 (option_proposer::suggest_completion): Likewise.
4218 (option_proposer::find_param_completions): Likewise.
4219 (verify_autocompletions): Likewise.
4220 (test_completion_valid_options): Likewise.
4221 (test_completion_valid_params): Likewise.
4222 (in_completion_p): Likewise.
4223 (empty_completion_p): Likewise.
4224 (test_completion_partial_match): Likewise.
4225 (test_completion_garbage): Likewise.
4226 (opt_proposer_c_tests): Likewise.
4227 * opt-suggestions.h: Declare new functions.
4228 * opts.c (common_handle_option): Handle OPT__completion_.
4229 * selftest-run-tests.c (selftest::run_tests): Add
4230 opt_proposer_c_tests.
4231 * selftest.c (assert_str_startswith): New.
4232 * selftest.h (assert_str_startswith): Likewise.
4233 (opt_proposer_c_tests): New.
4234 (ASSERT_STR_STARTSWITH): Likewise.
4235
4236 2018-06-28 Martin Liska <mliska@suse.cz>
4237
4238 * Makefile.in: Add opt-suggestions.o.
4239 * gcc-main.c: Include opt-suggestions.h.
4240 * gcc.c (driver::driver): Likewise.
4241 (driver::~driver): Remove m_option_suggestions.
4242 (driver::build_option_suggestions): Moved to option_proposer.
4243 (driver::suggest_option): Likewise.
4244 (driver::handle_unrecognized_options): Use option_proposer.
4245 * gcc.h (class driver): Add new memver m_option_proposer.
4246 * opt-suggestions.c: New file.
4247 * opt-suggestions.h: New file.
4248
4249 2018-06-28 Martin Liska <mliska@suse.cz>
4250
4251 * vec.h (class auto_string_vec): New (moved from auto_argvec).
4252 (auto_string_vec::~auto_string_vec): Likewise.
4253
4254 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
4255
4256 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
4257 prevent_decl_creation_for_types fields up and add reset_location field.
4258 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
4259 statement if id->reset_location is true.
4260 (copy_edges_for_bb): Do not set goto_locus on the new edges if
4261 id->reset_location is true.
4262 (copy_phis_for_bb): Force input_location on the arguments if
4263 id->reset_location is true.
4264 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
4265 is set on the function to be inlined.
4266
4267 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
4268
4269 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
4270
4271 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
4272
4273 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
4274 registers for Pmode.
4275 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
4276 hard registers for the clobbered pseudo.
4277
4278 2018-06-27 Paul Koning <ni1d@arrl.net>
4279
4280 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4281 mutually exclusive options.
4282 * config/pdp11/constraints.md (h): New constraint.
4283 (O): Update definition to match shift code generation.
4284 (D): New constraint.
4285 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
4286 (CCFP): Remove.
4287 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
4288 function.
4289 (output_jump): Change arguments.
4290 (pdp11_fixed_cc_regs): New function.
4291 (pdp11_cc_mode): Ditto.
4292 (pdp11_expand_shift): Ditto.
4293 (pdp11_assemble_shift): Ditto.
4294 (pdp11_small_shift): Ditto.
4295 (pdp11_branch_cost): Remove.
4296 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
4297 from output.
4298 (pdp11_register_move_cost): Update for CC registers.
4299 (pdp11_rtx_costs): Add case for LSHIFTRT.
4300 (pdp11_output_jump): Add CCNZ mode conditional branches.
4301 (notice_update_cc_on_set): Remove.
4302 (pdp11_cc_mode): New function.
4303 (simple_memory_operand): Correct pre/post decrement case.
4304 (no_side_effect_operand): New function.
4305 (pdp11_regno_reg_class): Add CC_REGS class.
4306 (pdp11_fixed_cc_regs): New function.
4307 (pdp11_small_shift): New function.
4308 (pdp11_expand_shift): New function to expand shift insns.
4309 (pdp11_assemble_shift): New function to output shifts.
4310 (pdp11_branch_cost): Remove.
4311 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
4312 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
4313 (WCHAR_TYPE): Ditto.
4314 (PTRDIFF_TYPE): Ditto.
4315 (ADJUST_INSN_LENGTH): New macro.
4316 (FIXED_REGISTERS): Add CC registers.
4317 (CALL_USED_REGISTERS): Ditto.
4318 (reg_class): Ditto.
4319 (REG_CLASS_NAMES): Ditto.
4320 (REG_CLASS_CONTENTS): Ditto.
4321 (SELECT_CC_MODE): Use new function.
4322 (TARGET_FLAGS_REGNUM): New macro.
4323 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
4324 (cc0_reg_rtx): Remove.
4325 (CC_STATUS_MDEP): Remove.
4326 (CC_STATUS_MDEFP_INIT): Remove.
4327 (CC_IN_FPU): Remove.
4328 (NOTICE_UPDATE_CC): Remove.
4329 (REGISTER_NAMES): Add CC registers.
4330 (BRANCH_COST): Change to constant 1.
4331 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
4332 handling.
4333 * config/pdp11/pdp11.opt (mbcopy): Remove.
4334 (mbcopy-builtin): Remove.
4335 (mbranch-cheap): Remove.
4336 (mbranch-expensive): Remove.
4337 * config/pdp11/predicates.md (expand_shift_operand): Update to
4338 match shift code generation.
4339 (ccnz_operator): New predicate.
4340 * doc/invoke.texi (PDP-11 Options): Remove deleted options
4341 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
4342 Remove non-existent option -mabshi, -mno-abshi. Document mutually
4343 exclusive options.
4344 * doc/md.texi (PDP-11): Document new D and h constraints. Update
4345 description of O constraint.
4346
4347 2018-06-27 Jeff Law <law@redhat.com>
4348 Austin Law <austinklaw@gmail.com>
4349
4350 * config/v850/v850.md (addsi3_set_flags): New pattern.
4351 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
4352 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
4353 (zero_extendhisi2_v850_set_flags): Likewise.
4354 (zero_extendqisi2_v850_set_flags): Likewise.
4355 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
4356 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
4357 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
4358
4359 * config/v850/v850-protos.h (notice_update_cc): Remove.
4360 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
4361 (v850_print_operand): Handle 'D' and "d".
4362 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
4363 Add handling of arithmetic/logical operations compared against zero.
4364 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
4365 Do not look at v850_compare_op, instead get mode from last argument.
4366 (v850_gen_compare): Remove
4367 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
4368 after reload for prologue insns.
4369 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
4370 patterns.
4371 (construct_save_jarl): Likewise.
4372 (TARGET_FLAGS_REGNUM): Define.
4373 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
4374 (NOTICE_UPDATE_CC): Remove.
4375 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
4376 than cc0. Conditionalize on reload_completed.
4377 (cmpsi_insn, setfcc_insn): Likewise.
4378 (tst1 splitter): Turn into define_and_split which sets the flags
4379 after reload.
4380 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
4381 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
4382 (cstoresf4, cstoredf4): Clobber the flags.
4383 (cmpsi, cmpsf, cmpdf): Remove expanders.
4384 (setf_insn): Remove pattern.
4385 (addsi3): Turn into define_and_split which clobbers the flags after
4386 reload and a suitable pattern (addsi3_clobber_flags) for use after
4387 reload.
4388 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
4389 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
4390 (ashrsi3, ashrsi3_v850e2): Likewise.
4391 (bins): Clobber the flags.
4392 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
4393 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
4394 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
4395 (call_value_internal_short, call_value_internal_long): Likewise.
4396 (callt_save_interrupt, callt_return_interrupt): Likewise.
4397 (save_interrupt, return_interrupt): Likewise.
4398 (callt_save_all_interrupt, save_all_interrupt): Likewise.
4399 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
4400 (restore_all_interrupt, _restore_all_interrupt): Likewise.
4401 (All FP comparisons): Only allow after reload has completed.
4402 (trfsr): Likewise.
4403 (divh, divhu): Tweak output template.
4404 (branch_z_normal, branch_z_invert): Remove
4405 (branch_nz_normal, branch_nz_invert): Likewise.
4406 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
4407
4408 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
4409 * config/v850/v850.c (notice_update_cc): Remove.
4410 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
4411 (CC_NO_CARRY): Likewise.
4412 (NOTICE_UPDATE_CC): Define to nothing.
4413 * config/v850/v850.md: Remove block comment on cc0 handling
4414 Remove "cc" attribute from all patterns. Remove cc_status handling
4415 from all patterns. Minor formatting fixes.
4416
4417 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4418
4419 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
4420 (cortex-a76.cortex-a55): Likewise.
4421 * config/aarch64/aarch64-tune.md: Regenerate.
4422 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
4423 cortex-a76.cortex-a55.
4424
4425 2018-06-27 Jeff Law <law@redhat.com>
4426
4427 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
4428 (MULTILIB_DIRNAMES): Similarly.
4429
4430 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
4431
4432 * gimple.h (gimple_return_retbnd): Delete.
4433 (gimple_return_set_retbnd): Likewise.
4434 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
4435 gimple_return_set_retbnd.
4436 * gimple-pretty-print.c (dump_gimple_return): Remove call to
4437 gimple_return_retbnd and adjust.
4438 * tree-inline.h (struct copy_body_data): Remove retbnd field.
4439 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
4440 Explicitly return NULL in a couple more cases. Move assertion
4441 on debug statements and remove unreachable code.
4442 (reset_debug_binding): Do not test id->retbnd.
4443 (expand_call_inline): Do not set it.
4444
4445 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4446
4447 * configure.ac: Add --disable-gcov option.
4448 * configure: Regenerate.
4449 * Makefile.in: Honour @enable_gcov@.
4450 * doc/install.texi: Document --disable-gcov.
4451
4452 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4453
4454 * config/arm/arm-cpus.in (cortex-a76): New entry.
4455 (cortex-a76.cortex-a55): Likewise.
4456 * config/arm/arm-tables.opt: Regenerate.
4457 * config/arm/arm-tune.md: Likewise.
4458 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
4459 * doc/invoke.texi (ARM Options): Document cortex-a76 and
4460 cortex-a76.cortex-a55.
4461
4462 2018-06-27 Tamar Christina <tamar.christina@arm.com>
4463
4464 PR target/85769
4465 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
4466
4467 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
4468
4469 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
4470 comment.
4471 (EPILOGUE_USES): Likewise.
4472
4473 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
4474
4475 * tree-inline.c (remap_location): New function extracted from...
4476 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
4477 (copy_phis_for_bb): ...here. Call remap_location.
4478 (copy_cfg_body): Adjust call to copy_edges_for_bb.
4479
4480 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4481
4482 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
4483 unaligned vsx for 16B memset.
4484
4485 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
4486
4487 PR target/86285
4488 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
4489 ieee128_float_type_node to long_double_type_node unless
4490 TARGET_LONG_DOUBLE_128 is set.
4491
4492 2018-06-26 David Malcolm <dmalcolm@redhat.com>
4493
4494 * cfgloop.c (get_loop_location): Convert return type from
4495 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
4496 by implicit construction from rtx_insn *, and using
4497 dump_user_location_t::from_function_decl for the fallback case.
4498 * cfgloop.h (get_loop_location): Convert return type from
4499 location_t to dump_user_location_t.
4500 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
4501 dump_printf_loc to pass in a dump_location_t rather than a
4502 location_t, via the gimple stmt.
4503 * coverage.c (get_coverage_counts): Update calls to
4504 dump_printf_loc to pass in dump_location_t rather than a
4505 location_t.
4506 * doc/optinfo.texi (Dump types): Convert example of
4507 dump_printf_loc from taking "locus" to taking "insn". Update
4508 description of the "_loc" calls to cover dump_location_t.
4509 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
4510 "selftest.h".
4511 (dump_user_location_t::dump_user_location_t): New constructors,
4512 from gimple *stmt and rtx_insn *.
4513 (dump_user_location_t::from_function_decl): New function.
4514 (dump_loc): Make static.
4515 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
4516 const dump_location_t &.
4517 (dump_generic_expr_loc): Delete.
4518 (dump_printf_loc): Convert param "loc" from location_t to
4519 const dump_location_t &.
4520 (selftest::test_impl_location): New function.
4521 (selftest::dumpfile_c_tests): New function.
4522 * dumpfile.h: Include "profile-count.h".
4523 (class dump_user_location_t): New class.
4524 (struct dump_impl_location_t): New struct.
4525 (class dump_location_t): New class.
4526 (dump_printf_loc): Convert 2nd param from source_location to
4527 const dump_location_t &.
4528 (dump_generic_expr_loc): Delete.
4529 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
4530 const dump_location_t &.
4531 * gimple-fold.c (fold_gimple_assign): Update call to
4532 dump_printf_loc to pass in a dump_location_t rather than a
4533 location_t, via the gimple stmt.
4534 (gimple_fold_call): Likewise.
4535 * gimple-loop-interchange.cc
4536 (loop_cand::analyze_iloop_reduction_var): Update for change to
4537 check_reduction_path.
4538 (tree_loop_interchange::interchange): Update for change to
4539 find_loop_location.
4540 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
4541 change in return-type of find_loop_location.
4542 (graphite_regenerate_ast_isl): Likewise.
4543 * graphite-optimize-isl.c (optimize_isl): Likewise.
4544 * graphite.c (graphite_transform_loops): Likewise.
4545 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
4546 pass in a dump_location_t rather than a location_t, via the
4547 gimple stmt.
4548 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4549 * ipa.c (walk_polymorphic_call_targets): Likewise.
4550 * loop-unroll.c (report_unroll): Convert "locus" param from
4551 location_t to dump_location_t.
4552 (decide_unrolling): Update for change to get_loop_location's
4553 return type.
4554 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
4555 location_t to dump_user_location_t.
4556 (grid_find_single_omp_among_assignments_1): Updates calls to
4557 dump_printf_loc to pass in a dump_location_t rather than a
4558 location_t, via the gimple stmt.
4559 (grid_parallel_clauses_gridifiable): Convert "tloc" from
4560 location_t to dump_location_t. Updates calls to dump_printf_loc
4561 to pass in a dump_location_t rather than a location_t, via the
4562 gimple stmt.
4563 (grid_inner_loop_gridifiable_p): Likewise.
4564 (grid_dist_follows_simple_pattern): Likewise.
4565 (grid_gfor_follows_tiling_pattern): Likewise.
4566 (grid_target_follows_gridifiable_pattern): Likewise.
4567 (grid_attempt_target_gridification): Convert initialization
4568 of local "grid" from memset to zero-initialization; FIXME: does
4569 this require C++11? Update call to dump_printf_loc to pass in a
4570 optinfo_location rather than a location_t, via the gimple stmt.
4571 * profile.c (read_profile_edge_counts): Updates call to
4572 dump_printf_loc to pass in a dump_location_t rather than a
4573 location_t
4574 (compute_branch_probabilities): Likewise.
4575 * selftest-run-tests.c (selftest::run_tests): Call
4576 dumpfile_c_tests.
4577 * selftest.h (dumpfile_c_tests): New decl.
4578 * tree-loop-distribution.c (pass_loop_distribution::execute):
4579 Update for change in return type of find_loop_location.
4580 * tree-parloops.c (parallelize_loops): Likewise.
4581 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
4582 "locus" from location_t to dump_user_location_t.
4583 (canonicalize_loop_induction_variables): Likewise.
4584 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
4585 for change in return type of find_loop_location.
4586 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
4587 to dump_printf_loc to pass in a dump_location_t rather than a
4588 location_t, via the stmt.
4589 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
4590 Likewise.
4591 * tree-vect-loop-manip.c (find_loop_location): Convert return
4592 type from source_location to dump_user_location_t.
4593 (vect_do_peeling): Update for above change.
4594 (vect_loop_versioning): Update for change in type of
4595 vect_location.
4596 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
4597 from location_t to dump_user_location_t.
4598 (vect_estimate_min_profitable_iters): Update for change in type
4599 of vect_location.
4600 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
4601 location_t to dump_location_t.
4602 (vect_slp_bb): Update for change in type of vect_location.
4603 * tree-vectorizer.c (vect_location): Convert from source_location
4604 to dump_user_location_t.
4605 (try_vectorize_loop_1): Update for change in vect_location's type.
4606 (vectorize_loops): Likewise.
4607 (increase_alignment): Likewise.
4608 * tree-vectorizer.h (vect_location): Convert from source_location
4609 to dump_user_location_t.
4610 (find_loop_location): Convert return type from source_location to
4611 dump_user_location_t.
4612 (check_reduction_path): Convert 1st param from location_t to
4613 dump_user_location_t.
4614 * value-prof.c (check_counter): Update call to dump_printf_loc to
4615 pass in a dump_user_location_t rather than a location_t; update
4616 call to error_at for change in type of "locus".
4617 (check_ic_target): Update call to dump_printf_loc to
4618 pass in a dump_user_location_t rather than a location_t, via the
4619 call_stmt.
4620
4621 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
4622
4623 * config/s390/s390.h (enum processor_flags): Do not use
4624 default tune parameter when -march was specified.
4625
4626 2018-06-26 Jakub Jelinek <jakub@redhat.com>
4627
4628 PR target/86314
4629 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
4630 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
4631 operands.
4632
4633 2018-06-26 Richard Biener <rguenther@suse.de>
4634
4635 PR tree-optimization/86287
4636 PR bootstrap/86316
4637 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
4638 (vect_analyze_loop): Initialize n_stmts.
4639
4640 2018-06-26 Richard Biener <rguenther@suse.de>
4641
4642 PR middle-end/86271
4643 * fold-const.c (fold_convertible_p): Pointer extension
4644 isn't valid.
4645
4646 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4647
4648 PR debug/86064
4649 * dwarf2out.c (loc_list_has_views): Adjust comments.
4650 (dw_loc_list): Split single cross-partition range with
4651 nonzero locview.
4652
4653 2018-06-25 Jeff Law <law@redhat.com>
4654
4655 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4656 on -mbig-switch by default.
4657
4658 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4659 test.
4660 (const_float_0_operand): Remove unused predicate.
4661 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4662 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4663 (recipsf2): New expander. Original pattern now called
4664 (recipsf2_insn).
4665 (recipdf2, recipdf2_insn): Similarly.
4666 (rsqrtsf2, rsqrtsf2_insn): Similarly
4667 (rsqrtdf2, rsqrtdf2_insn): Similarly
4668
4669 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4670
4671 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4672 Simplify logic for FreeBSD (twice).
4673
4674 2018-06-25 Martin Sebor <msebor@redhat.com>
4675
4676 PR tree-optimization/86204
4677 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4678 a strnlen result if it's less than the length of the string.
4679
4680 2018-06-25 Martin Sebor <msebor@redhat.com>
4681
4682 PR tree-optimization/85700
4683 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4684 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4685 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4686
4687 2018-06-25 Martin Sebor <msebor@redhat.com>
4688
4689 * doc/extend.texi (Zero-length arrays): Update and clarify.
4690
4691 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4692
4693 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4694 added IEEE/IBM long double multilib support on PowerPC little
4695 endian Linux systems.
4696 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4697 (MULTILIB_DEFAULTS): Likewise.
4698 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4699 Likewise.
4700 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4701 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4702 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4703
4704 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4705
4706 PR middle-end/86311
4707 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4708 (REORDER_45): Likewise.
4709
4710 2018-06-25 Jeff Law <law@redhat.com>
4711
4712 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4713 dividend to 32 bits. Adjust length.
4714 (udivmodhi4): Cleanup output template. Fix length.
4715
4716 2018-06-25 Carl Love <cel@us.ibm.com>
4717
4718 * config/rs6000/vsx.md: Change word selector to prefered location.
4719
4720 2018-06-25 Richard Biener <rguenther@suse.de>
4721
4722 PR tree-optimization/86304
4723 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4724 epilogue-if-converted loops as well.
4725
4726 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4727
4728 * lto-section-out.c (lto_begin_section): Do not print section
4729 name for noaddr and unnumbered dumps.
4730
4731 2018-06-25 Richard Biener <rguenther@suse.de>
4732
4733 * tree-vectorizer.h (struct vec_info_shared): New structure
4734 with parts split out from struct vec_info and loop_nest from
4735 struct _loop_vec_info.
4736 (struct vec_info): Adjust accordingly.
4737 (struct _loop_vec_info): Likewise.
4738 (LOOP_VINFO_LOOP_NEST): Adjust.
4739 (LOOP_VINFO_DATAREFS): Likewise.
4740 (LOOP_VINFO_DDRS): Likewise.
4741 (struct _bb_vec_info): Likewise.
4742 (BB_VINFO_DATAREFS): Likewise.
4743 (BB_VINFO_DDRS): Likewise.
4744 (struct _stmt_vec_info): Add dr_aux member.
4745 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4746 (DR_MISALIGNMENT_UNINITIALIZED): New.
4747 (set_dr_misalignment): Adjust.
4748 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4749 (vect_analyze_loop): Adjust prototype.
4750 (vect_analyze_loop_form): Likewise.
4751 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4752 Compute dependences lazily.
4753 (vect_record_base_alignments): Use shared datarefs/ddrs.
4754 (vect_verify_datarefs_alignment): Likewise.
4755 (vect_analyze_data_refs_alignment): Likewise.
4756 (vect_analyze_data_ref_accesses): Likewise.
4757 (vect_analyze_data_refs): Likewise.
4758 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4759 constructor parameter for shared part.
4760 (vect_analyze_loop_form): Pass in shared part and adjust.
4761 (vect_analyze_loop_2): Pass in storage for the number of
4762 stmts. Move loop nest finding to the caller. Compute
4763 datarefs lazily.
4764 (vect_analyze_loop): Pass in shared part.
4765 (vect_transform_loop): Verify shared datarefs are unchanged.
4766 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4767 constructor parameter for shared part.
4768 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4769 (vect_slp_bb): Verify shared datarefs are unchanged before
4770 transform.
4771 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4772 change.
4773 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4774 DR_MISALIGNMENT_UNINITIALIZED.
4775 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4776 parameter for shared part.
4777 (vec_info::~vec_info): Adjust.
4778 (vec_info_shared::vec_info_shared): New.
4779 (vec_info_shared::~vec_info_shared): Likewise.
4780 (vec_info_shared::save_datarefs): Likewise.
4781 (vec_info_shared::check_datarefs): Likewise.
4782 (try_vectorize_loop_1): Construct shared part live for analyses
4783 of a single loop for multiple vector sizes.
4784 * tree-parloops.c (gather_scalar_reductions): Adjust.
4785
4786 2018-06-25 Richard Biener <rguenther@suse.de>
4787
4788 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4789 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4790 (vect_analyze_data_refs): Remove similar code from here and
4791 simplify accordingly.
4792
4793 2018-06-25 Richard Biener <rguenther@suse.de>
4794
4795 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4796 for reverse storage order accesses rather than asserting
4797 they cannot happen here.
4798
4799 2018-06-25 Tom de Vries <tdevries@suse.de>
4800
4801 PR debug/86257
4802 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4803 Use data16 instead of .byte for insn prefix.
4804
4805 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4806
4807 PR C++/86082
4808 * parser.c (make_char_string_pack): Pass this literal chars
4809 through cpp_interpret_string.
4810 (cp_parser_userdef_numeric_literal): Check the result of
4811 make_char_string_pack.
4812
4813 2018-06-24 Maya Rashish <coypu@sdf.org>
4814
4815 * ginclude/stddef.h: Simplify conditions around avoiding
4816 re-definition of __size_t.
4817
4818 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4819
4820 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4821 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4822
4823 2018-06-22 Maya Rashish <coypu@sdf.org>
4824
4825 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4826 made to OpenBSD and NetBSD through the years.
4827
4828 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4829
4830 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4831 behavior of vec_pack (vector double, vector double) to match
4832 behavior of vec_float2 (vector double, vector double).
4833
4834 2018-06-22 Olivier Hainque <hainque@adacore.com>
4835
4836 * gimplify.c (gimplify_function_tree): Prevent creation
4837 of a trampoline for the address of the current function
4838 passed to entry/exit instrumentation hooks.
4839
4840 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4841
4842 PR target/86222
4843 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4844 correctly.
4845
4846 2018-06-22 Martin Liska <mliska@suse.cz>
4847
4848 PR tree-optimization/86263
4849 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4850 Bail out if is_enabled is false.
4851 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4852 New declaration.
4853 (jump_table_cluster::is_enabled): New function.
4854
4855 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4856
4857 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4858 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4859 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4860 (lto_input_ts_binfo_tree_pointers): Likewise.
4861 * tree-streamer-out.c (streamer_write_tree_bitfields,
4862 write_ts_binfo_tree_pointers): Likewise.
4863 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4864
4865 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4866
4867 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4868
4869 2018-06-22 Martin Liska <mliska@suse.cz>
4870
4871 * symbol-summary.h (get): Make it pure and inline move
4872 functionality from ::get function.
4873 (get): Remove and inline into ::get and ::get_create.
4874 (get_create): Move code from ::get function.
4875
4876 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4877
4878 PR target/85994
4879 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4880 -x assembler-with-cpp.
4881
4882 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4883
4884 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4885 _FILE_OFFSET_BITS=64 for C++.
4886
4887 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4888
4889 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4890 conversion insn that shows up when pr85657-3.c is compiled using
4891 IEEE 128-bit long double.
4892 (neg<mode>2_internal): Use the correct mode to check whether the
4893 mode is IBM extended.
4894 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4895 multiply and divide external functions from being created more
4896 than once.
4897
4898 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4899
4900 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4901 functions.
4902 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4903 the edge can be forwarded.
4904 (cfg_layout_merge_blocks): Likewise.
4905
4906 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4907
4908 * except.c (finish_eh_generation): Commit edge insertions only after
4909 the EH edges have been redirected from post-landing to landing pads.
4910
4911 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4912
4913 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4914 create_tmp_var_for to create the FRAME decl.
4915 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4916
4917 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4918
4919 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4920 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4921 debug statement when resetting its value.
4922 (expand_call_inline): Copy the locus of the call onto the assignment
4923 of the return value, if any. Use local variable in more cases.
4924
4925 2018-06-21 Martin Liska <mliska@suse.cz>
4926
4927 * ipa-pure-const.c (propagate_nothrow): Use
4928 funct_state_summaries->get.
4929 (dump_malloc_lattice): Likewise.
4930 (propagate_malloc): Likewise.
4931
4932 2018-06-21 Richard Biener <rguenther@suse.de>
4933
4934 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4935 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4936 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4937 comment.
4938 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4939 BLOCK_ABSTRACT_ORIGIN unconditionally.
4940
4941 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4942
4943 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4944 deleting it.
4945 * ipa-reference.c (ipa_reference_c_finalize): Delete
4946 ipa_ref_opt_sum_summaries and set it to NULL.
4947
4948 2018-06-21 Tom de Vries <tdevries@suse.de>
4949
4950 PR tree-optimization/85859
4951 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4952 test with comment from bb_no_side_effects_p.
4953
4954 2018-06-21 Richard Biener <rguenther@suse.de>
4955
4956 PR tree-optimization/86232
4957 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4958 max for constant niter.
4959
4960 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4961
4962 * config/aarch64/aarch64-simd.md
4963 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4964
4965 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4966
4967 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4968 Make opernads of the unspec commutative.
4969
4970 2018-06-21 Richard Biener <rguenther@suse.de>
4971
4972 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4973 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4974 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4975 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4976 NULL DR_STEP.
4977 (vect_record_base_alignments): Do not record base alignment
4978 for gathers or scatters.
4979 (vect_compute_data_ref_alignment): Drop return value that is always
4980 true. Bail out early for gathers or scatters.
4981 (vect_enhance_data_refs_alignment): Bail out early for gathers
4982 or scatters.
4983 (vect_find_same_alignment_drs): Likewise.
4984 (vect_analyze_data_refs_alignment): Remove dead code.
4985 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4986 (vect_analyze_data_refs): For possible gathers or scatters do
4987 not create an alternate DR, just check their possible validity
4988 and mark them. Adjust DECL_NONALIASED handling to not rely
4989 on DR_BASE_ADDRESS.
4990 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4991 update inits of gathers or scatters.
4992 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4993 Also copy gather/scatter flag to pattern vinfo.
4994
4995 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4996
4997 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4998 behavior of vec_packsu (vector unsigned long long, vector unsigned
4999 long long) to match behavior of vec_packs with same signature.
5000
5001 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
5002 Thomas Schwinge <thomas@codesourcery.com>
5003 Cesar Philippidis <cesar@codesourcery.com>
5004
5005 * gimplify.c (gimplify_scan_omp_clauses): Add support for
5006 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5007 (gimplify_adjust_omp_clauses): Likewise.
5008 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5009 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5010 (gimplify_omp_target_update): Update handling of acc update and
5011 enter/exit data.
5012 * omp-low.c (install_var_field): Remove unused parameter
5013 base_pointers_restrict.
5014 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5015 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5016 FINALIZE}
5017 (omp_target_base_pointers_restrict_p): Delete.
5018 (scan_omp_target): Update call to scan_sharing_clauses.
5019 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5020 FINALIZE}.
5021 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5022 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5023 (convert_local_omp_clauses): Likewise.
5024 * tree-pretty-print.c (dump_omp_clause): Likewise.
5025 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
5026 FINALIZE}.
5027 (omp_clause_code_name): Likewise.
5028
5029 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5030
5031 PR debug/86194
5032 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5033 be narrowed.
5034
5035 PR tree-optimization/86231
5036 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
5037 anti-range don't overwrite *vr0min before using it to compute *vr0max.
5038
5039 2018-06-20 Tom de Vries <tdevries@suse.de>
5040
5041 PR tree-optimization/86097
5042 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5043 iv type if signedness of iv type is not the same as that of *nit.
5044
5045 2018-06-20 Jakub Jelinek <jakub@redhat.com>
5046
5047 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
5048 EDGE_EH edges, verify they are all EDGE_EH.
5049
5050 2018-06-20 Maya Rashish <coypu@sdf.org>
5051
5052 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5053
5054 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5055
5056 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5057 * config/aarch64/aarch64.c (xgene1_tunings): Add
5058 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5059 (aarch64_mode_valid_for_sched_fusion_p):
5060 Allow 16-byte modes.
5061 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5062 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5063 128-bit modes.
5064 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5065 New pattern.
5066 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
5067 * config/aarch64/iterators.md (VQ2): New mode iterator.
5068
5069 2018-06-20 Martin Liska <mliska@suse.cz>
5070
5071 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5072 Change default ratio from 10 to 8.
5073
5074 2018-06-20 Martin Liska <mliska@suse.cz>
5075
5076 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5077 New.
5078 (bit_test_cluster::find_bit_tests): Likewise.
5079 (switch_decision_tree::analyze_switch_statement): Find clusters.
5080 * tree-switch-conversion.h (struct jump_table_cluster): Document
5081 hierarchy.
5082
5083 2018-06-20 Martin Liska <mliska@suse.cz>
5084
5085 * tree-switch-conversion.c (switch_conversion::collect):
5086 Record m_uniq property.
5087 (switch_conversion::expand): Bail out for special conditions.
5088 (group_cluster::~group_cluster): New.
5089 (group_cluster::group_cluster): Likewise.
5090 (group_cluster::dump): Likewise.
5091 (jump_table_cluster::emit): New.
5092 (switch_decision_tree::fix_phi_operands_for_edges): New.
5093 (struct case_node): Remove struct.
5094 (jump_table_cluster::can_be_handled): New.
5095 (case_values_threshold): Moved to header.
5096 (reset_out_edges_aux): Likewise.
5097 (jump_table_cluster::is_beneficial): New.
5098 (bit_test_cluster::can_be_handled): Likewise.
5099 (add_case_node): Remove.
5100 (bit_test_cluster::is_beneficial): New.
5101 (case_bit_test::cmp): New.
5102 (bit_test_cluster::emit): New.
5103 (expand_switch_as_decision_tree_p): Remove.
5104 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
5105 (fix_phi_operands_for_edge): Likewise.
5106 (switch_decision_tree::analyze_switch_statement): New.
5107 (compute_cases_per_edge): Move ...
5108 (switch_decision_tree::compute_cases_per_edge): ... here.
5109 (try_switch_expansion): Likewise.
5110 (switch_decision_tree::try_switch_expansion): Likewise.
5111 (record_phi_operand_mapping): Likewise.
5112 (switch_decision_tree::record_phi_operand_mapping): Likewise.
5113 (emit_case_decision_tree): Likewise.
5114 (switch_decision_tree::emit): Likewise.
5115 (balance_case_nodes): Likewise.
5116 (switch_decision_tree::balance_case_nodes): Likewise.
5117 (dump_case_nodes): Likewise.
5118 (switch_decision_tree::dump_case_nodes): Likewise.
5119 (emit_jump): Likewise.
5120 (switch_decision_tree::emit_jump): Likewise.
5121 (emit_cmp_and_jump_insns): Likewise.
5122 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
5123 (emit_case_nodes): Likewise.
5124 (switch_decision_tree::emit_case_nodes): Likewise.
5125 (conditional_probability): Remove.
5126 * tree-switch-conversion.h (enum cluster_type): New.
5127 (PRINT_CASE): New.
5128 (struct cluster): Likewise.
5129 (cluster::cluster): Likewise.
5130 (struct simple_cluster): Likewise.
5131 (simple_cluster::simple_cluster): Likewise.
5132 (struct group_cluster): Likewise.
5133 (struct jump_table_cluster): Likewise.
5134 (struct bit_test_cluster): Likewise.
5135 (struct min_cluster_item): Likewise.
5136 (struct case_tree_node): Likewise.
5137 (case_tree_node::case_tree_node): Likewise.
5138 (jump_table_cluster::case_values_threshold): Likewise.
5139 (struct case_bit_test): Likewise.
5140 (struct switch_decision_tree): Likewise.
5141 (struct switch_conversion): Likewise.
5142 (switch_decision_tree::reset_out_edges_aux): Likewise.
5143
5144 2018-06-20 Martin Liska <mliska@suse.cz>
5145
5146 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
5147 (hoist_edge_and_branch_if_true): Likewise.
5148 (expand_switch_using_bit_tests_p): Likewise.
5149 (struct case_bit_test): Likewise.
5150 (case_bit_test_cmp): Likewise.
5151 (emit_case_bit_tests): Likewise.
5152 (switch_conversion::switch_conversion): New class.
5153 (struct switch_conv_info): Remove old struct.
5154 (collect_switch_conv_info): More to ...
5155 (switch_conversion::collect): ... this.
5156 (check_range): Likewise.
5157 (switch_conversion::check_range): Likewise.
5158 (check_all_empty_except_final): Likewise.
5159 (switch_conversion::check_all_empty_except_final): Likewise.
5160 (check_final_bb): Likewise.
5161 (switch_conversion::check_final_bb): Likewise.
5162 (create_temp_arrays): Likewise.
5163 (switch_conversion::create_temp_arrays): Likewise.
5164 (free_temp_arrays): Likewise.
5165 (gather_default_values): Likewise.
5166 (switch_conversion::gather_default_values): Likewise.
5167 (build_constructors): Likewise.
5168 (switch_conversion::build_constructors): Likewise.
5169 (constructor_contains_same_values_p): Likewise.
5170 (switch_conversion::contains_same_values_p): Likewise.
5171 (array_value_type): Likewise.
5172 (switch_conversion::array_value_type): Likewise.
5173 (build_one_array): Likewise.
5174 (switch_conversion::build_one_array): Likewise.
5175 (build_arrays): Likewise.
5176 (switch_conversion::build_arrays): Likewise.
5177 (gen_def_assigns): Likewise.
5178 (switch_conversion::gen_def_assigns): Likewise.
5179 (prune_bbs): Likewise.
5180 (switch_conversion::prune_bbs): Likewise.
5181 (fix_phi_nodes): Likewise.
5182 (switch_conversion::fix_phi_nodes): Likewise.
5183 (gen_inbound_check): Likewise.
5184 (switch_conversion::gen_inbound_check): Likewise.
5185 (process_switch): Use the newly created class.
5186 (switch_conversion::expand): New.
5187 (switch_conversion::~switch_conversion): New.
5188 * tree-switch-conversion.h: New file.
5189
5190 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5191
5192 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
5193 tree-vect-patterns.c.
5194 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
5195 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
5196 (vect_recog_sad_pattern): Likewise.
5197 (vect_recog_widen_sum_pattern): Likewise.
5198 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
5199 (vect_recog_widen_shift_pattern): Remove the type_in argument.
5200 (vect_recog_rotate_pattern): Likewise.
5201 (vect_recog_mult_pattern): Likewise.
5202 (vect_recog_vector_vector_shift_pattern): Likewise.
5203 (vect_recog_divmod_pattern): Likewise.
5204 (vect_recog_mixed_size_cond_pattern): Likewise.
5205 (vect_recog_bool_pattern): Likewise.
5206 (vect_recog_mask_conversion_pattern): Likewise.
5207 (vect_try_gather_scatter_pattern): Likewise.
5208 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
5209 (vect_recog_over_widening_pattern): Likewise.
5210 (vect_recog_gather_scatter_pattern): Likewise.
5211 (vect_recog_func_ptr): Move from tree-vectorizer.h
5212 (vect_vect_recog_func_ptrs): Move further down the file.
5213 (vect_recog_func): Likewise. Remove the third argument.
5214 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
5215 (vect_pattern_recog_1): Expect the pattern function to do any
5216 necessary target tests. Also expect it to provide a vector type.
5217 Remove the type_in handling.
5218
5219 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5220
5221 * tree-vect-patterns.c (vect_pattern_detected): New function.
5222 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
5223 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
5224 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
5225 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
5226 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5227 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5228 (vect_recog_mask_conversion_pattern)
5229 (vect_try_gather_scatter_pattern): Likewise.
5230
5231 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5232
5233 * tree-vect-patterns.c (vect_get_internal_def): New function.
5234 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5235 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
5236 (search_type_for_mask_1): Use it.
5237
5238 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5239
5240 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5241 redundant WIDEN_SUM_EXPR handling.
5242 (vect_recog_sad_pattern): Likewise.
5243
5244 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5245
5246 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
5247 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
5248 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
5249 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
5250 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
5251
5252 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5253
5254 * tree-vect-stmts.c (vectorizable_call): Make sure that we
5255 use the stmt_vec_info of the original bb statement for the
5256 new zero assignment, even if the call is part of a pattern.
5257
5258 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5259
5260 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
5261 that the sequence is attached to the original statement rather
5262 than the pattern statement.
5263 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
5264 PATTERN_DEF_SEQ from the original statement rather than
5265 the main pattern statement.
5266 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
5267 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
5268 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
5269
5270 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
5271
5272 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
5273 definition statements before the early exit for statements that aren't
5274 live or relevant.
5275 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
5276 split out from...
5277 (vect_transform_loop): ...here. Process pattern definition
5278 statements without first checking whether the main pattern
5279 statement is live or relevant.
5280
5281 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5282
5283 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
5284 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
5285
5286 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
5287
5288 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
5289 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
5290 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
5291 (expand_block_compare): Change select_block_compare_mode call.
5292 (expand_strncmp_align_check): Use new functions, fix comment.
5293 (emit_final_str_compare_gpr): New function.
5294 (expand_strn_compare): Refactor and clean up code.
5295 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
5296
5297 2018-06-19 Tony Reix <tony.reix@atos.com>
5298 Damien Bergamini <damien.bergamini@atos.com>
5299 David Edelsohn <dje.gcc@gmail.com>
5300
5301 * collect2.c (static_obj): New variable.
5302 (static_libs): New variable.
5303 (is_in_list): Uncomment declaration.
5304 (main): Track AIX libraries linked statically.
5305 (is_in_list): Uncomment definition.
5306 (scan_prog_file): Don't add AIX shared libraries initializer
5307 to constructor list if linking statically.
5308
5309 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
5310
5311 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
5312 constant.
5313 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
5314
5315 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
5316
5317 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
5318 blocks.
5319
5320 2018-06-19 Martin Liska <mliska@suse.cz>
5321
5322 * config/i386/i386.c (ix86_can_inline_p): Do not use
5323 ipa_fn_summaries::get_create.
5324 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
5325 get.
5326 (devirtualization_time_bonus): Likewise.
5327 (ipcp_propagate_stage): Likewise.
5328 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5329 (edge_set_predicate): Likewise.
5330 (evaluate_conditions_for_known_args): Likewise.
5331 (evaluate_properties_for_edge): Likewise.
5332 (ipa_call_summary::reset): Tranform to ...
5333 (ipa_call_summary::~ipa_call_summary): ... this.
5334 (ipa_fn_summary::reset): Transform to ...
5335 (ipa_fn_summary::~ipa_fn_summary): ... this.
5336 (ipa_fn_summary_t::remove): Rename to ...
5337 (ipa_fn_summary_t::remove_callees): ... this.
5338 (ipa_fn_summary_t::duplicate): Use placement new
5339 instead of memory copy.
5340 (ipa_call_summary_t::duplicate): Likewise.
5341 (ipa_call_summary_t::remove): Remove.
5342 (dump_ipa_call_summary): Change get_create to get.
5343 (ipa_dump_fn_summary): Dump only when summary exists.
5344 (analyze_function_body): Use symbol_summary::get instead
5345 of get_create.
5346 (compute_fn_summary): Likewise.
5347 (estimate_edge_devirt_benefit): Likewise.
5348 (estimate_edge_size_and_time): Likewise.
5349 (inline_update_callee_summaries): Likewise.
5350 (remap_edge_change_prob): Likewise.
5351 (remap_edge_summaries): Likewise.
5352 (ipa_merge_fn_summary_after_inlining): Likewise.
5353 (write_ipa_call_summary): Likewise.
5354 (ipa_fn_summary_write): Likewise.
5355 (ipa_free_fn_summary): Likewise.
5356 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
5357 (struct ipa_call_summary): Likewise.
5358 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
5359 of get_create.
5360 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
5361 (estimate_size_after_inlining): Likewise.
5362 (estimate_growth): Likewise.
5363 (growth_likely_positive): Likewise.
5364 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5365 (inline_call): Likewise.
5366 * ipa-inline.c (caller_growth_limits): Likewise.
5367 (can_inline_edge_p): Likewise.
5368 (can_inline_edge_by_limits_p): Likewise.
5369 (compute_uninlined_call_time): Likewise.
5370 (compute_inlined_call_time): Likewise.
5371 (want_inline_small_function_p): Likewise.
5372 (edge_badness): Likewise.
5373 (update_caller_keys): Likewise.
5374 (update_callee_keys): Likewise.
5375 (inline_small_functions): Likewise.
5376 (inline_to_all_callers_1): Likewise.
5377 (dump_overall_stats): Likewise.
5378 (early_inline_small_functions): Likewise.
5379 (early_inliner): Likewise.
5380 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5381 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5382 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5383 * ipa-split.c (execute_split_functions): Likewise.
5384 * symbol-summary.h: Likewise.
5385 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5386
5387 2018-06-19 Richard Biener <rguenther@suse.de>
5388
5389 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
5390 (vectorize_loops): ... here. Fix dbgcnt handling.
5391 (try_vectorize_loop): Wrap try_vectorize_loop_1.
5392
5393 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
5394
5395 PR target/86197
5396 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
5397 ieee128 argument takes up only one (vector) register, not two (floating
5398 point) registers.
5399
5400 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
5401
5402 * gimplify.c (gimplify_init_constructor): Really never clear for an
5403 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
5404
5405 2018-06-19 Richard Biener <rguenther@suse.de>
5406
5407 PR tree-optimization/86179
5408 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
5409 after failed recognition.
5410
5411 2018-06-18 Martin Sebor <msebor@redhat.com>
5412
5413 PR middle-end/85602
5414 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
5415 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
5416 Handle integer subtraction.
5417 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
5418 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
5419
5420 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5421
5422 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
5423 param from rtx to rtx_insn *.
5424 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
5425 param.
5426 (frv_ifcvt_modify_insn): Likwise.
5427 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
5428 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
5429 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
5430 as_a <rtx_insn *> cast to local "unprotected_region" once
5431 it's been established that it's not NULL or pc_rtx.
5432 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
5433 param "sethi" from rtx to rtx_insn *.
5434 (nds32_group_float_insns): Likewise for param "insn".
5435 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
5436 param.
5437 (vax_output_int_subtract): Likewise.
5438 * config/vax/vax.c (vax_output_int_add): Likewise for param
5439 "insn".
5440 (vax_output_int_subtract): Likewise.
5441 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
5442 (emit_pattern_after): Likewise for param "after".
5443 (emit_insn_after): Likewise.
5444 (emit_jump_insn_after): Likewise.
5445 (emit_call_insn_after): Likewise.
5446 (emit_debug_insn_after): Likewise.
5447 (emit_pattern_before): Likewise for param "before".
5448 (emit_insn_before): Likewise.
5449 (emit_jump_insn_before): Likewise.
5450 * final.c (get_insn_template): Likewise for param "insn", removing
5451 a cast.
5452 * output.h (get_insn_template): Likewise for 2nd param.
5453 * rtl.h (emit_insn_before): Likewise.
5454 (emit_jump_insn_before): Likewise.
5455 (emit_debug_insn_before_noloc): Likewise.
5456 (emit_insn_after): Likewise.
5457 (emit_jump_insn_after): Likewise.
5458 (emit_call_insn_after): Likewise.
5459 (emit_debug_insn_after): Likewise.
5460 (set_insn_deleted): Likewise for param.
5461
5462 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
5463
5464 PR target/85358
5465 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
5466 floating point modes, so that IFmode is numerically greater than
5467 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
5468 to declare the ordering. This prevents IFmode from being
5469 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
5470 machine. Include rs6000-modes.h to share the fractional values
5471 between genmodes* and the rest of the compiler.
5472 (IFmode): Likewise.
5473 (KFmode): Likewise.
5474 (TFmode): Likewise.
5475 * config/rs6000/rs6000-modes.h: New file.
5476 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
5477 meaning of rs6000_long_double_size so that 126..128 selects an
5478 appropriate 128-bit floating point type.
5479 (rs6000_option_override_internal): Likewise.
5480 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
5481 (TARGET_LONG_DOUBLE_128): Change the meaning of
5482 rs6000_long_double_size so that 126..128 selects an appropriate
5483 128-bit floating point type.
5484 (LONG_DOUBLE_TYPE_SIZE): Update comment.
5485 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
5486 source and destination to match the standard usage.
5487 (truncifkf2): Likewise.
5488 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
5489 ISA 2.07 to use an explicit clobber, instead of passing in a
5490 temporary.
5491 (copysign<mode>3_soft): Likewise.
5492
5493 2018-06-18 David Malcolm <dmalcolm@redhat.com>
5494
5495 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5496 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
5497 (vect_slp_analyze_instance_dependence): Likewise.
5498 (vect_enhance_data_refs_alignment): Likewise.
5499 (vect_analyze_data_refs_alignment): Likewise.
5500 (vect_slp_analyze_and_verify_instance_alignment
5501 (vect_analyze_data_ref_accesses): Likewise.
5502 (vect_prune_runtime_alias_test_list): Likewise.
5503 (vect_analyze_data_refs): Likewise.
5504 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
5505 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
5506 (vect_analyze_scalar_cycles_1): Likewise.
5507 (vect_get_loop_niters): Likewise.
5508 (vect_analyze_loop_form_1): Likewise.
5509 (vect_update_vf_for_slp): Likewise.
5510 (vect_analyze_loop_operations): Likewise.
5511 (vect_analyze_loop): Likewise.
5512 (vectorizable_induction): Likewise.
5513 (vect_transform_loop): Likewise.
5514 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
5515 * tree-vect-slp.c (vect_analyze_slp): Likewise.
5516 (vect_make_slp_decision): Likewise.
5517 (vect_detect_hybrid_slp): Likewise.
5518 (vect_slp_analyze_operations): Likewise.
5519 (vect_slp_bb): Likewise.
5520 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
5521 (vectorizable_bswap): Likewise.
5522 (vectorizable_call): Likewise.
5523 (vectorizable_simd_clone_call): Likewise.
5524 (vectorizable_conversion): Likewise.
5525 (vectorizable_assignment): Likewise.
5526 (vectorizable_shift): Likewise.
5527 (vectorizable_operation): Likewise.
5528 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
5529
5530 2018-06-18 Martin Sebor <msebor@redhat.com>
5531
5532 PR tree-optimization/81384
5533 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
5534 * builtins.c (expand_builtin_strnlen): New function.
5535 (expand_builtin): Call it.
5536 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
5537 * builtins.def (BUILT_IN_STRNLEN): New.
5538 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
5539 Warn for bounds in excess of maximum object size.
5540 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
5541 single-value ranges. Handle strnlen.
5542 (handle_builtin_strlen): Handle strnlen.
5543 (strlen_check_and_optimize_stmt): Same.
5544 * doc/extend.texi (Other Builtins): Document strnlen.
5545
5546 2018-06-18 Maya Rashish <coypu@sdf.org>
5547
5548 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
5549 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
5550 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
5551
5552 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
5553 here to ...
5554 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
5555
5556 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5557
5558 * tree.c (escaped_string::escape): Replace cast to char * by
5559 const_cast<char *> (unescaped).
5560
5561 2018-06-18 Nick Clifton <nickc@redhat.com>
5562
5563 PR 84195
5564 * tree.c (escaped_string): New class. Converts an unescaped
5565 string into its escaped equivalent.
5566 (warn_deprecated_use): Use the new class to convert the
5567 deprecation message, if present.
5568 (test_escaped_strings): New self test.
5569 (test_c_tests): Add test_escaped_strings.
5570 * doc/extend.texi (deprecated): Add a note that the
5571 deprecation message is affected by the -fmessage-length
5572 option, and that control characters will be escaped.
5573 (#pragma GCC error): Document this pragma.
5574 (#pragma GCC warning): Likewise.
5575 * doc/invoke.texi (-fmessage-length): Document this option's
5576 effect on the #warning and #error preprocessor directives and
5577 the deprecated attribute.
5578
5579 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
5580
5581 * tree.c (decl_value_expr_lookup): Revert latest change.
5582 (decl_value_expr_insert): Likewise.
5583
5584 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
5585
5586 * gimplify.c (nonlocal_vlas): Delete.
5587 (nonlocal_vla_vars): Likewise.
5588 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
5589 referenced VLAs.
5590 (gimplify_body): Do not create and destroy nonlocal_vlas.
5591 * tree-nested.c: Include diagnostic.h.
5592 (use_pointer_in_frame): Tweak.
5593 (lookup_field_for_decl): Add assertion and declare the transformation.
5594 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
5595 internal error when the reference is in a wrong context. Do not
5596 create a debug decl by default.
5597 (note_nonlocal_block_vlas): Delete.
5598 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
5599 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
5600 create a debug decl by default.
5601 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
5602 call is in a wrong context.
5603 (fixup_vla_decls): New function.
5604 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
5605 debug variables were created.
5606 * tree.c (decl_value_expr_lookup): Add checking assertion.
5607 (decl_value_expr_insert): Likewise.
5608
5609 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5610
5611 PR middle-end/82479
5612 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
5613 * tree-scalar-evolution.c (interpret_expr): Likewise.
5614 (expression_expensive_p): Likewise.
5615 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
5616 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
5617 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
5618 (ssa_defined_by_minus_one_stmt_p): New.
5619
5620 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
5621
5622 PR middle-end/64946
5623 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
5624 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
5625 * dojump.c (do_jump): Likewise.
5626 * expr.c (expand_expr_real_2): Check operand type's sign.
5627 * fold-const.c (const_unop): Handle ABSU_EXPR.
5628 (fold_abs_const): Likewise.
5629 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
5630 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
5631 (strip_sign_op_1): Likesise.
5632 * match.pd: Add new pattern to generate ABSU_EXPR.
5633 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
5634 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5635 * tree-eh.c (operation_could_trap_helper_p): Likewise.
5636 * tree-inline.c (estimate_operator_cost): Likewise.
5637 * tree-pretty-print.c (dump_generic_node): Likewise.
5638 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
5639 * tree.def (ABSU_EXPR): New.
5640
5641 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5642
5643 PR middle-end/86095
5644 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5645 documented as preserved for backward compatibility only.
5646 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5647
5648 PR rtl-optimization/86108
5649 * bb-reorder.c (create_forwarder_block): Renamed to ...
5650 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5651 jump from new landing pad to the second part.
5652 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5653 Adjust callers.
5654
5655 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5656
5657 PR middle-end/85878
5658 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5659 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5660 Only call store_expr for halves if the mode is the same.
5661
5662 PR middle-end/86123
5663 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5664 Fix up comment formatting.
5665
5666 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5667
5668 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5669 (typed_splay_tree::closure,
5670 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5671 (typed_splay_tree::typed_splay_tree,
5672 typed_splay_tree::operator =): Declared private.
5673 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5674 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5675 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5676 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5677 typed_splay_tree::splay_tree_splay,
5678 typed_splay_tree::splay_tree_foreach_helper,
5679 typed_splay_tree::splay_tree_insert,
5680 typed_splay_tree::splay_tree_remove,
5681 typed_splay_tree::splay_tree_lookup,
5682 typed_splay_tree::splay_tree_predecessor,
5683 typed_splay_tree::splay_tree_successor,
5684 typed_splay_tree::splay_tree_min,
5685 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5686 (typed_splay_tree::root, typed_splay_tree::comp,
5687 typed_splay_tree::delete_key,
5688 typed_splay_tree::delete_value): New data members.
5689 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5690 typed_splay_tree::remove.
5691
5692 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5693
5694 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5695 -mginv and -mno-ginv to the assembler.
5696 * config/mips/mips.opt (-mcrc): New option.
5697 (-mginv): Likewise.
5698 * doc/invoke.text (-mcrc): Document.
5699 (-mginv): Likewise.
5700
5701 2018-06-15 Nick Clifton <nickc@redhat.com>
5702
5703 PR 84195
5704 * tree.c (escaped_string): New class. Converts an unescaped
5705 string into its escaped equivalent.
5706 (warn_deprecated_use): Use the new class to convert the
5707 deprecation message, if present.
5708 (test_escaped_strings): New self test.
5709 (test_c_tests): Add test_escaped_strings.
5710 * doc/extend.texi (deprecated): Add a note that the
5711 deprecation message is affected by the -fmessage-length
5712 option, and that control characters will be escaped.
5713 (#pragma GCC error): Document this pragma.
5714 (#pragma GCC warning): Likewise.
5715 * doc/invoke.texi (-fmessage-length): Document this option's
5716 effect on the #warning and #error preprocessor directives and
5717 the deprecated attribute.
5718
5719 2018-06-15 Richard Biener <rguenther@suse.de>
5720
5721 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5722 here, also noting vector size used.
5723 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5724 size used in MSG_OPTIMIZED_LOCATIONS dump.
5725 (pass_slp_vectorize::execute): Adjust.
5726
5727 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5728
5729 PR target/85968
5730 * config/arc/arc.c (arc_return_address_register): Fix
5731 if-condition.
5732
5733 2018-06-15 Richard Biener <rguenther@suse.de>
5734
5735 PR middle-end/86159
5736 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5737 leave useless conversion stripping to force_gimple_operand_gsi.
5738 (gimplify_build2): Likewise.
5739 (gimplify_build1): Likewise.
5740
5741 2018-06-15 Richard Biener <rguenther@suse.de>
5742
5743 PR middle-end/86076
5744 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5745 before adjusting their block.
5746
5747 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5748
5749 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5750 multilibs for *-*-rtems*.
5751 * config/riscv/t-rtems: New file.
5752
5753 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5754
5755 PR middle-end/86122
5756 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5757 unsigned_type_for returns NULL.
5758
5759 PR target/85945
5760 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5761 subregs of multi-word pseudos unless the float mode has word size.
5762
5763 2018-06-14 Richard Biener <rguenther@suse.de>
5764
5765 PR middle-end/86139
5766 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5767 duplicate and harmful type_hash_canon.
5768 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5769
5770 2018-06-14 Richard Biener <rguenther@suse.de>
5771
5772 PR ipa/86124
5773 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5774 NULL cgraph_node.
5775
5776 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5777
5778 * config/rtems.h (STDINT_LONG32): Define.
5779
5780 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5781 Prachi Godbole <prachi.godbole@imgtec.com>
5782
5783 * config/mips/mips-cpus.def: Define P6600.
5784 * config/mips/mips-tables.opt: Regenerate.
5785 * config/mips/mips.c (mips_ucbranch_type): New enum.
5786 (mips_rtx_cost_data): Add support for P6600.
5787 (mips_issue_rate): Likewise.
5788 (mips_multipass_dfa_lookahead): Likewise.
5789 (mips_avoid_hazard): Likewise.
5790 (mips_reorg_process_insns): Likewise.
5791 (mips_classify_branch_p6600): New function.
5792 * config/mips/mips.h (TUNE_P6600): New define.
5793 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5794 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5795 * config/mips/mips.md: Include p6600.md.
5796 (processor): Add p6600.
5797 * config/mips/p6600.md: New file.
5798 * doc/invoke.texi: Add p6600 to supported architectures.
5799
5800 2018-06-13 Martin Sebor <msebor@redhat.com>
5801
5802 PR tree-optimization/86114
5803 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5804 of integer types.
5805 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5806
5807 2018-06-13 Richard Biener <rguenther@suse.de>
5808
5809 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5810 Properly set vector type of the intermediate stmt.
5811 * tree-vect-stmts.c (vectorizable_operation): The destination
5812 var always has vectype_out type.
5813
5814 2018-06-13 Jeff Law <law@redhat.com>
5815
5816 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5817 integer 0 for argument to print_rtl_with_bb.
5818 (rl78_reorg): Likewise.
5819
5820 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5821
5822 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5823 from rtx to rtx_insn *.
5824 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5825 "label".
5826 (add_sched_insns_for_speculation): Likewise for local "target",
5827 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5828 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5829 from rtx_insn ** to rtx_code_label **.
5830 (reorg_emit_nops): Likewise.
5831 (c6x_reorg): Likewise for local "call_labels".
5832 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5833 rtx to rtx_insn *.
5834 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5835 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5836 the loops over LABEL_REFS.
5837 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5838 braf_label.
5839 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5840 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5841 (split_branches): Strengthen local "olabel" from rtx to
5842 rtx_insn *, adding a safe_as_a cast.
5843 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5844 to "rtx_insn *".
5845 (add_insn_after): Likewise for first two params.
5846 (add_insn_before): Likewise.
5847 (remove_insn): Likewise for param.
5848 (emit_pattern_before_noloc): Likewise for second and third params.
5849 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5850 (emit_call_insn_before_noloc): Likewise.
5851 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5852 to "rtx_insn *".
5853 (emit_barrier_before): Likewise.
5854 (emit_label_before): Strengthen "label" param from "rtx" to
5855 "rtx_code_label *". Strengthen "before" param from "rtx" to
5856 "rtx_insn *".
5857 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5858 "rtx_insn *".
5859 (emit_pattern_after_noloc): Likewise.
5860 (emit_insn_after_noloc): Likewise.
5861 (emit_jump_insn_after_noloc): Likewise.
5862 (emit_call_insn_after_noloc): Likewise.
5863 (emit_debug_insn_after_noloc): Likewise.
5864 (emit_barrier_after): Likewise.
5865 (emit_label_after): Likewise for both params.
5866 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5867 "loc" param from "int" to "location_t".
5868 (emit_insn_after_setloc): Likewise.
5869 (emit_jump_insn_after_setloc): Likewise.
5870 (emit_call_insn_after_setloc): Likewise.
5871 (emit_debug_insn_after_setloc): Likewise.
5872 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5873 "loc" param from "int" to "location_t".
5874 (emit_pattern_before): Convert NULL_RTX to NULL.
5875 (emit_insn_before_setloc): Convert "loc" param from "int" to
5876 "location_t".
5877 (emit_jump_insn_before_setloc): Likewise.
5878 (emit_call_insn_before_setloc): Likewise.
5879 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5880 rtx_insn *. Convert "loc" param from "int" to "location_t".
5881 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5882 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5883 Convert 3rd param from "int" to "location_t".
5884 (emit_barrier_before, emit_barrier_after, next_real_insn):
5885 Strengthen param from rtx to rtx_insn *.
5886 (emit_label_before): Strengthen 1st param from "rtx" to
5887 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5888 "rtx_insn *".
5889 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5890 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5891 Strengthen 2nd param from "rtx" to "rtx_insn *".
5892 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5893 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5894 Likewise. Convert 3rd param from "int" to "location_t".
5895 (emit_label_after): Strengthen 1st param from "rtx" to
5896 "rtx_code_label *".
5897 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5898 "rtx_insn *".
5899 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5900 from "rtx" to "rtx_insn *".
5901
5902 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5903
5904 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5905 bodies streamed in with -Q.
5906 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5907 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5908 * gimple-streamer-out.c: Include gimple-pretty-print.h
5909 (output_bb): Dump stmts streamed.
5910 * lto-section-out.c: Include print-tree.h
5911 (lto_begin_section): Dump sections created.
5912 (lto_output_decl_index): Dump decl encoded.
5913 * lto-streamer-out.c: Include print-tree.h
5914 (create_output_block): Dump output block created.
5915 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5916 (output_function): Dump function output.
5917 (output_constructor): Dump constructor streamed.
5918 (write_global_stream): Output indexes encoded.
5919 (produce_asm_for_decls): Dump streams encoded.
5920 * lto-streamer.c (streamer_dump_file): New global var.
5921 * lto-streamer.h (streamer_dump_file): Declare.
5922 * passes.c (ipa_write_summaries): Initialize streamer dump.
5923 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5924 in.
5925
5926 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5927
5928 PR target/86048
5929 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5930 offsets for register save directives. Emit a second batch of save
5931 directives, if need be, when the function accesses prior frames.
5932
5933 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5934
5935 * config/arc/fpu.md (fmasf4): Force operand to register.
5936 (fnmasf4): Likewise.
5937
5938 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5939
5940 * config/arc/arc-protos.h (arc_pad_return): Remove.
5941 * config/arc/arc.c (machine_function): Remove force_short_suffix
5942 and size_reason.
5943 (arc_print_operand): Adjust printing of '&'.
5944 (arc_verify_short): Remove conditional printing of short suffix.
5945 (arc_final_prescan_insn): Remove reference to size_reason.
5946 (pad_return): New function.
5947 (arc_reorg): Call pad_return.
5948 (arc_pad_return): Remove.
5949 (arc_init_machine_status): Remove reference to force_short_suffix.
5950 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5951 (attr length): When attribute iscompact is true force to 2
5952 regardless; in the case of maybe check if we want to force the
5953 instruction to have 4 bytes length.
5954 (nopv): Change it to generate 4 byte long nop as well.
5955 (blockage): New pattern.
5956 (simple_return): Remove call to arc_pad_return.
5957 (p_return_i): Likewise.
5958
5959 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5960
5961 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5962
5963 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5964
5965 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5966 ARC cores.
5967
5968 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5969
5970 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5971 for ARC700 and ARCv2.
5972
5973 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5974
5975 PR target/86076
5976 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5977 operands[2] instead of operands[1].
5978
5979
5980 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5981
5982 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5983 case, check whether the outer register overlaps an unallocatable
5984 register, not just whether it fits the required class.
5985
5986 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5987
5988 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5989 are poly_ints.
5990 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5991 (memrefs_conflict_p): Likewise.
5992 (init_alias_analysis): Likewise.
5993 * cfgexpand.c (expand_debug_expr): Likewise.
5994 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5995 * cse.c (fold_rtx): Likewise.
5996 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5997 * expr.c (emit_block_move_hints): Likewise.
5998 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5999 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6000 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6001 (emit_group_store): Likewise.
6002 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
6003 to read the PRE/POST_MODIFY increment.
6004 * calls.c (store_one_arg): Use strip_offset.
6005 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6006 poly_int_rtx_p.
6007 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6008 by a VEC_SELECT.
6009 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6010 (simplify_binary_operation_1): Extend CONST_INT handling to
6011 poly_int_rtx_p.
6012 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6013 than a HOST_WIDE_INT.
6014 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6015 poly_int64.
6016 (adjust_mems, add_stores): Update accodingly.
6017 (vt_canonicalize_addr): Track polynomial offsets.
6018 (emit_note_insn_var_location): Likewise.
6019 (vt_add_function_parameter): Likewise.
6020 (vt_initialize): Likewise.
6021
6022 2018-06-12 Jeff Law <law@redhat.com>
6023
6024 * config.gcc (alpha*-*-freebsd*): Remove.
6025 * config/alpha/freebsd.h: Remove.
6026
6027 2018-06-12 David Malcolm <dmalcolm@redhat.com>
6028
6029 PR other/69968
6030 * spellcheck-tree.c (levenshtein_distance): Rename to...
6031 (get_edit_distance): ...this, and update for underlying renaming.
6032 * spellcheck-tree.h (levenshtein_distance): Rename to...
6033 (get_edit_distance): ...this.
6034 * spellcheck.c (levenshtein_distance): Rename to...
6035 (get_edit_distance): ...this. Convert from Levenshtein distance
6036 to Damerau-Levenshtein distance by supporting transpositions of
6037 adjacent characters. Rename "v1" to "v_next" and "v0" to
6038 "v_one_ago".
6039 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6040 (selftest::test_edit_distance_unit_test_oneway): ...this, and
6041 update for underlying renaming.
6042 (selftest::levenshtein_distance_unit_test): Rename to...
6043 (selftest::test_get_edit_distance_unit): ...this, and update for
6044 underlying renaming.
6045 (selftest::test_find_closest_string): Add example from PR 69968
6046 where transposition helps
6047 (selftest::test_metric_conditions): Update for renaming.
6048 (selftest::test_metric_conditions): Likewise.
6049 (selftest::spellcheck_c_tests): Likewise.
6050 * spellcheck.h (levenshtein_distance): Rename both overloads to...
6051 (get_edit_distance): ...this.
6052 (best_match::consider): Update for renaming.
6053
6054 2018-06-12 Martin Sebor <msebor@redhat.com>
6055
6056 PR tree-optimization/85259
6057 * builtins.c (compute_objsize): Handle constant offsets.
6058 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6059 true iff a warning has been issued.
6060 * gimple.h (gimple_nonartificial_location): New function.
6061 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6062 gimple_nonartificial_location and handle -Wno-system-headers.
6063 (handle_builtin_stxncpy): Same.
6064
6065 2018-06-12 Martin Sebor <msebor@redhat.com>
6066
6067 PR c/85931
6068 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
6069
6070 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
6071
6072 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6073 BUILTIN_VEC_XST entries for pointer to double and long long.
6074
6075 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
6076
6077 PR target/85990
6078 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6079 Update comments.
6080 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
6081 Likewise.
6082
6083 2018-06-12 Martin Liska <mliska@suse.cz>
6084
6085 * doc/options.texi: Document IntegerRange.
6086
6087 2018-06-12 Martin Liska <mliska@suse.cz>
6088
6089 * config/i386/i386.opt: Make MPX-related options as Deprecated.
6090 * opt-functions.awk: Handle Deprecated flag.
6091 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
6092 and report error.
6093 (read_cmdline_option): Report warning for a deprecated option.
6094 * opts.h (struct cl_option): Add new field cl_deprecated.
6095 (CL_ERR_DEPRECATED): New.
6096
6097 2018-06-12 Martin Liska <mliska@suse.cz>
6098
6099 * doc/options.texi: Document Deprecated option flag.
6100
6101 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6102
6103 * config/arc/arc-arch.h (arc_extras): New enum.
6104 (arc_cpu_t):Add field extra.
6105 (arc_cpu_types): Consider the extras.
6106 * config/arc/arc-cpus.def: Add extras info.
6107 * config/arc/arc-opts.h (processor_type): Consider extra field.
6108 * config/arc/arc.c (arc_override_options): Handle extra field.
6109
6110 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
6111
6112 * config/arc/arc-arch.h: Update ARC_OPTX macro.
6113 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
6114 field.
6115 * config/arc/arc.c (arc_init): Update pic warning.
6116 (irq_range): Update irq range parsing warnings.
6117 (arc_override_options): Update various warning messages.
6118 (arc_handle_aux_attribute): Likewise.
6119
6120 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
6121
6122 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
6123
6124 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6125
6126 * doc/sourcebuild.texi: Document usage of line number 0 in verify
6127 compiler messages directives.
6128
6129 2018-06-12 Matthew Fortune <mfortune@gmail.com>
6130
6131 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
6132 * config/mips/mips-tables.opt: Regenerate.
6133 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
6134 mips64r6.
6135 * doc/invoke.texi: Document -march=i6500.
6136
6137 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
6138
6139 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
6140 (i6400_gpmul): Add cpu_unit.
6141 (i6400_gpdiv): Likewise.
6142 (i6400_msa_add_d): Update reservations.
6143 (i6400_msa_int_add) Likewise.
6144 (i6400_msa_short_logic3) Likewise.
6145 (i6400_msa_short_logic2) Likewise.
6146 (i6400_msa_short_logic) Likewise.
6147 (i6400_msa_move) Likewise.
6148 (i6400_msa_cmp) Likewise.
6149 (i6400_msa_short_float2) Likewise.
6150 (i6400_msa_div_d) Likewise.
6151 (i6400_msa_long_logic1) Likewise.
6152 (i6400_msa_long_logic2) Likewise.
6153 (i6400_msa_mult) Likewise.
6154 (i6400_msa_long_float2) Likewise.
6155 (i6400_msa_long_float4) Likewise.
6156 (i6400_msa_long_float5) Likewise.
6157 (i6400_msa_long_float8) Likewise.
6158 (i6400_fpu_fadd): Include frint type.
6159 (i6400_fpu_store): New define_insn_reservation.
6160 (i6400_fpu_load): Likewise.
6161 (i6400_fpu_move): Likewise.
6162 (i6400_fpu_fcmp): Likewise.
6163 (i6400_fpu_fmadd): Likewise.
6164 (i6400_int_mult): Include imul3nc type and update reservation.
6165 (i6400_int_div): Include idiv3 type and update reservation.
6166 (i6400_int_load): Update to check type not move_type.
6167 (i6400_int_store): Likewise.
6168 (i6400_int_prefetch): Set zero latency.
6169
6170 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
6171
6172 * gcc.c: Document new %@{...} sequence.
6173 (LINK_COMMAND_SPEC): Use it for the -L switches.
6174 (cpp_unique_options): Use it for the -I switches.
6175 (at_file_argbuf): New global variable.
6176 (in_at_file): Likewise.
6177 (alloc_args): Create at_file_argbuf.
6178 (clear_args): Truncate at_file_argbuf.
6179 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
6180 (open_at_file): New function.
6181 (close_at_file): Likewise.
6182 (create_at_file): Delete.
6183 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
6184 <'o'>: Likewise.
6185 <'@'>: New case.
6186 (validate_switches_from_spec): Deal with %@{...} sequence.
6187 (validate_switches): Likewise.
6188 (driver::finalize): Call clear_args.
6189
6190 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
6191
6192 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
6193
6194 2018-06-11 Martin Sebor <msebor@redhat.com>
6195
6196 * doc/invoke.texi (-Wall): List -Wc++17-compat.
6197 (Wno-class-memaccess): Add @opindex.
6198 (Wno-templates, Wno-multiple-inheritance): Same.
6199 (Wno-virtual-inheritance, Wno-namespaces): Same.
6200 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
6201 (Wno-format-overflow, Wno-format-truncation): Same.
6202 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
6203 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
6204 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
6205 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
6206 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
6207 (Wno-misspelled-isr): Same.
6208
6209 2018-06-11 Martin Sebor <msebor@redhat.com>
6210
6211 * PR tree-optimization/86083
6212 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
6213
6214 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
6215
6216 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
6217
6218 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
6219
6220 PR target/85755
6221 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
6222 on the correct operand.
6223 (*movdi_internal64): Ditto.
6224
6225 2018-06-11 Martin Liska <mliska@suse.cz>
6226
6227 PR tree-optimization/86089
6228 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
6229
6230 2018-06-11 Julia Koval <julia.koval@intel.com>
6231
6232 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
6233 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
6234 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
6235
6236 2018-06-11 Olivier Hainque <hainque@adacore.com>
6237
6238 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
6239 for Ada with strict dwarf2.
6240
6241 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
6242
6243 PR target/85755
6244 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
6245 addresses.
6246
6247 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
6248
6249 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
6250
6251 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
6252
6253 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
6254 TARGET_ELF.
6255
6256 2018-06-08 Martin Liska <mliska@suse.cz>
6257
6258 * tree-cfg.h (debug_function): Fix argument type to match
6259 implementation.
6260
6261 2018-06-08 Martin Liska <mliska@suse.cz>
6262
6263 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
6264 Remove usage of MPX-related (and removed) fields.
6265 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
6266
6267 2018-06-08 David Malcolm <dmalcolm@redhat.com>
6268
6269 * cfg.c (debug): Use TDF_NONE rather than 0.
6270 * cfghooks.c (debug): Likewise.
6271 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
6272 (struct dump_option_value_info): Convert to...
6273 (struct kv_pair): ...this template type.
6274 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
6275 rather than 0.
6276 (optinfo_verbosity_options): Likewise.
6277 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
6278 OPTGROUP_NONE.
6279 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
6280 than int for "optgroup_flags" param.
6281 (dump_generic_expr_loc): Use dump_flags_t rather than int for
6282 "dump_kind" param.
6283 (dump_dec): Likewise.
6284 (dump_finish): Use TDF_NONE rather than 0.
6285 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
6286 rather than int for "optgroup_flags" param. Use TDF_NONE rather
6287 than 0. Update for change to option_ptr.
6288 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
6289 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
6290 0. Update for changes to optinfo_verbosity_options and
6291 optgroup_options.
6292 (opt_info_switch_p): Convert optgroup_flags from int to
6293 optgroup_flags_t.
6294 (dump_basic_block): Use dump_flags_t rather than int
6295 for "dump_kind" param.
6296 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
6297 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
6298 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
6299 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
6300 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
6301 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
6302 TDF_NONE): Convert from macros to...
6303 (enum dump_flag): ...this new enum.
6304 (dump_flags_t): Update to use enum.
6305 (operator|, operator&, operator~, operator|=, operator&=):
6306 Implement for dump_flags_t.
6307 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
6308 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
6309 Convert from macros to...
6310 (enum optgroup_flag): ...this new enum.
6311 (optgroup_flags_t): New typedef.
6312 (operator|, operator|=): Implement for optgroup_flags_t.
6313 (struct dump_file_info): Convert field "alt_flags" to
6314 dump_flags_t. Convert field "optgroup_flags" to
6315 optgroup_flags_t.
6316 (dump_basic_block): Use dump_flags_t rather than int for param.
6317 (dump_generic_expr_loc): Likewise.
6318 (dump_dec): Likewise.
6319 (dump_register): Convert param "optgroup_flags" to
6320 optgroup_flags_t.
6321 (opt_info_enable_passes): Likewise.
6322 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
6323 than 0.
6324 * gimple-pretty-print.c (debug): Likewise.
6325 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
6326 (merged_store_group::apply_stores): Likewise.
6327 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
6328 * gimple.c (verify_gimple_pp): Likewise.
6329 * graphite-poly.c (print_pbb_body): Likewise.
6330 * passes.c (pass_manager::register_one_dump_file): Convert
6331 local "optgroup_flags" to optgroup_flags_t.
6332 * print-tree.c (print_node): Use TDF_NONE rather than 0.
6333 (debug): Likewise.
6334 (debug_body): Likewise.
6335 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
6336 to optgroup_flags_t.
6337 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
6338 than 0.
6339 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
6340 (convert_mult_to_fma): Likewise.
6341 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
6342 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
6343 * tree-vect-data-refs.c (dump_lower_bound): Convert param
6344 "dump_kind" to dump_flags_t.
6345
6346 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6347
6348 * config/rs6000/rs6000.c (min, max): Delete.
6349
6350 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
6351
6352 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
6353 -mabi=spe and -mabi=no-spe.
6354
6355 2018-06-08 Martin Liska <mliska@suse.cz>
6356
6357 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
6358 where we expect an existing summary.
6359
6360 2018-06-08 Martin Liska <mliska@suse.cz>
6361
6362 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
6363 * ipa-inline.h (estimate_edge_growth): Likewise.
6364
6365 2018-06-08 Martin Liska <mliska@suse.cz>
6366
6367 * cgraph.c (function_version_hasher::hash): Use
6368 cgraph_node::get_uid ().
6369 (function_version_hasher::equal):
6370 * cgraph.h (cgraph_node::get_uid): New method.
6371 * ipa-inline.c (update_caller_keys): Use
6372 cgraph_node::get_uid ().
6373 (update_callee_keys): Likewise.
6374 * ipa-utils.c (searchc): Likewise.
6375 (ipa_reduced_postorder): Likewise.
6376 * lto-cgraph.c (input_node): Likewise.
6377 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
6378 * symbol-summary.h (symtab_insertion): Likewise.
6379 (symtab_removal): Likewise.
6380 (symtab_duplication): Likewise.
6381 * tree-pretty-print.c (dump_function_header): Likewise.
6382 * tree-sra.c (convert_callers_for_node): Likewise.
6383
6384 2018-06-08 Martin Liska <mliska@suse.cz>
6385
6386 * cgraph.c (symbol_table::create_edge): Always assign a new
6387 unique number.
6388 (symbol_table::free_edge): Do not recycle numbers.
6389 * cgraph.h (cgraph_edge::get): New method.
6390 * symbol-summary.h (symtab_removal): Use it.
6391 (symtab_duplication): Likewise.
6392 (call_summary::hashable_uid): Remove.
6393
6394 2018-06-08 Martin Liska <mliska@suse.cz>
6395
6396 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
6397 (initialize_growth_caches): Remove.
6398 (free_growth_caches): Likewise.
6399 (do_estimate_edge_time): Use edge_growth_cache.
6400 (do_estimate_edge_size): Likewise.
6401 (do_estimate_edge_hints): Likewise.
6402 * ipa-inline.c (reset_edge_caches): Likewise.
6403 (recursive_inlining): Likewise.
6404 (inline_small_functions): Likewise.
6405 * ipa-inline.h (initialize_growth_caches): Remove.
6406 (estimate_edge_size): Likewise.
6407 (estimate_edge_time): Likewise.
6408 (estimate_edge_hints): Likewise.
6409 (reset_edge_growth_cache): Likewise.
6410 * symbol-summary.h (call_summary::remove): New method.
6411
6412 2018-06-08 Martin Liska <mliska@suse.cz>
6413
6414 * ipa-cp.c (class edge_clone_summary): New summary.
6415 (grow_edge_clone_vectors): Remove.
6416 (ipcp_edge_duplication_hook): Remove.
6417 (class edge_clone_summary_t): New call_summary class.
6418 (ipcp_edge_removal_hook): Remove.
6419 (edge_clone_summary_t::duplicate): New function.
6420 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
6421 (create_specialized_node): Likewise.
6422 (ipcp_driver): Initialize edge_clone_summaries and do not
6423 register hooks.
6424
6425 2018-06-08 Martin Liska <mliska@suse.cz>
6426
6427 * symbol-summary.h (get): New function.
6428 (call_summary::m_initialize_when_cloning): New class member.
6429
6430 2018-06-08 Martin Liska <mliska@suse.cz>
6431
6432 * cgraph.c (cgraph_node::remove): Do not recycle uid.
6433 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
6434 (symbol_table::allocate_cgraph_symbol): Do not set uid.
6435 * passes.c (uid_hash_t): Record removed_nodes by their uids.
6436 (remove_cgraph_node_from_order): Use the removed_nodes set.
6437 (do_per_function_toporder): Likwise.
6438 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
6439 instead of summary_uid.
6440 (symtab_removal): Likewise.
6441 (symtab_duplication): Likewise.
6442
6443 2018-06-08 Martin Liska <mliska@suse.cz>
6444
6445 * ipa-cp.c (ipcp_store_bits_results): Use
6446 ipcp_transformation_sum.
6447 (ipcp_store_vr_results): Likewise.
6448 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
6449 to ...
6450 (ipcp_transformation_initialize): ... this.
6451 (ipa_set_node_agg_value_chain):
6452 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
6453 (write_ipcp_transformation_info): Likewise.
6454 (read_ipcp_transformation_info): Likewise.
6455 (ipcp_update_bits): Likewise.
6456 (ipcp_update_vr): Likewise.
6457 (ipcp_transform_function): Likewise.
6458 * ipa-prop.h: Rename ipcp_transformation_summary to
6459 ipcp_transformation.
6460 (class ipcp_transformation_t): New function summary.
6461 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
6462 (ipa_get_agg_replacements_for_node): Likewise.
6463
6464 2018-06-08 Martin Liska <mliska@suse.cz>
6465
6466 * ipa-pure-const.c (struct funct_state_d): Do it class instead
6467 of struct.
6468 (class funct_state_summary_t): New function_summary class.
6469 (has_function_state): Remove.
6470 (get_function_state): Likewise.
6471 (set_function_state): Likewise.
6472 (add_new_function): Likewise.
6473 (funct_state_summary_t::insert): New function.
6474 (duplicate_node_data): Remove.
6475 (remove_node_data): Remove.
6476 (funct_state_summary_t::duplicate): New function.
6477 (register_hooks): Create new funct_state_summaries.
6478 (pure_const_generate_summary): Use it.
6479 (pure_const_write_summary): Likewise.
6480 (pure_const_read_summary): Likewise.
6481 (propagate_pure_const): Likewise.
6482 (propagate_nothrow): Likewise.
6483 (dump_malloc_lattice): Likewise.
6484 (propagate_malloc): Likewise.
6485 (execute): Do not register hooks, just remove summary
6486 instead.
6487 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
6488 constructor.
6489
6490 2018-06-08 Martin Liska <mliska@suse.cz>
6491
6492 * ipa-reference.c (remove_node_data): Remove.
6493 (duplicate_node_data): Likewise.
6494 (class ipa_ref_var_info_summary_t): New class.
6495 (class ipa_ref_opt_summary_t): Likewise.
6496 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
6497 (get_reference_optimization_summary): Use
6498 ipa_ref_opt_sum_summaries.
6499 (set_reference_vars_info): Remove.
6500 (set_reference_optimization_summary): Likewise.
6501 (ipa_init): Create summaries.
6502 (init_function_info): Use function summary.
6503 (ipa_ref_opt_summary_t::duplicate): New function.
6504 (ipa_ref_opt_summary_t::remove): New function.
6505 (get_read_write_all_from_node): Fix GNU coding style.
6506 (propagate): Use function summary.
6507 (write_node_summary_p): Fix GNU coding style.
6508 (stream_out_bitmap): Likewise.
6509 (ipa_reference_read_optimization_summary): Use function summary.
6510 (ipa_reference_c_finalize): Do not release hooks.
6511
6512 2018-06-08 Martin Liska <mliska@suse.cz>
6513
6514 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
6515 (analyze_function_body): Extract multiple calls of get_create.
6516 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6517 * ipa-inline.c (recursive_inlining): Use ::get method.
6518 * ipa-inline.h (estimate_edge_growth): Likewise.
6519
6520 2018-06-08 Martin Liska <mliska@suse.cz>
6521
6522 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
6523 HSA_INVALID.
6524 (hsa_function_summary::hsa_function_summary): Use the new enum
6525 value.
6526 (hsa_gpu_implementation_p): Use hsa_summaries::get.
6527 * hsa-gen.c (hsa_get_host_function): Likewise.
6528 (get_brig_function_name): Likewise.
6529 * ipa-hsa.c (process_hsa_functions): Likewise.
6530 (ipa_hsa_write_summary): Likewise.
6531 * symbol-summary.h (symtab_duplication): Use ::get function/
6532 (get): New function.
6533
6534 2018-06-08 Martin Liska <mliska@suse.cz>
6535
6536 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
6537 of get.
6538 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
6539 (hsa_register_kernel): Likewise.
6540 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
6541 * hsa-gen.c (hsa_get_host_function): Likewise.
6542 (get_brig_function_name): Likewise.
6543 (generate_hsa): Likewise.
6544 (pass_gen_hsail::execute): Likewise.
6545 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
6546 (devirtualization_time_bonus): Likewise.
6547 (ipcp_propagate_stage): Likewise.
6548 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6549 (edge_set_predicate): Likewise.
6550 (evaluate_conditions_for_known_args): Likewise.
6551 (evaluate_properties_for_edge): Likewise.
6552 (ipa_fn_summary::reset): Likewise.
6553 (ipa_fn_summary_t::duplicate): Likewise.
6554 (dump_ipa_call_summary): Likewise.
6555 (ipa_dump_fn_summary): Likewise.
6556 (analyze_function_body): Likewise.
6557 (compute_fn_summary): Likewise.
6558 (estimate_edge_devirt_benefit): Likewise.
6559 (estimate_edge_size_and_time): Likewise.
6560 (estimate_calls_size_and_time): Likewise.
6561 (estimate_node_size_and_time): Likewise.
6562 (inline_update_callee_summaries): Likewise.
6563 (remap_edge_change_prob): Likewise.
6564 (remap_edge_summaries): Likewise.
6565 (ipa_merge_fn_summary_after_inlining): Likewise.
6566 (ipa_update_overall_fn_summary): Likewise.
6567 (read_ipa_call_summary): Likewise.
6568 (inline_read_section): Likewise.
6569 (write_ipa_call_summary): Likewise.
6570 (ipa_fn_summary_write): Likewise.
6571 (ipa_free_fn_summary): Likewise.
6572 * ipa-hsa.c (process_hsa_functions): Likewise.
6573 (ipa_hsa_write_summary): Likewise.
6574 (ipa_hsa_read_section): Likewise.
6575 * ipa-icf.c (sem_function::merge): Likewise.
6576 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
6577 (do_estimate_edge_time): Likewise.
6578 (estimate_size_after_inlining): Likewise.
6579 (estimate_growth): Likewise.
6580 (growth_likely_positive): Likewise.
6581 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6582 (inline_call): Likewise.
6583 * ipa-inline.c (caller_growth_limits): Likewise.
6584 (can_inline_edge_p): Likewise.
6585 (can_inline_edge_by_limits_p): Likewise.
6586 (compute_uninlined_call_time): Likewise.
6587 (compute_inlined_call_time): Likewise.
6588 (want_inline_small_function_p): Likewise.
6589 (edge_badness): Likewise.
6590 (update_caller_keys): Likewise.
6591 (update_callee_keys): Likewise.
6592 (recursive_inlining): Likewise.
6593 (inline_small_functions): Likewise.
6594 (inline_to_all_callers_1): Likewise.
6595 (dump_overall_stats): Likewise.
6596 (early_inline_small_functions): Likewise.
6597 (early_inliner): Likewise.
6598 * ipa-inline.h (estimate_edge_growth): Likewise.
6599 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6600 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6601 * ipa-prop.h (IPA_NODE_REF): Likewise.
6602 (IPA_EDGE_REF): Likewise.
6603 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6604 (propagate_malloc): Likewise.
6605 * ipa-split.c (execute_split_functions): Likewise.
6606 * symbol-summary.h: Rename get to get_create.
6607 (get): Likewise.
6608 (get_create): Likewise.
6609 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6610
6611 2018-06-08 Martin Liska <mliska@suse.cz>
6612
6613 * symbol-summary.h (release): Move definition out of class
6614 declaration.
6615 (symtab_removal): Likewise.
6616 (symtab_duplication): Likewise.
6617
6618 2018-06-08 Martin Liska <mliska@suse.cz>
6619
6620 * symbol-summary.h (function_summary): Move constructor
6621 implementation out of class declaration.
6622 (release): Likewise.
6623 (symtab_insertion): Likewise.
6624 (symtab_removal): Likewise.
6625 (symtab_duplication): Likewise.
6626 (get): Likewise.
6627
6628 2018-06-08 Martin Liska <mliska@suse.cz>
6629
6630 * Makefile.in: Remove support for MPX (macros, related functions,
6631 fields in cgraph_node, ...).
6632 * builtin-types.def (BT_BND): Likewise.
6633 (BT_FN_BND_CONST_PTR): Likewise.
6634 (BT_FN_CONST_PTR_BND): Likewise.
6635 (BT_FN_VOID_PTR_BND): Likewise.
6636 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
6637 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
6638 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
6639 (expand_builtin_mempcpy_with_bounds): Likewise.
6640 (expand_builtin_memset_with_bounds): Likewise.
6641 (expand_builtin_memset_args): Likewise.
6642 (std_expand_builtin_va_start): Likewise.
6643 (expand_builtin): Likewise.
6644 (expand_builtin_with_bounds): Likewise.
6645 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6646 (DEF_LIB_BUILTIN_CHKP): Likewise.
6647 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6648 (DEF_CHKP_BUILTIN): Likewise.
6649 (BUILT_IN_MEMCPY): Likewise.
6650 (BUILT_IN_MEMMOVE): Likewise.
6651 (BUILT_IN_MEMPCPY): Likewise.
6652 (BUILT_IN_MEMSET): Likewise.
6653 (BUILT_IN_STPCPY): Likewise.
6654 (BUILT_IN_STRCAT): Likewise.
6655 (BUILT_IN_STRCHR): Likewise.
6656 (BUILT_IN_STRCPY): Likewise.
6657 (BUILT_IN_STRLEN): Likewise.
6658 (BUILT_IN_MEMCPY_CHK): Likewise.
6659 (BUILT_IN_MEMMOVE_CHK): Likewise.
6660 (BUILT_IN_MEMPCPY_CHK): Likewise.
6661 (BUILT_IN_MEMSET_CHK): Likewise.
6662 (BUILT_IN_STPCPY_CHK): Likewise.
6663 (BUILT_IN_STRCAT_CHK): Likewise.
6664 (BUILT_IN_STRCPY_CHK): Likewise.
6665 * calls.c (store_bounds): Likewise.
6666 (emit_call_1): Likewise.
6667 (special_function_p): Likewise.
6668 (maybe_warn_nonstring_arg): Likewise.
6669 (initialize_argument_information): Likewise.
6670 (finalize_must_preallocate): Likewise.
6671 (compute_argument_addresses): Likewise.
6672 (expand_call): Likewise.
6673 * cfgexpand.c (expand_call_stmt): Likewise.
6674 (expand_return): Likewise.
6675 (expand_gimple_stmt_1): Likewise.
6676 (pass_expand::execute): Likewise.
6677 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6678 (cgraph_node::remove): Likewise.
6679 (cgraph_node::dump): Likewise.
6680 (cgraph_node::verify_node): Likewise.
6681 * cgraph.h (chkp_function_instrumented_p): Likewise.
6682 (symtab_node::get_alias_target): Likewise.
6683 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6684 (cgraph_local_p): Likewise.
6685 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6686 (cgraph_edge::rebuild_references): Likewise.
6687 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6688 (walk_polymorphic_call_targets): Likewise.
6689 (cgraph_node::expand_thunk): Likewise.
6690 (symbol_table::output_weakrefs): Likewise.
6691 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6692 (ix86_handle_option): Likewise.
6693 * config/i386/constraints.md: Likewise.
6694 * config/i386/i386-builtin-types.def (BND): Likewise.
6695 (VOID): Likewise.
6696 (PVOID): Likewise.
6697 (ULONG): Likewise.
6698 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6699 (BDESC_FIRST): Likewise.
6700 (BDESC): Likewise.
6701 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6702 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6703 * config/i386/i386.c (enum reg_class): Likewise.
6704 (ix86_target_string): Likewise.
6705 (ix86_option_override_internal): Likewise.
6706 (ix86_conditional_register_usage): Likewise.
6707 (ix86_valid_target_attribute_inner_p): Likewise.
6708 (ix86_set_indirect_branch_type): Likewise.
6709 (ix86_set_current_function): Likewise.
6710 (ix86_function_arg_regno_p): Likewise.
6711 (init_cumulative_args): Likewise.
6712 (ix86_function_arg_advance): Likewise.
6713 (ix86_function_arg): Likewise.
6714 (ix86_pass_by_reference): Likewise.
6715 (ix86_function_value_regno_p): Likewise.
6716 (ix86_function_value_1): Likewise.
6717 (ix86_function_value_bounds): Likewise.
6718 (ix86_return_in_memory): Likewise.
6719 (ix86_setup_incoming_vararg_bounds): Likewise.
6720 (ix86_va_start): Likewise.
6721 (indirect_thunk_need_prefix): Likewise.
6722 (print_reg): Likewise.
6723 (ix86_print_operand): Likewise.
6724 (ix86_expand_call): Likewise.
6725 (ix86_output_function_return): Likewise.
6726 (reg_encoded_number): Likewise.
6727 (BDESC_VERIFYS): Likewise.
6728 (ix86_init_mpx_builtins): Likewise.
6729 (ix86_init_builtins): Likewise.
6730 (ix86_emit_cmove): Likewise.
6731 (ix86_emit_move_max): Likewise.
6732 (ix86_expand_builtin): Likewise.
6733 (ix86_builtin_mpx_function): Likewise.
6734 (ix86_get_arg_address_for_bt): Likewise.
6735 (ix86_load_bounds): Likewise.
6736 (ix86_store_bounds): Likewise.
6737 (ix86_load_returned_bounds): Likewise.
6738 (ix86_store_returned_bounds): Likewise.
6739 (ix86_class_likely_spilled_p): Likewise.
6740 (ix86_hard_regno_mode_ok): Likewise.
6741 (x86_order_regs_for_local_alloc): Likewise.
6742 (ix86_mitigate_rop): Likewise.
6743 (ix86_bnd_prefixed_insn_p): Likewise.
6744 (ix86_mpx_bound_mode): Likewise.
6745 (ix86_make_bounds_constant): Likewise.
6746 (ix86_initialize_bounds): Likewise.
6747 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6748 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6749 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6750 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6751 (TARGET_CHKP_BOUND_MODE): Likewise.
6752 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6753 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6754 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6755 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6756 * config/i386/i386.h (TARGET_MPX): Likewise.
6757 (TARGET_MPX_P): Likewise.
6758 (VALID_BND_REG_MODE): Likewise.
6759 (FIRST_BND_REG): Likewise.
6760 (LAST_BND_REG): Likewise.
6761 (enum reg_class): Likewise.
6762 (BND_REG_P): Likewise.
6763 (BND_REGNO_P): Likewise.
6764 (BNDmode): Likewise.
6765 (ADJUST_INSN_LENGTH): Likewise.
6766 * config/i386/i386.md: Likewise.
6767 * config/i386/i386.opt: Likewise.
6768 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6769 (defined): Likewise.
6770 (LINK_MPX): Likewise.
6771 (MPX_SPEC): Likewise.
6772 (LIBMPX_SPEC): Likewise.
6773 (LIBMPXWRAPPERS_SPEC): Likewise.
6774 (CHKP_SPEC): Likewise.
6775 * config/i386/predicates.md: Likewise.
6776 * dbxout.c (dbxout_type): Likewise.
6777 * doc/extend.texi: Likewise.
6778 * doc/invoke.texi: Likewise.
6779 * doc/md.texi: Likewise.
6780 * doc/tm.texi: Likewise.
6781 * doc/tm.texi.in: Likewise.
6782 * dwarf2out.c (is_base_type): Likewise.
6783 (gen_formal_types_die): Likewise.
6784 (gen_subprogram_die): Likewise.
6785 (gen_type_die_with_usage): Likewise.
6786 (gen_decl_die): Likewise.
6787 (dwarf2out_late_global_decl): Likewise.
6788 * expr.c (expand_assignment): Likewise.
6789 (emit_storent_insn): Likewise.
6790 (store_expr_with_bounds): Likewise.
6791 (store_expr): Likewise.
6792 (expand_expr_real_1): Likewise.
6793 * expr.h (store_expr_with_bounds): Likewise.
6794 * function.c (use_register_for_decl): Likewise.
6795 (struct bounds_parm_data): Likewise.
6796 (assign_parms_augmented_arg_list): Likewise.
6797 (assign_parm_find_entry_rtl): Likewise.
6798 (assign_parm_is_stack_parm): Likewise.
6799 (assign_parm_load_bounds): Likewise.
6800 (assign_bounds): Likewise.
6801 (assign_parms): Likewise.
6802 (expand_function_start): Likewise.
6803 * gcc.c (CHKP_SPEC): Likewise.
6804 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6805 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6806 (wrestrict_dom_walker::check_call): Likewise.
6807 * gimple.c (gimple_build_call_from_tree): Likewise.
6808 * gimple.h (enum gf_mask): Likewise.
6809 (gimple_call_with_bounds_p): Likewise.
6810 (gimple_call_set_with_bounds): Likewise.
6811 * gimplify.c (gimplify_init_constructor): Likewise.
6812 * ipa-cp.c (initialize_node_lattices): Likewise.
6813 (propagate_constants_across_call): Likewise.
6814 (find_more_scalar_values_for_callers_subset): Likewise.
6815 * ipa-hsa.c (process_hsa_functions): Likewise.
6816 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6817 * ipa-icf.c (sem_function::merge): Likewise.
6818 * ipa-inline.c (early_inliner): Likewise.
6819 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6820 (warn_function_cold): Likewise.
6821 (propagate_pure_const): Likewise.
6822 * ipa-ref.h (enum GTY): Likewise.
6823 * ipa-split.c (find_retbnd): Likewise.
6824 (consider_split): Likewise.
6825 (split_function): Likewise.
6826 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6827 * ipa.c (walk_polymorphic_call_targets): Likewise.
6828 (symbol_table::remove_unreachable_nodes): Likewise.
6829 (process_references): Likewise.
6830 (cgraph_build_static_cdtor_1): Likewise.
6831 * lto-cgraph.c (lto_output_node): Likewise.
6832 (output_refs): Likewise.
6833 (compute_ltrans_boundary): Likewise.
6834 (input_overwrite_node): Likewise.
6835 (input_node): Likewise.
6836 (input_cgraph_1): Likewise.
6837 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6838 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6839 (class pass_chkp_instrumentation_passes): Likewise.
6840 (make_pass_chkp_instrumentation_passes): Likewise.
6841 * passes.def: Likewise.
6842 * rtl.h (struct GTY): Likewise.
6843 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6844 * stor-layout.c (layout_type): Likewise.
6845 * symtab.c: Likewise.
6846 * target.def: Likewise.
6847 * targhooks.c (default_chkp_bound_type): Likewise.
6848 (default_chkp_bound_mode): Likewise.
6849 (default_builtin_chkp_function): Likewise.
6850 (default_chkp_function_value_bounds): Likewise.
6851 (default_chkp_make_bounds_constant): Likewise.
6852 (default_chkp_initialize_bounds): Likewise.
6853 * targhooks.h (default_chkp_bound_type): Likewise.
6854 (default_chkp_bound_mode): Likewise.
6855 (default_builtin_chkp_function): Likewise.
6856 (default_chkp_function_value_bounds): Likewise.
6857 (default_chkp_make_bounds_constant): Likewise.
6858 (default_chkp_initialize_bounds): Likewise.
6859 * toplev.c (compile_file): Likewise.
6860 (process_options): Likewise.
6861 * tree-core.h (DEF_BUILTIN): Likewise.
6862 (DEF_BUILTIN_CHKP): Likewise.
6863 * tree-inline.c (declare_return_variable): Likewise.
6864 (remap_gimple_stmt): Likewise.
6865 (copy_bb): Likewise.
6866 (initialize_inlined_parameters): Likewise.
6867 (expand_call_inline): Likewise.
6868 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6869 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6870 (make_pass_ipa_chkp_produce_thunks): Likewise.
6871 (make_pass_chkp): Likewise.
6872 (make_pass_chkp_opt): Likewise.
6873 (make_pass_chkp_instrumentation_passes): Likewise.
6874 * tree-pretty-print.c (dump_generic_node): Likewise.
6875 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6876 * tree-ssa-dce.c (propagate_necessity): Likewise.
6877 (eliminate_unnecessary_stmts): Likewise.
6878 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6879 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6880 * tree-ssa-sccvn.h: Likewise.
6881 * tree-ssa-strlen.c (get_string_length): Likewise.
6882 (valid_builtin_call): Likewise.
6883 (adjust_last_stmt): Likewise.
6884 (handle_builtin_strchr): Likewise.
6885 (handle_builtin_strcpy): Likewise.
6886 (handle_builtin_stxncpy): Likewise.
6887 (handle_builtin_memcpy): Likewise.
6888 (handle_builtin_strcat): Likewise.
6889 (strlen_check_and_optimize_stmt): Likewise.
6890 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6891 * tree-streamer-in.c: Likewise.
6892 * tree-streamer.c (record_common_node): Likewise.
6893 * tree.c (tree_code_size): Likewise.
6894 (wide_int_to_tree_1): Likewise.
6895 (type_contains_placeholder_1): Likewise.
6896 (build_common_tree_nodes): Likewise.
6897 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6898 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6899 (POINTER_BOUNDS_P): Likewise.
6900 (BOUNDED_TYPE_P): Likewise.
6901 (BOUNDED_P): Likewise.
6902 (CALL_WITH_BOUNDS_P): Likewise.
6903 (pointer_bounds_type_node): Likewise.
6904 * value-prof.c (gimple_ic): Likewise.
6905 * var-tracking.c (vt_add_function_parameters): Likewise.
6906 * varasm.c (make_decl_rtl): Likewise.
6907 (assemble_start_function): Likewise.
6908 (output_constant): Likewise.
6909 (maybe_assemble_visibility): Likewise.
6910 * varpool.c (ctor_for_folding): Likewise.
6911 * chkp-builtins.def: Remove.
6912 * ipa-chkp.c: Remove.
6913 * ipa-chkp.h: Remove.
6914 * rtl-chkp.c: Remove.
6915 * rtl-chkp.h: Remove.
6916 * tree-chkp-opt.c: Remove.
6917 * tree-chkp.c: Remove.
6918 * tree-chkp.h: Remove.
6919
6920 2018-06-07 Carl Love <cel@us.ibm.com>
6921
6922 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6923 vextract_fp_from_shortl): Add BE support.
6924
6925 2018-06-07 Paul Koning <ni1d@arrl.net>
6926
6927 * compare-elim.c (try_merge_compare): Don't merge compare if
6928 address contains a side effect.
6929 (try_eliminate_compare): Likewise.
6930
6931 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6932
6933 * config.gcc: Support "tremont".
6934 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6935 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6936 PROCESSOR_TREMONT.
6937 * config/i386/i386.c (m_TREMONT): Define.
6938 (processor_target_table): Add "tremont".
6939 (PTA_TREMONT): Define.
6940 (ix86_lea_outperforms): Add TARGET_TREMONT.
6941 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6942 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6943 and M_INTEL_GOLDMONT_PLUS.
6944 (fold_builtin_cpu): Add "tremont".
6945 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6946 (ix86_option_override_internal): Add "tremont".
6947 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6948 (processor_type): Add PROCESSOR_TREMONT.
6949 * config/i386/x86-tune.def: Add m_TREMONT.
6950 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6951
6952 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6953
6954 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6955 symbol defined for msp430i* devices to be lower case.
6956
6957 2018-06-07 Richard Biener <rguenther@suse.de>
6958
6959 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6960 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6961 Properly wrap signed arithmetic if overflow wraps.
6962
6963 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6964
6965 PR tree-optimization/69615
6966 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6967 of a cast from a same precision integral SSA_NAME in a bb dominated
6968 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6969 cast to utype if rhs2 has already a compatible type.
6970
6971 2018-06-07 Richard Biener <rguenther@suse.de>
6972
6973 PR tree-optimization/85935
6974 * graphite-scop-detection.c (find_params_in_bb): Analyze
6975 condition operands with respect to the correct loop. Assert
6976 the analysis doesn't fail.
6977
6978 2018-06-04 Carl Love <cel@us.ibm.com>
6979
6980 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6981 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6982 as it is slightly cheaper.
6983 (first_match_or_eos_index_<mode>):
6984 Calculate index using natural element order.
6985 (first_match_index_<mode>):
6986 Calculate index using natural element order.
6987 (first_match_or_eos_index_<mode>):
6988 Calculate index using natural order.
6989 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6990 for BE and LE modes.
6991 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6992 P9V_BUILTIN_VCLZLSBB_V16QI.
6993 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6994 specific.
6995
6996 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6997
6998 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6999 indentation and line wrap for many prototypes. Add missing
7000 @smallexample directives around block of prototypes for vec_xl and
7001 vec_xst.
7002
7003 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
7004
7005 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7006 track if we pass or return IEEE 128-bit floating point.
7007 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7008 C++ mangling that is compatible with GCC 8.1.
7009 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7010 (init_cumulative_args): Note if we pass or return IEEE 128-bit
7011 floating point types.
7012 (rs6000_function_arg_advance_1): Likewise.
7013 (rs6000_mangle_type): Optionally generate mangled names that match
7014 what GCC 8.1 generated for IEEE 128-bit floating point types.
7015 (rs6000_globalize_decl_name): If we have an external function that
7016 passes or returns IEEE 128-bit types, generate a weak reference
7017 from the mangled name used in GCC 8.1 to the current mangled
7018 name.
7019 (rs6000_init_builtins): Make __ibm128 use the long double type if
7020 long double is IBM extended double. Make __float128 use the long
7021 double type if long double is IEEE 128-bit.
7022
7023 PR target/85657
7024 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7025 macro for __ibm128 built-in functions.
7026 (PACK_IF): Add __ibm128 pack/unpack functions.
7027 (UNPACK_IF): Likewise.
7028 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7029 enable long double built-in functions if long double is IEEE
7030 128-bit floating point.
7031 (rs6000_invalid_builtin): Update long double built-in function
7032 error message.
7033 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7034 functions, adjust the built-in function to use the long double
7035 built-in function if __ibm128 and long double are the same type.
7036 * doc/extend.texi (PowerPC builtins): Update documention for
7037 __builtin_{,un}pack_longdouble. Add documentation for
7038 __builtin_{,un}pack_ibm128.
7039
7040 2018-06-06 Jim Wilson <jimw@sifive.com>
7041
7042 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7043 (struct machine_function): New field interrupt_mode.
7044 (riscv_handle_type_attribute): New function. Add forward declaration.
7045 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7046 (riscv_expand_epilogue): Check interrupt_mode field.
7047 (riscv_set_current_function): Check interrupt attribute args and
7048 set interrupt_mode field.
7049 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7050 (riscv_sret, riscv_uret): New.
7051 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7052 new arguments to interrupt attribute.
7053
7054 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
7055
7056 PR target/63177
7057 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7058 Don't handle -mcpu=power8 if -mpower9-vector is also used.
7059
7060 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
7061
7062 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7063 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7064 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7065 several redundant entries.
7066
7067 2018-06-06 David Malcolm <dmalcolm@redhat.com>
7068
7069 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
7070 type from "rtx" to "rtx_insn *".
7071 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
7072 for local "call_insn", removing cast.
7073 (ix86_expand_call): Likewise, introducing a "call_insn" local.
7074
7075 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
7076
7077 PR tree-optimization/86066
7078 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
7079 for BIT_INSERT_EXPR stores.
7080
7081 2018-06-06 Richard Biener <rguenther@suse.de>
7082
7083 PR tree-optimization/86062
7084 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7085 component refs ontop
7086 of to be offsetted base.
7087
7088 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7089
7090 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
7091 to be static and remove check on interrupt attribute name.
7092
7093 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
7094
7095 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7096 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
7097
7098 2018-06-05 Steve Ellcey <sellcey@cavium.com>
7099
7100 PR target/79924
7101 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
7102 second argument.
7103 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
7104 Remove second argument, change how error is called.
7105 (aarch64_layout_arg): Remove second argument from
7106 aarch64_err_no_fpadvsimd call.
7107 (aarch64_init_cumulative_args): Ditto.
7108 (aarch64_gimplify_va_arg_expr): Ditto.
7109 * config/aarch64/aarch64.md (mov<mode>): Ditto.
7110
7111 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
7112
7113 * config/i386/i386.md (simple_return_indirect_internal): New expander.
7114 (*simple_return_indirect_internal<mode>): Rename from
7115 simple_return_indirect_internal. Use W mode iterator.
7116 (rstorssp): New expander.
7117 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
7118 (clrssbsy): New expander.
7119 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
7120
7121 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
7122
7123 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
7124 __typeof__.
7125 (cmse_check_pointed_object): Likewise.
7126
7127 2018-06-05 Martin Liska <mliska@suse.cz>
7128
7129 PR gcov-profile/47618
7130 * doc/invoke.texi: Document how -fprofile-dir format
7131 is extended.
7132
7133 2018-06-05 Richard Biener <rguenther@suse.de>
7134
7135 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
7136 removal pretend DOM info isn't available so we do not update
7137 it and only remove edges, not dominated blocks. Actually free
7138 DOM info in case we removed something. Remove unreachable blocks.
7139 (mfb_keep_latches): Work with either DOM info or marked backedges.
7140 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
7141 first. Mark backedges if DOM info isn't available.
7142 (Re-)compute DOM info after cleanup_control_flow_pre.
7143
7144 2018-06-05 Richard Biener <rguenther@suse.de>
7145
7146 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
7147 (locus_discrim_hasher::hash): Adjust.
7148 (locus_discrim_hasher::equal): Likewise.
7149 (next_discriminator_for_locus): Work on line directly.
7150 (same_line_p): Pass in expanded locus1 as well.
7151 (assign_discriminators): Avoid redundant location expansions.
7152
7153 2018-06-05 Richard Biener <rguenther@suse.de>
7154
7155 PR tree-optimization/86046
7156 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
7157 if required after clearing TREE_ADDRESSABLE.
7158
7159 2018-06-05 Richard Biener <rguenther@suse.de>
7160
7161 PR tree-optimization/86047
7162 * tree-ssa-loop.c (for_each_index): Glob handling of all
7163 decls and constants and really handle all of them.
7164
7165 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7166
7167 PR target/81497
7168 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
7169 qualifier_void_pointer and qualifier_const_void_pointer.
7170 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
7171 (arm_init_builtins): Handle the above.
7172 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
7173 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
7174 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
7175 void intrinsics.
7176
7177 2018-06-05 Martin Liska <mliska@suse.cz>
7178
7179 * auto-profile.c (read_autofdo_file): Do not use
7180 gcov_ctr_summary struct.
7181 (afdo_callsite_hot_enough_for_early_inline): Likewise.
7182 * coverage.c (struct counts_entry): Likewise.
7183 (read_counts_file): Read just single summary entry.
7184 (get_coverage_counts): Use gcov_summary struct.
7185 * coverage.h (get_coverage_counts): Likewise.
7186 * gcov-dump.c (dump_working_sets): Likewise.
7187 (tag_summary): Dump just single summary.
7188 * gcov-io.c (gcov_write_summary): Write just histogram
7189 summary.
7190 (gcov_read_summary): Read just single summary.
7191 (compute_working_sets): Use gcov_summary struct.
7192 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
7193 of GCOV_COUNTERS_SUMMABLE.
7194 (GCOV_COUNTERS_SUMMABLE): Remove.
7195 (GCOV_FIRST_VALUE_COUNTER): Replace with
7196 GCOV_COUNTER_V_INTERVAL.
7197 (struct gcov_ctr_summary): Remove.
7198 (struct gcov_summary): Directly use fields of former
7199 gcov_ctr_summary.
7200 (compute_working_sets): Use gcov_summary struct.
7201 * gcov.c (read_count_file): Do not use ctrs fields.
7202 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
7203 struct.
7204 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
7205 struct.
7206 * profile.c: Likewise.
7207 * profile.h: Likewise.
7208
7209 2018-06-05 Martin Liska <mliska@suse.cz>
7210
7211 PR gcov-profile/84846
7212 * gcov.c (output_lines): Print working directory only
7213 in intermediate format.
7214
7215 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
7216
7217 * config/s390/s390-builtin-types.def: Add void function type.
7218 * config/s390/s390-builtins.def: Use the function type for the
7219 tbeginc builtin.
7220
7221 2018-06-04 Jim Wilson <jimw@sifive.com>
7222
7223 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
7224 to int.
7225 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
7226 and maybe_eh_return. Change regno to unsigned int. Use new args to
7227 handle EH_RETURN_DATA_REGNO registers properly.
7228 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
7229 (riscv_expand_epilogue): Update comment. Change argument name and
7230 type. Update code to use new name and type. Pass new args to
7231 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
7232 EXCEPTION_RETURN.
7233 * config/riscv/riscv.md (NORMAL_RETURN): New.
7234 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
7235 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
7236 (eh_return): Call gen_eh_return_internal and emit barrier.
7237 (eh_return_internal): Call riscv_expand_epilogue.
7238
7239 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
7240
7241 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
7242 bit_insertion field and declare can_be_merged_into method.
7243 (merged_store_group::can_be_merged_into): New method.
7244 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
7245 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
7246 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
7247
7248 2018-06-04 Richard Biener <rguenther@suse.de>
7249
7250 PR tree-optimization/85955
7251 * builtins.c (fold_builtin_sincos): Convert pointers to
7252 destination to appropriate type before dereferencing.
7253
7254 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
7255
7256 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
7257
7258 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
7259
7260 * expr.c (expand_expr_real_1): Force the operand into memory if
7261 its TYPE_MODE is BLKmode and if there is no integer mode for
7262 the number of bits being extracted.
7263
7264 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7265
7266 PR target/85832
7267 PR target/86036
7268 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7269 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
7270
7271 2018-06-04 Richard Biener <rguenther@suse.de>
7272
7273 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
7274 (cleanup_tree_cfg_noloop): ... single caller. Do
7275 start_recording_case_labels later.
7276
7277 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
7278
7279 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
7280 to _IMMINTRIN_H_INCLUDED.
7281 * config/i386/pconfigintrin.h: Ditto.
7282 * config/i386/waitpkgintrin.h: Ditto.
7283 * config/i386/immintrin.h: Add includes for sgxintrin.h,
7284 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
7285 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
7286 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
7287 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
7288 waitpkgintrin.h and cldemoteintrin.h.
7289
7290 2018-06-04 Richard Biener <rguenther@suse.de>
7291
7292 PR tree-optimization/86038
7293 * tracer.c (find_best_successor): Check probability for
7294 being initialized, bail out if not.
7295
7296 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
7297
7298 PR target/86003
7299 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
7300 of bits to ignore when comparing architectures.
7301
7302 2018-06-04 Jakub Jelinek <jakub@redhat.com>
7303
7304 PR tree-optimization/69615
7305 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
7306 maximum or minimum of the type, try to merge it also as if
7307 range1 is + [-, x - 1] or + [x + 1, -].
7308
7309 PR c++/86025
7310 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
7311
7312 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
7313
7314 PR tree-optimization/86034
7315 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
7316 the unsigned bitfield type in a bit insertion sequence if it does not
7317 have a larger precision than the bitfield size.
7318 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
7319
7320 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
7321
7322 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
7323
7324 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7325
7326 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
7327 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
7328 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
7329 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
7330
7331 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
7332
7333 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
7334 Disable -fdelete-null-pointer-checks for ELF toolchain.
7335
7336 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7337 Kito Cheng <kito.cheng@gmail.com>
7338
7339 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
7340 (nds32le-*-*, nds32be-*-*): Integrate checking process.
7341 (nds32*-*-*): Add glibc and uclibc conditions.
7342 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
7343 (TARGET_EXCEPT_UNWIND_INFO): Define.
7344 * config/nds32/elf.h: New file.
7345 * config/nds32/linux.h: New file.
7346 * config/nds32/nds32-elf.opt: New file.
7347 * config/nds32/nds32-linux.opt: New file.
7348 * config/nds32/nds32-fp-as-gp.c
7349 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
7350 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
7351 TARGET_LINUX_ABI.
7352 (nds32_asm_file_end): Ditto.
7353 (nds32_print_operand): Ditto.
7354 (nds32_insert_attributes): Ditto.
7355 (nds32_init_libfuncs): New function.
7356 (TARGET_HAVE_TLS): Define.
7357 (TARGET_INIT_LIBFUNCS): Define.
7358 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
7359 spec content.
7360 (TARGET_ELF): Apply different mcmodel setting.
7361 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
7362 been migrated into elf.h and linux.h files.
7363 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
7364 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
7365 (mcmodel): The content has been migrated into nds32-elf.opt and
7366 nds32-linux.opt files.
7367 * config/nds32/t-elf: New file.
7368 * config/nds32/t-linux: New file.
7369
7370 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
7371 Shiva Chen <shiva0217@gmail.com>
7372
7373 * config/nds32/constants.md (unspec_volatile_element): Add
7374 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
7375 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
7376 optimization.
7377 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
7378 (make_pass_nds32_fp_as_gp): Declare.
7379 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
7380 optmization pass.
7381 (nds32_asm_function_end_prologue): Remove unused asm output.
7382 (nds32_asm_function_begin_epilogue): Remove unused asm output.
7383 (nds32_asm_file_start): Output necessary fp_as_gp information.
7384 (nds32_option_override): Adjust register usage.
7385 (nds32_expand_prologue): Consider fp_as_gp situation.
7386 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
7387 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
7388 (epilogue): Ditto.
7389 (return): Ditto.
7390 (simple_return): Ditto.
7391 (omit_fp_begin): Output special directive for fp_as_gp.
7392 (omit_fp_end): Output special directive for fp_as_gp.
7393 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
7394 mforbid-fp-as-gp): New options.
7395
7396 2018-06-01 Mark Wielaard <mark@klomp.org>
7397
7398 * dwarf2out.c (dwarf2out_finish): Remove generation of
7399 DW_AT_loclists_base.
7400
7401 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
7402
7403 * gimple-ssa-store-merging.c: Include gimple-fold.h.
7404 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
7405 (struct merged_store_group): Add bit_insertion field.
7406 (dump_char_array): Use standard hexadecimal format.
7407 (merged_store_group::merged_store_group): Set bit_insertion to false.
7408 (merged_store_group::apply_stores): Use optimal buffer size. Deal
7409 with BIT_INSERT_EXPR stores. Move up code updating the mask and
7410 also print the mask in the dump file.
7411 (pass_store_merging::gate): Minor tweak.
7412 (imm_store_chain_info::coalesce_immediate): Fix wrong association
7413 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
7414 stores with INTEGER_CST stores.
7415 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
7416 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
7417 and use it throughout. Generate bit insertion sequences if need be.
7418 (pass_store_merging::process_store): Remove redundant condition.
7419 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
7420
7421 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
7422
7423 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
7424 the 128-bit floating point types. Fix function comment.
7425
7426 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7427
7428 * config/aarch64/aarch64-simd.md
7429 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
7430 mnemonics.
7431 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
7432 mnemonics.
7433
7434 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7435
7436 PR tree-optimization/85989
7437 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
7438 variable.
7439 (backprop::intersect_uses): Check it when deciding whether this
7440 is a backedge reference.
7441 (backprop::process_block): Add each phi to m_visited_phis
7442 after visiting it, then clear it at the end.
7443
7444 2018-06-01 Richard Biener <rguenther@suse.de>
7445
7446 * tree-vectorizer.h (vect_dr_stmt): New function.
7447 (vect_get_load_cost): Adjust.
7448 (vect_get_store_cost): Likewise.
7449 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
7450 Use vect_dr_stmt instead of DR_SMTT.
7451 (vect_record_base_alignments): Likewise.
7452 (vect_calculate_target_alignment): Likewise.
7453 (vect_compute_data_ref_alignment): Likewise and make static.
7454 (vect_update_misalignment_for_peel): Likewise.
7455 (vect_verify_datarefs_alignment): Likewise.
7456 (vector_alignment_reachable_p): Likewise.
7457 (vect_get_data_access_cost): Likewise. Pass down
7458 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
7459 (vect_get_peeling_costs_all_drs): Likewise.
7460 (vect_peeling_hash_get_lowest_cost): Likewise.
7461 (vect_enhance_data_refs_alignment): Likewise.
7462 (vect_find_same_alignment_drs): Likewise.
7463 (vect_analyze_data_refs_alignment): Likewise.
7464 (vect_analyze_group_access_1): Likewise.
7465 (vect_analyze_group_access): Likewise.
7466 (vect_analyze_data_ref_access): Likewise.
7467 (vect_analyze_data_ref_accesses): Likewise.
7468 (vect_vfa_segment_size): Likewise.
7469 (vect_small_gap_p): Likewise.
7470 (vectorizable_with_step_bound_p): Likewise.
7471 (vect_prune_runtime_alias_test_list): Likewise.
7472 (vect_analyze_data_refs): Likewise.
7473 (vect_supportable_dr_alignment): Likewise.
7474 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7475 (vect_gen_prolog_loop_niters): Likewise.
7476 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7477 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
7478 modify DR_STMT.
7479 (vect_recog_mask_conversion_pattern): Likewise.
7480 (vect_try_gather_scatter_pattern): Likewise.
7481 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
7482 to vect_get_store_cost.
7483 (vect_get_store_cost): Get stmt_info instead of DR.
7484 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
7485 (vect_get_load_cost): Get stmt_info instead of DR.
7486
7487 2018-06-01 Richard Biener <rguenther@suse.de>
7488
7489 PR middle-end/86017
7490 * gimple-fold.c (var_decl_component_p): Also allow offsetted
7491 vars wrapped in MEM_REFs.
7492
7493 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
7494
7495 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7496 Fix subreg tests so that we only return a choice between
7497 GENERAL_REGS and FP_REGS if the original classes included both.
7498
7499 2018-06-01 Richard Biener <rguenther@suse.de>
7500
7501 PR ipa/85960
7502 * tree-ssa-structalias.c (get_function_part_constraint):
7503 Handle NULL fi->decl.
7504 (find_func_aliases_for_call): Properly handle indirect
7505 fi from direct call.
7506 (find_func_clobbers): Likewise.
7507 (ipa_pta_execute): Likewise.
7508 (create_variable_info_for): For functions that are ifunc_resolver
7509 resolve to a varinfo that contains the result of the resolver call.
7510 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
7511 aliases.
7512
7513 2018-05-31 Michael Collison <michael.collison@arm.com>
7514
7515 * config/aarch64/aarch64.md:
7516 (*fix_to_zero_extenddfdi2): New pattern.
7517 * gcc.target/aarch64/fix_extend1.c: New testcase.
7518
7519 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
7520
7521 PR middle-end/78809
7522 PR middle-end/83026
7523 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
7524 and BUILT_IN_STRNCMP_EQ.
7525 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
7526 BUILT_IN_STRNCMP_EQ.
7527 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
7528 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7529 (gimple_fold_builtin): Likewise.
7530 * tree-ssa-strlen.c (compute_string_length): New function.
7531 (determine_min_obsize): New function.
7532 (handle_builtin_string_cmp): New function to handle calls to
7533 string compare functions.
7534 (strlen_optimize_stmt): Add handling to builtin string compare
7535 calls.
7536 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
7537 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
7538 * tree.c (build_common_builtin_nodes): Add new defines of
7539 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
7540
7541 2018-05-31 Jakub Jelinek <jakub@redhat.com>
7542
7543 PR target/85984
7544 * bb-reorder.c (pass_partition_blocks::gate): Return false for
7545 functions with naked attribute.
7546
7547 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7548
7549 * config/i386/sse.md (avx_vec_concat<mode>):
7550 Substitute concat_tg_mode mode attribute with xtg_mode.
7551 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
7552 (concat_tg_mode): Remove mode attribute.
7553
7554 2018-05-31 Martin Sebor <msebor@redhat.com>
7555
7556 PR c/82063
7557 * calls.c (alloc_max_size): Correct a logic error/typo.
7558 Treat excessive arguments as infinite. Warn for invalid arguments.
7559 * doc/invoke.texi (-Walloc-size-larger-than): Update.
7560
7561 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
7562
7563 PR target/85829
7564 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
7565 and movx for Haswell.
7566
7567 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
7568 Cesar Philippidis <cesar@codesourcery.com>
7569
7570 PR middle-end/85879
7571 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
7572 when emitting error on private/firstprivate reductions.
7573 * omp-low.c (lower_omp_target): Avoid reference-type processing
7574 on pointers for firstprivate clause.
7575
7576 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7577
7578 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
7579 (st1x2): Likewise.
7580 (st1x3): Likewise.
7581 * config/aarch64/aarch64-simd.md
7582 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
7583 (aarch64_ld1_x3_<mode>): Likewise
7584 (aarch64_st1x2<VALLDIF:mode>): Likewise
7585 (aarch64_st1_x2_<mode>): Likewise
7586 (aarch64_st1x3<VALLDIF:mode>): Likewise
7587 (aarch64_st1_x3_<mode>): Likewise
7588 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
7589 (vld1_s8_x3): Likewise.
7590 (vld1_u16_x3): Likewise.
7591 (vld1_s16_x3): Likewise.
7592 (vld1_u32_x3): Likewise.
7593 (vld1_s32_x3): Likewise.
7594 (vld1_u64_x3): Likewise.
7595 (vld1_s64_x3): Likewise.
7596 (vld1_f16_x3): Likewise.
7597 (vld1_f32_x3): Likewise.
7598 (vld1_f64_x3): Likewise.
7599 (vld1_p8_x3): Likewise.
7600 (vld1_p16_x3): Likewise.
7601 (vld1_p64_x3): Likewise.
7602 (vld1q_u8_x3): Likewise.
7603 (vld1q_s8_x3): Likewise.
7604 (vld1q_u16_x3): Likewise.
7605 (vld1q_s16_x3): Likewise.
7606 (vld1q_u32_x3): Likewise.
7607 (vld1q_s32_x3): Likewise.
7608 (vld1q_u64_x3): Likewise.
7609 (vld1q_s64_x3): Likewise.
7610 (vld1q_f16_x3): Likewise.
7611 (vld1q_f32_x3): Likewise.
7612 (vld1q_f64_x3): Likewise.
7613 (vld1q_p8_x3): Likewise.
7614 (vld1q_p16_x3): Likewise.
7615 (vld1q_p64_x3): Likewise.
7616 (vst1_s64_x2): Likewise.
7617 (vst1_u64_x2): Likewise.
7618 (vst1_f64_x2): Likewise.
7619 (vst1_s8_x2): Likewise.
7620 (vst1_p8_x2): Likewise.
7621 (vst1_s16_x2): Likewise.
7622 (vst1_p16_x2): Likewise.
7623 (vst1_s32_x2): Likewise.
7624 (vst1_u8_x2): Likewise.
7625 (vst1_u16_x2): Likewise.
7626 (vst1_u32_x2): Likewise.
7627 (vst1_f16_x2): Likewise.
7628 (vst1_f32_x2): Likewise.
7629 (vst1_p64_x2): Likewise.
7630 (vst1q_s8_x2): Likewise.
7631 (vst1q_p8_x2): Likewise.
7632 (vst1q_s16_x2): Likewise.
7633 (vst1q_p16_x2): Likewise.
7634 (vst1q_s32_x2): Likewise.
7635 (vst1q_s64_x2): Likewise.
7636 (vst1q_u8_x2): Likewise.
7637 (vst1q_u16_x2): Likewise.
7638 (vst1q_u32_x2): Likewise.
7639 (vst1q_u64_x2): Likewise.
7640 (vst1q_f16_x2): Likewise.
7641 (vst1q_f32_x2): Likewise.
7642 (vst1q_f64_x2): Likewise.
7643 (vst1q_p64_x2): Likewise.
7644 (vst1_s64_x3): Likewise.
7645 (vst1_u64_x3): Likewise.
7646 (vst1_f64_x3): Likewise.
7647 (vst1_s8_x3): Likewise.
7648 (vst1_p8_x3): Likewise.
7649 (vst1_s16_x3): Likewise.
7650 (vst1_p16_x3): Likewise.
7651 (vst1_s32_x3): Likewise.
7652 (vst1_u8_x3): Likewise.
7653 (vst1_u16_x3): Likewise.
7654 (vst1_u32_x3): Likewise.
7655 (vst1_f16_x3): Likewise.
7656 (vst1_f32_x3): Likewise.
7657 (vst1_p64_x3): Likewise.
7658 (vst1q_s8_x3): Likewise.
7659 (vst1q_p8_x3): Likewise.
7660 (vst1q_s16_x3): Likewise.
7661 (vst1q_p16_x3): Likewise.
7662 (vst1q_s32_x3): Likewise.
7663 (vst1q_s64_x3): Likewise.
7664 (vst1q_u8_x3): Likewise.
7665 (vst1q_u16_x3): Likewise.
7666 (vst1q_u32_x3): Likewise.
7667 (vst1q_u64_x3): Likewise.
7668 (vst1q_f16_x3): Likewise.
7669 (vst1q_f32_x3): Likewise.
7670 (vst1q_f64_x3): Likewise.
7671 (vst1q_p64_x3): Likewise.
7672
7673 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7674
7675 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7676 user_label_prefix to name.
7677
7678 * tree-core.h: Update comment about the format of NAME string
7679 passed to handler in attribute_spec.
7680
7681 * config/msp430/msp430.md: Remove erroneous subreg expression from
7682 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7683 zero_extend{q,h}isi2.
7684
7685 2018-05-30 Borislav Petkov <bp@suse.de>
7686
7687 * doc/extend.texi: Document some architecture specific
7688 constraints and sort entries.
7689
7690 2018-05-30 Martin Sebor <msebor@redhat.com>
7691
7692 PR middle-end/85369
7693 * builtins.c (expand_builtin_stpcpy_1): New function.
7694 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7695 only if the former succeeds.
7696
7697 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7698
7699 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7700 in saphira.
7701
7702 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7703
7704 * doc/invoke.texi (-flinker-output): Document
7705
7706 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7707
7708 * passes.c (ipa_write_summaries): Only modify statements if body
7709 is in memory.
7710 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7711 incrementally linking.
7712 (ipa_passes): Likewise.
7713 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7714 pass down resolution info.
7715 * common.opt (flag_incremental_link): Update info.
7716 * gcc.c (plugin specs): Turn flinker-output=* to
7717 -plugin-opt=-linker-output-known
7718 * toplev.c (compile_file): Also cut compilation when doing incremental
7719 link.
7720 * flag-types. (enum lto_partition_model): Add
7721 LTO_LINKER_OUTPUT_NOLTOREL.
7722 (invoke.texi): Add -flinker-output docs.
7723 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7724 link same way as WPA; do not stream in dead initializers.
7725
7726 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7727 darf2out_register_external_decl): Support incremental link.
7728
7729 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7730
7731 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7732
7733 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7734
7735 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7736 it down to simple_object_copy_lto_debug_sections.
7737 (run_gcc): Determine incremental LTO link time and configure
7738 lto1 into non-wpa mode, disable renaming of debug sections.
7739
7740 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7741
7742 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7743 descriptions of various incorrectly documented functions.
7744
7745 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7746
7747 Revert:
7748 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7749 address check not strict.
7750
7751 2018-05-30 Richard Biener <rguenther@suse.de>
7752
7753 PR tree-optimization/85964
7754 * tracer.c (better_p): Drop initialized count check, we only
7755 call the function with initialized counts now.
7756 (find_best_successor): Do find a best edge if one
7757 has uninitialized count.
7758 (find_best_predecessor): Likewise. Do BB frequency check only
7759 if count is initialized.
7760
7761 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7762
7763 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7764 (aarch64_ldrstr_offset_compare): New.
7765 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7766 load/store orderings.
7767 (aarch64_gen_adjusted_ldpstp): Likewise.
7768
7769 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7770
7771 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7772 Check for subset of GENERAL_REGS and FP_REGS.
7773 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7774 r=w alternative.
7775
7776 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7777
7778 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7779 and wi::to_poly_offset. Add the current offset and then check
7780 whether the sum fits, rather than using an unchecked addition of
7781 a checked term. Check for a shwi rather than a uhwi.
7782 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7783 (store_constructor): Use poly_int_tree_p.
7784 (expand_expr_real_1): Likewise.
7785 * function.c (assign_temp): Likewise.
7786 * fold-const.c (const_binop): Use poly_int_tree_p and
7787 wi::to_poly_offset.
7788 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7789 division.
7790 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7791 to_poly_offset for MEM offsets.
7792 * ipa-icf.c (sem_variable::equals): Likewise.
7793 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7794 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7795 wi::to_poly_offset for BIT_FIELD_REF offsets.
7796 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7797 wi::to_poly_offset.
7798 * var-tracking.c (emit_note_insn_var_location): Use
7799 tree_to_poly_uint64.
7800
7801 2018-05-29 Jim Wilson <jimw@sifive.com>
7802
7803 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7804
7805 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7806
7807 PR target/85950
7808 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7809 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7810 sequence.
7811 (sse4_1_round<mode>2): Use nonimmediate_operand
7812 for operand 1 predicate.
7813
7814 2018-05-29 Martin Sebor <msebor@redhat.com>
7815 Richard Biener <rguenther@suse.de>
7816
7817 PR testsuite/85888
7818 * calls.c (get_size_range): Call determine_value_range instead
7819 of get_value_range..
7820 * tree-vrp.h (determine_value_range): Declared new function.
7821 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7822
7823 2018-05-29 Richard Biener <rguenther@suse.de>
7824
7825 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7826 sure to use non-pattern stmts for get_earlier_stmt arguments.
7827 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7828 called on pattern stmts.
7829 (get_later_stmt): Likewise.
7830
7831 2018-05-29 Martin Liska <mliska@suse.cz>
7832
7833 PR gcov-profile/85759
7834 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7835 env variables.
7836
7837 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7838
7839 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7840 VEC_UNPACK_*_EXPR.
7841 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7842 VEC_PACK_*_EXPR.
7843
7844 PR target/85918
7845 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7846 VEC_PACK_FLOAT_EXPR): New tree codes.
7847 * tree-pretty-print.c (op_code_prio): Handle
7848 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7849 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7850 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7851 * tree-inline.c (estimate_operator_cost): Likewise.
7852 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7853 * fold-const.c (const_binop): Likewise.
7854 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7855 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7856 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7857 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7858 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7859 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7860 * expr.c (expand_expr_real_2): Likewise.
7861 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7862 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7863 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7864 optabs.
7865 * optabs.c (expand_widen_pattern_expr): For
7866 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7867 sign from result type rather than operand's type.
7868 (expand_binop_directly): For vec_packu_float_optab and
7869 vec_packs_float_optab allow result type to be different from operand's
7870 type.
7871 * optabs-tree.c (optab_for_tree_code): Handle
7872 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7873 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7874 * tree-vect-generic.c (expand_vector_operations_1): Handle
7875 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7876 VEC_PACK_FLOAT_EXPR.
7877 * tree-vect-stmts.c (supportable_widening_operation): Handle
7878 FIX_TRUNC_EXPR.
7879 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7880 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7881 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7882 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7883 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7884 mode attributes.
7885 (vec_pack<floatprefix>_float_<mode>): New expander.
7886 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7887 attributes.
7888 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7889 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7890 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7891 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7892 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7893 Document.
7894 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7895 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7896 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7897 VEC_PACK_FLOAT_EXPR): Document.
7898
7899 2018-05-29 Richard Biener <rguenther@suse.de>
7900
7901 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7902 member.
7903 (stmt_vec_info_vec): Make pointer.
7904 (init_stmt_vec_info_vec): Remove.
7905 (free_stmt_vec_info_vec): Likewise.
7906 (set_stmt_vec_info_vec): New function.
7907 (free_stmt_vec_infos): Likewise.
7908 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7909 (set_vinfo_for_stmt): Likewise.
7910 (get_earlier_stmt): Likewise.
7911 (get_later_stmt): Likewise.
7912 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7913 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7914 (vec_info::~vec_info): Free stmt_vec_infos.
7915 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7916 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7917 (pass_slp_vectorize::execute): Likewise.
7918 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7919 (free_stmt_vec_info_vec): Likewise.
7920 (set_stmt_vec_info_vec): New function.
7921 (free_stmt_vec_infos): Likewise.
7922 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7923 the global stmt_vec_info_vec.
7924 * tree-parloops.c (gather_scalar_reductions): Use
7925 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7926 vector.
7927
7928 2018-05-29 Richard Biener <rguenther@suse.de>
7929
7930 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7931
7932 2018-05-29 Martin Liska <mliska@suse.cz>
7933 David Malcolm <dmalcolm@redhat.com>
7934
7935 * vec.c (test_reverse): New.
7936 (vec_c_tests): Add new test.
7937 * vec.h (vl_ptr>::reverse): New function.
7938
7939 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7940
7941 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7942
7943 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7944 and later.
7945
7946 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7947
7948 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7949
7950 2018-05-28 Richard Biener <rguenther@suse.de>
7951
7952 PR tree-optimization/85933
7953 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7954 look at stmts marked as vectorizable.
7955
7956 2018-05-28 Richard Biener <rguenther@suse.de>
7957
7958 PR tree-optimization/85934
7959 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7960 vector boolean check before scalar optimization.
7961
7962 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7963
7964 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7965 for armv5te.
7966
7967 2018-05-28 Mark Wielaard <mark@klomp.org>
7968
7969 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7970 if it is an expression containing a minus sign.
7971
7972 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7973
7974 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7975
7976 2018-05-27 Paul Koning <ni1d@arrl.net>
7977
7978 * config/pdp11/pdp11.md (truncsihi2): Remove.
7979
7980 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7981 Chung-Ju Wu <jasonwucj@gmail.com>
7982
7983 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7984 implementation.
7985 (unaligned_store_dw): Ditto.
7986 * config/nds32/nds32-memory-manipulation.c
7987 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7988 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7989 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7990 (emit_setmem_word_loop): Rename to ...
7991 (emit_setmem_doubleword_loop): ... this.
7992 (nds32_gen_dup_4_byte_to_word_value): New function.
7993 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7994 (nds32_expand_setmem_loop): Refine implementation.
7995 (nds32_expand_setmem_loop_v3m): Ditto.
7996 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7997 pattern.
7998
7999 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8000
8001 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8002
8003 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
8004
8005 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8006 (nds32_init_machine_status): Initialize machine->attr_naked_p and
8007 machine->attr_no_prologue_p.
8008 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8009 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8010 (nds32_expand_epilogue): Consider attr_naked_p.
8011 (nds32_expand_epilogue_v3pop): Likewise.
8012 (nds32_can_use_return_insn): Likewise.
8013 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8014 attr_no_prologue_p fields.
8015 * config/nds32/nds32.opt (mret-in-naked-func): New option.
8016
8017 2018-05-27 Jakub Jelinek <jakub@redhat.com>
8018
8019 PR target/85918
8020 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8021 attributes.
8022 * config/i386/sse.md
8023 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8024 Rename to ...
8025 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8026 ... this.
8027 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8028 Rename to ...
8029 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8030 ... this.
8031 (*<floatsuffix>floatv2div2sf2): Rename to ...
8032 (*float<floatunssuffix>v2div2sf2): ... this.
8033 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8034 (float<floatunssuffix>v2div2sf2_mask): ... this.
8035 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8036 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8037 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8038 to ...
8039 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8040 ... this.
8041 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8042 Rename to ...
8043 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8044 ... this.
8045 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8046 Rename to ...
8047 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8048 ... this.
8049 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8050 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8051 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8052 gen_ufix_truncv8dfv8si2.
8053 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8054 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8055 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8056 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8057 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8058 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8059 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8060 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8061
8062 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8063
8064 PR target/85900
8065 PR target/85345
8066 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
8067
8068 2018-05-25 Jim Wilson <jimw@sifive.com>
8069
8070 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
8071 * config/riscv/riscv.c (struct machine_function): Add
8072 interrupt_handler_p and attribute_checked_p fields.
8073 (riscv_attribute_table): Add interrupt.
8074 (riscv_interrupt_type_p): New.
8075 (riscv_save_reg_p): Save extra regs for interrupt handler.
8076 (riscv_use_save_libcall): Return false for interrupt handler.
8077 (riscv_first_stack_step): Add forward declaration.
8078 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
8079 for interrupt handler with large frame. Use it for saved reg list.
8080 (riscv_expand_prologue): Move flag_stack_usage_info support to
8081 eliminate duplication.
8082 (riscv_expand_epilogue): Generate mret for interrupt handler.
8083 (riscv_epilogue_uses): New.
8084 (riscv_can_use_return_insn): Return false for interrupt handler.
8085 (riscv_function_ok_for_sibcall): Likewise.
8086 (riscv_set_current_function): Add interrupt handler support.
8087 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
8088 * config/riscv/riscv.md (UNSPECV_MRET): New.
8089 (GP_REGNUM): New.
8090 (riscv_frflags, riscv_fsflags): Use tab after opcode.
8091 (riscv_mret): New.
8092 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
8093
8094 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
8095
8096 PR tree-optimization/85712
8097 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
8098 this candidate has already been replaced in-situ by a copy.
8099
8100 2018-05-25 Jason Merrill <jason@redhat.com>
8101
8102 PR c++/80485 - inline function non-zero address.
8103 * symtab.c (nonzero_address): Check DECL_COMDAT.
8104
8105 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
8106
8107 PR target/83628
8108 * config/alpha/alpha.md (ashlsi3): New insn pattern.
8109 (*ashlsi_se): Rename from *ashldi_se. Define as sign
8110 extension of SImode operation. Use const123_operand predicate.
8111 (*saddsi_1): Remove.
8112 (*saddl_se_1): Ditto.
8113 (*ssubsi_1): Ditto.
8114 (*ssubl_se_1): Ditto.
8115 * config/alpha/predicates.md (const123_operand): New predicate.
8116 * config/alpha/constraints.md (P): Use IN_RANGE.
8117
8118 2018-05-25 Richard Biener <rguenther@suse.de>
8119
8120 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
8121 defaulted to true.
8122 (ref_maybe_used_by_stmt_p): Likewise.
8123 (stmt_may_clobber_ref_p): Likewise.
8124 (stmt_may_clobber_ref_p_1): Likewise.
8125 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
8126 and pass it along.
8127 (ref_maybe_used_by_stmt_p): Likewise.
8128 (stmt_may_clobber_ref_p): Likewise.
8129 (stmt_may_clobber_ref_p_1): Likewise.
8130 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
8131 the alias oracle to disambiguate DRs with stmts DR analysis
8132 couldn't handle.
8133 (vect_analyze_data_refs): Do not give up on not analyzable
8134 DRs for BB vectorization. Remove code truncating the dataref
8135 vector.
8136
8137 2018-05-25 Jakub Jelinek <jakub@redhat.com>
8138
8139 PR target/85832
8140 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8141 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
8142 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
8143
8144 2018-05-25 Richard Biener <rguenther@suse.de>
8145
8146 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
8147 function, combining stmt data ref gathering and fatal analysis
8148 parts.
8149 (vect_analyze_data_refs): Remove now redudnant code and simplify.
8150 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
8151 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
8152 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
8153 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
8154
8155 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8156
8157 PR tree-optimization/85720
8158 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
8159 SCC if all partitions are builtins.
8160 (version_loop_by_alias_check): New parameter. Generate cancelable
8161 runtime alias check if all partitions are builtins.
8162 (distribute_loop): Update call to above function.
8163
8164 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8165
8166 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
8167 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
8168 (parm_default_def_partition_arg): Ditto.
8169 (set_parm_default_def_partition): Ditto.
8170 (get_parm_default_def_partitions): Ditto and make it static.
8171 (get_undefined_value_partitions): Ditto and make it static.
8172 (remove_ssa_form): Refactor call to init_var_map here.
8173 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
8174 computation for loop region.
8175 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
8176 (register_default_def): Delete.
8177 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
8178 (parm_default_def_partition_arg): Ditto.
8179 (set_parm_default_def_partition): Ditto.
8180 (get_parm_default_def_partitions): Ditto and make it static.
8181 (get_undefined_value_partitions): Ditto and make it static.
8182 (coalesce_with_default, coalesce_with_default): Update comment.
8183 (create_coalesce_list_for_region): New func factored out from
8184 create_outofssa_var_map.
8185 (populate_coalesce_list_for_outofssa): New func factored out from
8186 create_outofssa_var_map and coalesce_ssa_name.
8187 (create_outofssa_var_map): Delete.
8188 (coalesce_ssa_name): Refactor to support live range computation.
8189 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
8190 (get_parm_default_def_partitions): Delete.
8191 (get_undefined_value_partitions): Ditto.
8192 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
8193 computation for loop region.
8194 (new_tree_live_info, loe_visit_block): Ditto.
8195 (live_worklist, set_var_live_on_entry): Ditto.
8196 (calculate_live_on_exit, verify_live_on_entry): Ditto.
8197 * tree-ssa-live.h (struct _var_map): New fields.
8198 (init_var_map): Change decl.
8199 (region_contains_p): New.
8200
8201 2018-05-25 Bin Cheng <bin.cheng@arm.com>
8202
8203 * tree-ssa-live.h (live_merge_and_clear): Delete.
8204
8205 2018-05-25 Richard Biener <rguenther@suse.de>
8206
8207 PR c++/85912
8208 * tree-dump.c (dequeue_and_dump): Remove access to removed
8209 operand 2 of a SWITCH_EXPR.
8210
8211 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8212
8213 * doc/sourcebuild.texi (vect_double_cond_arith): Include
8214 multiplication and division.
8215 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
8216 (cond_udiv@var{m}, cond_umod@var{m}): Document.
8217 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
8218 (cond_udiv_optab, cond_umod_optab): New optabs.
8219 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
8220 (IFN_COND_RDIV): New internal functions.
8221 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
8222 TRUNC_MOD_EXPR and RDIV_EXPR.
8223 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
8224 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
8225 New unspecs.
8226 (SVE_INT_BINARY): Include mult.
8227 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
8228 (optab, sve_int_op): Handle mult.
8229 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
8230 UNSPEC_COND_DIV.
8231 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
8232 for SVE_INT_BINARY_SD.
8233
8234 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8235
8236 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
8237 (optab, sve_int_op): Handle div and udiv.
8238 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
8239 for SVE_INT_BINARY_SD.
8240 (*<optab><mode>3): New insn for the same.
8241
8242 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8243
8244 * tree-vect-patterns.c: Include predict.h.
8245 (vect_recog_divmod_pattern): Restrict check for division support
8246 to when optimizing for size.
8247
8248 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8249
8250 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
8251 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
8252 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
8253 (gimple_match_op::set_op): Likewise.
8254 (gimple_resimplify4): Declare.
8255 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
8256 (expr::gen_transform): Likewise.
8257 (decision_tree::gen): Generate a simplification routine for 4 operands.
8258 * gimple-match-head.c (gimple_simplify): Add an overload for
8259 4 operands. In the top-level function, handle up to 4 call
8260 arguments and call gimple_resimplify4.
8261 (gimple_resimplify4): New function.
8262 (build_call_internal): Pass a fourth operand.
8263 (maybe_push_to_seq): Likewise.
8264 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
8265 Fold VEC_COND_EXPRs of an operation and a default value into
8266 an IFN_COND_* function if possible.
8267 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
8268 New unspecs.
8269 (SVE_COND_FP_BINARY): Include them.
8270 (optab, sve_fp_op): Handle them.
8271 (SVE_INT_BINARY_REV): New code iterator.
8272 (SVE_COND_FP_BINARY_REV): New int iterator.
8273 (commutative): New int attribute.
8274 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
8275 Declare.
8276 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
8277 function.
8278 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
8279 (*cond_<optab><mode>): New patterns for reversed operands.
8280
8281 2018-05-25 Richard Biener <rguenther@suse.de>
8282
8283 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
8284 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
8285 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
8286 (STMT_VINFO_GROUPED_ACCESS): Adjust.
8287 * tree-vect-data-refs.c (everywhere): Adjust users.
8288 * tree-vect-loop.c (everywhere): Likewise.
8289 * tree-vect-slp.c (everywhere): Likewise.
8290 * tree-vect-stmts.c (everywhere): Likewise.
8291 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8292
8293 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8294
8295 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
8296 Rename to...
8297 (gcc_cv_as_section_exclude): ... this.
8298 Try Solaris as #exclude syntax.
8299 * configure: Regenerate.
8300 * config.in: Regenerate.
8301 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
8302 SECTION_EXCLUDE.
8303 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
8304 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
8305
8306 * varasm.c (default_elf_asm_named_section): Don't check if
8307 HAVE_GAS_SECTION_EXCLUDE is defined.
8308
8309 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8310
8311 * doc/md.texi: Update the documentation of the cond_* optabs
8312 to mention the new final operand. Fix GET_MODE_NUNITS call.
8313 Describe the scalar case too.
8314 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
8315 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
8316 instead of 2.
8317 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
8318 (get_conditional_internal_fn): Update comment.
8319 * tree-vect-loop.c (vectorizable_reduction): Pass the original
8320 accumulator value as a final argument to conditional functions.
8321 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
8322 a define_expand and add an "else" operand. Assert for now that
8323 the else operand is equal to operand 2. Use SVE_INT_BINARY and
8324 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
8325 (*cond_<optab><mode>): New patterns.
8326 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
8327 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8328 (UNSPEC_COND_EOR): Delete.
8329 (optab): Remove associated mappings.
8330 (SVE_INT_BINARY): New code iterator.
8331 (sve_int_op): Remove int attribute and add "minus" to the code
8332 attribute.
8333 (SVE_COND_INT_OP): Delete.
8334 (SVE_COND_FP_OP): Rename to...
8335 (SVE_COND_FP_BINARY): ...this.
8336
8337 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
8338
8339 * optabs.c (can_reuse_operands_p): New function.
8340 (maybe_legitimize_operands): Try to reuse the results for
8341 earlier operands.
8342
8343 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8344
8345 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
8346 Add {q} suffix to insn mnemonic.
8347
8348 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8349
8350 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
8351 (msp430_warn_func_return): New.
8352
8353 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
8354
8355 * fold-const.c (tree_nonzero_bits): New function.
8356 * fold-const.h (tree_nonzero_bits): Likewise.
8357 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
8358 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
8359
8360 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
8361
8362 PR target/85900
8363 PR target/85345
8364 * varasm.c (assemble_alias): Check ifunc_resolver only on
8365 FUNCTION_DECL.
8366
8367 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
8368
8369 PR target/85903
8370 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
8371 when memory input operand is handled.
8372
8373 2018-05-24 Luis Machado <luis.machado@linaro.org>
8374
8375 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
8376 global.
8377 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
8378
8379 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8380
8381 * match.pd: Delay FMA folds until after vectorization.
8382
8383 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
8384
8385 PR target/83009
8386 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8387 address check not strict.
8388
8389 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
8390
8391 * gimple-match.h (gimple_match_op): New class.
8392 (mprts_hook): Replace parameters with a gimple_match_op *.
8393 (maybe_build_generic_op): Likewise.
8394 (gimple_simplified_result_is_gimple_val): Replace parameters with
8395 a const gimple_match_op *.
8396 (gimple_simplify): Replace code_helper * and tree * parameters with
8397 a gimple_match_op * parameter.
8398 (gimple_resimplify1): Replace code_helper *, tree and tree *
8399 parameters with a gimple_match_op * parameter.
8400 (gimple_resimplify2): Likewise.
8401 (gimple_resimplify3): Likewise.
8402 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
8403 parameters with a gimple_match_op * parameter.
8404 * gimple-match-head.c (gimple_simplify): Change prototypes of
8405 auto-generated functions to take a gimple_match_op * instead of
8406 separate code_helper * and tree * parameters. Make the same
8407 change in the top-level overload and update calls to the
8408 gimple_resimplify routines. Update calls to the auto-generated
8409 functions and to maybe_push_res_to_seq in the publicly-facing
8410 operation-specific gimple_simplify overloads.
8411 (gimple_match_op::MAX_NUM_OPS): Define.
8412 (gimple_resimplify1): Replace rcode and ops with a single res_op
8413 parameter. Update call to gimple_simplify.
8414 (gimple_resimplify2): Likewise.
8415 (gimple_resimplify3): Likewise.
8416 (mprts_hook): Replace parameters with a gimple_match_op *.
8417 (maybe_build_generic_op): Likewise.
8418 (build_call_internal): Replace type, nargs and ops with
8419 a gimple_match_op *.
8420 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
8421 with a single gimple_match_op *. Update calls to mprts_hook,
8422 build_call_internal and gimple_simplified_result_is_gimple_val.
8423 Factor out code that is common to the tree_code and combined_fn cases.
8424 * genmatch.c (expr::gen_transform): Replace tem_code and
8425 tem_ops with a gimple_match_op called tem_op. Update calls
8426 to the gimple_resimplify functions and maybe_push_res_to_seq.
8427 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
8428 res_ops. Update call to the gimple_resimplify functions.
8429 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
8430 (decision_tree::gen): Make the functions take a gimple_match_op *
8431 called res_op instead of separate res_code and res_ops parameters.
8432 Update call accordingly.
8433 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
8434 and ops with a single res_op parameter. Update calls to
8435 maybe_build_generic_op and maybe_push_res_to_seq.
8436 (fold_stmt_1): Update calls to gimple_simplify and
8437 replace_stmt_with_simplification.
8438 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
8439 and gimple_simplified_result_is_gimple_val.
8440 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
8441 gimple_simplify.
8442 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
8443 with a gimple_match_op *.
8444 (vn_nary_build_or_lookup): Likewise. Update call to
8445 vn_nary_build_or_lookup_1.
8446 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
8447 gimple_match_op *. Update calls to the gimple_resimplify routines
8448 and to gimple_simplified_result_is_gimple_val.
8449 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
8450 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
8451 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
8452 (visit_nary_op): Likewise.
8453 (visit_reference_op_load): Likewise.
8454
8455 2018-05-23 Luis Machado <luis.machado@linaro.org>
8456
8457 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
8458 modifier for printing the step amount.
8459
8460 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
8461
8462 PR target/78849
8463 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
8464 types.
8465
8466 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
8467
8468 * doc/sourcebuild.texi (Endianness): New subsubsection.
8469
8470 2018-05-23 Luis Machado <luis.machado@linaro.org>
8471
8472 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8473 <prefetch_dynamic_strides>: New const bool field.
8474 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8475 prefetch_dynamic_strides.
8476 (exynosm1_prefetch_tune): Likewise.
8477 (thunderxt88_prefetch_tune): Likewise.
8478 (thunderx_prefetch_tune): Likewise.
8479 (thunderx2t99_prefetch_tune): Likewise.
8480 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
8481 false.
8482 (aarch64_override_options_internal): Update to set
8483 PARAM_PREFETCH_DYNAMIC_STRIDES.
8484 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8485 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8486 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8487 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8488 prefetch-dynamic-strides setting.
8489
8490 2018-05-23 Luis Machado <luis.machado@linaro.org>
8491
8492 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8493 <minimum_stride>: New const int field.
8494 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8495 minimum_stride field defaulting to -1.
8496 (exynosm1_prefetch_tune): Likewise.
8497 (thunderxt88_prefetch_tune): Likewise.
8498 (thunderx_prefetch_tune): Likewise.
8499 (thunderx2t99_prefetch_tune): Likewise.
8500 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
8501 <default_opt_level>: Set to 3.
8502 (aarch64_override_options_internal): Update to set
8503 PARAM_PREFETCH_MINIMUM_STRIDE.
8504 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8505 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8506 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8507 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8508 stride is constant and is below the minimum stride threshold.
8509
8510 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8511
8512 * config/arm/arm-cpus.in (mode26): Delete.
8513 (armv4): Delete mode26 reference.
8514 * config/arm/arm.c (arm_configure_build_target): Delete use of
8515 isa_bit_mode26.
8516
8517 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8518
8519 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
8520 New insn pattern.
8521 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
8522 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
8523 for non-SSE modes.
8524 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
8525 (floatunsdidf2): Ditto.
8526
8527 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
8528
8529 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
8530 (fixuns_trunc<mode>si2_avx512f): Ditto.
8531 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
8532 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
8533 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
8534
8535 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8536
8537 PR rtl-optimization/79985
8538 * df-scan.c (df_insn_refs_collect): Remove special case for
8539 global registers and asm statements.
8540
8541 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
8542
8543 * extend.texi (Global Register Variables): Rewrite the bullet list.
8544 Note that the register is available for allocation. Note that access
8545 via inline asm must use constraints. Add note about async-signal
8546 handlers. Remove paragraph about automagic register selection.
8547
8548 2018-05-23 Richard Biener <rguenther@suse.de>
8549
8550 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
8551 of fixed offset from memset VN.
8552
8553 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
8554
8555 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
8556 first_interp field.
8557 (alloc_cand_and_find_basis): Initialize first_interp field.
8558 (slsr_process_mul): Modify first_interp field.
8559 (slsr_process_add): Likewise.
8560 (slsr_process_cast): Modify first_interp field for each new
8561 interpretation.
8562 (slsr_process_copy): Likewise.
8563 (dump_candidate): Dump first_interp field.
8564 (replace_mult_candidate): Process all interpretations, not just
8565 subsequent ones.
8566 (replace_rhs_if_not_dup): Likewise.
8567 (replace_one_candidate): Likewise.
8568
8569 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
8570
8571 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
8572 Add new boolean.
8573 (aarch64_needs_frame_chain): New function.
8574 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
8575
8576 2018-05-23 Sudakshina Das <sudi.das@arm.com>
8577
8578 PR target/84882
8579 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
8580 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
8581 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
8582 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
8583 as true for strict-align.
8584 (aarch64_can_inline_p): Perform checks even when callee has no
8585 attributes to check for strict alignment.
8586 * doc/extend.texi (AArch64 Function Attributes): Document
8587 no-strict-align.
8588 * doc/invoke.texi: (AArch64 Options): Likewise.
8589
8590 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
8591
8592 PR tree-optimization/85853
8593 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
8594 the handling of the root of the node to...
8595 (vect_slp_analyze_node_operations_1): ...this new function,
8596 and run the whole thing with the child nodes' def types
8597 set according to their SLP node's def type.
8598
8599 2018-05-23 Richard Biener <rguenther@suse.de>
8600
8601 PR middle-end/85874
8602 * tree-data-ref.c (create_runtime_alias_checks): Defer
8603 and ignore overflow warnings.
8604
8605 2018-05-23 Yury Gribov <tetra2005@gmail.com>
8606
8607 PR tree-optimization/85822
8608 * tree-vrp.c (is_masked_range_test): Fix handling of negative
8609 constants.
8610
8611 2018-05-23 Richard Biener <rguenther@suse.de>
8612
8613 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8614 memset constants via native_interpret_expr.
8615
8616 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
8617
8618 PR target/85345
8619 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
8620 attribute.
8621 (cgraph_node::create_alias): Likewise.
8622 (cgraph_node::get_availability): Check ifunc_resolver instead
8623 of looking up ifunc attribute.
8624 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8625 * varasm.c (do_assemble_alias): Likewise.
8626 (assemble_alias): Likewise.
8627 (default_binds_local_p_3): Likewise.
8628 * cgraph.h (cgraph_node): Add ifunc_resolver.
8629 (cgraph_node::only_called_directly_or_aliased_p): Return false
8630 for IFUNC resolver.
8631 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
8632 attribute.
8633 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
8634 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
8635 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
8636 instead of looking up ifunc attribute.
8637
8638 2018-05-22 Luis Machado <luis.machado@linaro.org>
8639
8640 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
8641
8642 2018-05-22 Martin Sebor <msebor@redhat.com>
8643
8644 PR middle-end/85359
8645 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8646 only when expasion succeeds.
8647 (expand_builtin_strcmp): Same.
8648 (expand_builtin_strncmp): Same.
8649
8650 2018-05-22 Martin Sebor <msebor@redhat.com>
8651
8652 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8653
8654 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8655 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8656
8657 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8658 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8659 code.
8660 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8661 Add check for legitimate_address.
8662 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8663 (aarch64_swap_ldrstr_operands): New.
8664 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8665 Define prototype.
8666
8667 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8668 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8669
8670 * config/aarch64/aarch64.md: New patterns to generate stp
8671 and ldp.
8672 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8673 single words and double words.
8674 (load_pair_sw, load_pair_dw): Likewise.
8675 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8676 Delete.
8677 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8678 Delete.
8679 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8680 for different mode ldpstp and add peephole for merged zero stores.
8681 Likewise for loads.
8682 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8683 Add size check.
8684 (aarch64_gen_store_pair): Rename calls to match new patterns.
8685 (aarch64_gen_load_pair): Rename calls to match new patterns.
8686 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8687 (load_pair<DREG:mode><DREG2:mode>): ... This.
8688 (store_pair<mode>): Rename to...
8689 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8690 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8691 New mode iterators.
8692 (V_INT_EQUIV): Handle SImode.
8693 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8694 New predicate.
8695
8696 2018-05-22 Martin Sebor <msebor@redhat.com>
8697
8698 PR c/85623
8699 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8700 or ajust the presumed bound on an operation to avoid unnecessary
8701 warnings.
8702
8703 2018-05-22 Martin Sebor <msebor@redhat.com>
8704
8705 PR tree-optimization/85826
8706 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8707 assuming that a DECL necesarily has a constant size.
8708
8709 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8710
8711 PR middle-end/85862
8712 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8713
8714 2018-05-22 Richard Biener <rguenther@suse.de>
8715
8716 PR tree-optimization/85834
8717 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8718 non-constant and non-zero memset arguments.
8719
8720 2018-05-22 Martin Liska <mliska@suse.cz>
8721
8722 PR ipa/85607
8723 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8724
8725 2018-05-22 Richard Biener <rguenther@suse.de>
8726
8727 PR tree-optimization/85863
8728 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8729 comparisons when vectype is specified.
8730 (vectorizable_condition): Do not specify vectype for
8731 vect_is_simple_cond when SLP vectorizing.
8732
8733 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8734
8735 PR target/85657
8736 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8737 define __ibm128 as long double.
8738 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8739 as a distinct type when IEEE 128-bit support is enabled.
8740 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8741 128-bit types to use the correct functions.
8742 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8743 convert between 128-bit floating point types that have different
8744 modes but the same representation, instead of using gen_lowpart to
8745 makean alias.
8746 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8747 KFmode.
8748 (IFKF_reg): New attributes to give the register constraints for
8749 IFmode and KFmode.
8750 (extend<mode>tf2_internal): New insns to mark an explicit
8751 conversion between 128-bit floating point types that have a
8752 different mode but share the same representation.
8753
8754 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8755
8756 PR tree-optimization/85814
8757 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8758 a null return from get_strinfo when unsharing the next
8759 strinfo in the chain.
8760
8761 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8762
8763 PR gcc/84923
8764 * varasm.c (weak_finish): Clean up weak_decls.
8765
8766 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8767
8768 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8769 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8770 UNSPEC_UADALP values.
8771 * config/aarch64/iterators.md (ABAL): New int iterator.
8772 (ABDL2): Likewise.
8773 (ADALP): Likewise.
8774 (sur): Add mappings for the above.
8775 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8776 New define_insn.
8777 (aarch64_<sur>abal<mode>_4): Likewise.
8778 (aarch64_<sur>adalp<mode>_3): Likewise.
8779 (<sur>sadv16qi): New define_expand.
8780
8781 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8782
8783 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8784 (*movdf_internal): Ditto.
8785 (*rcpsf2_sse): Ditto.
8786 (*rsqrtsf2_sse): Ditto.
8787 (*sqrt<mode>2_sse): Ditto.
8788
8789 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8790
8791 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8792 eor3q<mode>4.
8793 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8794 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8795 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8796 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8797 vbcaxq_s64): New.
8798 * config/aarch64/arm_neon.h: Likewise.
8799 * config/aarch64/iterators.md (VQ_I): New.
8800
8801 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8802
8803 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8804 arc*-*-linux*.
8805 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8806 MULTILIB_DIRNAMES
8807
8808 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8809
8810 * config/nds32/constraints.md (S): New constraint.
8811 * config/nds32/nds32.md (call_internal): Use constraint S.
8812 (call_value_internal): Likewise.
8813 (sibcall_internal): Likewise.
8814 (sibcall_value_internal): Likewise.
8815
8816 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8817 Chung-Ju Wu <jasonwucj@gmail.com>
8818
8819 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8820 into consideration.
8821
8822 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8823 Chung-Ju Wu <jasonwucj@gmail.com>
8824
8825 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8826 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8827 (nds32_rtx_costs_impl): Simplify.
8828 (nds32_address_cost_impl): Simplify.
8829 (nds32_init_rtx_costs): New function.
8830 (nds32_rtx_costs_speed_prefer): Likewise.
8831 (nds32_rtx_costs_size_prefer): Likewise.
8832 (nds32_address_cost_speed_prefer): Likewise.
8833 (nds32_address_cost_speed_fwprop): Likewise.
8834 (nds32_address_cost_size_prefer): Likewise.
8835 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8836 * config/nds32/nds32.c (nds32_option_override): Use
8837 nds32_init_rtx_costs function.
8838
8839 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8840
8841 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8842 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8843 (TARGET_PIPELINE_N8): Likewise.
8844 (TARGET_PIPELINE_N10): Likewise.
8845 (TARGET_PIPELINE_N13): Likewise.
8846 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8847
8848 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8849
8850 * config/nds32/nds32-fpu.md: Update copyright year.
8851
8852 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8853
8854 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8855
8856 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8857
8858 * config/nds32/nds32.c
8859 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8860 * config/nds32/nds32.opt (minline-asm-r15): New option.
8861
8862 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8863
8864 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8865 MASK_HW_ABS.
8866 * config/nds32/nds32.md (abssi2): New pattern.
8867
8868 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8869
8870 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8871 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8872 Merge insn pattern from sse_cvtsi2ss<round_name> and
8873 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8874 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8875 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8876 using SWI48 mode iterator.
8877 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8878 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8879 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8880 pattern from sse_cvttss2si<round_saeonly_name>
8881 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8882 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8883 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8884 using SWI48 mode iterator.
8885 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8886 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8887 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8888 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8889 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8890 using SWI48 mode iterator.
8891 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8892 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8893 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8894 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8895 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8896 SWI48 mode iterator.
8897 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8898 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8899 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8900 pattern from sse_cvttsd2si<round_saeonly_name>
8901 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8902
8903 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8904
8905 * config/nds32/nds32-md-auxiliary.c
8906 (nds32_valid_smw_lwm_base_p): Refine.
8907 (nds32_output_smw_single_word): Refine.
8908 (nds32_output_smw_double_word): New.
8909 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8910
8911 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8912
8913 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8914 (nds32_output_stack_pop): Refine.
8915 (nds32_expand_unaligned_load): Refine.
8916 (nds32_expand_unaligned_store): Refine.
8917
8918 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8919 Chung-Ju Wu <jasonwucj@gmail.com>
8920
8921 * config/nds32/constants.md: Add TP_REGNUM constant.
8922 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8923 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8924 UNSPEC_ADD32.
8925 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8926 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8927 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8928 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8929 and PIC code generation.
8930 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8931 code generation.
8932 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8933 optimization.
8934 * config/nds32/nds32.md: Support TLS and PIC.
8935 * config/nds32/nds32.c: Support TLS and PIC.
8936 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8937 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8938 predicate.
8939
8940 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8941
8942 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8943 mode with E_ prefix.
8944
8945 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8946 Chung-Ju Wu <jasonwucj@gmail.com>
8947
8948 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8949 * config/nds32/nds32-md-auxiliary.c
8950 (symbolic_reference_mentioned_p): New.
8951 (nds32_legitimize_ict_address): New.
8952 (nds32_expand_ict_move): New.
8953 (nds32_indirect_call_referenced_p): New.
8954 (nds32_symbol_binds_local_p): Delete.
8955 (nds32_long_call_p): Modify.
8956 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8957 * config/nds32/nds32-protos.h
8958 (symbolic_reference_mentioned_p): Declare.
8959 (nds32_legitimize_ict_address): Declare.
8960 (nds32_expand_ict_move): Declare.
8961 (nds32_indirect_call_referenced_p): Declare.
8962 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8963 (nds32_relax_group): Use nds32_ict_const_p as condition.
8964 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8965 (nds32_asm_file_start): Output ict_model directive in asm code.
8966 (nds32_legitimate_address_p): Consider indirect call.
8967 (nds32_print_operand): Consider indirect call.
8968 (nds32_print_operand_address): Consider indirect call.
8969 (nds32_insert_attributes): Handle "indirect_call" attribute.
8970 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8971 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8972 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8973 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8974 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8975 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8976 (TARGET_ICT_MODEL_SMALL): Define.
8977 (TARGET_ICT_MODEL_LARGE): Define.
8978 * config/nds32/nds32.md (movsi): Consider ict model.
8979 (call, call_value): Consider ict model.
8980 (sibcall, sibcall_value): Consider ict model.
8981 * config/nds32/nds32.opt (mict-model): New option.
8982 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8983 model.
8984
8985 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8986 Monk Chiang <sh.chiang04@gmail.com>
8987 Jim Wilson <jimw@sifive.com>
8988
8989 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8990 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8991 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8992 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8993 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8994 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8995 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8996 compute save_libcall_adjustment properly.
8997 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8998 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8999 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9000 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9001 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9002 (ABI_SPEC): Handle mabi=ilp32e.
9003 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9004 (RVE): Add RVE mask.
9005 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9006 <-march>: Add rv32e as an example.
9007
9008 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
9009
9010 PR c++/82899
9011 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9012 (intra_create_variable_infos): Handle C++ constructors.
9013
9014 2018-05-18 Martin Liska <mliska@suse.cz>
9015
9016 * passes.def: Remove a redundant pass.
9017
9018 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
9019
9020 PR bootstrap/85838
9021 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9022
9023 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9024
9025 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9026 (ARMv4): Update.
9027 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9028 (ARMv6m): Update.
9029 (armv2, armv2a, armv3, armv3m): Delete architectures.
9030 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9031 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9032 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9033 Delete cpus.
9034 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9035 (*mulsidi3adddi): Likewise.
9036 (mulsidi3): Likewise.
9037 (*mulsidi3_nov6): Likewise.
9038 (umulsidi3): Likewise.
9039 (umulsidi3_nov6): Likewise.
9040 (umaddsidi4): Likewise.
9041 (*umulsidi3adddi): Likewise.
9042 (smulsi3_highpart): Likewise.
9043 (*smulsi3_highpart_nov6): Likewise.
9044 (umulsi3_highpart): Likewise.
9045 (*umulsi3_highpart_nov6): Likewise.
9046 * config/arm/arm.h (arm_arch3m): Delete.
9047 * config/arm/arm.c (arm_arch3m): Delete.
9048 (arm_option_override_internal): Update armv3-related comment.
9049 (arm_configure_build_target): Delete use of isa_bit_mode32.
9050 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9051 (arm_rtx_costs_internal): Delete check of arm_arch3m.
9052 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9053 (mulsa3): Likewise.
9054 (mulusa3): Likewise.
9055 * config/arm/arm-protos.h (arm_arch3m): Delete.
9056 * config/arm/arm-tables.opt: Regenerate.
9057 * config/arm/arm-tune.md: Likewise.
9058 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9059 deleted architectures.
9060
9061 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9062
9063 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9064 (armv5t, armv5te): New features.
9065 (ARMv5, ARMv5e): Delete fgroups.
9066 (ARMv5t, ARMv5te): Adjust for above changes.
9067 (ARMv6m): Likewise.
9068 (armv5, armv5e): Delete arches.
9069 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
9070 arm_arch5.
9071 (*call_reg_arm): Likewise.
9072 (*call_value_reg_armv5): Likewise.
9073 (*call_value_reg_arm): Likewise.
9074 (*call_symbol): Likewise.
9075 (*call_value_symbol): Likewise.
9076 (*sibcall_insn): Likewise.
9077 (*sibcall_value_insn): Likewise.
9078 (clzsi2): Likewise.
9079 (prefetch): Likewise.
9080 (define_split and define_peephole2 dependent on arm_arch5):
9081 Likewise.
9082 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
9083 arm_arch5e.
9084 (TARGET_ARM_QBIT): Likewise.
9085 (TARGET_DSP_MULTIPLY): Likewise.
9086 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
9087 (arm_arch5, arm_arch5e): Delete.
9088 (arm_arch5t, arm_arch5te): Declare.
9089 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
9090 (arm_arch5t): Declare.
9091 (arm_option_reconfigure_globals): Update for the above.
9092 (arm_options_perform_arch_sanity_checks): Update comment, replace
9093 use of arm_arch5 with arm_arch5t.
9094 (use_return_insn): Likewise.
9095 (arm_emit_call_insn): Likewise.
9096 (output_return_instruction): Likewise.
9097 (arm_final_prescan_insn): Likewise.
9098 (arm_coproc_builtin_available): Likewise.
9099 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
9100 arm_arch5e with arm_arch5t and arm_arch5te.
9101 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
9102 (arm_arch5t, arm_arch5te): Declare.
9103 * config/arm/arm-tables.opt: Regenerate.
9104 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
9105 * config/arm/t-multilib: Likewise.
9106 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
9107 instead of arm_arch5.
9108 (*call_reg_thumb1): Likewise.
9109 (*call_value_reg_thumb1_v5): Likewise.
9110 (*call_value_reg_thumb1): Likewise.
9111 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
9112 unreachable path.
9113 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
9114
9115 2018-05-18 Martin Liska <mliska@suse.cz>
9116
9117 PR gcov-profile/84846
9118 * doc/gcov.texi: Document -t option of gcov tool.
9119
9120 2018-05-18 Martin Liska <mliska@suse.cz>
9121
9122 PR gcov-profile/84846
9123 * gcov.c (print_usage): Add new -t option.
9124 (process_args): Handle the option.
9125 (generate_results): Use stdout as output when requested by
9126 the option.
9127
9128 2018-05-18 Martin Liska <mliska@suse.cz>
9129
9130 PR gcov-profile/84846
9131 * coverage.c (coverage_init): Write PWD to .gcno file.
9132 * doc/gcov.texi: Document how working directory is printed.
9133 * gcov-dump.c (dump_gcov_file): Print PWD.
9134 * gcov.c (output_intermediate_file): Likewise.
9135 (read_graph_file): Read PWD string.
9136 (output_lines): Print PWD.
9137
9138 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9139
9140 PR middle-end/85817
9141 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
9142 for retval and return false if all args to phi are zero.
9143
9144 2018-05-18 Richard Biener <rguenther@suse.de>
9145
9146 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
9147 method.
9148 (evrp_dom_walker::before_dom_children): Call it.
9149
9150 2018-05-18 Richard Biener <rguenther@suse.de>
9151
9152 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
9153 results when processing array refs with variable index.
9154
9155 2018-05-18 Toon Moene <toon@moene.org>
9156
9157 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
9158 directly after that of -floop-interchange. Indicate that both
9159 options are enabled by default when specifying -O3.
9160
9161 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9162
9163 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
9164 iterator. Delete separate integer-mode vec_set<mode> expander.
9165 (aarch64_simd_vec_setv2di): Delete.
9166 (vec_setv2di): Delete.
9167 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
9168 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
9169 the "w, r" alternative.
9170
9171 2018-05-18 Martin Liska <mliska@suse.cz>
9172
9173 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
9174 * tree-pass.h (make_pass_lower_switch_O0): New function.
9175 * tree-switch-conversion.c (node_has_low_bound): Remove.
9176 (node_has_high_bound): Likewise.
9177 (node_is_bounded): Likewise.
9178 (class pass_lower_switch): Make it a template type and create
9179 two instances.
9180 (pass_lower_switch::execute): Add template argument.
9181 (make_pass_lower_switch): New function.
9182 (make_pass_lower_switch_O0): New function.
9183 (do_jump_if_equal): Remove.
9184 (emit_case_nodes): Simplify to just handle all 3 cases and leave
9185 all the hard work to tree optimization passes.
9186
9187 2018-05-18 Martin Liska <mliska@suse.cz>
9188
9189 * dbgcnt.c (limit_low): Renamed from limit.
9190 (limit_high): New variable.
9191 (dbg_cnt_is_enabled): Check for upper limit.
9192 (dbg_cnt): Adjust dumping.
9193 (dbg_cnt_set_limit_by_index): Add new argument for high
9194 value.
9195 (dbg_cnt_set_limit_by_name): Likewise.
9196 (dbg_cnt_process_single_pair): Parse new format.
9197 (dbg_cnt_process_opt): Use strtok.
9198 (dbg_cnt_list_all_counters): Remove 'value' and add
9199 'limit_high'.
9200 * doc/invoke.texi: Document changes.
9201
9202 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
9203
9204 * doc/sourcebuild.texi (scalar_all_fma): Document.
9205 * tree.def (FMA_EXPR): Delete.
9206 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
9207 * internal-fn.c (ternary_direct): New macro.
9208 (expand_ternary_optab_fn): Likewise.
9209 (direct_ternary_optab_supported_p): Likewise.
9210 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
9211 * builtins.c (fold_builtin_fma): Delete.
9212 (fold_builtin_3): Don't call it.
9213 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
9214 * expr.c (expand_expr_real_2): Likewise.
9215 * fold-const.c (operand_equal_p): Likewise.
9216 (fold_ternary_loc): Likewise.
9217 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
9218 * gimple.c (DEFTREECODE): Likewise.
9219 * gimplify.c (gimplify_expr): Likewise.
9220 * optabs-tree.c (optab_for_tree_code): Likewise.
9221 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9222 * tree-eh.c (operation_could_trap_p): Likewise.
9223 (stmt_could_throw_1_p): Likewise.
9224 * tree-inline.c (estimate_operator_cost): Likewise.
9225 * tree-pretty-print.c (dump_generic_node): Likewise.
9226 (op_code_prio): Likewise.
9227 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9228 * tree-ssa-operands.c (get_expr_operands): Likewise.
9229 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
9230 * fold-const-call.h (fold_fma): Delete.
9231 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
9232 CFN_FNMA and CFN_FNMS.
9233 (fold_fma): Delete.
9234 * genmatch.c (combined_fn): New enum.
9235 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
9236 (commutative_op): New function.
9237 (commutate): Use it. Handle more than 2 operands.
9238 (dt_operand::gen_gimple_expr): Use commutative_op.
9239 (parser::parse_expr): Allow :c to be used with non-binary
9240 operators if the commutative operand is known.
9241 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
9242 CFN_FMS, CFN_FNMA and CFN_FNMS.
9243 (backprop::process_assign_use): Remove FMA_EXPR handling.
9244 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
9245 (gen_hsa_fma): New function.
9246 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
9247 IFN_FNMA and IFN_FNMS.
9248 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
9249 * gimple-fold.h (follow_all_ssa_edges): Declare.
9250 * gimple-fold.c (follow_all_ssa_edges): New function.
9251 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
9252 gimple_build interface and use follow_all_ssa_edges to fold the result.
9253 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
9254 instead of checking for optabs directly.
9255 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
9256 rather than FMA_EXPRs.
9257 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
9258 call to IFN_FMA instead of an FMA_EXPR.
9259
9260 2018-05-17 Jim Wilson <jimw@sifive.com>
9261
9262 * expr.c (do_tablejump): When converting index to Pmode, if we have a
9263 sign extended promoted subreg, and the range does not have the sign bit
9264 set, then do a sign extend.
9265
9266 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
9267 test, check for sign extended subreg and/or constant operands, and
9268 do a sign extend in that case.
9269
9270 2018-05-17 Steve Ellcey <sellcey@cavium.com>
9271
9272 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
9273 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
9274 Add untyped.
9275 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
9276 Change logics_shift_reg to logics_shift_imm.
9277 (thunderx2t99_fp_loadpair_basic): Delete.
9278 (thunderx2t99_fp_storepair_basic): Delete.
9279 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
9280 (thunderx2t99_asimd_polynomial): Delete.
9281 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
9282 and neon_fp_mul_d_scalar_q.
9283 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
9284 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
9285 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
9286 (thunderx2t99_asimd_lut): Add missing tbl types.
9287 (thunderx2t99_asimd_ext): Delete.
9288 (thunderx2t99_asimd_load1_1_mult): Delete.
9289 (thunderx2t99_asimd_load1_2_mult): Delete.
9290 (thunderx2t99_asimd_load1_ldp): New.
9291 (thunderx2t99_asimd_load1): New.
9292 (thunderx2t99_asimd_load2): Add missing *load2* types.
9293 (thunderx2t99_asimd_load3): New.
9294 (thunderx2t99_asimd_load4): New.
9295 (thunderx2t99_asimd_store1_1_mult): Delete.
9296 (thunderx2t99_asimd_store1_2_mult): Delete.
9297 (thunderx2t99_asimd_store2_mult): Delete.
9298 (thunderx2t99_asimd_store2_onelane): Delete.
9299 (thunderx2t99_asimd_store_stp): New.
9300 (thunderx2t99_asimd_store1): New.
9301 (thunderx2t99_asimd_store2): New.
9302 (thunderx2t99_asimd_store3): New.
9303 (thunderx2t99_asimd_store4): New.
9304
9305 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
9306
9307 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
9308 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
9309
9310 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
9311 Segher Boessenkool <segher@kernel.crashing.org>
9312
9313 PR target/85698
9314 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
9315 operand.
9316
9317 2018-05-17 Richard Biener <rguenther@suse.de>
9318
9319 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
9320 for pruning loop and prune defs feeding only already visited PHIs.
9321
9322 2018-05-17 Richard Biener <rguenther@suse.de>
9323
9324 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
9325
9326 2018-05-17 Bin Cheng <bin.cheng@arm.com>
9327 Richard Biener <rguenther@suse.de>
9328
9329 PR tree-optimization/85793
9330 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
9331 for VMAT_ELEMENTWISE.
9332
9333 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9334
9335 * internal-fn.h (lookup_internal_fn): Declare
9336 * internal-fn.c (lookup_internal_fn): New function.
9337 * gimple.c (gimple_build_call_from_tree): Handle calls to
9338 internal functions.
9339 * gimple-pretty-print.c (dump_gimple_call): Print "." before
9340 internal function names.
9341 * tree-pretty-print.c (dump_generic_node): Likewise.
9342 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
9343
9344 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
9345
9346 * gimple-fold.h (gimple_build): Make the function forms take
9347 combined_fn rather than built_in_function.
9348 (gimple_simplify): Likewise.
9349 * gimple-match-head.c (gimple_simplify): Likewise.
9350 * gimple-fold.c (gimple_build): Likewise.
9351 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
9352 rather than gimple_build_call_internal.
9353 (get_initial_defs_for_reduction): Likewise.
9354 (vect_create_epilog_for_reduction): Likewise.
9355 (vectorizable_live_operation): Likewise.
9356
9357 2018-05-17 Martin Liska <mliska@suse.cz>
9358
9359 * gimple-ssa-sprintf.c (format_directive): Do not use
9360 space in between 'G_' and '('.
9361
9362 2018-05-17 Jakub Jelinek <jakub@redhat.com>
9363
9364 PR target/85323
9365 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
9366 even if the mask is not all ones.
9367
9368 PR target/85323
9369 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
9370 vector.
9371 (ix86_gimple_fold_builtin): Likewise.
9372
9373 PR target/85323
9374 * config/i386/i386.c: Include tree-vector-builder.h.
9375 (ix86_vector_shift_count): New function.
9376 (ix86_fold_builtin): Fold shift builtins by scalar count.
9377 (ix86_gimple_fold_builtin): Likewise.
9378
9379 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
9380 _mm512_setzero): New intrinsics.
9381
9382 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
9383 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9384
9385 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
9386 code generation for cases where splatting a value is not useful.
9387 * simplify-rtx.c (simplify_ternary_operation): Simplify
9388 vec_merge across a vec_duplicate and a paradoxical subreg forming
9389 a vector mode to a vec_concat.
9390
9391 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
9392
9393 * config.gcc: Support "goldmont-plus".
9394 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9395 "goldmont-plus".
9396 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9397 PROCESSOR_GOLDMONT_PLUS.
9398 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
9399 (processor_target_table): Add "goldmont-plus".
9400 (PTA_GOLDMONT_PLUS): Define.
9401 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
9402 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
9403 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
9404 (fold_builtin_cpu): Add "goldmont-plus".
9405 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
9406 (ix86_option_override_internal): Add "goldmont-plus".
9407 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
9408 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
9409 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
9410 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
9411
9412 2018-05-17 Richard Biener <rguenther@suse.de>
9413
9414 PR tree-optimization/85757
9415 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
9416 remove defs that only feed that PHI from further processing.
9417
9418 2018-05-16 Jim Wilson <jimw@sifive.com>
9419
9420 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
9421 asterisk to name.
9422 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
9423
9424 2018-05-16 Mark Wielaard <mark@klomp.org>
9425
9426 * dwarf2out.c (count_index_strings): New function.
9427 (output_indirect_strings): Call count_index_strings and generate
9428 header for dwarf_version >= 5.
9429
9430 2018-05-16 Mark Wielaard <mark@klomp.org>
9431
9432 * dwarf2out.c (dwarf_FORM): New function.
9433 (set_indirect_string): Use dwarf_FORM.
9434 (reset_indirect_string): Likewise.
9435 (size_of_die): Likewise.
9436 (value_format): Likewise.
9437 (output_die): Likewise.
9438 (add_skeleton_AT_string): Likewise.
9439 (output_macinfo_op): Likewise.
9440 (index_string): Likewise.
9441 (output_index_string_offset): Likewise.
9442 (output_index_string): Likewise.
9443 (count_index_strings): Likewise.
9444
9445 2018-05-16 Carl Love <cel@us.ibm.com>
9446
9447 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9448 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
9449
9450 2018-05-16 Martin Jambor <mjambor@suse.cz>
9451
9452 * ipa-prop.c (ipa_free_all_edge_args): Remove.
9453 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
9454
9455 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
9456
9457 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
9458 (fnma<mode>4): Likewise.
9459 (fms<mode>4): Likewise.
9460 (fnms<mode>4): Likewise.
9461 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
9462 (aarch64_fnma<mode>4): Likewise.
9463 (aarch64_fms<mode>4): Likewise.
9464 (aarch64_fnms<mode>4): Likewise.
9465 (aarch64_fnmadd<mode>4): Likewise.
9466
9467 2018-05-16 Jason Merrill <jason@redhat.com>
9468
9469 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
9470
9471 2018-05-16 Richard Biener <rguenther@suse.de>
9472
9473 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
9474 (dump_stmt_cost): Declare.
9475 (add_stmt_cost): Dump cost we add.
9476 (add_stmt_costs): New function.
9477 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
9478 No longer exported.
9479 (vect_analyze_stmt): Adjust prototype.
9480 (vectorizable_condition): Likewise.
9481 (vectorizable_live_operation): Likewise.
9482 (vectorizable_reduction): Likewise.
9483 (vectorizable_induction): Likewise.
9484 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
9485 cost vector to pass to vectorizable_ and record afterwards.
9486 (vect_model_reduction_cost): Take cost vector argument and adjust.
9487 (vect_model_induction_cost): Likewise.
9488 (vectorizable_reduction): Likewise.
9489 (vectorizable_induction): Likewise.
9490 (vectorizable_live_operation): Likewise.
9491 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
9492 SLP_TREE_NUMBER_OF_VEC_STMTS.
9493 (vect_analyze_slp_cost_1): Remove.
9494 (vect_analyze_slp_cost): Likewise.
9495 (vect_slp_analyze_node_operations): Take visited args and
9496 a target cost vector. Avoid processing already visited stmt sets.
9497 (vect_slp_analyze_operations): Use a local cost vector to gather
9498 costs and register those of non-discarded instances.
9499 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
9500 (vect_schedule_slp_instance): Remove copying of
9501 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
9502 zero.
9503 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
9504 adding cost. Record cost entry location.
9505 (vect_prologue_cost_for_slp_op): Function to compute cost of
9506 a constant or invariant generated for SLP vect in the prologue,
9507 split out from vect_analyze_slp_cost_1.
9508 (vect_model_simple_cost): Make static. Adjust for SLP costing.
9509 (vect_model_promotion_demotion_cost): Likewise.
9510 (vect_model_store_cost): Likewise, make static.
9511 (vect_model_load_cost): Likewise.
9512 (vectorizable_bswap): Add cost vector arg and adjust.
9513 (vectorizable_call): Likewise.
9514 (vectorizable_simd_clone_call): Likewise.
9515 (vectorizable_conversion): Likewise.
9516 (vectorizable_assignment): Likewise.
9517 (vectorizable_shift): Likewise.
9518 (vectorizable_operation): Likewise.
9519 (vectorizable_store): Likewise.
9520 (vectorizable_load): Likewise.
9521 (vectorizable_condition): Likewise.
9522 (vectorizable_comparison): Likewise.
9523 (can_vectorize_live_stmts): Likewise.
9524 (vect_analyze_stmt): Likewise.
9525 (vect_transform_stmt): Adjust calls to vectorizable_*.
9526 * tree-vectorizer.c: Include gimple-pretty-print.h.
9527 (dump_stmt_cost): New function.
9528
9529 2018-05-16 Richard Biener <rguenther@suse.de>
9530
9531 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
9532 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
9533 * tree-ssa-dse.c: Include tree-ssa-loop.h.
9534 (check_name): New callback.
9535 (dse_classify_store): Track cycles via a visited bitmap of PHI
9536 defs and simplify handling of in-loop and across loop dead stores
9537 and properly fail for loop-variant refs. Handle byte-tracking with
9538 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
9539 limiting the walk.
9540
9541 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
9542
9543 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
9544 (vect_get_mask_type_for_stmt): Likewise.
9545 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
9546 split out from...
9547 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
9548 to determine the statement's vector type and the vector type that
9549 should be used for calculating nunits. Deal with cases in which
9550 the type has to be deferred.
9551 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
9552 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
9553 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
9554 (vect_determine_vf_for_stmt): New functions, split out from...
9555 (vect_determine_vectorization_factor): ...here.
9556 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
9557 (vect_get_mask_type_for_stmt): New functions, split out from
9558 vect_determine_vectorization_factor.
9559
9560 2018-05-16 Richard Biener <rguenther@suse.de>
9561
9562 * tree-cfg.c (verify_gimple_assign_ternary): Properly
9563 verify the [VEC_]COND_EXPR embedded comparison.
9564
9565 2018-05-15 Martin Sebor <msebor@redhat.com>
9566
9567 PR tree-optimization/85753
9568 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
9569 RECORD_TYPE in addition to ARRAY_TYPE.
9570
9571 2018-05-15 Martin Sebor <msebor@redhat.com>
9572
9573 PR middle-end/85643
9574 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
9575
9576 2018-05-15 Richard Biener <rguenther@suse.de>
9577
9578 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
9579 add by_clobber_p one. Change algorithm to collect all defs
9580 representing uses we need to walk and try reducing them to
9581 a single one before failing.
9582 (dse_dom_walker::dse_optimize_stmt): Adjust.
9583
9584 2018-05-13 Mark Wielaard <mark@klomp.org>
9585
9586 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
9587 (size_of_loc_descr): Likewise.
9588 (output_loc_operands): Likewise.
9589 (output_loc_operands_raw): Likewise.
9590 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
9591 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
9592 (hash_loc_operands): Likewise.
9593 (compare_loc_operands): Likewise.
9594
9595 2018-05-14 Mark Wielaard <mark@klomp.org>
9596
9597 * dwarf2out.c (count_index_addrs): New function.
9598 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
9599
9600 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9601
9602 PR tree-optimization/83648
9603 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
9604 return value as malloc candidate.
9605
9606 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9607
9608 PR ipa/85734
9609 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
9610 param as true in call to suggest_attribute.
9611
9612 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
9613
9614 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
9615 -mreadonly-in-sdata.
9616
9617 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9618
9619 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
9620 New pattern.
9621 (aarch64_crypto_aesd_fused): Likewise.
9622
9623 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
9624
9625 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
9626 (movsi_aarch64): Likewise.
9627 (load_pairsi): Likewise.
9628 (load_pairdi): Likewise.
9629 (store_pairsi): Likewise.
9630 (store_pairdi): Likewise.
9631 (load_pairsf): Likewise.
9632 (load_pairdf): Likewise.
9633 (store_pairsf): Likewise.
9634 (store_pairdf): Likewise.
9635 (zero_extend): Likewise.
9636 (trunc): Swap alternatives.
9637 (fcvt_target): Add '?' to prefer w over r.
9638
9639 2018-05-14 Jakub Jelinek <jakub@redhat.com>
9640
9641 PR target/85756
9642 * config/i386/i386.md: Disallow non-commutative arithmetics in
9643 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9644 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9645 in the peephole2 before it.
9646
9647 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9648
9649 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9650 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9651 (ix86_handle_option): Handle -mcldemote.
9652 * config.gcc: New header.
9653 * config/i386/cldemoteintrin.h: New file.
9654 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9655 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9656 -mcldemote.
9657 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9658 OPTION_MASK_ISA_CLDEMOTE.
9659 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9660 (ix86_valid_target_attribute_inner_p): Ditto.
9661 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9662 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9663 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9664 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9665 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9666 (cldemote): New.
9667 * config/i386/i386.opt: Add -mcldemote.
9668 * config/i386/x86intrin.h: New header.
9669 * doc/invoke.texi: Add -mcldemote.
9670
9671 2018-05-14 Richard Biener <rguenther@suse.de>
9672
9673 * doc/match-and-simplify.texi: Adjust :s documentation.
9674
9675 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9676
9677 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9678 intended memcpy size.
9679 (REORDER_45): Likewise.
9680
9681 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9682
9683 * sort.cc: New file.
9684 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9685 * vec.c (qsort_chk): Use gcc_qsort.
9686 * Makefile.in (OBJS-libcommon): Add sort.o.
9687 (build/sort.o): New target. Use it...
9688 (BUILD_RTL): ... here, and...
9689 (build/gencfn-macros): ... here, and...
9690 (build/genmatch): ... here.
9691
9692 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9693 Chung-Ju Wu <jasonwucj@gmail.com>
9694
9695 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9696 * config/nds32/nds32-graywolf.md: New file.
9697 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9698 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9699 pipeline.
9700 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9701 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9702 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9703 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9704 * config/nds32/pipelines.md: Include n15 settings.
9705
9706 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9707 Chung-Ju Wu <jasonwucj@gmail.com>
9708
9709 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9710 * config/nds32/nds32-n13.md: New file.
9711 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9712 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9713 pipeline.
9714 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9715 * config/nds32/nds32.md (pipeline_model): Add n13.
9716 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9717 * config/nds32/pipelines.md: Include n13 settings.
9718
9719 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9720 Chung-Ju Wu <jasonwucj@gmail.com>
9721
9722 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9723 * config/nds32/nds32-n10.md: New file.
9724 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9725 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9726 pipeline.
9727 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9728 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9729 * config/nds32/nds32.md (pipeline_model): Add n10.
9730 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9731 * config/nds32/pipelines.md: Include n10 settings.
9732
9733 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9734 Kito Cheng <kito.cheng@gmail.com>
9735 Chung-Ju Wu <jasonwucj@gmail.com>
9736
9737 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9738 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9739 Add enum values for DSP extension instructions.
9740 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9741 New constraints.
9742 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9743 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9744 New code iterators.
9745 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9746 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9747 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9748 * config/nds32/nds32-intrinsic.md: Likewise.
9749 * config/nds32/nds32_intrinsic.h: Likewise.
9750 * config/nds32/nds32-md-auxiliary.c: Likewise.
9751 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9752 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9753 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9754 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9755 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9756 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9757 TYPE_DMAC in switch statement.
9758 * config/nds32/nds32.c: New checking and implementation for DSP
9759 extension instructions.
9760 * config/nds32/nds32.h: Likewise.
9761 * config/nds32/nds32.md: Likewise.
9762 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9763 * config/nds32/predicates.md: Implement new predicates for DSP
9764 extension.
9765
9766 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9767
9768 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9769 Reformat alternatives and attributes so it is easier to identify
9770 which constraints/attributes go with which instruction.
9771 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9772 (mov<mode>_softfloat32, FMOVE64): Likewise.
9773 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9774 (mov<mode>_softfloat64, FMOVE64): Likewise.
9775
9776 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9777
9778 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9779 subsection.
9780 (Basic PowerPC Built-in Functions): The new name of the
9781 subsection previously known as "PowerPC Built-in Functions".
9782 (Basic PowerPC Built-in Functions Available on all Configurations):
9783 New subsubsection.
9784 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9785 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9786 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9787 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9788
9789 2018-05-11 Martin Jambor <mjambor@suse.cz>
9790
9791 PR ipa/85655
9792 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9793 single const.
9794
9795 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9796
9797 PR target/85733
9798 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9799
9800 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9801
9802 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9803 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9804 (ix86_handle_option): Handle -mwaitpkg.
9805 * config.gcc: New header.
9806 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9807 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9808 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9809 function type.
9810 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9811 OPTION_MASK_ISA_WAITPKG.
9812 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9813 (ix86_option_override_internal): Add PTA_WAITPKG.
9814 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9815 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9816 IX86_BUILTIN_TPAUSE.
9817 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9818 __builtin_ia32_umwait and __builtin_ia32_tpause.
9819 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9820 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9821 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9822 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9823 UNSPECV_TPAUSE): New.
9824 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9825 * config/i386/i386.opt: Add -mwaitpkg.
9826 * config/i386/waitpkgintrin.h: New file.
9827 * config/i386/x86intrin.h: New header.
9828 * doc/invoke.texi: Add -mwaitpkg.
9829
9830 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9831
9832 PR target/85606
9833 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9834 equivalent.
9835 (cortex-m0): Use armv6s-m isa.
9836 (cortex-m0plus): Likewise.
9837 (cortex-m1): Likewise.
9838 (cortex-m0.small-multiply): Likewise.
9839 (cortex-m0plus.small-multiply): Likewise.
9840 (cortex-m1.small-multiply): Likewise.
9841
9842 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9843 Jakub Jelinek <jakub@redhat.com>
9844
9845 PR tree-optimization/85692
9846 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9847 source permute as well.
9848
9849 2018-05-11 Martin Liska <mliska@suse.cz>
9850
9851 PR sanitizer/85556
9852 * doc/extend.texi: Document LLVM style format for no_sanitize
9853 attribute.
9854
9855 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9856
9857 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9858 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9859 (mode_supports_vsx_dform_quad): Likewise.
9860 (mode_supports_vmx_dform): Move these functions to be next to the
9861 other mode_supports functions.
9862 (mode_supports_dq_form): Likewise.
9863 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9864 mode_supports_dq_form.
9865 (reg_offset_addressing_ok_p): Likewise.
9866 (offsettable_ok_by_alignment): Likewise.
9867 (rs6000_legitimate_offset_address_p): Likewise.
9868 (legitimate_lo_sum_address_p): Likewise.
9869 (rs6000_legitimize_address): Likewise.
9870 (rs6000_legitimize_reload_address): Likewise.
9871 (rs6000_secondary_reload_inner): Likewise.
9872 (rs6000_preferred_reload_class): Likewise.
9873 (rs6000_output_move_128bit): Likewise.
9874
9875 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9876
9877 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9878 Generate SImode target register for null target.
9879 <case IX86_BUILTIN_XGETBV>: Ditto.
9880 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9881 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9882
9883 2018-05-10 Carl Love <cel@us.ibm.com>
9884
9885 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9886 dcbtt and dcbtstt if operands[2] is 0.
9887
9888 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9889
9890 PR target/85693
9891 * config/i386/sse.md (usadv64qi): New expander.
9892
9893 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9894
9895 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9896 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9897 -maltivec=be support.
9898 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9899 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9900 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9901 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9902 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9903 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9904 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9905 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9906 altivec_vsumsws): Adjust.
9907 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9908 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9909 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9910 support.
9911 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9912 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9913 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9914 (altivec_lve<VI_char>x): Delete expand.
9915 (*altivec_lve<VI_char>x_internal): Rename to...
9916 (altivec_lve<VI_char>x): ... this.
9917 (altivec_lvxl_<mode>): Delete expand.
9918 (*altivec_lvxl_<mode>_internal): Rename to ...
9919 (altivec_lvxl_<mode>): ... this.
9920 (altivec_stvxl_<mode>): Delete expand.
9921 (*altivec_stvxl_<mode>_internal): Rename to ...
9922 (altivec_stvxl_<mode>): ... this.
9923 (altivec_stve<VI_char>x): Delete expand.
9924 (*altivec_stve<VI_char>x_internal): Rename to ...
9925 (altivec_stve<VI_char>x): ... this.
9926 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9927 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9928 reduc_plus_scal_<mode>): Adjust.
9929 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9930 comment.
9931 (rs6000_cpu_cpp_builtins): Adjust.
9932 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9933 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9934 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9935 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9936 -maltivec=be support.
9937 (rs6000_split_vec_extract_var): Adjust.
9938 (rs6000_split_v4si_init): Adjust.
9939 (swap_selector_for_mode): Delete.
9940 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9941 altivec_expand_stvex_be): Delete.
9942 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9943 -maltivec=be support.
9944 (rs6000_gimple_fold_builtin): Ditto.
9945 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9946 Adjust.
9947 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9948 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9949 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9950 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9951 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9952 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9953 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9954 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9955 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9956 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9957 anonymous split): Adjust.
9958 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9959 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9960
9961 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9962
9963 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9964 when --with-gxx-include-dir is also specified.
9965 * configure: Regenerate.
9966
9967 2018-05-09 Jim Wilson <jimw@sifive.com>
9968
9969 PR target/84797
9970 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9971 * config/riscv/t-withmultilib: New.
9972 * config/riscv/withmultilib.h: New.
9973 * doc/install.texi: Document RISC-V --with-multilib-list support.
9974
9975 2018-05-09 Richard Biener <rguenther@suse.de>
9976
9977 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9978 vector.
9979 (vect_bb_vectorization_profitable_p): Adjust. Compute
9980 actual scalar cost using the cost vector and the add_stmt_cost
9981 machinery.
9982
9983 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9984
9985 PR rtl-optimization/85645
9986 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9987 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9988
9989 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9990
9991 PR rtl-optimization/85645
9992 * shrink-wrap.c (spread_components): Return a boolean saying if
9993 anything was changed.
9994 (try_shrink_wrapping_separate): Iterate spread_components until
9995 nothing changes anymore.
9996
9997 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9998
9999 PR rtl-optimization/85645
10000 * regrename.c (build_def_use): Also kill the chains that include the
10001 destination of a REG_CFA_REGISTER note.
10002
10003 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
10004
10005 PR rtl-optimization/85645
10006 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10007 insn that has a REG_CFA_REGISTER note.
10008
10009 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
10010
10011 * cfgexpand.c (expand_clobber): New function.
10012 (expand_gimple_stmt_1): Use it.
10013 * tree-vect-stmts.c (vect_clobber_variable): New function,
10014 split out from...
10015 (vectorizable_simd_clone_call): ...here.
10016 (vectorizable_store): Emit a clobber either side of an
10017 IFN_STORE_LANES sequence.
10018 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10019
10020 2018-05-09 Tom de Vries <tom@codesourcery.com>
10021
10022 PR target/85626
10023 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10024 (define_insn "trap_if_false"): Add exit after trap.
10025
10026 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
10027
10028 PR rtl-optimization/85638
10029 * bb-reorder.c: Include common/common-target.h.
10030 (create_forwarder_block): New function extracted from...
10031 (fix_up_crossing_landing_pad): ...here. Rename into...
10032 (dw2_fix_up_crossing_landing_pad): ...this.
10033 (sjlj_fix_up_crossing_landing_pad): New function.
10034 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10035 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10036 from both partitions and exit the loop after one iteration.
10037
10038 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10039
10040 Revert:
10041 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10042 subsection.
10043 (Basic PowerPC Built-in Functions): The new name of the
10044 subsection previously known as "PowerPC Built-in Functions".
10045 (Basic PowerPC Built-in Functions Available on all Configurations):
10046 New subsubsection.
10047 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10048 subsubsection.
10049 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10050 subsubsection.
10051 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10052 subsubsection.
10053 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10054 subsubsection.
10055
10056 2018-05-08 Jim Wilson <jimw@sifive.com>
10057
10058 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10059 (LD_EMUL_SUFFIX): New.
10060 (LINK_SPEC): Use it.
10061
10062 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
10063
10064 * doc/extend.texi (PowerPC Built-in Functions): Rename this
10065 subsection.
10066 (Basic PowerPC Built-in Functions): The new name of the
10067 subsection previously known as "PowerPC Built-in Functions".
10068 (Basic PowerPC Built-in Functions Available on all Configurations):
10069 New subsubsection.
10070 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10071 subsubsection.
10072 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10073 subsubsection.
10074 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10075 subsubsection.
10076 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10077 subsubsection.
10078
10079 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10080
10081 PR target/85683
10082 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
10083 after cmpelim optimization.
10084
10085 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
10086
10087 * config.gcc: Support "goldmont".
10088 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
10089 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10090 PROCESSOR_GOLDMONT.
10091 * config/i386/i386.c (m_GOLDMONT): Define.
10092 (processor_target_table): Add "goldmont".
10093 (PTA_GOLDMONT): Define.
10094 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
10095 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
10096 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
10097 (fold_builtin_cpu): Add "goldmont".
10098 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
10099 (ix86_option_override_internal): Add "goldmont".
10100 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
10101 (processor_type): Add PROCESSOR_GOLDMONT.
10102 * config/i386/i386.md: Add CPU "glm".
10103 * config/i386/glm.md: New file.
10104 * config/i386/x86-tune.def: Add m_GOLDMONT.
10105 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
10106
10107 2018-05-08 Jakub Jelinek <jakub@redhat.com>
10108
10109 PR target/85572
10110 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
10111 E_V4DImode.
10112 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
10113 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
10114 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
10115
10116 PR target/85317
10117 * config/i386/i386.c (ix86_fold_builtin): Handle
10118 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
10119
10120 PR target/85480
10121 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
10122 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
10123
10124 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
10125
10126 PR target/85658
10127 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
10128 (check_arch): Likewise.
10129 (check_fpu): Return the result rather than printing it.
10130 (end arch): Fix operator precedence.
10131 (end cpu): Likewise.
10132 (END): Print the result from check_fpu.
10133
10134 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10135 Alan Hayward <alan.hayward@arm.com>
10136 David Sherwood <david.sherwood@arm.com>
10137
10138 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
10139 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
10140 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
10141 (*fcmuo<mode>_and): New patterns.
10142
10143 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
10144
10145 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
10146 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
10147 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
10148 (cmp_op, sve_imm_con): New code attributes.
10149 (SVE_COND_INT_CMP, imm_con): Delete.
10150 (cmp_op): Remove above unspecs from int attribute.
10151 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
10152 to...
10153 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
10154 comparison-specific unspecs.
10155 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
10156 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
10157 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
10158 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
10159 (*vec_fcm<cmp_op><mode>): Rename to...
10160 (*fcm<cmp_op><mode>): ...this and adjust likewise.
10161 (*vec_fcmuo<mode>): Rename to...
10162 (*fcmuo<mode>): ...this and adjust likewise.
10163 (*pred_fcm<cmp_op><mode>): New pattern.
10164 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
10165 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
10166 functions.
10167 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
10168 and UNORDERED.
10169 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
10170 (aarch64_emit_sve_predicated_cond): New function.
10171 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
10172 (aarch64_emit_unspec_cond_or): Replace with...
10173 (aarch64_emit_sve_or_conds): ...this new function. Use
10174 aarch64_emit_sve_ptrue_op for the individual comparisons and
10175 aarch64_emit_binop to OR them together.
10176 (aarch64_emit_inverted_unspec_cond): Replace with...
10177 (aarch64_emit_sve_inverted_cond): ...this new function. Use
10178 aarch64_emit_sve_ptrue_op for the comparison and
10179 aarch64_emit_unop to invert the result.
10180 (aarch64_expand_sve_vec_cmp_float): Update after the above
10181 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
10182
10183 2018-05-07 Nathan Sidwell <nathan@acm.org>
10184
10185 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
10186 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
10187 (Backwards Compatibility): Likewise.
10188
10189 2018-05-07 Luis Machado <luis.machado@linaro.org>
10190
10191 PR bootstrap/85681
10192 Revert:
10193 2018-05-07 Luis Machado <luis.machado@linaro.org>
10194
10195 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10196 <prefetch_dynamic_strides>: New const bool field.
10197 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10198 prefetch_dynamic_strides.
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 prefetch_dynamic_strides
10204 to false.
10205 (aarch64_override_options_internal): Update to set
10206 PARAM_PREFETCH_DYNAMIC_STRIDES.
10207 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10208 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10209 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10210 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10211 prefetch-dynamic-strides setting.
10212
10213 2018-05-07 Luis Machado <luis.machado@linaro.org>
10214
10215 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10216 <minimum_stride>: New const int field.
10217 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10218 minimum_stride field.
10219 (exynosm1_prefetch_tune): Likewise.
10220 (thunderxt88_prefetch_tune): Likewise.
10221 (thunderx_prefetch_tune): Likewise.
10222 (thunderx2t99_prefetch_tune): Likewise.
10223 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10224 (aarch64_override_options_internal): Update to set
10225 PARAM_PREFETCH_MINIMUM_STRIDE.
10226 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10227 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10228 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10229 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10230 stride is constant and is below the minimum stride threshold.
10231
10232 2018-05-07 Luis Machado <luis.machado@linaro.org>
10233
10234 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
10235 to 512.
10236
10237 2018-05-07 Luis Machado <luis.machado@linaro.org>
10238
10239 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10240 <prefetch_dynamic_strides>: New const bool field.
10241 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10242 prefetch_dynamic_strides.
10243 (exynosm1_prefetch_tune): Likewise.
10244 (thunderxt88_prefetch_tune): Likewise.
10245 (thunderx_prefetch_tune): Likewise.
10246 (thunderx2t99_prefetch_tune): Likewise.
10247 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
10248 to false.
10249 (aarch64_override_options_internal): Update to set
10250 PARAM_PREFETCH_DYNAMIC_STRIDES.
10251 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10252 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10253 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10254 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10255 prefetch-dynamic-strides setting.
10256
10257 2018-05-07 Luis Machado <luis.machado@linaro.org>
10258
10259 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10260 <minimum_stride>: New const int field.
10261 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10262 minimum_stride field.
10263 (exynosm1_prefetch_tune): Likewise.
10264 (thunderxt88_prefetch_tune): Likewise.
10265 (thunderx_prefetch_tune): Likewise.
10266 (thunderx2t99_prefetch_tune): Likewise.
10267 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
10268 (aarch64_override_options_internal): Update to set
10269 PARAM_PREFETCH_MINIMUM_STRIDE.
10270 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10271 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10272 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10273 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10274 stride is constant and is below the minimum stride threshold.
10275
10276 2018-05-06 Jakub Jelinek <jakub@redhat.com>
10277
10278 PR c++/85659
10279 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
10280 the type is addressable. Don't force op into register if it has
10281 BLKmode.
10282
10283 2018-05-05 Roland McGrath <mcgrathr@google.com>
10284
10285 PR other/77609
10286 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
10287 any section for which we don't know a specific type it should have,
10288 regardless of name. Previously this was done only for the exact
10289 names ".init_array", ".fini_array", and ".preinit_array".
10290 (default_elf_asm_named_section): Add comment about
10291 relationship with default_section_type_flags and SECTION_NOTYPE.
10292 (get_section): Don't consider it a type conflict if one side has
10293 SECTION_NOTYPE and the other doesn't, as long as neither has the
10294 SECTION_BSS et al used in the default_section_type_flags logic.
10295
10296 2018-05-05 Tom de Vries <tom@codesourcery.com>
10297
10298 PR target/85653
10299 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
10300 (workaround_barsyncs): New function.
10301 (nvptx_reorg): Use workaround_barsyncs.
10302 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10303 (define_expand "nvptx_membar_cta"): New define_expand.
10304 (define_insn "*nvptx_membar_cta"): New insn.
10305
10306 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
10307
10308 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
10309 To improve optimization opportunities.
10310 * builtin-types.def: The new needed builtin types for the above.
10311
10312 2018-05-04 Richard Biener <rguenther@suse.de>
10313
10314 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
10315 * gimple-ssa-store-merging.c
10316 (imm_store_chain_info::output_merged_store): Remove redundant create,
10317 release split_store vector contents on failure.
10318 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
10319 scalar stmt vector on cache hit.
10320
10321 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
10322
10323 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
10324 Xilinx FP support.
10325 * config.gcc (powerpc-xilinx-eabi*): Remove.
10326 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
10327 support.
10328 (fusion_addis_mem_combo_load): Ditto.
10329 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
10330 FP support.
10331 (rs6000_cpu_cpp_builtins): Ditto.
10332 * config/rs6000/rs6000-linux.c
10333 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
10334 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
10335 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
10336 support.
10337 (rs6000_setup_reg_addr_masks): Ditto.
10338 (rs6000_init_hard_regno_mode_ok): Ditto.
10339 (rs6000_option_override_internal): Ditto.
10340 (legitimate_lo_sum_address_p): Ditto.
10341 (rs6000_legitimize_address): Ditto.
10342 (rs6000_legitimize_reload_address): Ditto.
10343 (rs6000_legitimate_address_p): Ditto.
10344 (abi_v4_pass_in_fpr): Ditto.
10345 (setup_incoming_varargs): Ditto.
10346 (rs6000_gimplify_va_arg): Ditto.
10347 (rs6000_split_multireg_move): Ditto.
10348 (rs6000_savres_strategy): Ditto.
10349 (rs6000_emit_prologue_components): Ditto.
10350 (rs6000_emit_epilogue_components): Ditto.
10351 (rs6000_emit_prologue): Ditto.
10352 (rs6000_emit_epilogue): Ditto.
10353 (rs6000_elf_file_end): Ditto.
10354 (rs6000_function_value): Ditto.
10355 (rs6000_libcall_value): Ditto.
10356 * config/rs6000/rs6000.h: Ditto.
10357 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
10358 (TARGET_MINMAX): ... this. New.
10359 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
10360 * config/rs6000/rs6000.md: Remove Xilinx FP support.
10361 (*movsi_internal1_single): Delete.
10362 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
10363 mfpu=, mxilinx-fpu): Delete.
10364 * config/rs6000/singlefp.h: Delete.
10365 * config/rs6000/sysv4.h: Remove Xilinx FP support.
10366 * config/rs6000/t-rs6000: Ditto.
10367 * config/rs6000/t-xilinx: Delete.
10368 * config/rs6000/titan.md: Adjust for fp_type removal.
10369 * config/rs6000/vsx.md: Remove Xilinx FP support.
10370 (VStype_simple): Delete.
10371 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
10372 * config/rs6000/xfpu.h: Delete.
10373 * config/rs6000/xfpu.md: Delete.
10374 * config/rs6000/xilinx.h: Delete.
10375 * config/rs6000/xilinx.opt: Delete.
10376 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
10377 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
10378
10379 2018-05-04 Tom de Vries <tom@codesourcery.com>
10380
10381 PR libgomp/85639
10382 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
10383 if ignore == 0.
10384
10385 2018-05-04 Richard Biener <rguenther@suse.de>
10386
10387 PR middle-end/85627
10388 * tree-complex.c (update_complex_assignment): We are always in SSA form.
10389 (expand_complex_div_wide): Likewise.
10390 (expand_complex_operations_1): Likewise.
10391 (expand_complex_libcall): Preserve EH info of the original stmt.
10392 (tree_lower_complex): Handle removed blocks.
10393 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
10394 on complex multiplication and division libcall builtins.
10395
10396 2018-05-04 Richard Biener <rguenther@suse.de>
10397
10398 PR middle-end/85574
10399 * fold-const.c (negate_expr_p): Restrict negation of operand
10400 zero of a division to when we know that can happen without
10401 overflow.
10402 (fold_negate_expr_1): Likewise.
10403
10404 2018-05-04 Jakub Jelinek <jakub@redhat.com>
10405
10406 PR libstdc++/85466
10407 * real.h (real_nextafter): Declare.
10408 * real.c (real_nextafter): New function.
10409 * fold-const-call.c (fold_const_nextafter): New function.
10410 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
10411 CASE_CFN_NEXTTOWARD.
10412 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
10413 even when arg1_mode is different from arg0_mode.
10414
10415 2018-05-03 Nathan Sidwell <nathan@acm.org>
10416
10417 * doc/extend.texi (Deprecated Features): Remove
10418 -ffriend-injection.
10419 (Backwards Compatibility): Likewise.
10420 * doc/invoke.texi (C++ Language Options): Likewise.
10421 (C++ Dialect Options): Likewise.
10422
10423 2018-05-03 Jakub Jelinek <jakub@redhat.com>
10424
10425 PR target/85530
10426 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
10427 _mm512_mask_mullox_epi64): New intrinsics.
10428
10429 2018-05-03 Tom de Vries <tom@codesourcery.com>
10430
10431 PR testsuite/85106
10432 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10433 dump files): Add offload-tree.
10434
10435 2018-05-03 Richard Biener <rguenther@suse.de>
10436
10437 PR tree-optimization/85615
10438 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
10439 to loops not nested in BBs loop father to avoid creating multi-entry
10440 loops.
10441
10442 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10443
10444 PR tree-optimization/70291
10445 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
10446 arguments. Change return type to tree. Emit libcall as a new
10447 statement rather than replacing existing one when inplace_p is true.
10448 (expand_complex_multiplication_components): New function.
10449 (expand_complex_multiplication): Expand floating-point complex
10450 multiplication using the above.
10451 (expand_complex_division): Rename inner_type parameter to type.
10452 Update expand_complex_libcall call-site.
10453 (expand_complex_operations_1): Update expand_complex_multiplication
10454 and expand_complex_division call-sites.
10455
10456 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10457
10458 PR target/85582
10459 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10460 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10461 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
10462 the highest significant bit of the shift count mask is clear. In
10463 check whether and[sq]i3 is needed verify that all significant bits
10464 of the shift count other than the highest are set.
10465
10466 2018-05-02 Tom de Vries <tom@codesourcery.com>
10467
10468 PR libgomp/82428
10469 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
10470 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
10471 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
10472 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
10473 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
10474 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
10475 __builtin_goacc_parlevel_size.
10476
10477 2018-05-02 Richard Biener <rguenther@suse.de>
10478
10479 PR tree-optimization/85597
10480 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
10481 do not use split vect_get_vec_defs call but call vect_get_slp_defs
10482 directly.
10483
10484 2018-05-02 Tom de Vries <tom@codesourcery.com>
10485
10486 PR testsuite/85106
10487 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10488 dump files): Add ltrans-tree.
10489
10490 2018-05-02 Tom de Vries <tom@codesourcery.com>
10491
10492 PR testsuite/85106
10493 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
10494 dump files): Add wpa-ipa.
10495
10496 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
10497
10498 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
10499 powerpc*-*-linux*paired* target.
10500 * config/rs6000/750cl.h: Delete.
10501 * config/rs6000/paired.h: Delete.
10502 * config/rs6000/paired.md: Delete.
10503 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
10504 float support.
10505 * config/rs6000/rs6000-builtin.def: Remove paired float support.
10506 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10507 comment. Remove paired float support.
10508 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
10509 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
10510 VECTOR_PAIRED.
10511 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
10512 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
10513 declarations.
10514 * config/rs6000/rs6000.c: Remove paired float support.
10515 (paired_expand_vector_init, paired_expand_vector_move,
10516 paired_emit_vector_compare, paired_emit_vector_cond_expr,
10517 (paired_expand_lv_builtin, paired_expand_stv_builtin,
10518 paired_expand_builtin, paired_expand_predicate_builtin,
10519 paired_init_builtins): Delete.
10520 * config/rs6000/rs6000.h: Remove paired float support.
10521 * config/rs6000/rs6000.md: Remove paired float support.
10522 (move_from_CR_ov_bit): Delete.
10523 * config/rs6000/rs6000.opt (mpaired): Delete.
10524 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
10525 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
10526
10527 2018-05-02 Richard Biener <rguenther@suse.de>
10528
10529 PR middle-end/85567
10530 * gimplify.c (gimplify_save_expr): When in SSA form allow
10531 SAVE_EXPRs to compute to SSA vars.
10532
10533 2018-05-02 Jakub Jelinek <jakub@redhat.com>
10534
10535 PR target/85582
10536 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
10537 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
10538 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
10539 clobber operands[2], instead use a new pseudo. Formatting fixes.
10540
10541 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
10542
10543 PR tree-optimization/85586
10544 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
10545 exit early for statements in the same group if the accesses are
10546 not strided.
10547
10548 2018-05-02 Tom de Vries <tom@codesourcery.com>
10549
10550 PR lto/85451
10551 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
10552 error message.
10553
10554 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
10555
10556 PR tree-optimization/85143
10557 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
10558
10559 2018-05-01 Tom de Vries <tom@codesourcery.com>
10560
10561 PR lto/85451
10562 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
10563 not found" error message.
10564
10565 2018-05-01 Tom de Vries <tom@codesourcery.com>
10566
10567 PR other/83786
10568 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
10569 * vec.c (test_ordered_remove_if): New function.
10570 (vec_c_tests): Call test_ordered_remove_if.
10571 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
10572 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
10573 * tree-vect-patterns.c (vect_pattern_recog_1): Use
10574 VEC_ORDERED_REMOVE_IF.
10575
10576 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10577
10578 PR tree-optimization/82665
10579 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
10580 pointer subtraction where arguments come from a memchr call.
10581
10582 2018-05-01 Jakub Jelinek <jakub@redhat.com>
10583
10584 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
10585 --push-state --as-needed and --pop-state instead of --as-needed and
10586 --no-as-needed if ld supports it.
10587 * configure: Regenerated.
10588
10589 PR web/85578
10590 * doc/install.texi2html: Replace _002d with - and _002a with * in
10591 generated html files using sed.
10592
10593 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10594
10595 PR c++/85523
10596 * gcc-rich-location.c (blank_line_before_p): New function.
10597 (use_new_line): New function.
10598 (gcc_rich_location::add_fixit_insert_formatted): New function.
10599 * gcc-rich-location.h
10600 (gcc_rich_location::add_fixit_insert_formatted): New function.
10601
10602 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10603
10604 * selftest.c (assert_streq): Rename "expected" and "actual" to
10605 "val1" and "val2". Extend NULL-handling to cover both inputs
10606 symmetrically, while still requiring both to be non-NULL for a pass.
10607 * selftest.h (assert_streq): Rename "expected" and "actual" to
10608 "val1" and "val2".
10609 (ASSERT_EQ): Likewise.
10610 (ASSERT_EQ_AT): Likewise.
10611 (ASSERT_KNOWN_EQ): Likewise.
10612 (ASSERT_KNOWN_EQ_AT): Likewise.
10613 (ASSERT_NE): Likewise.
10614 (ASSERT_MAYBE_NE): Likewise.
10615 (ASSERT_MAYBE_NE_AT): Likewise.
10616 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
10617 the assertion to pass.
10618 (ASSERT_STREQ_AT): Likewise.
10619
10620 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10621
10622 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
10623 interaction with -pie.
10624
10625 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10626
10627 * selftest.h: Fix alphabetization of per-source-file selftest
10628 declarations.
10629
10630 2018-04-30 Jason Merrill <jason@redhat.com>
10631
10632 PR c++/61982 - dead stores to destroyed objects.
10633 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
10634 of clobber.
10635
10636 2018-04-30 Jason Merrill <jason@redhat.com>
10637
10638 * tree.c (build_clobber): New.
10639 * tree.h: Declare it.
10640 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
10641
10642 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10643
10644 * diagnostic-show-locus.c (layout::layout): Update for
10645 location_get_source_line returning a char_span.
10646 (struct char_span): Move to input.h.
10647 (struct correction): Update for fields in char_span becoming
10648 private.
10649 (struct source_line): Update for location_get_source_line
10650 returning a char_span.
10651 (layout::print_line): Likewise.
10652 * edit-context.c (edited_file::print_content): Likewise.
10653 (edited_file::print_diff_hunk): Likewise.
10654 (edited_file::print_run_of_changed_lines): Likewise.
10655 (edited_file::get_num_lines): Likewise.
10656 (edited_line::edited_line): Likewise.
10657 * final.c (asm_show_source): Likewise.
10658 * input.c (location_get_source_line): Convert return type
10659 from const char * to char_span, losing the final "line_len"
10660 param.
10661 (dump_location_info): Update for the above.
10662 (get_substring_ranges_for_loc): Likewise. Use a char_span
10663 when handling the literal within the line.
10664 (test_reading_source_line): Update for location_get_source_line
10665 returning a char_span.
10666 * input.h (class char_span): Move here from
10667 diagnostic-show-locus.c, converting from a struct to a class.
10668 Make data members private.
10669 (char_span::operator bool): New.
10670 (char_span::length): New.
10671 (char_span::get_buffer): New.
10672 (char_span::operator[]): New.
10673 (char_span::subspan): Make const.
10674 (char_span::xstrdup): New.
10675 (location_get_source_line): Convert return type from const char *
10676 to char_span, losing the final "line_size" param.
10677
10678 2018-04-30 Jan Hubicka <jh@suse.cz>
10679
10680 * lto-wrapper.c (ltrans_priorities): New static var.
10681 (cmp_priority): New.
10682 (run_gcc): Read priorities and if doing parallel build order
10683 the Makefile by them.
10684
10685 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10686
10687 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10688
10689 2018-04-30 Richard Biener <rguenther@suse.de>
10690
10691 * tree-cfg.c (verify_address): Remove base argument, add
10692 flag whether to check TREE_ADDRESSABLE and do that.
10693 (verify_expr): Remove.
10694 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10695 (verify_gimple_assign_single): Likewise.
10696 (verify_gimple_switch): Likewise.
10697 (verify_expr_location_1): Dereference tp once. Add (disabled)
10698 piece from verify_expr.
10699 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10700
10701 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10702
10703 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10704
10705 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10706
10707 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10708 (small_data_pattern): Likewise.
10709 (arc_rewrite_small_data): Likewise.
10710 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10711 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10712 (get_symbol_alignment): New function.
10713 (legitimate_small_data_address_p): Likewise.
10714 (legitimate_scaled_address): Update, call
10715 legitimate_small_data_address_p.
10716 (output_sdata): New static variable.
10717 (arc_print_operand): Update how we handle small data operands.
10718 (arc_print_operand_address): Likewise.
10719 (arc_legitimate_address_p): Update, use
10720 legitimate_small_data_address_p.
10721 (arc_rewrite_small_data_p): Remove.
10722 (arc_rewrite_small_data_1): Likewise.
10723 (arc_rewrite_small_data): Likewise.
10724 (small_data_pattern): Likewise.
10725 (compact_sda_memory_operand): Update to use
10726 legitimate_small_data_address_p and get_symbol_alignment.
10727 (prepare_move_operands): Don't rewite sdata pattern.
10728 (prepare_extend_operands): Remove.
10729 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10730 pattern.
10731 (zero_extendqisi2): Likewise.
10732 (zero_extendhisi2): Likewise.
10733 (extendqihi2): Likewise.
10734 (extendqisi2): Likewise.
10735 (extendhisi2): Likewise.
10736 (addsi3): Likewise.
10737 (subsi3): Likewise.
10738 (andsi3): Likewise.
10739 * config/arc/constraints.md (Usd): Change it to memory constraint.
10740
10741 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10742
10743 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10744 as source of std instructions.
10745 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10746 allow 6-bit constants as source for store instructions.
10747 (movdi_insn): Update instruction pattern to allow 6-bit constants
10748 as source for store instructions.
10749
10750 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10751
10752 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10753
10754 2018-04-30 Nathan Sidwell <nathan@acm.org>
10755 Sandra Loosemore <sandra@codesourcery.com>
10756
10757 * dumpfile.c (dump_open): Allow '-' for stdout.
10758 * doc/invoke.texi (Developer Options): Document dump filename
10759 determination early. Document stdin/stdout selection.
10760
10761 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10762
10763 Microblaze Target: PIC data text relative
10764
10765 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10766 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10767 Add declaration.
10768 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10769 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10770 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10771 New addressing mode for data-text relative position indepenedent code.
10772 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10773 'ADDRESS_SYMBOLIC_TXT_REL'.
10774 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10775 (microblaze_legitimate_pic_operand): Exclude function calls from
10776 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10777 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10778 addresses cases.
10779 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10780 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10781 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10782 for 'address + offset'.
10783 (microblaze_expand_prologue): Add new function prologue call for
10784 'r20' assignation.
10785 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10786 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10787 table in case of TARGET_PIC_DATA_TEXT_REL.
10788 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10789 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10790 Add new macros 'UNSPEC_TEXT',
10791 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10792 + exclude function calls from 'UNSPEC_PLT' in case of data text
10793 relative mode.
10794 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10795 new target hook for generating address diff vector tables in case of
10796 flag_pic.
10797 * doc/tm.texi : Regenerate.
10798 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10799 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10800 of addr diff vector generation.
10801 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10802 target hook definition.
10803 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10804 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10805 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10806 option for data text relative.
10807
10808 2018-04-30 Richard Biener <rguenther@suse.de>
10809
10810 * tree-chrec.h (evolution_function_is_constant_p): Remove
10811 redundant check.
10812 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10813
10814 2018-04-30 Richard Biener <rguenther@suse.de>
10815
10816 PR bootstrap/85571
10817 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10818
10819 2018-04-30 Richard Biener <rguenther@suse.de>
10820
10821 PR tree-optimization/28364
10822 PR tree-optimization/85275
10823 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10824 copying first exit test.
10825
10826 2018-04-28 Mark Wielaard <mark@klomp.org>
10827
10828 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10829 dwarf_version >= 5.
10830 (dwarf_AT): Handle DW_AT_addr_base.
10831 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10832
10833 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10834
10835 PR target/84431
10836 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10837 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10838 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10839 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10840
10841 2018-04-28 Richard Biener <rguenther@suse.de>
10842
10843 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10844 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10845 to reflect use. Only add interesting stmts.
10846
10847 2018-04-27 Martin Jambor <mjambor@suse.cz>
10848
10849 PR ipa/85549
10850 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10851 the jump function allows for passing through aggregate values.
10852
10853 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10854
10855 * input.h (in_system_header_at): Convert from macro to inline
10856 function.
10857 (from_macro_expansion_at): Likewise.
10858 (from_macro_definition_at): Likewise.
10859
10860 2018-04-27 Jeff Law <law@redhat.com>
10861
10862 * config.gcc: Mark tile* targets as deprecated/obsolete.
10863
10864 2018-04-27 Richard Biener <rguenther@suse.de>
10865
10866 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10867 fix for ILP32.
10868
10869 2018-04-27 Richard Biener <rguenther@suse.de>
10870
10871 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10872
10873 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10874
10875 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10876 with Yd constraint. Set "preferred_for_speed" attribute from
10877 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10878 with Yd constraint.
10879 (*movdi_internal): Ditto.
10880 (movti_interunit splitters): Remove
10881 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10882 (movdi_interunit splitters): Ditto.
10883 * config/i386/constraints.md (Ye): Remove.
10884 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10885
10886 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10887
10888 PR target/85512
10889 * config/aarch64/constraints.md (Usg): Limit to 31.
10890 (Usj): Limit to 63.
10891
10892 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10893
10894 PR tree-optimization/85529
10895 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10896 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10897 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10898 zero extension or masking of the MSB bit.
10899 (optimize_range_tests): Add FIRST_BB argument, pass it through
10900 to optimize_range_tests_var_bound.
10901 (maybe_optimize_range_tests, reassociate_bb): Adjust
10902 optimize_range_tests callers.
10903
10904 2018-04-26 Richard Biener <rguenther@suse.de>
10905 Jakub Jelinek <jakub@redhat.com>
10906
10907 * cgraph.h (symbol_table): Just declare debug method here.
10908 * symtab.c (symbol_table::debug): Define.
10909
10910 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10911
10912 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10913
10914 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10915
10916 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10917 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10918 (*movdi_internal): Substitute Yi and Yj constraint with x
10919 and Ym and Yn constraint with y constraint. Update "isa"
10920 attribute and set "preferred_for_speed" attribute from
10921 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10922 (*movsi_internal): Ditto.
10923 (*movdf_internal): Ditto.
10924 (*movsf_internal): Ditto.
10925 (*zero_extendsidi2): Ditto.
10926 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10927 (sse2_loadld): Ditto.
10928 (*vec_extract<ssevecmodelower>_0): Ditto.
10929 (*vec_extractv4si_0_zext_sse4): Ditto.
10930 (vec_concatv2di): Ditto.
10931 (*vec_dup<mode>): Ditto.
10932 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10933 * config/i386/constraints.md (Yi): Remove.
10934 (Yj): Remove.
10935 (Ym): Remove.
10936 (Yn): Remove.
10937
10938 2018-04-26 Nathan Sidwell <nathan@acm.org>
10939
10940 * dumpfile.c (dump_open): New.
10941 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10942 (dump_finish): Detect stdio/stderr by value not name.
10943
10944 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10945
10946 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10947
10948 2018-04-26 Tom de Vries <tom@codesourcery.com>
10949
10950 PR target/84952
10951 * config/nvptx/nvptx.c (verify_neutering_jumps)
10952 (verify_neutering_labels): New function
10953 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10954
10955 2018-04-26 Tom de Vries <tom@codesourcery.com>
10956
10957 PR target/84025
10958 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10959 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10960 need neutering.
10961
10962 2018-04-26 Richard Biener <rguenther@suse.de>
10963 Tom de Vries <tom@codesourcery.com>
10964
10965 PR lto/85422
10966 * lto-streamer-out.c (output_function): Fixup loops if required to match
10967 discovery done in the reader.
10968
10969 2018-04-26 Richard Biener <rguenther@suse.de>
10970
10971 PR tree-optimization/85116
10972 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10973 have a loop exit from the single latch predecessor. Remove
10974 case of header with just condition.
10975 (ch_base::copy_headers): Exclude infinite loops from any
10976 processing.
10977 (pass_ch::execute): Record exits.
10978
10979 2018-04-26 Richard Biener <rguenther@suse.de>
10980
10981 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10982 prologue cost vector and pass it to vect_get_load_cost.
10983 (vect_get_peeling_costs_all_drs): Likewise.
10984 (vect_peeling_hash_get_lowest_cost): Likewise.
10985 (vect_enhance_data_refs_alignment): Likewise.
10986
10987 2018-04-26 Richard Biener <rguenther@suse.de>
10988
10989 PR middle-end/85450
10990 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10991 checking of integer<->pointer conversions.
10992 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10993 sign-/zero-extending pointer types.
10994 (expand_omp_for_static_chunk): Likewise.
10995
10996 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10997 Jean Lee <xiaoyur347@gmail.com>
10998
10999 * config/mips/mips.c (mips_asan_shadow_offset): New function.
11000 (TARGET_ASAN_SHADOW_OFFSET): Define.
11001 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11002 true for -fsanitize=address.
11003
11004 2018-04-25 Mark Wielaard <mark@klomp.org>
11005
11006 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11007 shorter ones.
11008
11009 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11010
11011 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11012 than "alu", remove explicit "memory" and "imm_disp" attributes.
11013 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11014
11015 PR middle-end/85414
11016 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11017 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11018 gen_lowpart_no_emit.
11019
11020 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
11021
11022 PR target/85473
11023 * config/i386/i386.c (ix86_expand_builtin): Change memory
11024 operand to XI, extend p0 to Pmode.
11025 * config/i386/i386.md: Change unspec volatile and operand
11026 1 mode to XI, change operand 0 mode to P.
11027
11028 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11029
11030 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11031 GET_MODE_MASK before any checking.
11032 (nds32_can_use_bset_p): Likewise.
11033 (nds32_can_use_btgl_p): Likewise.
11034
11035 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11036
11037 * config/nds32/nds32-doubleword.md: New define_split pattern for
11038 illegal register number.
11039
11040 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11041
11042 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11043
11044 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
11045
11046 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11047
11048 2018-04-25 Richard Biener <rguenther@suse.de>
11049
11050 * lto-streamer.h (LTO_major_version): Bump to 8.
11051
11052 2018-04-25 Jakub Jelinek <jakub@redhat.com>
11053
11054 * BASE-VER: Set to 9.0.0.
11055
11056 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
11057
11058 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11059 in __abskf2 and __powikf2.
11060
11061 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11062
11063 PR target/85512
11064 * config/aarch64/constraints.md (Usg, Usj): New constraints.
11065 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11066 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
11067 Use the above on operand 2. Reindent.
11068 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
11069
11070 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11071
11072 PR target/85485
11073 * common/config/i386/i386-common.c (ix86_handle_option): Don't
11074 handle OPT_mcet.
11075 * config/i386/i386.opt (mcet): Removed.
11076 * doc/install.texi: Remove -mcet documentation.
11077 * doc/invoke.texi: Likewise.
11078
11079 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
11080
11081 PR target/85485
11082 * doc/install.texi: Remove -mcet from bootstrap-cet.
11083
11084 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11085
11086 PR target/85511
11087 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
11088 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
11089 if TARGET_64BIT.
11090
11091 PR target/85503
11092 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
11093 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
11094 containing a CONST_VECTOR.
11095
11096 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
11097
11098 * doc/install.texi: Update newlib dependency for nvptx.
11099
11100 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11101
11102 PR target/85508
11103 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
11104 instead of INTVAL when shifting x left.
11105
11106 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
11107
11108 PR tree-optimization/85478
11109 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
11110 vect_grouped_store_supported for single element vectors.
11111
11112 2018-04-24 Richard Biener <rguenther@suse.de>
11113
11114 PR target/85491
11115 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
11116 load cost increase to the case of non-constant step.
11117
11118 2018-04-24 Jakub Jelinek <jakub@redhat.com>
11119
11120 PR target/84828
11121 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
11122 destination if any_malformed_asm.
11123
11124 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
11125
11126 PR middle-end/85496
11127 * expr.c (store_field): In the bitfield case, if the value comes from
11128 a function call and is returned in registers by means of a PARALLEL,
11129 do not change the mode of the temporary unless BLKmode and VOIDmode.
11130
11131 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
11132
11133 PR rtl-optimization/85423
11134 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
11135 dependencies to debug insns when the previous insn is non-debug.
11136
11137 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11138
11139 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
11140 enums into a single definition.
11141 (fls): Fix predicates and printing.
11142 (seti): Likewise.
11143
11144 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
11145
11146 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
11147 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
11148 and short u6 immediate.
11149 (check_if_valid_sleep_operand): Remove.
11150 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
11151
11152 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11153
11154 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
11155 flag_always_save_lp condition.
11156 * config/nds32/nds32.opt (malways-save-lp): New option.
11157
11158 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11159
11160 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
11161 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
11162 * config/nds32/nds32.h
11163 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
11164 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
11165
11166 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11167
11168 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
11169 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
11170
11171 2018-04-22 Shiva Chen <shiva0217@gmail.com>
11172 Chung-Ju Wu <jasonwucj@gmail.com>
11173
11174 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
11175 Declare.
11176 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
11177 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
11178
11179 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11180
11181 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
11182
11183 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11184
11185 * config/nds32/nds32-protos.h (nds32_data_alignment,
11186 nds32_local_alignment): Declare.
11187 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
11188 nds32_local_alignment): New functions.
11189 (TARGET_CONSTANT_ALIGNMENT): Define.
11190 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
11191
11192 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11193
11194 * config/nds32/nds32.c
11195 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
11196 (TARGET_MODES_TIEABLE_P): Likewise.
11197
11198 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
11199
11200 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
11201 level Ofast and Og.
11202
11203 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
11204 Chung-Ju Wu <jasonwucj@gmail.com>
11205
11206 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11207 for unaligned access.
11208 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11209 unaligned access.
11210 * config/nds32/nds32-intrinsic.md: Likewise.
11211 * config/nds32/nds32_intrinsic.h: Likewise.
11212 * config/nds32/nds32.h (nds32_builtins): Likewise.
11213 * config/nds32/nds32.opt (munaligned-access): New option.
11214 * config/nds32/nds32.c (nds32_asm_file_start): Display
11215 flag_unaligned_access status.
11216
11217 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11218
11219 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
11220 -mno-relax is present.
11221 * config/riscv/linux.h (LINK_SPEC): Ditto.
11222
11223 2018-04-20 Martin Sebor <msebor@redhat.com>
11224
11225 PR c/85365
11226 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
11227 for null pointers.
11228 (gimple_fold_builtin_stxcpy_chk): Same.
11229 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
11230
11231 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
11232
11233 PR target/85456
11234 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
11235 __powikf2 when long double is IEEE 128-bit.
11236
11237 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
11238
11239 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
11240 step to make sure stack always aligned.
11241
11242 2018-04-20 Carl Love <cel@us.ibm.com>
11243
11244 PR target/83402
11245 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
11246 size check for arg0.
11247
11248 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
11249 Tom de Vries <tom@codesourcery.com>
11250
11251 PR target/85445
11252 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
11253 Emit insns for calls too.
11254 (nvptx_find_par): Always look for worker-level predecessor insn.
11255 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
11256 calls.
11257 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
11258 (nvptx_process_pars): Propagate frames for calls.
11259
11260 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
11261
11262 PR target/85469
11263 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
11264 Removed.
11265 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
11266 (ix86_handle_option): Don't handle OPT_mibt.
11267 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
11268 __SHSTK__.
11269 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
11270 has_ibt and ibt.
11271 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
11272 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
11273 (ix86_target_macros): Define __CET__ with flag_cf_protection
11274 for -fcf-protection.
11275 * config/i386/i386.c (isa2_opts): Remove -mibt.
11276 * config/i386/i386.h (TARGET_IBT): Removed.
11277 (TARGET_IBT_P): Likewise.
11278 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
11279 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
11280 * config/i386/i386.opt (mcet): Update help message.
11281 (mshstk): Likewise.
11282 (mibt): Removed.
11283 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
11284 -mcet as an alias for -mshstk.
11285
11286 2018-04-20 Richard Biener <rguenther@suse.de>
11287
11288 PR middle-end/85475
11289 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
11290 complexity by forcing a single use of the multiply operand.
11291
11292 2018-04-20 Martin Jambor <mjambor@suse.cz>
11293
11294 ipa/85449
11295 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
11296 recursion dependency to only apply to non-clones.
11297
11298 2018-04-20 Martin Jambor <mjambor@suse.cz>
11299
11300 ipa/85447
11301 * ipa-cp.c (create_specialized_node): Check that clones of
11302 self-recursive edges exist during IPA-CP.
11303
11304 2018-04-19 Toon Moene <toon@moene.org>
11305
11306 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
11307 by -O3.
11308
11309 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11310
11311 PR tree-optimization/85467
11312 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
11313 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
11314 VECTOR_CST element to type.
11315
11316 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11317
11318 PR target/85397
11319 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
11320 * config/i386/i386.md (builtin_setjmp_setup): Removed.
11321 (builtin_longjmp): Likewise.
11322 (save_stack_nonlocal): New pattern.
11323 (restore_stack_nonlocal): Likewise.
11324
11325 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11326
11327 PR target/85404
11328 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11329 Replace ASM_OUTPUT_LABEL with fprintf.
11330
11331 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
11332
11333 PR target/85417
11334 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
11335 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
11336 * config/i386/i386-c.c (ix86_target_macros_internal): Also
11337 define __IBT__ and __SHSTK__ for -fcf-protection.
11338 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
11339 TARGET_IBT.
11340 (ix86_trampoline_init): Likewise.
11341 (x86_output_mi_thunk): Likewise.
11342 (ix86_notrack_prefixed_insn_p): Likewise.
11343 (ix86_option_override_internal): Don't disallow -fcf-protection.
11344 * config/i386/i386.md (rdssp<mode>): Also enable for
11345 -fcf-protection.
11346 (incssp<mode>): Likewise.
11347 (nop_endbr): Likewise.
11348 * config/i386/i386.opt (mcet): Change help message to built-in
11349 functions only.
11350 (mibt): Likewise.
11351 (mshstk): Likewise.
11352 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
11353 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
11354 enable CET built-in functions.
11355
11356 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
11357
11358 * common/config/i386/i386-common.c
11359 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
11360 OPTION_MASK_ISA_MOVDIRI_UNSET,
11361 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
11362 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
11363 * config.gcc (movdirintrin.h): New header.
11364 * config/i386/cpuid.h (bit_MOVDIRI,
11365 bit_MOVDIR64B): New bits.
11366 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
11367 and -mmvodir64b.
11368 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
11369 (VOID, PVOID, PCVOID)): New function types.
11370 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
11371 __builtin_ia32_directstoreu_u64,
11372 __builtin_ia32_movdir64b): New builtins.
11373 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
11374 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
11375 and -mmovdiri.
11376 (ix86_valid_target_attribute_inner_p): Ditto.
11377 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
11378 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
11379 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
11380 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
11381 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
11382 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
11383 (movdiri<mode>, movdir64b_<mode>): New.
11384 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
11385 * config/i386/immintrin.h: Include movdirintrin.h.
11386 * config/i386/movdirintrin.h: New file.
11387 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
11388
11389 2018-04-19 Richard Biener <rguenther@suse.de>
11390
11391 PR middle-end/85455
11392 * cfg.c (clear_bb_flags): When loop state says we have
11393 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
11394
11395 2018-04-19 Richard Biener <rguenther@suse.de>
11396
11397 PR tree-optimization/84737
11398 * tree-vect-data-refs.c (vect_copy_ref_info): New function
11399 copying restrict info.
11400 (vect_setup_realignment): Use it.
11401 * tree-vectorizer.h (vect_copy_ref_info): Declare.
11402 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
11403 the first DR to all generated stores.
11404 (vectorizable_load): Likewise for loads.
11405
11406 2018-04-19 Jakub Jelinek <jakub@redhat.com>
11407
11408 PR tree-optimization/85446
11409 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
11410 the integral and pointer types to have the same precision.
11411
11412 * doc/install.texi: Document --disable-cet being the default and
11413 --enable-cet=auto.
11414
11415 2018-04-18 Martin Liska <mliska@suse.cz>
11416
11417 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
11418 style.
11419
11420 2018-04-18 Martin Liska <mliska@suse.cz>
11421
11422 Revert
11423 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11424
11425 PR ipa/83983
11426 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11427 arguments if they are comparable.
11428
11429 2018-04-18 Martin Liska <mliska@suse.cz>
11430
11431 Revert
11432 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11433
11434 PR lto/84805
11435 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11436 incomplete types.
11437
11438 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
11439
11440 PR target/85388
11441 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
11442 ENDBR after calling __morestack.
11443
11444 2018-04-18 David Malcolm <dmalcolm@redhat.com>
11445
11446 PR jit/85384
11447 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
11448 by using gcc_base_ver to generate a gcc_driver_version, and use
11449 it when generating GCC_DRIVER_NAME.
11450 * configure: Regenerate.
11451
11452 2018-04-18 Jakub Jelinek <jakub@redhat.com>
11453
11454 PR target/81084
11455 * config.gcc: Obsolete powerpc*-*-*spe*.
11456
11457 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11458
11459 PR debug/84637
11460 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
11461 (stabstr_D): Change type of unum from unsigned int to
11462 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
11463 type.
11464
11465 2018-04-17 Jim Wilson <jimw@sifive.com>
11466
11467 PR 84856
11468 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
11469 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
11470 Set arg_pointer_offset after using pretend_args_size.
11471
11472 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11473
11474 PR rtl-optimization/85431
11475 * dse.c (record_store): Ignore zero width stores.
11476
11477 PR sanitizer/85230
11478 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
11479 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
11480 __builtin_stack_restore rather than after it.
11481 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
11482 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
11483 argument instead of virtual_dynamic_stack_rtx.
11484
11485 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
11486
11487 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
11488 New prototype.
11489 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11490 Add note to error message to explain internal mapping of overloaded
11491 built-in function name to non-overloaded built-in function name.
11492 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
11493 function.
11494
11495 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11496
11497 PR target/85424
11498 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
11499 where the inputs overlap with the output.
11500
11501 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11502
11503 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
11504 (=v, v) alternative and explicit "memory" attribute.
11505 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
11506 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11507 attributes.
11508 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
11509 "sselog1" type instead of "sselog".
11510 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
11511 "sselog". Remove explicit "memory" attribute.
11512 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
11513 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11514 attributes.
11515 (vec_extract_hi_v32hi): Merge all alternatives into one, use
11516 "sselog1" type instead of "sselog". Remove explicit "memory"
11517 attribute.
11518 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
11519 use "sselog1" type instead of "sselog". Remove explicit "memory"
11520 attribute.
11521 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
11522 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
11523 attributes.
11524 (vec_extract_hi_v64qi): Merge all alternatives into one, use
11525 "sselog1" type instead of "sselog". Remove explicit "memory"
11526 attribute.
11527 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
11528 use "sselog1" type instead of "sselog". Remove explicit "memory"
11529 attribute.
11530
11531 PR target/85430
11532 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
11533
11534 PR middle-end/85414
11535 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
11536 on a SUBREG.
11537
11538 2018-04-17 Martin Jambor <mjambor@suse.cz>
11539
11540 PR ipa/85421
11541 * ipa-cp.c (create_specialized_node): Call
11542 expand_all_artificial_thunks if necessary.
11543
11544 2018-04-17 Martin Liska <mliska@suse.cz>
11545
11546 PR lto/85405
11547 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
11548 in message, remote space in between '_G' and '('.
11549
11550 2018-04-17 Jakub Jelinek <jakub@redhat.com>
11551
11552 PR target/85281
11553 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
11554 avx512f_vmcmp<mode>3<round_saeonly_name>,
11555 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
11556 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
11557 avx512f_rndscale<mode><round_saeonly_name>,
11558 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
11559 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
11560 Use %<iptr>2 instead of %2 for -masm=intel.
11561 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
11562 avx512f_vcvttss2usi<round_saeonly_name>,
11563 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
11564 -masm=intel.
11565 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
11566 avx512f_vcvttsd2usi<round_saeonly_name>,
11567 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
11568 Use %q1 instead of %1 for -masm=intel.
11569 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
11570 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
11571 of %3 for -masm=intel.
11572 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
11573 -masm=intel.
11574 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
11575 -masm=intel.
11576 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
11577 -masm=intel.
11578 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
11579 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
11580 %g1.
11581 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
11582 -masm=intel.
11583 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
11584 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
11585 %g1 and one with %0 and %1.
11586 (avx512er_vmrcp28<mode><round_saeonly_name>,
11587 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
11588 %1 for -masm=intel.
11589 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
11590 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
11591 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
11592 of %0 and %{%4%} for -masm=intel.
11593 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
11594 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
11595 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
11596 order of %0 and %{%5%}%{z%} for -masm=intel.
11597
11598 2018-04-17 Jan Hubicka <jh@suse.cz>
11599
11600 PR lto/85405
11601 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
11602
11603 2018-04-17 Martin Liska <mliska@suse.cz>
11604
11605 PR ipa/85329
11606 * multiple_target.c (create_dispatcher_calls): Set apostrophes
11607 for target_clone error message. Make default implementation
11608 clone to be a local declaration.
11609 (separate_attrs): Add new argument and check for an empty
11610 string.
11611 (expand_target_clones): Handle it.
11612 (ipa_target_clone): Make redirection just for target_clones
11613 functions.
11614
11615 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
11616 Tom de Vries <tom@codesourcery.com>
11617
11618 PR middle-end/84955
11619 * omp-expand.c (expand_oacc_for): Add dummy false branch for
11620 tiled basic blocks without omp continue statements.
11621
11622 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
11623
11624 PR target/83660
11625 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
11626 vec_extract expression as having side effects to make sure it gets
11627 a cleanup point.
11628
11629 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
11630
11631 PR target/85403
11632 * config/i386/i386.c (get_builtin_code_for_version): Check
11633 error_mark_node.
11634
11635 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
11636
11637 PR target/84331
11638 * config.gcc: Support "skylake".
11639 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11640 PROCESSOR_SKYLAKE.
11641 * config/i386/i386.c (m_SKYLAKE): Define.
11642 (processor_target_table): Add "skylake".
11643 (ix86_option_override_internal): Add "skylake".
11644 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11645 PROCESSOR_CANNONLAKE.
11646 (get_builtin_code_for_version): Fix priority for
11647 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11648 PROCESSOR_SKYLAKE-AVX512.
11649 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11650 (processor_type): Add PROCESSOR_SKYLAKE.
11651
11652 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11653 Jason Merrill <jason@redhat.com>
11654
11655 PR c++/85112
11656 * convert.c (convert_to_integer_1): Use direct recursion for
11657 enumeral types and types with a precision less than the number
11658 of bits in their mode.
11659
11660 2018-04-16 Julia Koval <julia.koval@intel.com>
11661
11662 PR target/84413
11663 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11664 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11665
11666 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11667
11668 PR target/85293
11669 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11670 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11671 and -mno-direct-move.
11672
11673 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11674
11675 PR target/83402
11676 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11677 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11678 Ensure negative shifts result in {0}.
11679
11680 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11681
11682 PR rtl-optimization/79916
11683 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11684 regs (if any) to define how to gnerate SD moves when LRA is in
11685 progress.
11686
11687 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11688
11689 PR rtl-optimization/85393
11690 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11691 * except.c (expand_dw2_landing_pad_for_region): Make static.
11692 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11693 a label and unconditional jump to old_bb, rather than
11694 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11695 basic block.
11696
11697 PR rtl-optimization/85376
11698 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11699 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11700 instead of a specific value.
11701
11702 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11703 Bin Cheng <bin.cheng@arm.com>
11704
11705 PR tree-optimization/82965
11706 PR tree-optimization/83991
11707 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11708 by_profile_only parameter.
11709 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11710 information if the loop was predicted to iterate too many times.
11711 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11712
11713 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11714
11715 PR lto/71991
11716 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11717 always inline.
11718
11719 2018-04-13 Martin Liska <mliska@suse.cz>
11720 Jakub Jelinek <jakub@redhat.com>
11721
11722 PR middle-end/81657
11723 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11724 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11725 * builtins.c (expand_builtin_memory_copy_args): Use
11726 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11727 handle dest_addr == pc_rtx.
11728
11729 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11730
11731 PR target/85291
11732 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11733 asked to not generate direct moves.
11734 (fix_trunc<mode>si2_stfiwx): Similar.
11735 (fix_trunc<mode>si2_internal): Similar.
11736
11737 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11738
11739 PR debug/83157
11740 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11741 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11742 lookup if dest in some wider mode is known to be const0_rtx and
11743 if so, record permanent equivalence for it to be ZERO_EXTEND of
11744 the narrower mode destination.
11745
11746 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11747
11748 * lto-streamer-out.c (output_function): Revert 259346.
11749 * omp-expand.c (expand_oacc_for): Likewise.
11750
11751 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11752
11753 PR rtl-optimization/85354
11754 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11755 * sel-sched.c (sel_global_init): ... here.
11756
11757 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11758
11759 PR target/85238
11760 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11761 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11762 mode for PE-COFF targets.
11763 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11764 (i386_pe_asm_lto_end): Likewise.
11765 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11766 (TARGET_ASM_LTO_END): Likewise.
11767 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11768 (i386_pe_asm_lto_start): New function.
11769 (i386_pe_asm_lto_end): Likewise.
11770
11771 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11772 Richard Biener <rguenther@suse.de>
11773
11774 PR middle-end/84955
11775 * lto-streamer-out.c (output_function): Fix CFG loop state before
11776 streaming out.
11777 * omp-expand.c (expand_oacc_for): Handle calls to internal
11778 functions like regular functions.
11779
11780 2018-04-12 Richard Biener <rguenther@suse.de>
11781
11782 PR lto/85371
11783 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11784 for the early LTO debug to properly generate references to it
11785 during DIE emission. Do not re-use that for the skeleton for
11786 split-dwarf.
11787 (dwarf2out_early_finish): Likewise.
11788
11789 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11790
11791 PR target/85328
11792 * config/i386/sse.md
11793 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11794 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11795 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11796 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11797 and output is a reg, avoid creating invalid lowpart subreg, but
11798 instead split into a 512-bit move. Don't split if not AVX512VL,
11799 input is xmm16+ reg and output is a mem.
11800 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11801 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11802 xmm16+ reg and output is a mem.
11803
11804 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11805
11806 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11807 also for flag_dwarf2_cfi_asm.
11808
11809 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11810
11811 PR rtl-optimization/85342
11812 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11813 a bool scalar var inside of the loop instead. Don't try to update
11814 recog_data.operand after failed apply_change_group.
11815
11816 2018-04-12 Tom de Vries <tom@codesourcery.com>
11817
11818 PR target/85296
11819 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11820 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11821 array with flexible array member as array without given dimension.
11822 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11823 argument for undefined param to true.
11824
11825 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11826
11827 PR target/85321
11828 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11829 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11830 from PowerPC section.
11831 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11832 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11833 help text that is too long.
11834 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11835 help text that is too long.
11836 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11837 help text that is too long.
11838
11839 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11840
11841 * config/alpha/alpha.md (stack_probe_internal): Rename
11842 from "probe_stack". Update all callers.
11843
11844 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11845
11846 PR rtl-optimization/84566
11847 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11848 sched_macro_fuse_insns.
11849
11850 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11851
11852 PR target/84301
11853 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11854 (compute_block_dependences): ... from here.
11855
11856 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11857
11858 PR tree-optimization/85331
11859 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11860 from int to HOST_WIDE_INT.
11861
11862 2018-04-11 Martin Jambor <mjambor@suse.cz>
11863
11864 PR ipa/84149
11865 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11866 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11867 not the same as the source val.
11868 (cgraph_edge_brings_value_p): New parameter.
11869 (gather_edges_for_value): Pass destination value to
11870 cgraph_edge_brings_value_p.
11871 (perhaps_add_new_callers): Likewise.
11872 (get_info_about_necessary_edges): Likewise and exclude values brought
11873 only by self-recursive edges.
11874 (create_specialized_node): Redirect only clones of self-calling edges.
11875 (+self_recursive_pass_through_p): New function.
11876 (find_more_scalar_values_for_callers_subset): Use it.
11877 (find_aggregate_values_for_callers_subset): Likewise.
11878 (known_aggs_to_agg_replacement_list): Removed.
11879 (decide_whether_version_node): Re-calculate known constants for all
11880 remaining context clones.
11881
11882 2018-04-11 Richard Biener <rguenther@suse.de>
11883
11884 PR lto/85339
11885 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11886 from early DWARF output.
11887 (dwarf2out_early_finish): Output line info unconditionally into
11888 early DWARF and add reference to it.
11889
11890 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11891
11892 PR target/85281
11893 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11894 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11895 other than V2DFmode using iptr mode attribute.
11896 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11897
11898 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11899
11900 PR rtl-optimization/84659
11901 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11902
11903 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11904
11905 PR debug/85302
11906 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11907 SIZEP is NULL.
11908 (output_loc_list): Pass address of a dummy size variable even in the
11909 locview handling loop.
11910 (index_location_lists): Add comment on why skip_loc_list_entry can't
11911 call size_of_locs.
11912
11913 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11914
11915 PR target/85261
11916 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11917 into register.
11918
11919 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11920
11921 PR target/85321
11922 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11923 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11924 and -mstring-compare-inline-limit.
11925
11926 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11927
11928 PR target/85287
11929 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11930 for stack clash protection in a register whenever we need it to be in
11931 a register.
11932
11933 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11934
11935 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11936 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11937
11938 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11939
11940 PR target/85321
11941 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11942 the help text.
11943 (mlong-double-): Ditto.
11944 * config/rs6000/sysv4.opt (msdata=): Ditto.
11945 (mtls-size=): Ditto.
11946
11947 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11948
11949 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11950 erroneous entries for
11951 "vector int vec_ldl (int, long int *)", and
11952 "vector unsigned int vec_ldl (int, unsigned long int *)".
11953 Add comments and entries for
11954 "vector bool char vec_ldl (int, bool char *)",
11955 "vector bool short vec_ldl (int, bool short *)",
11956 "vector bool int vec_ldl (int, bool int *)",
11957 "vector bool long long vec_ldl (int, bool long long *)",
11958 "vector pixel vec_ldl (int, pixel *)",
11959 "vector long long vec_ldl (int, long long *)",
11960 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11961 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11962 type tree bool_long_long_type_node and correct definition of
11963 bool_V2DI_type_node to make reference to this new type tree.
11964 (rs6000_mangle_type): Replace erroneous reference to
11965 bool_long_type_node with bool_long_long_type_node.
11966 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11967 comments to emphasize sign distinctions for char and int types and
11968 replace RS6000_BTI_bool_long constant with
11969 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11970 use of RS6000_BTI_pixel.
11971 (bool_long_type_node): Remove this macro definition.
11972 (bool_long_long_type_node): New macro definition
11973
11974 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11975
11976 PR rtl-optimization/85300
11977 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11978 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11979 simplify_unary_operation fails.
11980
11981 2018-04-10 Martin Liska <mliska@suse.cz>
11982
11983 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11984 cgraph_edge and ipa_ref.
11985
11986 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11987
11988 PR target/85177
11989 PR target/85255
11990 * config/i386/sse.md
11991 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11992 computation of the VEC_MERGE selector from mask.
11993 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11994 Fix decoding of the VEC_MERGE selector into mask.
11995
11996 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11997
11998 PR tree-optimization/85286
11999 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12000
12001 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
12002
12003 * final.c (final_1): Set insn_last_address as well as
12004 insn_current_address.
12005
12006 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12007
12008 PR target/85173
12009 * explow.c (emit_stack_probe): Call validize_mem on memory location
12010 before passing it to gen_probe_stack. Create address operand and
12011 legitimize it for the probe_stack_address case.
12012
12013 2018-04-09 Jan Hubicka <jh@suse.cz>
12014
12015 PR lto/85078
12016 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12017 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12018 * tree.c (free_lang_data_in_type): Fix handling of binfos;
12019 walk basetypes.
12020 (free_lang_data): Rebuild type inheritance graph.
12021
12022 2018-04-09 Martin Sebor <msebor@redhat.com>
12023
12024 * invoke.texi (-finline-small-functions): Mention other optimization
12025 options.
12026 (-findirect-inlining, -fpartial-inlining): Same.
12027 (-finline-functions-called-once): Same.
12028 (-freorder-blocks-and-partition): Same.
12029
12030 2018-04-09 Jan Hubicka <jh@suse.cz>
12031
12032 PR rtl/84058
12033 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12034 jumps; choose last target that matches the criteria (i.e.
12035 no partition changes for non-crossing jumps).
12036 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12037 support for redirecting crossing jumps to non-crossing.
12038
12039 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
12040
12041 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12042 also for naked functions.
12043
12044 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
12045
12046 * config/arc/arc.md (add_shift): New pattern.
12047 (add_shift2): Likewise.
12048 (sub_shift): Likewise.
12049 (sub_shift_cmp0_noout): Likewise.
12050 (compare_si_ashiftsi): Likewise.
12051 (xbfu_cmp0_noout): New combine pattern.
12052 (xbfu_cmp0"): Likewise.
12053 (movsi_set_cc_insn): Place the predicable variant first.
12054 (commutative_binary_cmp0_noout): Remove clobber.
12055 (commutative_binary_cmp0): New pattern.
12056 (noncommutative_binary_cmp0): Likewise.
12057 (noncommutative_binary_cmp0_noout): Likewise.
12058 (noncommutative_binary_comparison_result_used): Removed.
12059 (rsub_cmp0): New pattern.
12060 (rsub_cmp0_noout): Likewise.
12061 (extzvsi): Changed, keep only meaningful variants.
12062 (SQH, SEZ): New iterators.
12063 (SQH_postfix): New mode attribute.
12064 (SEZ_prefix): New code attribute.
12065 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12066 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
12067 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
12068 of numerical value.
12069 (noncommutative_operator): Check the availability of barrel
12070 shifter option.
12071
12072 2018-04-09 Richard Biener <rguenther@suse.de>
12073
12074 PR tree-optimization/85284
12075 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
12076 Only use the niter constraining form of simple_iv when the exit
12077 is always executed.
12078
12079 2018-04-09 Tom de Vries <tom@codesourcery.com>
12080
12081 PR target/84041
12082 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12083 (define_expand "*memory_barrier"): New define_expand.
12084 (define_insn "memory_barrier"): New insn.
12085
12086 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12087
12088 PR rtl-optimization/80463
12089 PR rtl-optimization/83972
12090 PR rtl-optimization/83480
12091
12092 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
12093 correct producer for the insn.
12094 (tidy_control_flow): Fixup seqnos in case of debug insns.
12095
12096 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12097
12098 PR rtl-optimization/83913
12099
12100 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
12101 different sched-times when merging exprs.
12102
12103 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12104
12105 PR rtl-optimization/83962
12106
12107 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
12108 tidy_fallthru_edge and tidy_control_flow.
12109
12110 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
12111
12112 PR rtl-optimization/83530
12113
12114 * sel-sched.c (force_next_insn): New global variable.
12115 (remove_insn_for_debug): When force_next_insn is true, also leave only
12116 next insn in the ready list.
12117 (sel_sched_region): When the region wasn't scheduled, make another pass
12118 over it with force_next_insn set to 1.
12119
12120 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12121
12122 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
12123 into tm_file.
12124 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12125 for interrupt control.
12126 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12127 functions for interrupt control.
12128 * config/nds32/nds32-intrinsic.md: Likewise.
12129 * config/nds32/nds32_intrinsic.h: Likewise.
12130 * config/nds32/nds32.h (nds32_builtins): Likewise.
12131
12132 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12133
12134 * config/nds32/nds32.c (nds32_init_machine_status,
12135 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
12136 strict_aligned_p field.
12137 (nds32_expand_to_rtl_hook): New function.
12138 (TARGET_EXPAND_TO_RTL_HOOK): Define.
12139 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
12140
12141 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12142 Chung-Ju Wu <jasonwucj@gmail.com>
12143
12144 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
12145 * config/nds32/nds32-n7.md: New file.
12146 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
12147 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
12148 pipeline.
12149 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
12150 * config/nds32/nds32.md (pipeline_model): Add n7.
12151 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
12152 * config/nds32/pipelines.md: Include n7 settings.
12153
12154 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12155 Chung-Ju Wu <jasonwucj@gmail.com>
12156
12157 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
12158 * config/nds32/nds32-e8.md: New file.
12159 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
12160 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
12161 pipeline.
12162 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
12163 * config/nds32/nds32.md (pipeline_model): Add e8.
12164 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
12165 * config/nds32/pipelines.md: Include e8 settings.
12166
12167 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12168 Chung-Ju Wu <jasonwucj@gmail.com>
12169
12170 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
12171 * config/nds32/nds32-n8.md: New file.
12172 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
12173 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
12174 pipeline.
12175 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
12176 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
12177 * config/nds32/nds32.md (pipeline_model): Add n8.
12178 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
12179 * config/nds32/pipelines.md: Include n8 settings.
12180
12181 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
12182 Chung-Ju Wu <jasonwucj@gmail.com>
12183
12184 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
12185 * config/nds32/nds32-n9-2r1w.md: New file.
12186 * config/nds32/nds32-n9-3r2w.md: New file.
12187 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
12188 nds32_register_ports): New or modify for cpu n9.
12189 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
12190 pipeline.
12191 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
12192 * config/nds32/nds32-utils.c: New file.
12193 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
12194 TARGET_MUL_SLOW): Define.
12195 * config/nds32/nds32.md (pipeline_model): New attribute.
12196 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
12197 New options that support cpu n9.
12198 * config/nds32/pipelines.md: Include n9 settings.
12199 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
12200
12201 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
12202
12203 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
12204 information if necessary.
12205 (output_cond_branch_compare_zero): Likewise.
12206 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
12207 (nds32_target_alignment): Refine for alignment.
12208 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
12209 (FUNCTION_BOUNDARY): Modify.
12210 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
12211 align case.
12212 * config/nds32/nds32.opt (malways-align, malign-functions): New.
12213
12214 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
12215
12216 * config/nds32/constants.md (unspec_volatile_element): Add values for
12217 TLB operation and data prefetch.
12218 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
12219 functions for TLB operation and data prefetch.
12220 * config/nds32/nds32-intrinsic.md: Likewise.
12221 * config/nds32/nds32_intrinsic.h: Likewise.
12222 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
12223 (nds32_print_operand): Likewise.
12224 * config/nds32/nds32.h (nds32_builtins): Likewise.
12225
12226 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
12227 Andrew Pinski <pinsika@gcc.gnu.org>
12228
12229 PR middle-end/82976
12230 * match.pd: Use constant_boolean_node of correct type instead of
12231 boolean_true_node or boolean_false_node for simplifying
12232 pointer comparisons to zero.
12233
12234 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12235
12236 PR tree-optimization/80021
12237 * tree.c (verify_type_variant): Make error call in verify_variant_match
12238 translatable and remove final full stop.
12239
12240 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12241
12242 * config/nds32/constants.md (unspec_volatile_element): Add
12243 UNSPEC_VOLATILE_EH_RETURN.
12244 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
12245 nds32_output_stack_pop): Support dwarf exception handling process.
12246 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
12247 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
12248 exception handling process.
12249 (nds32_compute_stack_frame): Likewise.
12250 (nds32_return_addr_rtx): Likewise.
12251 (nds32_initial_elimination_offset): Likewise.
12252 (nds32_expand_prologue): Likewise.
12253 (nds32_expand_epilogue): Likewise.
12254 (nds32_dynamic_chain_address): New function.
12255 * config/nds32/nds32.h (machine_function): Add fields for dwarf
12256 exception handling.
12257 (DYNAMIC_CHAIN_ADDRESS): Define.
12258 (EH_RETURN_DATA_REGNO): Define.
12259 (EH_RETURN_STACKADJ_RTX): Define.
12260 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
12261 patterns for dwarf exception handling.
12262
12263 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12264
12265 * config/nds32/nds32.h: Clean up obsolete macros.
12266
12267 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12268
12269 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12270 Add enum values for particular instructions.
12271 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12272 particular intrinsic functions.
12273 * config/nds32/nds32-intrinsic.md: Likewise.
12274 * config/nds32/nds32_intrinsic.h: Likewise.
12275 * config/nds32/nds32.h (nds32_builtins): Likewise.
12276 * config/nds32/nds32.md (type): Add pbsad and pbsada.
12277 (btst, ave): New patterns for particular instructions.
12278
12279 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12280
12281 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12282 Add enum values for atomic load/store and memory sync.
12283 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
12284 and memory sync.
12285 * config/nds32/nds32-intrinsic.md: Likewise.
12286 * config/nds32/nds32_intrinsic.h: Likewise.
12287 * config/nds32/nds32.h (nds32_builtins): Likewise.
12288
12289 2018-04-07 Jakub Jelinek <jakub@redhat.com>
12290
12291 PR tree-optimization/85257
12292 * fold-const.c (native_encode_vector): If not all elts could fit
12293 and off is -1, return 0 rather than offset.
12294 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
12295 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
12296 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
12297 adjust buffer in native_interpret_expr call.
12298
12299 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12300
12301 * config/nds32/constants.md (unspec_volatile_element): Add cache
12302 control enum values.
12303 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
12304 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
12305 * config/nds32/nds32.c (nds32_cctl_names): New.
12306 (nds32_print_operand): Handle cache control register names.
12307 * config/nds32/nds32.h (nds32_builtins): New enum values.
12308 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
12309 macros.
12310 * config/nds32/nds32.md (type): Add mmu.
12311 * config/nds32/pipelines.md (simple_insn): Add mmu.
12312
12313 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12314
12315 * config/nds32/nds32.md (type): Remove call.
12316 * config/nds32/pipelines.md (simple_insn): Likewise.
12317
12318 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12319
12320 * config/nds32/constants.md (unspec_volatile_element): Add
12321 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
12322 UNSPEC_VOLATILE_FMFCFG.
12323 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12324 description for fmfcfg and fmfcsr.
12325 (bdesc_1arg): Add fmtcsr.
12326 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
12327 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
12328 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
12329 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
12330 unspec_fmfcfg): New patterns.
12331 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
12332 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
12333 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
12334 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
12335 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
12336 __nds32__fmfcfg): Define.
12337
12338 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
12339
12340 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
12341 intrinsic register names.
12342 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
12343 intrinsic register enum values and macros.
12344
12345 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
12346
12347 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
12348 for load/store addressing form.
12349 (nds32_print_operand_address): Likewise.
12350
12351 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
12352
12353 PR target/85196
12354 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
12355 based on LABEL_REF. Remove useless assertion.
12356 (pic_address_needs_scratch): Fix formatting.
12357 (sparc_legitimize_pic_address): Minor tweaks.
12358 (sparc_delegitimize_address): Adjust assertion accordingly.
12359 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
12360 into symbolic_operand.
12361 (movsi_high_pic_label_ref): Likewise.
12362 (movsi_lo_sum_pic_label_ref): Likewise.
12363 (movdi_pic_label_ref): Likewise.
12364 (movdi_high_pic_label_ref): Likewise.
12365 (movdi_lo_sum_pic_label_ref): Likewise.
12366
12367 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
12368
12369 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
12370 custom LIB_SPEC setup.
12371
12372 2018-04-06 Ruslan Bukin <br@bsdpad.com>
12373 Kito Cheng <kito.cheng@gmail.com>
12374
12375 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
12376 * config/riscv/freebsd.h: New.
12377
12378 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12379
12380 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
12381 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
12382 file.
12383
12384 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12385 Kito Cheng <kito.cheng@gmail.com>
12386
12387 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
12388 nds32_output_call, nds32_symbol_binds_local_p): New functions.
12389 * config/nds32/nds32-protos.h (nds32_output_call,
12390 nds32_output_return): Declare.
12391 * config/nds32/nds32.md: Refine all the call and return patterns.
12392
12393 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12394
12395 PR debug/85252
12396 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
12397 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
12398
12399 PR rtl-optimization/84872
12400 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
12401 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
12402 EDGE_CROSSING edge.
12403
12404 2018-04-06 Tamar Christina <tamar.christina@arm.com>
12405
12406 * expr.c (copy_blkmode_to_reg): Revert 254862.
12407 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
12408
12409 2018-04-06 Richard Biener <rguenther@suse.de>
12410
12411 PR middle-end/85244
12412 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
12413 after seeing a component reference with an adjacent field. Treat
12414 refs to arrays at struct end of external decls similar to
12415 refs to unconstrained commons.
12416
12417 2018-04-06 Jakub Jelinek <jakub@redhat.com>
12418
12419 PR sanitizer/85213
12420 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
12421 look through SAVE_EXPRs with non-side-effects argument. Adjust
12422 recursive calls.
12423 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
12424 save_p here.
12425
12426 2018-04-06 Richard Biener <rguenther@suse.de>
12427
12428 PR middle-end/85180
12429 * alias.c (find_base_term): New wrapper around find_base_term
12430 unwinding CSELIB_VAL_PTR changes.
12431 (find_base_term): Do not restore CSELIB_VAL_PTR during the
12432 recursion.
12433
12434 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12435
12436 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
12437 instructions.
12438 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
12439 constant definitions.
12440 ("nop"): lr 0,0 -> nopr r0
12441 ("nop_lr0", "nop_lr1"): New insn definitions.
12442
12443 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
12444
12445 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
12446 NDS32_V3PUSH_AVAILABLE_P macro.
12447
12448 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
12449 Chung-Ju Wu <jasonwucj@gmail.com>
12450
12451 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
12452 (nds32*-*-*): Add float and fpu_config into supported_defaults.
12453 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
12454 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
12455 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
12456 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
12457 * config/nds32/constraints.md: New constraints and checking for hard
12458 float configuration.
12459 * config/nds32/iterators.md: New mode iterator and attribute for hard
12460 float configuration.
12461 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
12462 patterns.
12463 * config/nds32/nds32-fpu.md: New file.
12464 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
12465 deal with hard float code generation.
12466 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
12467 ARCH_V3S.
12468 (abi_type, float_reg_number): New enum type.
12469 * config/nds32/nds32-predicates.c: New predicates for hard float.
12470 * config/nds32/nds32-protos.h: Declare functions for hard float.
12471 * config/nds32/nds32.c: Implementation for hard float configuration.
12472 * config/nds32/nds32.h: Definitions for hard float configuration.
12473 * config/nds32/nds32.md: Include hard float machine description and
12474 modify patterns for hard float configuration.
12475 * config/nds32/nds32.opt: New options for hard float configuration.
12476 * config/nds32/predicates.md: New predicates for hard float
12477 configuration.
12478
12479 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12480
12481 * common/config/nds32/nds32-common.c
12482 (nds32_option_optimization_table): Enable -mreleax-hint by default.
12483
12484 2018-04-05 Jakub Jelinek <jakub@redhat.com>
12485
12486 PR middle-end/85195
12487 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
12488 CONSTRUCTOR_ELT (ctor, ...)->value.
12489
12490 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
12491
12492 PR target/85193
12493 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
12494
12495 2018-04-05 Tom de Vries <tom@codesourcery.com>
12496
12497 PR target/85204
12498 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
12499 cond jump.
12500
12501 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12502 Kito Cheng <kito.cheng@gmail.com>
12503
12504 * config/nds32/constraints.md (U33): Fine-tune checking condition.
12505 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
12506 * config/nds32/nds32.h (nds32_16bit_address_type): Add
12507 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
12508
12509 2018-04-05 Shiva Chen <shiva0217@gmail.com>
12510 Kito Cheng <kito.cheng@gmail.com>
12511
12512 * config/nds32/constraints.md (Ufe): New memory constraint.
12513 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
12514 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
12515 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
12516 operands.
12517 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
12518 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
12519
12520 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12521
12522 * config/nds32/nds32.md: Use optimize_size in the condition for
12523 alu-shift instructions.
12524
12525 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12526
12527 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
12528
12529 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12530
12531 * config/nds32/nds32.md (negsi2): Refine pattern.
12532
12533 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12534 Chung-Ju Wu <jasonwucj@gmail.com>
12535
12536 * config/nds32/iterators.md (shift_rotate): New code iterator.
12537 (shift): New code attribute.
12538 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
12539 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
12540 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
12541 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
12542 bit-wise operations.
12543 (andsi3, *andsi3): Ditto.
12544 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
12545 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
12546 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
12547 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
12548 nds32_ior_operand, nds32_xor_operand): New predicates.
12549
12550 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12551
12552 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
12553 (addsi3, subsi3): ... this.
12554
12555 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12556
12557 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
12558
12559 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12560
12561 * config/nds32/nds32.md: Adjust indention.
12562
12563 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
12564
12565 * config/nds32/nds32.md (feature): New attribute.
12566
12567 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
12568
12569 * config/nds32/nds32.md (subtype): New attribute.
12570
12571 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
12572
12573 PR target/85203
12574 * config/arm/arm-builtins.c (arm_expand_builtin): Change
12575 expansion to perform a bitwise AND of the argument followed by a
12576 boolean negation of the result.
12577
12578 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
12579
12580 PR rtl-optimization/84878
12581 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
12582 the basic block. Assert the use reference is not artificial and that
12583 it has an associated insn.
12584
12585 2018-04-04 Michael Matz <matz@suse.de>
12586
12587 * builtins.c (compute_objsize): Pass correct operand
12588 to array_at_struct_end_p.
12589
12590 2018-04-04 Richard Biener <rguenther@suse.de>
12591
12592 PR lto/85176
12593 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
12594 from contexts for DINFO_LEVEL_TERSE and below.
12595
12596 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12597
12598 * config/nds32/nds32-doubleword.md (move_<mode>): Require
12599 resiter_operand condition.
12600 * config/nds32/nds32.md (*move<mode>): Ditto.
12601
12602 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12603 Monk Chiang <sh.chiang04@gmail.com>
12604
12605 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
12606
12607 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12608
12609 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
12610
12611 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12612 Kito Cheng <kito.cheng@gmail.com>
12613
12614 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
12615 nds32_cond_code_str, output_cond_branch,
12616 output_cond_branch_compare_zero, nds32_expand_cbranch,
12617 nds32_expand_cstore, nds32_expand_movcc,
12618 nds32_output_cbranchsi4_equality_zero,
12619 nds32_output_cbranchsi4_equality_reg,
12620 nds32_output_cbranchsi4_equality_reg_or_const_int,
12621 nds32_output_cbranchsi4_greater_less_zero: New functions.
12622 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
12623 nds32_expand_cstore, nds32_expand_movcc,
12624 nds32_output_cbranchsi4_equality_zero,
12625 nds32_output_cbranchsi4_equality_reg,
12626 nds32_output_cbranchsi4_equality_reg_or_const_int,
12627 nds32_output_cbranchsi4_greater_less_zero): Declare.
12628 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
12629 nds32_rimm11s_operand): New predicates.
12630 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
12631 * config/nds32/nds32.md: Rewrite all the branch and conditional move
12632 patterns.
12633
12634 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
12635
12636 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
12637 * config/nds32/nds32.md: Ditto.
12638 * config/nds32/pipelines.md: Ditto.
12639
12640 2018-04-04 Richard Biener <rguenther@suse.de>
12641
12642 PR tree-optimization/85168
12643 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12644 propagating abnormals.
12645
12646 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12647
12648 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12649
12650 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12651 Kito Cheng <kito.cheng@gmail.com>
12652
12653 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12654 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12655 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12656 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12657 * config/nds32/nds32.md (sibcall_internal): New.
12658 (sibcall_register): Remove.
12659 (sibcall_immediate): Remove.
12660 (sibcall_value_internal): New.
12661 (sibcall_value_register): Remove.
12662 (sibcall_value_immediate): Remove.
12663 * config/nds32/predicates.md (nds32_general_register_operand): New.
12664 (nds32_call_address_operand): New.
12665
12666 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12667
12668 PR rtl-optimization/85167
12669 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12670 bb_defs if *split_p, instead preinitialize it to NULL.
12671
12672 PR tree-optimization/85156
12673 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12674 evaluating the argument multiple times.
12675
12676 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12677
12678 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12679 than vector.
12680 (_mm_cvtpd_ps): Likewise.
12681 (_mm_cvttpd_epi32): Likewise.
12682 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12683 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12684 vector, pixel, and bool following altivec.h include.
12685
12686 2018-04-03 Martin Sebor <msebor@redhat.com>
12687
12688 * doc/extend.texi (Common Function Attributes): Clarify.
12689 (const attribute): Likewise.
12690 (pure attribute): Likewise.
12691
12692 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12693
12694 PR target/85169
12695 * config/i386/i386.c (ix86_expand_vector_set): Use
12696 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12697
12698 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12699
12700 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12701 instructions when changing rounding bits to preserve precision bits
12702 in the x87 control word.
12703
12704 2018-04-03 Martin Liska <mliska@suse.cz>
12705
12706 PR tree-optimization/82491
12707 * rtl.h (strip_offset_and_add): Replace += suboffset with
12708 poly_uint64 () + suboffset.
12709
12710 2018-03-29 Martin Liska <mliska@suse.cz>
12711 Martin Jambor <mjambor@suse.cz>
12712
12713 PR ipa/84947
12714 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12715 param_type is not an integral or pointer type.
12716
12717 2018-04-03 Richard Biener <rguenther@suse.de>
12718
12719 * sese.h (recompute_all_dominators): Remove.
12720
12721 2018-04-02 Martin Sebor <msebor@redhat.com>
12722
12723 * doc/invoke.texi (-Wrestrict): Fix typos.
12724
12725 2018-04-02 Jim Wilson <jimw@sifive.com>
12726
12727 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12728 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12729 (<optab>di3, <optab>si3_extend): Likewise.
12730 (<optab>si3_mask, <optab>si3_mask_1): New.
12731 (<optab>di3_mask, <optab>di3_mask_1): New.
12732 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12733 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12734 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12735
12736 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12737
12738 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12739 example.
12740
12741 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12742
12743 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12744 (nds32_canonicalize_comparison): New function.
12745
12746 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12747 Kito Cheng <kito.cheng@gmail.com>
12748 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12749
12750 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12751 * config/nds32/constants.md (unspec_volatile_element): Add
12752 UNSPEC_VOLATILE_RELAX_GROUP.
12753 * config/nds32/nds32-relax-opt.c: New file.
12754 * config/nds32/nds32-predicates.c
12755 (nds32_symbol_load_store_p): New function.
12756 * config/nds32/nds32-protos.h
12757 (nds32_symbol_load_store_p): Declare function.
12758 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12759 * config/nds32/nds32.c
12760 (nds32_register_pass): New function to register pass.
12761 (nds32_register_passes): New function to register passes.
12762 * config/nds32/nds32.md (relax_group): New pattern.
12763 * config/nds32/nds32.opt (mrelax-hint): New option.
12764 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12765
12766 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12767
12768 * config/nds32/t-nds32: Modify files dependency.
12769
12770 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12771
12772 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12773 (PROFILE_HOOK): Define its implementation.
12774
12775 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12776
12777 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12778 type and 32-bit size.
12779
12780 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12781
12782 PR middle-end/85090
12783 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12784 (V_128_256): New mode iterator.
12785 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12786 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12787 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12788 of V.
12789 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12790 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12791
12792 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12793
12794 PR target/83315
12795 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12796 NaN inputs correctly.
12797
12798 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12799
12800 PR target/80546
12801 * config/rs6000/vsx.md (??r): New mode attribute.
12802 (*vsx_mov<mode>_64bit): Use it.
12803 (*vsx_mov<mode>_32bit): Likewise.
12804
12805 2018-03-30 Martin Sebor <msebor@redhat.com>
12806
12807 PR tree-optimization/84818
12808 * builtins.c (check_access): Use warning_n.
12809
12810 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12811
12812 PR target/83822
12813 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12814 condition.
12815 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12816 condition.
12817
12818 2018-03-30 Julia Koval <julia.koval@intel.com>
12819
12820 PR target/84413
12821 * x86-tune.def (movx, partial_reg_dependency): Enable for
12822 m_SKYLAKE_AVX512.
12823
12824 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12825
12826 PR inline-asm/84985
12827 * lra-constraints.c (process_alt_operands): Move setting
12828 this_alternative_matches below.
12829
12830 2018-03-29 Martin Liska <mliska@suse.cz>
12831
12832 PR lto/84995.
12833 * doc/invoke.texi: Document how LTO works with debug info.
12834 Describe auto-load support of binutils. Mention 'x86-64'
12835 as valid option value of -march option.
12836
12837 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12838
12839 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12840
12841 PR c/85094
12842 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12843 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12844 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12845 checking.
12846
12847 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12848
12849 PR target/84912
12850 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12851 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12852 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12853 for RS6000_BTM_POWERPC64.
12854 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12855 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12856 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12857 definition.
12858 (DIVDE): Use it.
12859 (DIVDEU): Likewise.
12860
12861 2018-03-28 Carl Love <cel@us.ibm.com>
12862
12863 Revert
12864 2017-09-27 Carl Love <cel@us.ibm.com>
12865
12866 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12867 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12868 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12869 fctiw instruction.
12870
12871 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12872
12873 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12874 instead of __vector bool.
12875 (_mm_max_pu8): Likewise.
12876 (_mm_min_pi16): Likewise.
12877
12878 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12879
12880 PR target/84912
12881 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12882 (DIVWEUO): Likewise.
12883 (DIVDEO): Likewise.
12884 (DIVDEUO): Likewise.
12885 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12886 DIVWEUO and DIVDEUO.
12887 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12888 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12889 (div_extend): Likewise.
12890 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12891 builtin function.
12892 (__builtin_divweuo): Likewise.
12893 (__builtin_divdeo): Likewise.
12894 (__builtin_divdeuo): Likewise.
12895
12896 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12897
12898 PR target/85095
12899 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12900 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12901
12902 PR tree-optimization/82004
12903 * gimple-match-head.c (optimize_pow_to_exp): New function.
12904 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12905 Don't fold to exp if optimize_pow_to_exp is false.
12906
12907 2018-03-28 Martin Liska <mliska@suse.cz>
12908
12909 PR other/84819
12910 * calls.c (initialize_argument_information): Fix trailing space.
12911 * common.opt: Fix typo and provide better explanation for
12912 -fsanitize-coverage option.
12913 * config/i386/i386.opt: Fix typo.
12914
12915 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12916 Martin Liska <mliska@suse.cz>
12917
12918 PR sanitizer/85081
12919 * gimplify.c (asan_poison_variable): Don't do the check for
12920 gimplify_omp_ctxp here.
12921 (gimplify_decl_expr): Do it here.
12922 (gimplify_target_expr): Likewise.
12923
12924 2018-03-28 Martin Liska <mliska@suse.cz>
12925
12926 PR target/84988
12927 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12928 chkp_type_bounds_count if MPX is not enabled.
12929
12930 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12931
12932 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12933
12934 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12935
12936 PR target/84914
12937 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12938 function to create the function decl for complex long double
12939 multiply and divide for -mabi=ieeelongdouble.
12940 (init_float128_ieee): Call it.
12941
12942 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12943
12944 PR target/85044
12945 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12946 -fcf-protection=branch -mibt.
12947 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12948
12949 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12950
12951 PR target/81863
12952 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12953 arm_word_relocations.
12954
12955 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12956
12957 PR target/85056
12958 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12959 extern array declarations.
12960
12961 2018-03-27 Richard Biener <rguenther@suse.de>
12962
12963 PR middle-end/84067
12964 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12965 explicit single_use checks.
12966
12967 2018-03-27 Richard Biener <rguenther@suse.de>
12968
12969 PR tree-optimization/85082
12970 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12971 Valueize the VUSE.
12972
12973 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12974
12975 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12976 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12977 Turn on fasynchronous-unwind-tables and funwind-tables.
12978
12979 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12980
12981 PR target/85073
12982 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12983 (*bmi_blsr_<mode>_ccz): Ditto.
12984
12985 2018-03-26 Tom de Vries <tom@codesourcery.com>
12986
12987 PR tree-optimization/85063
12988 * omp-general.c (offloading_function_p): New function. Factor out
12989 of ...
12990 * omp-offload.c (pass_omp_target_link::gate): ... here.
12991 * omp-general.h (offloading_function_p): Declare.
12992 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12993 with attribute omp declare target for offloading functions.
12994
12995 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12996
12997 PR tree-optimization/84005
12998 * tree-data-ref.h (get_base_for_alignment): Declare.
12999 * tree-data-ref.c (get_base_for_alignment_1): New function.
13000 (get_base_for_alignment): Likewise.
13001 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13002 get_base_for_alignment to find a suitable base object, instead
13003 of always using drb->base_address.
13004
13005 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13006
13007 PR inline-asm/85022
13008 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13009 known size by default.
13010
13011 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
13012
13013 PR inline-asm/85030
13014 * lra-constraints.c (process_alt_operands): Don't match BLKmode
13015 and non BLKmode operands.
13016
13017 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13018
13019 PR target/85026
13020 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13021 Clean up attributes.
13022
13023 2018-03-23 Richard Biener <rguenther@suse.de>
13024
13025 PR debug/85020
13026 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13027 we are going to emit early debug for LTO.
13028
13029 2018-03-23 Jakub Jelinek <jakub@redhat.com>
13030
13031 PR inline-asm/85034
13032 * function.c (match_asm_constraints_1): Don't optimize if input
13033 doesn't satisfy general_operand predicate for output's mode.
13034
13035 PR inline-asm/85022
13036 * alias.c (write_dependence_p): Don't require for x_canonicalized
13037 non-VOIDmode if x has VOIDmode.
13038
13039 PR sanitizer/85029
13040 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13041 just don't try to optimize it rather than assert it never happens.
13042
13043 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13044
13045 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13046 macro expansions for definition of ST_INTERNAL_<mode> and
13047 LD_INTERNAL_<mode> builtins.
13048 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13049 Remove prototype.
13050 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13051 function.
13052 (altivec_expand_st_builtin): Likewise.
13053 (altivec_expand_builtin): Remove calls to deleted functions.
13054 (rs6000_address_for_altivec): Delete this function.
13055 * config/rs6000/vector.md: Remove expands for
13056 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13057
13058 2018-03-22 Sudakshina Das <sudi.das@arm.com>
13059
13060 PR target/84826
13061 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13062 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13063 re-computing once computed.
13064 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13065 (arm_init_machine_status): Initialize
13066 machine->static_chain_stack_bytes.
13067
13068 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13069
13070 PR target/84760
13071 * doc/extend.texi: Add four new prototypes for vec_ld.
13072 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
13073 definitions for more logical presentation.
13074 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
13075 entries for V1TI variants of __builtin_altivec_ld builtin.
13076 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
13077 handling of V1TI variant of LVX icode pattern.
13078 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
13079 (rs6000_gimple_fold_builtin): Likewise.
13080 (altivec_init_builtins): Add code to define
13081 __builtin_altivec_lvx_v1ti function.
13082
13083 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13084
13085 PR inline-asm/84941
13086 * function.c (match_asm_constraints_1): Don't do the optimization
13087 if input isn't a REG, SUBREG, MEM or constant.
13088
13089 2018-03-22 Tom de Vries <tom@codesourcery.com>
13090
13091 PR tree-optimization/84956
13092 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
13093 bb_has_abnormal_pred.
13094
13095 2018-03-22 Jakub Jelinek <jakub@redhat.com>
13096
13097 PR sanitizer/85018
13098 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
13099 DECL_INITIAL (decl) to decl at the end.
13100 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
13101 adjust the comment.
13102
13103 2018-03-21 Joseph Myers <joseph@codesourcery.com>
13104
13105 * doc/extend.texi (__builtin_tgmath): Document when complex
13106 integer types are treated as _Complex _Float64.
13107
13108 2018-03-21 Tom de Vries <tom@codesourcery.com>
13109
13110 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
13111
13112 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13113
13114 PR tree-optimization/84960
13115 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
13116 if it is ENTRY block, move them into single succ of ENTRY in that case.
13117
13118 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
13119
13120 PR tree-optimization/84811
13121 * poly-int.h (poly_span_traits): Remove the T3 parameter and
13122 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
13123 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
13124 (known_subrange_p): Update accordingly. Cast each value involved
13125 in the size comparison, rather than casting the result of the
13126 subtraction.
13127
13128 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13129
13130 PR tree-optimization/84982
13131 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
13132 by flipping the least significant bit rather than all bits from
13133 bitpos to bitpos + bitsize - 1.
13134
13135 2018-03-21 Nathan Sidwell <nathan@acm.org>
13136
13137 * doc/extend.texi (Deprecated Features): Remove mention of
13138 long-deleted deprecations.
13139
13140 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13141
13142 PR jit/84288
13143 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
13144 * configure: Regenerate.
13145
13146 2018-03-21 Tom de Vries <tom@codesourcery.com>
13147
13148 PR tree-optimization/83126
13149 * tree-parloops.c (num_phis): New function.
13150 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
13151
13152 2018-03-21 Nathan Sidwell <nathan@acm.org>
13153
13154 * doc/extend.texi (Deprecated Features): Update deprecated flags,
13155 mention anon-struct/union members and trailing attributes.
13156
13157 2018-03-21 Bin Cheng <bin.cheng@arm.com>
13158
13159 PR tree-optimization/84969
13160 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
13161 builtin memset partitions if they set different rhs values.
13162
13163 2018-03-21 Jakub Jelinek <jakub@redhat.com>
13164
13165 PR rtl-optimization/84989
13166 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
13167 VEC_DUPLICATE with scalar result mode.
13168
13169 2018-03-21 Martin Liska <mliska@suse.cz>
13170
13171 PR ipa/84963
13172 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
13173 not intended return statement.
13174
13175 2018-03-21 Martin Liska <mliska@suse.cz>
13176
13177 PR target/84988
13178 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
13179 (chkp_find_bound_slots_1): Limit number of iterations.
13180
13181 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
13182
13183 PR target/84838
13184 * Minor grammar fixes for x86 options.
13185
13186 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13187
13188 PR debug/84875
13189 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
13190 holding REG_CFA_RESTORE notes, instead turn them into a USE.
13191
13192 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
13193
13194 PR target/83789
13195 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
13196 (altivec_lvx_<mode>_1op): Likewise.
13197 (altivec_stvx_<mode>_2op): Likewise.
13198 (altivec_stvx_<mode>_1op): Likewise.
13199 (altivec_lvx_<VM2:mode>): New define_expand.
13200 (altivec_stvx_<VM2:mode>): Likewise.
13201 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
13202 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13203 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
13204 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
13205 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
13206 (rs6000_gen_lvx): Likewise.
13207 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
13208 (altivec_expand_stv_builtin): Likewise.
13209 (altivec_expand_builtin): Likewise.
13210 * config/rs6000/vector.md: Likewise.
13211
13212 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13213
13214 PR target/82518
13215 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
13216 BYTES_BIG_ENDIAN.
13217
13218 2018-03-20 Richard Biener <rguenther@suse.de>
13219
13220 PR target/84986
13221 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
13222 sign-conversions as zero, fall back to standard scalar_stmt
13223 cost for the rest.
13224
13225 2018-03-20 Martin Liska <mliska@suse.cz>
13226
13227 PR ipa/84825
13228 * predict.c (rebuild_frequencies): Handle case when we have
13229 PROFILE_ABSENT, but flag_guess_branch_prob is false.
13230
13231 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13232
13233 PR target/84990
13234 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
13235 flag_section_anchors.
13236 * varasm.c (use_blocks_for_decl_p): Remove hack for
13237 dw2_force_const_mem.
13238
13239 PR target/84845
13240 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
13241 to ...
13242 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
13243 be created, use lowpart_subreg of operands[0] rather than operands[0]
13244 itself.
13245 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
13246 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
13247 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
13248 and n constraint instead of aarch64_shift_imm_di and Usd.
13249 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
13250 (*aarch64_<optab>_reg_minus<mode>3): ... this.
13251
13252 2018-03-20 Sudakshina Das <sudi.das@arm.com>
13253
13254 PR target/82989
13255 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
13256 to favor GPR over NEON registers.
13257 (<shift>di3_neon): Likewise.
13258
13259 2018-03-20 Tom de Vries <tom@codesourcery.com>
13260
13261 PR target/84952
13262 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
13263 (nvptx_process_pars): Emit bar.sync asap and alap.
13264
13265 2018-03-20 Tom de Vries <tom@codesourcery.com>
13266
13267 PR target/84954
13268 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
13269 seen_label if seen_label is already set.
13270
13271 2018-03-20 Jakub Jelinek <jakub@redhat.com>
13272
13273 PR target/84945
13274 * config/i386/i386.c (fold_builtin_cpu): For features above 31
13275 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
13276 Use 1U instead of 1. Formatting fixes.
13277
13278 PR c/84953
13279 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
13280 instead of TREE_TYPE (s1) for the return value.
13281
13282 2018-03-19 Jakub Jelinek <jakub@redhat.com>
13283
13284 PR tree-optimization/84946
13285 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
13286 bitsize + bitsize in poly_uint64 rather than poly_int64.
13287
13288 PR sanitizer/78651
13289 * dwarf2asm.c: Include fold-const.c.
13290 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
13291 of decl rather than decl itself.
13292
13293 PR rtl-optimization/84643
13294 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
13295
13296 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
13297
13298 PR sanitizer/78651
13299 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
13300 calling assemble_variable.
13301
13302 2018-03-19 Sudakshina Das <sudi.das@arm.com>
13303
13304 PR target/81647
13305 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
13306 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
13307
13308 2018-03-19 Jim Wilson <jimw@sifive.com>
13309
13310 PR bootstrap/84856
13311 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
13312 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
13313 (riscv_first_stack_step): Likewise.
13314 (riscv_option_override): Use STACK_BOUNDARY instead of
13315 MIN_STACK_BOUNDARY.
13316 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
13317 MIN_STACK_BOUNDARY.
13318 (BIGGEST_ALIGNMENT): Set to 128.
13319 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
13320 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
13321 STACK_BOUNDARY.
13322
13323 2018-03-19 Richard Biener <rguenther@suse.de>
13324
13325 PR tree-optimization/84933
13326 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
13327 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
13328
13329 2018-03-19 Richard Biener <rguenther@suse.de>
13330
13331 PR tree-optimization/84859
13332 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
13333 (cond_if_else_store_replacement): Perform sinking operation on
13334 single-store BBs regardless of MAX_STORES_TO_SINK setting.
13335 Generalize what a BB with a single eligible store is.
13336
13337 2018-03-19 Richard Biener <rguenther@suse.de>
13338
13339 PR tree-optimization/84929
13340 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
13341 chrec_is_positive against non-chrec arg.
13342
13343 2018-03-19 Tamar Christina <tamar.christina@arm.com>
13344
13345 PR target/84711
13346 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
13347
13348 2018-03-18 Martin Liska <mliska@suse.cz>
13349
13350 PR rtl-optimization/84635
13351 * regrename.c (build_def_use): Use matches_mode only when
13352 matches >= 0.
13353
13354 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
13355
13356 PR tree-optimization/84913
13357 * tree-vect-loop.c (vectorizable_reduction): Don't try to
13358 vectorize chains of COND_EXPRs.
13359
13360 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13361
13362 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
13363
13364 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13365
13366 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
13367
13368 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
13369
13370 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
13371
13372 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13373 Kito Cheng <kito.cheng@gmail.com>
13374
13375 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
13376 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
13377 (nds32_adjust_reg_alloc_order): New function.
13378 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
13379
13380 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
13381
13382 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
13383 nds32_print_operand, nds32_print_operand_address): Use
13384 HOST_WIDE_INT_PRINT_DEC instead.
13385
13386 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
13387
13388 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
13389
13390 2018-03-17 Jakub Jelinek <jakub@redhat.com>
13391
13392 PR target/84902
13393 * config/i386/i386.c (initial_ix86_tune_features,
13394 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
13395 unsigned long long.
13396 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
13397 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
13398 rather than 1u << ix86_tune. Formatting fix.
13399 (ix86_option_override_internal): Change ix86_arch_mask from
13400 unsigned int to unsigned HOST_WIDE_INT, initialize to
13401 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
13402 (ix86_function_specific_restore): Likewise.
13403
13404 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13405
13406 PR target/84899
13407 * postreload.c (reload_combine_recognize_pattern): Perform
13408 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
13409 truncate_int_for_mode the result for the destination's mode.
13410
13411 PR c/84909
13412 * hsa-gen.c (mem_type_for_type): Fix comment typo.
13413 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
13414 Likewise.
13415 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13416 Likewise.
13417
13418 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
13419
13420 PR target/84876
13421 * lra-assigns.c (lra_split_hard_reg_for): Don't use
13422 regno_allocno_class_array and sorted_pseudos.
13423 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
13424 insns where regno is used.
13425
13426 2018-03-16 Martin Liska <mliska@suse.cz>
13427
13428 PR ipa/84833
13429 * multiple_target.c (create_dispatcher_calls): Redirect
13430 reference in the symbol table.
13431
13432 2018-03-16 Martin Liska <mliska@suse.cz>
13433
13434 PR ipa/84722
13435 * multiple_target.c (create_dispatcher_calls): Redirect also
13436 an alias.
13437
13438 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13439
13440 PR c++/79937
13441 PR c++/82410
13442 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
13443 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
13444 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
13445
13446 2018-03-16 Julia Koval <julia.koval@intel.com>
13447
13448 * doc/invoke.texi (Skylake Server): Add CLWB.
13449 Cannonlake): Remove CLWB.
13450
13451 2018-03-16 Jakub Jelinek <jakub@redhat.com>
13452
13453 PR tree-optimization/84841
13454 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
13455 1 << 3.
13456 (FLOAT_ONE_CONST_TYPE): Define.
13457 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
13458 (sort_by_operand_rank): Put entries with higher constant_type last
13459 rather than first to match comments.
13460
13461 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
13462
13463 * config/nios2/nios2.md (movsi_internal): Fix thinko in
13464 split predicate.
13465
13466 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13467
13468 PR c++/79085
13469 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
13470 check and use address of target always.
13471
13472 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
13473
13474 PR target/84574
13475 * config/i386/i386.c (indirect_thunk_needed): Update comments.
13476 (indirect_thunk_bnd_needed): Likewise.
13477 (indirect_thunks_used): Likewise.
13478 (indirect_thunks_bnd_used): Likewise.
13479 (indirect_return_needed): New.
13480 (indirect_return_bnd_needed): Likewise.
13481 (output_indirect_thunk_function): Add a bool argument for
13482 function return.
13483 (output_indirect_thunk_function): Don't generate alias for
13484 function return thunk.
13485 (ix86_code_end): Call output_indirect_thunk_function to generate
13486 function return thunks.
13487 (ix86_output_function_return): Set indirect_return_bnd_needed
13488 and indirect_return_needed instead of indirect_thunk_bnd_needed
13489 and indirect_thunk_needed.
13490
13491 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
13492
13493 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
13494 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
13495 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
13496
13497 2018-03-15 David Malcolm <dmalcolm@redhat.com>
13498 Paul Hua <paul.hua.gm@gmail.com>
13499
13500 PR c/84852
13501 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
13502
13503 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
13504
13505 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
13506 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
13507 resp. SFmode cases.
13508
13509 2018-03-15 Tamar Christina <tamar.christina@arm.com>
13510
13511 PR target/84711
13512 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13513 instead of GET_MODE_SIZE when comparing Units.
13514
13515 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
13516
13517 PR target/68256
13518 * varasm.c (hash_section): Return an unchangeble hash value
13519 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
13520 Return !aarch64_can_use_per_function_literal_pools_p ().
13521
13522 2018-03-15 Jakub Jelinek <jakub@redhat.com>
13523
13524 PR target/84860
13525 * optabs.c (emit_conditional_move): Pass address of cmode's copy
13526 rather than address of cmode as last argument to prepare_cmp_insn.
13527
13528 2018-03-15 Julia Koval <julia.koval@intel.com>
13529
13530 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
13531 F_AVX512VNNI, F_AVX512BITALG): New.
13532
13533 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
13534
13535 PR target/83451
13536 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
13537 insn for floating-point loads and stores.
13538
13539 2018-03-14 Carl Love <cel@us.ibm.com>
13540
13541 * config/rs6000/rs6000-c.c: Add macro definitions for
13542 ALTIVEC_BUILTIN_VEC_PERMXOR.
13543 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
13544 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
13545 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
13546 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
13547 UNSPEC_VPERMXOR.
13548 * config/doc/extend.texi: Add prototypes for vec_permxor.
13549
13550 2018-03-14 David Malcolm <dmalcolm@redhat.com>
13551
13552 PR c/84852
13553 * diagnostic-show-locus.c (class layout_point): Convert m_line
13554 from int to linenum_type.
13555 (line_span::comparator): Use linenum "compare" function when
13556 comparing line numbers.
13557 (test_line_span): New function.
13558 (layout_range::contains_point): Convert param "row" from int to
13559 linenum_type.
13560 (layout_range::intersects_line_p): Likewise.
13561 (layout::will_show_line_p): Likewise.
13562 (layout::print_source_line): Likewise.
13563 (layout::should_print_annotation_line_p): Likewise.
13564 (layout::print_annotation_line): Likewise.
13565 (layout::print_leading_fixits): Likewise.
13566 (layout::annotation_line_showed_range_p): Likewise.
13567 (struct line_corrections): Likewise for field m_row.
13568 (line_corrections::line_corrections): Likewise for param "row".
13569 (layout::print_trailing_fixits): Likewise.
13570 (layout::get_state_at_point): Likewise.
13571 (layout::get_x_bound_for_row): Likewise.
13572 (layout::print_line): Likewise.
13573 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
13574 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
13575 * input.c (selftest::test_linenum_comparisons): New function.
13576 (selftest::input_c_tests): Call it.
13577 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
13578 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
13579 * selftest.h (ASSERT_GT): New macro.
13580 (ASSERT_GT_AT): New macro.
13581 (ASSERT_LT): New macro.
13582 (ASSERT_LT_AT): New macro.
13583
13584 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
13585
13586 PR rtl-optimization/84780
13587 * combine.c (distribute_links): Don't make a link based on pc_rtx.
13588
13589 2018-03-14 Martin Liska <mliska@suse.cz>
13590
13591 * tree.c (record_node_allocation_statistics): Use
13592 get_stats_node_kind.
13593 (get_stats_node_kind): New function extracted from
13594 record_node_allocation_statistics.
13595 (free_node): Use get_stats_node_kind.
13596
13597 2018-03-14 Richard Biener <rguenther@suse.de>
13598
13599 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
13600 that the value-set of ANTIC_IN doesn't grow.
13601
13602 Revert
13603 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13604 member.
13605 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13606 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13607
13608 2018-03-14 Julia Koval <julia.koval@intel.com>
13609
13610 * config.gcc (icelake-client, icelake-server): New.
13611 (icelake): Remove.
13612 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
13613 (initial_ix86_arch_features): Ditto.
13614 (PTA_SKYLAKE): Add SGX.
13615 (PTA_ICELAKE): Remove.
13616 (PTA_ICELAKE_CLIENT): New.
13617 (PTA_ICELAKE_SERVER): New.
13618 (ix86_option_override_internal): Split up icelake on icelake client and
13619 icelake server.
13620 (get_builtin_code_for_version): Ditto.
13621 (fold_builtin_cpu): Ditto.
13622 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
13623 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
13624 * config/i386/i386.h (processor_type): Ditto.
13625 * doc/invoke.texi: Ditto.
13626
13627 2018-03-14 Jakub Jelinek <jakub@redhat.com>
13628
13629 PR sanitizer/83392
13630 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
13631 INTEGER_CST offset, add it together with bitpos / 8 and
13632 sign extend based on POINTER_SIZE.
13633
13634 PR target/84844
13635 Revert
13636 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
13637
13638 PR target/78090
13639 * config/i386/constraints.md (Yc): New register constraint.
13640 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
13641 Use Yc constraint for alternative 2 of operand 0. Remove
13642 preferred_for_speed attribute.
13643
13644 2018-03-14 Richard Biener <rguenther@suse.de>
13645
13646 PR tree-optimization/84830
13647 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13648 with the old one to avoid oscillations.
13649
13650 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13651
13652 PR target/83712
13653 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13654 pseudos.
13655 (assign_by_spills): Return a flag of reload assignment failure.
13656 Do not process the reload assignment failures. Do not spill other
13657 reload pseudos if they has the same reg class. Update n if
13658 necessary.
13659 (lra_assign): Add a return arg. Set up from the result of
13660 assign_by_spills call.
13661 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13662 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13663 usage_insns if it is not NULL.
13664 (spill_hard_reg_in_range): New function.
13665 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13666 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13667 function prototypes.
13668 (lra_assign): Change prototype.
13669 * lra.c (lra): Add code to deal with fails by splitting hard reg
13670 live ranges.
13671
13672 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13673
13674 * config/riscv/riscv.opt (mrelax): New option.
13675 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13676 "norelax" when riscv_mrelax is disabled.
13677 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13678
13679 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13680
13681 PR target/84743
13682 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13683 reassociation for int modes.
13684
13685 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13686
13687 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13688 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13689 for big-endian.
13690 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13691 * config/aarch64/aarch64-sve.md
13692 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13693 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13694 (*extend<mode><Vwide>2): Rename to...
13695 (aarch64_sve_extend<mode><Vwide>2): ...this.
13696 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13697 renaming the old pattern to...
13698 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13699 unsigned packs.
13700 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13701 define_expand, renaming the old pattern to...
13702 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13703 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13704 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13705 account when deciding which SVE instruction the optab should use.
13706 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13707
13708 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13709
13710 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13711 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13712 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13713 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13714 (tlsdesc_small_<mode>): Turn a define_expand and use
13715 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13716 (tlsdesc_small_advsimd_<mode>): ...this.
13717 (tlsdesc_small_sve_<mode>): New pattern.
13718
13719 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13720
13721 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13722 (UNSPEC_UMUL_HIGHPART): New constants.
13723 (MUL_HIGHPART): New int iteraor.
13724 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13725 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13726 define_expand.
13727 (*<su>mul<mode>3_highpart): New define_insn.
13728
13729 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13730
13731 PR lto/84805
13732 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13733 incomplete types.
13734
13735 2018-03-13 Martin Liska <mliska@suse.cz>
13736
13737 PR ipa/84658.
13738 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13739 vector.
13740 (sem_item_optimizer::~sem_item_optimizer): Release it.
13741 (sem_item_optimizer::merge_classes): Register variable aliases.
13742 (sem_item_optimizer::fixup_pt_set): New function.
13743 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13744 * ipa-icf.h: Declare new variables and functions.
13745
13746 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13747
13748 PR middle-end/84834
13749 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13750 integer_pow2p@2 and test integer_pow2p in condition.
13751 (A < 0 ? C : 0): Similarly for @1.
13752
13753 PR middle-end/84831
13754 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13755 characters starting at p contain '\0' character, don't look beyond
13756 that.
13757
13758 PR target/84827
13759 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13760 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13761
13762 PR target/84828
13763 * reg-stack.c (change_stack): Change update_end var from int to
13764 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13765 also call set_block_for_insn on the newly added insns and rescan.
13766
13767 PR target/84786
13768 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13769 on the last operand.
13770
13771 PR c++/84704
13772 * tree.c (stabilize_reference_1): Return save_expr (e) for
13773 STATEMENT_LIST even if it doesn't have side-effects.
13774
13775 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13776
13777 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13778
13779 2018-03-12 Renlin Li <renlin.li@arm.com>
13780
13781 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13782 aarch64_output_scalar_simd_mov_immediate.
13783
13784 2018-03-12 Martin Sebor <msebor@redhat.com>
13785
13786 PR tree-optimization/83456
13787 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13788 for perfectly overlapping calls to memcpy.
13789 (gimple_fold_builtin_memory_chk): Same.
13790 (gimple_fold_builtin_strcpy): Handle no-warning.
13791 (gimple_fold_builtin_stxcpy_chk): Same.
13792 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13793
13794 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13795
13796 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13797 parameter. Use it for SFmode.
13798 (rs6000_function_arg_advance_1): Adjust.
13799 (rs6000_function_arg): Adjust.
13800 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13801
13802 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13803
13804 PR rtl-optimization/84169
13805 PR rtl-optimization/84780
13806 * combine.c (can_combine_p): Check for a 2-insn combination whether
13807 the destination register is used between the two insns, too.
13808
13809 2018-03-12 Richard Biener <rguenther@suse.de>
13810
13811 PR tree-optimization/84803
13812 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13813 for refs DR analysis didn't process.
13814
13815 2018-03-12 Richard Biener <rguenther@suse.de>
13816
13817 PR tree-optimization/84777
13818 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13819 force-vectorize loops ignore whether we are optimizing for size.
13820
13821 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13822
13823 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13824 (TARGET_MD_ASM_ADJUST): Define.
13825
13826 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13827 Kito Cheng <kito.cheng@gmail.com>
13828 Chung-Ju Wu <jasonwucj@gmail.com>
13829
13830 * config/nds32/nds32.c (nds32_compute_stack_frame,
13831 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13832 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13833 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13834 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13835 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13836 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13837 * config/nds32/nds32.md (prologue, epilogue): Use macro
13838 NDS32_V3PUSH_AVAILABLE_P to do checking.
13839
13840 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13841
13842 PR debug/58150
13843 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13844 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13845 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13846 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13847 addition of most attributes on !orig_type_die or the attribute not
13848 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13849
13850 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13851 Chung-Ju Wu <jasonwucj@gmail.com>
13852
13853 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13854 __NDS32_VH__ macro.
13855 * config/nds32/nds32.opt (mvh): New option.
13856
13857 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13858 Chung-Ju Wu <jasonwucj@gmail.com>
13859
13860 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13861 function.
13862 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13863 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13864 definition.
13865
13866 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13867 Chung-Ju Wu <jasonwucj@gmail.com>
13868
13869 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13870 function.
13871 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13872 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13873
13874 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13875 Kito Cheng <kito.cheng@gmail.com>
13876 Chung-Ju Wu <jasonwucj@gmail.com>
13877
13878 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13879 UNSPEC_FFMISM and UNSPEC_FLMISM.
13880 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13881 for ffb, ffmism and flmism.
13882 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13883 (unspec_ffmism): Ditto.
13884 (unspec_flmism): Ditto.
13885 (nds32_expand_builtin_impl): Check if string extension is available.
13886 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13887 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13888
13889 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13890
13891 Reverting patch:
13892 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13893
13894 PR target/83712
13895 * lra-assigns.c (assign_by_spills): Return a flag of reload
13896 assignment failure. Do not process the reload assignment
13897 failures. Do not spill other reload pseudos if they has the same
13898 reg class.
13899 (lra_assign): Add a return arg. Set up from the result of
13900 assign_by_spills call.
13901 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13902 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13903 usage_insns if it is not NULL.
13904 (spill_hard_reg_in_range): New function.
13905 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13906 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13907 function prototypes.
13908 (lra_assign): Change prototype.
13909 * lra.c (lra): Add code to deal with fails by splitting hard reg
13910 live ranges.
13911
13912 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13913
13914 PR target/84807
13915 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13916
13917 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13918
13919 PR debug/84620
13920 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13921 (dw_val_node): Add val_symbolic_view.
13922 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13923 (symview_upper_bound): New.
13924 (new_line_info_table): Initialize symviews_since_reset.
13925 (dwarf2out_source_line): Count symviews_since_reset and set
13926 symview_upper_bound.
13927 (dw_val_equal_p): Handle symview.
13928 (add_AT_symview): New.
13929 (print_dw_val): Handle symview.
13930 (attr_checksum, attr_checksum_ordered): Likewise.
13931 (same_dw_val_p, size_of_die): Likewise.
13932 (value_format, output_die): Likewise.
13933 (add_high_low_attributes): Use add_AT_symview for entry_view.
13934 (dwarf2out_finish): Reset symview_upper_bound, clear
13935 zero_view_p.
13936
13937 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13938
13939 PR target/83969
13940 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13941 Add strict argument and use it.
13942 (rs6000_split_multireg_move): Update for new strict argument.
13943 (mem_operand_gpr): Disallow all non-offsettable addresses.
13944 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13945
13946 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13947
13948 PR target/84772
13949 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13950 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13951 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13952
13953 PR c++/84767
13954 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13955 decl, use remap_type if we want to use the type.
13956
13957 2018-03-09 Martin Sebor <msebor@redhat.com>
13958
13959 PR tree-optimization/84526
13960 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13961 Remove dead code.
13962 (builtin_access::generic_overlap): Be prepared to handle non-array
13963 base objects.
13964
13965 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13966
13967 PR rtl-optimization/84682
13968 * lra-constraints.c (process_address_1): Check is_address flag
13969 for address constraints.
13970 (process_alt_operands): Likewise.
13971 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13972 preprocess_constraints.
13973 * recog.h (preprocess_constraints): Add oploc parameter.
13974 Adjust callers.
13975 * recog.c (preprocess_constraints): Test address_operand for
13976 CT_ADDRESS constraints.
13977
13978 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13979
13980 PR target/83712
13981 * lra-assigns.c (assign_by_spills): Return a flag of reload
13982 assignment failure. Do not process the reload assignment
13983 failures. Do not spill other reload pseudos if they has the same
13984 reg class.
13985 (lra_assign): Add a return arg. Set up from the result of
13986 assign_by_spills call.
13987 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13988 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13989 usage_insns if it is not NULL.
13990 (spill_hard_reg_in_range): New function.
13991 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13992 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13993 function prototypes.
13994 (lra_assign): Change prototype.
13995 * lra.c (lra): Add code to deal with fails by splitting hard reg
13996 live ranges.
13997
13998 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13999
14000 PR target/83193
14001 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14002 Accept complain bool parameter. Only emit errors if it is true.
14003 (arm_parse_cpu_option_name): Likewise.
14004 (arm_target_thumb_only): Adjust callers of the above.
14005 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14006 prototype to take a default true bool parameter.
14007 (arm_parse_arch_option_name): Likewise.
14008
14009 2018-03-09 David Malcolm <dmalcolm@redhat.com>
14010 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
14011
14012 PR jit/64089
14013 PR jit/84288
14014 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14015 * configure: Regenerate.
14016 * configure.ac ("linker --version-script option"): New.
14017 ("linker soname option"): New.
14018
14019 2018-03-09 Richard Biener <rguenther@suse.de>
14020
14021 PR tree-optimization/84775
14022 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14023 immediate uses of predicate stmts and mark them modified.
14024
14025 Revert
14026 PR tree-optimization/84178
14027 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14028 to caller.
14029 (version_loop_for_if_conversion): Delay update_ssa call.
14030 (tree_if_conversion): Delay update_ssa until after predicate
14031 insertion.
14032
14033 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
14034
14035 PR target/84763
14036 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14037 when the function accesses prior frames.
14038
14039 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14040
14041 PR debug/84456
14042 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14043 gen_llsym, otherwise call maybe_gen_llsym.
14044
14045 PR inline-asm/84742
14046 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14047 has ',' character inside of it.
14048
14049 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14050
14051 PR target/84748
14052 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14053 as clobbering CC_REGNUM.
14054
14055 2018-03-08 Richard Biener <rguenther@suse.de>
14056
14057 PR middle-end/84552
14058 * tree-scalar-evolution.c: Include tree-into-ssa.h.
14059 (follow_copies_to_constant): Do not follow SSA names registered
14060 for update.
14061
14062 2018-03-08 Richard Biener <rguenther@suse.de>
14063
14064 PR tree-optimization/84178
14065 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14066 to caller.
14067 (version_loop_for_if_conversion): Delay update_ssa call.
14068 (tree_if_conversion): Delay update_ssa until after predicate
14069 insertion.
14070
14071 2018-03-08 David Malcolm <dmalcolm@redhat.com>
14072
14073 PR tree-optimization/84178
14074 * tree-if-conv.c (release_bb_predicate): Remove the
14075 the assertion that the stmts have NULL use_ops.
14076 Discard the statements, asserting that they haven't
14077 yet been added to a BB.
14078
14079 2018-03-08 Richard Biener <rguenther@suse.de>
14080
14081 PR tree-optimization/84746
14082 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
14083 (phi_translate): Pass in destination ANTIC_OUT set.
14084 (phi_translate_1): Likewise. For a simplified result lookup
14085 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
14086 (phi_translate_set): Adjust.
14087 (do_pre_regular_insertion): Likewise.
14088 (do_pre_partial_partial_insertion): Likewise.
14089
14090 2018-03-08 Martin Liska <mliska@suse.cz>
14091
14092 PR gcov-profile/84735
14093 * doc/gcov.texi: Document usage of profile files.
14094 * gcov-io.h: Document changes in the format.
14095
14096 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
14097
14098 PR debug/84404
14099 PR debug/84408
14100 * dwarf2out.c (struct dw_line_info_table): Update comments for
14101 view == -1.
14102 (FORCE_RESET_NEXT_VIEW): New.
14103 (FORCE_RESETTING_VIEW_P): New.
14104 (RESETTING_VIEW_P): Check for -1 too.
14105 (ZERO_VIEW_P): Likewise.
14106 (new_line_info_table): Force-reset next view.
14107 (dwarf2out_begin_function): Likewise.
14108 (dwarf2out_source_line): Simplify zero_view_p initialization.
14109 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
14110 view directly. Omit view when omitting .loc at line 0.
14111
14112 2018-03-08 Jakub Jelinek <jakub@redhat.com>
14113
14114 PR tree-optimization/84740
14115 * tree-switch-conversion.c (process_switch): Call build_constructors
14116 only if info.phi_count is non-zero.
14117
14118 PR tree-optimization/84739
14119 * tree-tailcall.c (find_tail_calls): Check call arguments against
14120 DECL_ARGUMENTS (current_function_decl) rather than
14121 DECL_ARGUMENTS (func) when checking for tail recursion.
14122
14123 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14124
14125 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
14126 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
14127 Volker Reichelt's entry and add entries for people that perform
14128 GCC fuzzy testing and report numerous bugs.
14129
14130 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
14131
14132 PR target/82411
14133 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
14134 readonly data in sdata, if that is disabled.
14135 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
14136 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
14137 -mreadonly-in-sdata option.
14138
14139 2018-03-07 Martin Sebor <msebor@redhat.com>
14140
14141 PR tree-optimization/84468
14142 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
14143 basic block when looking for nul assignment.
14144
14145 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
14146
14147 PR target/84277
14148 * except.h (output_function_exception_table): Adjust prototype.
14149 * except.c (output_function_exception_table): Remove FNNAME parameter
14150 and add SECTION parameter. Ouput one part of the table at a time.
14151 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
14152 the first part of the exception table and emit unwind directives.
14153 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
14154 (i386_pe_seh_cold_init): Likewise.
14155 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
14156 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
14157 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
14158 (ix86_output_call_insn): Emit a nop in one more case for SEH.
14159 * config/i386/winnt.c: Include except.h.
14160 (struct seh_frame_state): Add reg_offset, after_prologue and
14161 in_cold_section fields.
14162 (i386_pe_seh_end_prologue): Set seh->after_prologue.
14163 (i386_pe_seh_cold_init): New function.
14164 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
14165 to seh->in_cold_section.
14166 (seh_emit_push): Record the offset of the push.
14167 (seh_emit_save): Record the offet of the save.
14168 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
14169 Test seh->after_prologue to disregard the epilogue.
14170 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
14171 (i386_pe_end_cold_function): New function.
14172
14173 2018-03-07 Jakub Jelinek <jakub@redhat.com>
14174
14175 PR fortran/84565
14176 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
14177 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
14178
14179 PR c++/84704
14180 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
14181 on tmp_var.
14182 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
14183 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
14184
14185 PR middle-end/84723
14186 * multiple_target.c: Include tree-inline.h and intl.h.
14187 (expand_target_clones): Diagnose and fail if node->definition and
14188 !tree_versionable_function_p (node->decl).
14189
14190 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
14191
14192 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
14193 sprint_ul.
14194 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
14195 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14196 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
14197
14198 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14199
14200 PR target/84710
14201 * combine.c (try_combine): Use reg_or_subregno instead of handling
14202 just paradoxical SUBREGs and REGs.
14203
14204 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
14205
14206 * config/arc/arc.c (arc_finalize_pic): Remove function.
14207 (arc_must_save_register): We use single base PIC register, remove
14208 checks to save/restore the PIC register.
14209 (arc_expand_prologue): Likewise.
14210 * config/arc/arc-protos.h (arc_set_default_type_attributes):
14211 Remove.
14212 (arc_verify_short): Likewise.
14213 (arc_attr_type): Likewise.
14214 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
14215 (walk_stores): Likewise.
14216 (arc_address_cost): Make it static.
14217 (arc_verify_short): Likewise.
14218 (branch_dest): Likewise.
14219 (arc_attr_type): Likewise.
14220 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
14221 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
14222 (arc_final_prescan_insn): Remove inserting the nops due to
14223 hardware hazards. It is done in reorg step.
14224 (insn_length_variant_t): Remove.
14225 (insn_length_parameters_t): Likewise.
14226 (arc_insn_length_parameters): Likewise.
14227 (arc_get_insn_variants): Likewise.
14228 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
14229
14230 2018-03-06 Jakub Jelinek <jakub@redhat.com>
14231
14232 PR inline-asm/84683
14233 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
14234 assertion failure.
14235
14236 PR tree-optimization/84687
14237 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
14238 on new_node->decl.
14239 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
14240
14241 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14242
14243 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
14244 Rename to ppc_speculation_barrier.
14245 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
14246 __builtin_ppc_speculation_barrier.
14247
14248 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14249
14250 PR target/84700
14251 * combine.c (combine_simplify_rtx): Don't try to simplify if
14252 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
14253 are equal to x.
14254
14255 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
14256
14257 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
14258 to 32 bytes when compiling for POWER9.
14259
14260 2018-03-05 Jakub Jelinek <jakub@redhat.com>
14261
14262 PR target/84564
14263 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
14264 regparm >= 3 with no arg reg available also for calls with
14265 flag_force_indirect_call. Pass decl to ix86_function_regparm.
14266
14267 PR target/84524
14268 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
14269 orig,vex.
14270 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
14271
14272 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
14273
14274 PR target/84264
14275 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
14276
14277 2018-03-05 Richard Biener <rguenther@suse.de>
14278
14279 PR tree-optimization/84486
14280 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
14281 When inserting a __builtin_assume_aligned call set the LHS
14282 SSA name alignment info accordingly.
14283
14284 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
14285
14286 PR tree-optimization/84114
14287 * config/aarch64/aarch64.c (aarch64_reassociation_width)
14288 Avoid reassociation of FLOAT_MODE addition.
14289
14290 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
14291
14292 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
14293 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
14294 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
14295 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
14296 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
14297 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
14298 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
14299 and -mwbnoinvd.
14300 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
14301 __builtin_ia32_wbinvd): New builtins.
14302 (SPECIAL_ARGS2): New.
14303 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
14304 (SPECIAL_ARGS2): New.
14305 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
14306 (ix86_valid_target_attribute_inner_p): Ditto.
14307 (ix86_init_mmx_sse_builtins): Add special_args2.
14308 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
14309 TARGET_WBNOINVD_P): New.
14310 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
14311 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
14312 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
14313 * config/i386/immintrin.h (_wbinvd): New intrinsic.
14314 * config/i386/pconfigintrin.h: New file.
14315 * config/i386/wbnoinvdintrin.h: Ditto.
14316 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
14317 wbnoinvdintrin.h.
14318 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
14319
14320 2018-03-05 Richard Biener <rguenther@suse.de>
14321
14322 PR tree-optimization/84670
14323 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14324 member.
14325 (BB_VISITED_WITH_VISITED_SUCCS): New define.
14326 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14327 (compute_antic_aux): Only assert the number of values in ANTIC_IN
14328 doesn't grow if all successors (recursively) were visited at least
14329 once.
14330
14331 2018-03-05 Richard Biener <rguenther@suse.de>
14332
14333 PR tree-optimization/84650
14334 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
14335 if executed in the loop pipeline.
14336
14337 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
14338
14339 * doc/configfiles.texi (Configuration Files): Move info about
14340 conditionalizing $target-protos.h to...
14341 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
14342 differs from $target-protos.h.
14343
14344 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
14345 Chung-Ju Wu <jasonwucj@gmail.com>
14346
14347 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
14348 * config/nds32/nds32-multiple.md (setmemsi): Define.
14349 * config/nds32/nds32-memory-manipulation.c
14350 (nds32_gen_dup_4_byte_to_word_value): New.
14351 (emit_setmem_word_loop): New.
14352 (emit_setmem_byte_loop): New.
14353 (nds32_expand_setmem_loop): New.
14354 (nds32_expand_setmem_loop_v3m): New.
14355 (nds32_expand_setmem_unroll): New.
14356 (nds32_expand_setmem): New.
14357
14358 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14359 Chung-Ju Wu <jasonwucj@gmail.com>
14360
14361 * config/nds32/nds32-memory-manipulation.c
14362 (nds32_emit_load_store): New.
14363 (nds32_emit_post_inc_load_store): New.
14364 (nds32_emit_mem_move): New.
14365 (nds32_emit_mem_move_block): New.
14366 (nds32_expand_movmemsi_loop_unknown_size): New.
14367 (nds32_expand_movmemsi_loop_known_size): New.
14368 (nds32_expand_movmemsi_loop): New.
14369 (nds32_expand_movmemsi_unroll): New.
14370 (nds32_expand_movmemqi): Rename ...
14371 (nds32_expand_movmemsi): ... to this.
14372 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
14373 (movmemsi): ... to this.
14374 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
14375 (nds32_expand_movmemsi): ... to this.
14376
14377 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14378 Monk Chiang <sh.chiang04@gmail.com>
14379 Chung-Ju Wu <jasonwucj@gmail.com>
14380
14381 * config/nds32/nds32-protos.h
14382 (nds32_expand_load_multiple): New arguments.
14383 (nds32_expand_store_multiple): Ditto.
14384 (nds32_valid_multiple_load_store): Rename ...
14385 (nds32_valid_multiple_load_store_p): ... to this.
14386 * config/nds32/nds32-memory-manipulation.c
14387 (nds32_expand_load_multiple): Refine implementation.
14388 (nds32_expand_store_multiple): Ditto.
14389 * config/nds32/nds32-multiple.md
14390 (load_multiple): Update nds32_expand_load_multiple interface.
14391 (store_multiple): Update nds32_expand_store_multiple interface.
14392 * config/nds32/nds32-predicates.c
14393 (nds32_valid_multiple_load_store): Rename ...
14394 (nds32_valid_multiple_load_store_p): ... to this and refine
14395 implementation.
14396 * config/nds32/predicates.md
14397 (nds32_load_multiple_and_update_address_operation): New predicate.
14398 (nds32_store_multiple_and_update_address_operation): New predicate.
14399
14400 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
14401 Chung-Ju Wu <jasonwucj@gmail.com>
14402
14403 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
14404 (combo): New attribute.
14405 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
14406
14407 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
14408
14409 * config/nds32/nds32.opt: Change -mcmodel= default value.
14410
14411 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
14412 Monk Chiang <sh.chiang04@gmail.com>
14413 Chung-Ju Wu <jasonwucj@gmail.com>
14414
14415 * config/nds32/constants.md (unspec_element): New enum.
14416 * config/nds32/constraints.md (Umw): New constraint.
14417 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
14418 * config/nds32/nds32-intrinsic.md: Likewise.
14419 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
14420 (nds32_valid_smw_lwm_base_p): New.
14421 (nds32_output_smw_single_word): New.
14422 (nds32_output_lmw_single_word): New.
14423 (nds32_expand_unaligned_load): New.
14424 (nds32_expand_unaligned_store): New.
14425 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
14426 (nds32_output_smw_single_word): Declare.
14427 (nds32_output_lmw_single_word): Declare.
14428 (nds32_expand_unaligned_load): Declare.
14429 (nds32_expand_unaligned_store): Declare.
14430 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
14431 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
14432 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
14433 NDS32_BUILTIN_UASTORE_DW.
14434 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
14435 predicate.
14436
14437 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
14438 Kito Cheng <kito.cheng@gmail.com>
14439 Chung-Ju Wu <jasonwucj@gmail.com>
14440
14441 * config/nds32/nds32-intrinsic.c
14442 (nds32_expand_builtin_null_ftype_reg): Delete.
14443 (nds32_expand_builtin_reg_ftype_imm): Ditto.
14444 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
14445 (nds32_read_argument): New.
14446 (nds32_legitimize_target): Ditto.
14447 (nds32_legitimize_argument): Ditto.
14448 (nds32_check_constant_argument): Ditto.
14449 (nds32_expand_unop_builtin): Ditto.
14450 (nds32_expand_unopimm_builtin): Ditto.
14451 (nds32_expand_binop_builtin): Ditto.
14452 (nds32_builtin_decl_impl): Ditto.
14453 (builtin_description): Ditto.
14454 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
14455 (nds32_init_builtins_impl): Ditto.
14456 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
14457 (nds32_builtin_decl): New.
14458 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
14459 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
14460
14461 2018-03-02 Jeff Law <law@redhat.com>
14462
14463 * reorg.c (stop_search_p): Handle DEBUG_INSN.
14464 (redundant_insn, fill_simple_delay_slots): Likewise.
14465 (fill_slots_from_thread): Likewise.
14466 * resource.c (mark_referenced_resources): Likewise.
14467 (mark_set_resources, find_dead_or_set_registers): Likewise.
14468
14469 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14470
14471 * substring-locations.h (format_warning_va): Formatting fix for
14472 ATTRIBUTE_GCC_DIAG.
14473 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
14474 argument.
14475 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
14476 * substring-locations.c: Include intl.h.
14477 (format_warning_va): Turned into small wrapper around
14478 format_warning_n_va, renamed to ...
14479 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
14480 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
14481 use ngettext.
14482 (format_warning_at_substring_n): New function.
14483 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
14484 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
14485 format_warning_at_substring with just a shorter name instead of
14486 const function pointer.
14487 (fmtwarn_n): New function.
14488 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
14489 appropriate, get rid of all the fmtstr temporaries, move conditionals
14490 with G_() wrapped string literals directly into fmtwarn arguments,
14491 cast dir.len to (int), formatting fixes.
14492
14493 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
14494
14495 * doc/invoke.texi: Remove "Cilk Plus" references.
14496
14497 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14498 Richard Biener <rguenther@suse.de>
14499
14500 PR ipa/84628
14501 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
14502 for error or warning attributes if CALL_FROM_THUNK_P is set.
14503 Formatting fixes.
14504
14505 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14506
14507 PR target/56540
14508 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
14509 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
14510
14511 PR target/56540
14512 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
14513 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
14514
14515 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
14516 instead of -1U in last predictors element's probability member.
14517
14518 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14519
14520 PR ipa/83983
14521 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14522 arguments if they are comparable.
14523
14524 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14525
14526 PR tree-optimization/84634
14527 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
14528 masks and masked_loop_p with a single loop_masks, making sure it's
14529 null for bb vectorization.
14530
14531 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
14532
14533 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
14534 (vect_analyze_data_ref_access): Use loop->safe_len rather than
14535 loop->force_vectorize to check whether there is no alias.
14536
14537 2018-03-02 Jakub Jelinek <jakub@redhat.com>
14538
14539 PR target/84614
14540 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
14541 prototypes.
14542 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
14543 comments.
14544 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
14545 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
14546 instead of a loop around prev_real_insn.
14547 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
14548 prev_real_insn.
14549
14550 PR inline-asm/84625
14551 * config/i386/i386.c (ix86_print_operand): Use conditional
14552 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
14553 zero vector.
14554
14555 2018-03-02 Richard Biener <rguenther@suse.de>
14556
14557 PR tree-optimization/84427
14558 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
14559 (bitmap_set_subtract_values): Rewrite to handle multiple
14560 exprs per value.
14561 (clean): Likewise.
14562 (prune_clobbered_mems): Likewise.
14563 (phi_translate): Take edge instead of pred/phiblock.
14564 (phi_translate_1): Likewise.
14565 (phi_translate_set): Likewise. Insert all translated
14566 exprs for a value into the set, keeping possibly multiple
14567 expressions per value.
14568 (compute_antic_aux): Adjust for phi_translate changes.
14569 When intersecting union the expressions and prune those
14570 not in the final value set, keeping possibly multiple
14571 expressions per value. Do not use value-insertion
14572 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
14573 all expressions. Add verification that the value-sets
14574 only shrink during iteration.
14575 (compute_partial_antic_aux): Adjust for the phi_translate changes.
14576 (do_pre_regular_insertion): Likewise.
14577 (do_pre_partial_partial_insertion): Likewise.
14578
14579 2018-03-02 Richard Biener <rguenther@suse.de>
14580
14581 PR target/82005
14582 * config/darwin.c (saved_debug_info_level): New static global.
14583 (darwin_asm_lto_start): Disable debug info generation for LTO out.
14584 (darwin_asm_lto_end): Restore debug info generation settings.
14585
14586 2018-03-01 Martin Liska <mliska@suse.cz>
14587
14588 PR sanitizer/82484
14589 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
14590 volatile arguments.
14591
14592 2018-03-01 Richard Biener <rguenther@suse.de>
14593
14594 PR debug/84645
14595 * dwarf2out.c (gen_variable_die): Properly handle late VLA
14596 type annotation with LTO when debug was disabled at compile-time.
14597
14598 2018-03-01 Matthew Fortune <mfortune@gmail.com>
14599
14600 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
14601 XINT with INTVAL.
14602 (mips_final_postscan_insn): Likewise.
14603
14604 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
14605
14606 PR rtl-optimization/84528
14607 * alias.c (init_alias_target): Add commentary.
14608 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
14609 a unique base value if the frame pointer is not eliminated
14610 to the stack pointer.
14611
14612 2018-03-01 Tom de Vries <tom@codesourcery.com>
14613
14614 PR rtl-optimization/83327
14615 * lra-int.h (hard_regs_spilled_into): Declare.
14616 * lra.c (hard_regs_spilled_into): Define.
14617 (init_reg_info): Init hard_regs_spilled_into.
14618 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
14619 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
14620 (process_bb_lives): Handle hard_regs_spilled_into.
14621 (lra_create_live_ranges_1): Before doing liveness propagation, clear
14622 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
14623
14624 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
14625
14626 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
14627 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
14628 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
14629 * config/rs6000/aix72.h: New file.
14630
14631 2018-02-28 Jakub Jelinek <jakub@redhat.com>
14632
14633 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
14634 instead of warning_at with conditional singular and plural messages
14635 where possible.
14636
14637 PR target/52991
14638 * stor-layout.c (update_alignment_for_field): For
14639 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
14640 && !DECL_PACKED (field), do the alignment update, just use
14641 only desired_align instead of MAX (type_align, desired_align)
14642 as the alignment.
14643 (place_field): Don't do known_align < desired_align handling
14644 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14645 is non-NULL, instead do it after rli->prev_field handling and
14646 only if not within a bitfield word. For DECL_PACKED (field)
14647 use type_align of BITS_PER_UNIT.
14648
14649 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14650
14651 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14652 superfluous parentheses and trailing spaces.
14653
14654 2018-02-28 Richard Biener <rguenther@suse.de>
14655
14656 PR tree-optimization/84584
14657 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14658 SCoPs with fake exit edge.
14659
14660 2018-02-28 Martin Liska <mliska@suse.cz>
14661
14662 PR testsuite/84597
14663 * timevar.c (timer::print): Fix format to properly print 100%
14664 values.
14665
14666 2018-02-28 Richard Biener <rguenther@suse.de>
14667
14668 PR middle-end/84607
14669 * genmatch.c (capture_info::walk_match): Do not mark
14670 captured expressions without operands as expr_p given
14671 they act more like predicates and should be subject to
14672 "lost tail" side-effect preserving.
14673
14674 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14675
14676 PR rtl-optimization/81611
14677 * auto-inc-dec.c (attempt_change): Move dead note from
14678 mem_insn if it's the next use of regno
14679 (find_address): Take address use of reg holding
14680 non-incremented value. Add parm to limit search to the named
14681 reg only.
14682 (merge_in_block): Attempt to use a mem insn that is the next
14683 use of the original regno.
14684
14685 2018-02-27 Martin Sebor <msebor@redhat.com>
14686
14687 PR c++/83871
14688 * doc/invoke.texi (-Wmissing-attributes): New option.
14689 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14690
14691 2018-02-27 Martin Sebor <msebor@redhat.com>
14692
14693 PR translation/84207
14694 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14695 n argument to unsigned HOST_WIDE_INT.
14696 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14697 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14698 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14699 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14700
14701 2018-02-27 Richard Biener <rguenther@suse.de>
14702
14703 PR tree-optimization/84512
14704 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14705 Do not use the estimate returned from record_stmt_cost for
14706 the scalar iteration cost but sum properly using add_stmt_cost.
14707
14708 2018-02-27 Richard Biener <rguenther@suse.de>
14709
14710 PR tree-optimization/84466
14711 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14712 Adjust last change to less strictly validate use operands.
14713
14714 2018-02-27 Martin Liska <mliska@suse.cz>
14715
14716 PR gcov-profile/84548
14717 * gcov.c (process_file): Allow partial overlap and consider it
14718 also as group functions.
14719 (output_lines): Properly calculate range of lines for a group.
14720
14721 2018-02-27 Martin Liska <mliska@suse.cz>
14722
14723 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14724 'ggc' suffixes. Change first column width.
14725 (timer::print): Fix formatting of the column.
14726
14727 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14728
14729 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14730 preserve inline entry blocks for the sake of debug inline
14731 entry point markers alone.
14732 (remove_unused_locals): Suggest in comments a better place to
14733 force the preservation of inline entry blocks that are
14734 otherwise unused, but do not preserve them.
14735
14736 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14737
14738 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14739
14740 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14741
14742 PR target/84039
14743 * config/i386/constraints.md (Bs): Replace
14744 ix86_indirect_branch_register with
14745 TARGET_INDIRECT_BRANCH_REGISTER.
14746 (Bw): Likewise.
14747 * config/i386/i386.md (indirect_jump): Likewise.
14748 (tablejump): Likewise.
14749 (*sibcall_memory): Likewise.
14750 (*sibcall_value_memory): Likewise.
14751 Peepholes of indirect call and jump via memory: Likewise.
14752 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14753 (*sibcall_value_GOT_32): Likewise.
14754 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14755 (GOT_memory_operand): Likewise.
14756 (call_insn_operand): Likewise.
14757 (sibcall_insn_operand): Likewise.
14758 (GOT32_symbol_operand): Likewise.
14759 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14760
14761 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14762
14763 PR rtl-optimization/83496
14764 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14765 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14766 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14767 redundant insn, if any.
14768 (relax_delay_slots): Likewise.
14769 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14770
14771 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14772
14773 PR tree-optimization/83965
14774 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14775 that grouped statements are part of a reduction chain. Return
14776 true if the statement is not marked as a reduction itself but
14777 is part of a group.
14778 (vect_recog_dot_prod_pattern): Don't check whether the statement
14779 is part of a group here.
14780 (vect_recog_sad_pattern): Likewise.
14781 (vect_recog_widen_sum_pattern): Likewise.
14782
14783 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14784
14785 PR debug/84545
14786 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14787
14788 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14789
14790 PR target/84530
14791 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14792 the bool argument.
14793 (ix86_output_indirect_function_return): New prototype.
14794 (ix86_split_simple_return_pop_internal): Likewise.
14795 * config/i386/i386.c (indirect_return_via_cx): New.
14796 (indirect_return_via_cx_bnd): Likewise.
14797 (indirect_thunk_name): Handle return va CX_REG.
14798 (output_indirect_thunk_function): Create alias for
14799 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14800 (ix86_output_indirect_jmp): Remove the bool argument.
14801 (ix86_output_indirect_function_return): New function.
14802 (ix86_split_simple_return_pop_internal): Likewise.
14803 * config/i386/i386.md (*indirect_jump): Don't pass false
14804 to ix86_output_indirect_jmp.
14805 (*tablejump_1): Likewise.
14806 (simple_return_pop_internal): Change it to define_insn_and_split.
14807 Call ix86_split_simple_return_pop_internal to split it for
14808 -mfunction-return=.
14809 (simple_return_indirect_internal): Call
14810 ix86_output_indirect_function_return instead of
14811 ix86_output_indirect_jmp.
14812
14813 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14814
14815 PR bootstrap/84405
14816 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14817 memset and value initialization afterwards.
14818
14819 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14820
14821 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14822
14823 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14824
14825 PR target/84521
14826 * common/config/aarch64/aarch64-common.c
14827 (aarch_option_optimization_table[]): Switch
14828 off fomit-frame-pointer
14829
14830 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14831 Chung-Ju Wu <jasonwucj@gmail.com>
14832
14833 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14834 volatile memory.
14835 (store_multiple): Ditto.
14836
14837 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14838
14839 * config.gcc: Add --with-cpu support for nds32 target.
14840 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14841 * config/nds32/nds32.opt: Add -mcpu= option.
14842
14843 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14844
14845 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14846 isel=yes): Warn for these deprecated options.
14847
14848 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14849
14850 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14851 ISA_2_5_MASKS_EMBEDDED.
14852
14853 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14854
14855 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14856 p->max as pointers rather than using iterative_hash_expr.
14857
14858 2018-02-23 Carl Love <cel@us.ibm.com>
14859
14860 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14861 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14862 BU_P8V_OVERLOAD_2.
14863 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14864 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14865 P8V_BUILTIN_VEC_VUNSIGNED2.
14866
14867 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14868
14869 PR target/81572
14870 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14871 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14872 LRA_UNKNOWN_ALT.
14873 * lra-constraints.c (curr_insn_transform): Set up
14874 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14875 LRA_UNKNOWN_ALT.
14876 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14877 * lra-eliminations.c (spill_pseudos): Ditto.
14878 (process_insn_for_elimination): Ditto.
14879 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14880 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14881 LRA_NON_CLOBBERED_ALT.
14882
14883 2018-02-22 Martin Sebor <msebor@redhat.com>
14884
14885 PR tree-optimization/84480
14886 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14887 to maybe_diag_stxncpy_trunc. Call it.
14888 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14889 from gimple_fold_builtin_strcpy. Print inlining stack.
14890 (handle_builtin_stxncpy): Print inlining stack.
14891 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14892
14893 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14894
14895 PR target/84176
14896 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14897 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14898 and -fcheck-pointer-bounds are used together.
14899 (indirect_thunk_prefix): New enum.
14900 (indirect_thunk_need_prefix): New function.
14901 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14902 "_nt" instead of "_bnd" for NOTRACK prefix.
14903 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14904 (output_indirect_thunk_function): Likewise.
14905 (): Likewise.
14906 (ix86_code_end): Update output_indirect_thunk_function calls.
14907 (ix86_output_indirect_branch_via_reg): Replace
14908 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14909 (ix86_output_indirect_branch_via_push): Likewise.
14910 (ix86_output_function_return): Likewise.
14911 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14912 incompatible with -fcf-protection=branch and
14913 -fcheck-pointer-bounds.
14914
14915 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14916
14917 PR target/83335
14918 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14919 Change gcc_assert call to output_operand_lossage.
14920
14921 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14922
14923 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14924
14925 2018-02-22 DJ Delorie <dj@redhat.com>
14926 Sebastian Perta <sebastian.perta@renesas.com>
14927 Oleg Endo <olegendo@gcc.gnu.org>
14928
14929 * config/rx/rx.c (rx_rtx_costs): New function.
14930 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14931
14932 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14933
14934 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14935
14936 2018-02-22 Martin Liska <mliska@suse.cz>
14937
14938 PR driver/83193
14939 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14940 Add "native" as a possible value.
14941
14942 2018-02-22 Martin Liska <mliska@suse.cz>
14943
14944 PR driver/83193
14945 * config/i386/i386.c (ix86_option_override_internal):
14946 Add "native" as a possible value for -march and -mtune.
14947
14948 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14949
14950 PR target/84502
14951 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14952 to all type variants.
14953
14954 PR tree-optimization/84503
14955 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14956 width as info->bitpos + info->bitsize - start.
14957 (merged_store_group::merge_overlapping): Simplify width computation.
14958 (check_no_overlap): New function.
14959 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14960 start + width and last_order of the group, fail if check_no_overlap
14961 fails.
14962 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14963 to group if check_no_overlap fails.
14964
14965 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14966
14967 * config/rs6000/altivec.md: Delete contraint arguments to
14968 define_expand, define_split, and define_peephole2, and in
14969 define_insn_and_split if always unused.
14970 * config/rs6000/darwin.md: Ditto.
14971 * config/rs6000/dfp.md: Ditto.
14972 * config/rs6000/rs6000.md: Ditto.
14973 * config/rs6000/sync.md: Ditto.
14974 * config/rs6000/vector.md: Ditto.
14975 * config/rs6000/vsx.md: Ditto.
14976
14977 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14978
14979 * config/rs6000/altivec.md: Write output control strings as braced
14980 blocks instead of double-quoted strings.
14981 * config/rs6000/darwin.md: Ditto.
14982 * config/rs6000/rs6000.md: Ditto.
14983 * config/rs6000/vector.md: Ditto.
14984 * config/rs6000/vsx.md: Ditto.
14985
14986 2018-02-21 Jason Merrill <jason@redhat.com>
14987
14988 PR c++/84314 - ICE with templates and fastcall attribute.
14989 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14990
14991 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14992
14993 * ipa-cp.c (determine_versionability): Fix comment typos.
14994
14995 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14996
14997 PR c/84229
14998 * ipa-cp.c (determine_versionability): Do not version functions caling
14999 va_arg_pack.
15000
15001 2018-02-21 Martin Liska <mliska@suse.cz>
15002
15003 PR driver/83193
15004 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15005 Add "native" as a possible value.
15006 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
15007 the macro when native cpu detection is available.
15008
15009 2018-02-21 Martin Liska <mliska@suse.cz>
15010
15011 PR driver/83193
15012 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15013 Add "native" as a possible value.
15014 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15015 when native cpu detection is available.
15016
15017 2018-02-21 Jakub Jelinek <jakub@redhat.com>
15018 Martin Sebor <msebor@redhat.com>
15019
15020 PR tree-optimization/84478
15021 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15022 false.
15023 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15024 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15025 support which is conservatively correct, for 2 only stay conservative
15026 for maxlen. Formatting and comment capitalization fixes. Add STRICT
15027 argument to the 2 argument get_range_strlen, adjust 6 arg
15028 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15029 false.
15030 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15031 (gimple_fold_builtin_strlen): Pass true as last argument to
15032 get_range_strlen.
15033
15034 2018-02-20 Martin Sebor <msebor@redhat.com>
15035
15036 PR middle-end/84095
15037 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15038 (builtin_memref::set_base_and_offset): Same. Handle inner references.
15039 (builtin_memref::builtin_memref): Factor out parts into
15040 set_base_and_offset and call it.
15041
15042 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15043
15044 PR middle-end/84406
15045 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15046 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15047 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
15048 search at the associated MODE_INT.
15049
15050 2018-02-20 Jeff Law <law@redhat.com>
15051
15052 PR middle-end/82123
15053 PR tree-optimization/81592
15054 PR middle-end/79257
15055 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15056 for range data rather than using global data.
15057 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15058 range data rather than using global data.
15059 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15060 pass it to children as needed.
15061 (struct directive::fmtresult): Similarly.
15062 (struct directive::set_width): Similarly.
15063 (struct directive::set_precision): Similarly.
15064 (format_integer, format_directive, parse_directive): Similarly.
15065 (format_none): Accept unnamed vr_values parameter.
15066 (format_percent, format_floating, format_character): Similarly.
15067 (format_string, format_plain): Similarly.
15068 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
15069 the EVRP range analyzer for range data rather than using global data.
15070 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
15071 gimple-ssa-evrp-analyze.h
15072 (class sprintf_dom_walker): Add after_dom_children member function.
15073 Add evrp_range_analyzer member.
15074 (sprintf_dom_walker::before_dom_children): Call into the EVRP
15075 range analyzer as needed.
15076 (sprintf_dom_walker::after_dom_children): New member function.
15077 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
15078 if not optimizing.
15079 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
15080 (evrp_range_analyzer::pop_to_marker): Likewise.
15081
15082 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
15083
15084 PR tree-optimization/84419
15085 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
15086 with the required type if its current type is compatible but
15087 different.
15088
15089 2018-02-20 Jakub Jelinek <jakub@redhat.com>
15090
15091 PR middle-end/82004
15092 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
15093 after vectorization.
15094
15095 2018-02-20 Martin Liska <mliska@suse.cz>
15096
15097 PR driver/83193
15098 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
15099 possible values if we don't have a hint.
15100
15101 2018-02-20 Martin Liska <mliska@suse.cz>
15102
15103 PR c/84310
15104 PR target/79747
15105 * final.c (shorten_branches): Build align_tab array with one
15106 more element.
15107 * opts.c (finish_options): Add alignment option limit check.
15108 (MAX_CODE_ALIGN): Likewise.
15109 (MAX_CODE_ALIGN_VALUE): Likewise.
15110 * doc/invoke.texi: Document maximum allowed option value for
15111 all -falign-* options.
15112
15113 2018-02-19 Jakub Jelinek <jakub@redhat.com>
15114
15115 PR target/84146
15116 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
15117 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
15118 * var-tracking.c (emit_note_insn_var_location): Remove all references
15119 to NOTE_INSN_CALL_ARG_LOCATION.
15120 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
15121 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
15122 Use copy_rtx_if_shared.
15123 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
15124 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
15125 (dwarf2out_var_location): Remove handling of
15126 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
15127 on call_insn.
15128 * final.c (final_scan_insn): Remove all references to
15129 NOTE_INSN_CALL_ARG_LOCATION.
15130 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
15131 before dumping final insns.
15132 * except.c (emit_note_eh_region_end): Remove all references to
15133 NOTE_INSN_CALL_ARG_LOCATION.
15134 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
15135 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
15136 * config/arc/arc.c (hwloop_optimize): Likewise.
15137 * config/arm/arm.c (create_fix_barrier): Likewise.
15138 * config/s390/s390.c (s390_chunkify_start): Likewise.
15139 * config/sh/sh.c (find_barrier): Likewise.
15140 * config/i386/i386.c (rest_of_insert_endbranch,
15141 ix86_seh_fixup_eh_fallthru): Likewise.
15142 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
15143 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
15144 * config/frv/frv.c (frv_function_prologue): Likewise.
15145 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
15146 reg note.
15147 (note_outside_basic_block_p): Remove all references to
15148 NOTE_INSN_CALL_ARG_LOCATION.
15149 * gengtype.c (adjust_field_rtx_def): Likewise.
15150 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
15151 Likewise.
15152 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
15153 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
15154
15155 PR c++/84444
15156 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
15157 is ADDR_EXPR.
15158
15159 PR tree-optimization/84452
15160 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
15161 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
15162 is NULL.
15163
15164 2018-02-19 Martin Liska <mliska@suse.cz>
15165
15166 PR sanitizer/82183
15167 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
15168
15169 2018-02-19 Martin Liska <mliska@suse.cz>
15170 Richard Sandiford <richard.sandiford@linaro.org>
15171
15172 PR tree-optimization/82491
15173 * gimple-fold.c (get_base_constructor): Make earlier bail out
15174 to prevent ubsan.
15175
15176 2018-02-19 Carl Love <cel@us.ibm.com>
15177
15178 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
15179 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
15180 BU_P8V_OVERLOAD_1.
15181 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
15182 P8V_BUILTIN_VEC_NEG.
15183
15184 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
15185
15186 * config/rl78/rl78.md (movdf): New define expand.
15187
15188 2018-02-19 Martin Liska <mliska@suse.cz>
15189
15190 PR other/80589
15191 * doc/invoke.texi: Fix typo.
15192 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
15193
15194 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
15195
15196 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
15197 handle rs6000_single_float and rs6000_double_float specially for
15198 e500 family CPUs.
15199
15200 2018-02-16 Jeff Law <law@redhat.com>
15201
15202 * config/rx/rx.c (add_pop_cfi_notes): New function.;
15203 (pop_regs): Use it.
15204
15205 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15206
15207 PR ipa/84425
15208 * ipa-inline.c (inline_small_functions): Fix a typo.
15209
15210 2018-02-16 Nathan Sidwell <nathan@acm.org>
15211
15212 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
15213
15214 2018-02-16 Carl Love <cel@us.ibm.com>
15215
15216 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
15217 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
15218 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
15219 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
15220 expansion to P8V_BUILTIN_VEC_FLOAT2.
15221
15222 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
15223
15224 PR rtl-optimization/70023
15225 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
15226 src_regno into account.
15227
15228 2018-02-16 Carl Love <cel@us.ibm.com>
15229
15230 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
15231 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
15232 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
15233 * config/rs6000/rs6000.c: Remove case statements for
15234 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
15235 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
15236 and P9V_BUILTIN_VEC_VINSERT4B.
15237 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
15238 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
15239 * config/rs6000/vsx.md:
15240 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
15241 vec_insert4b.
15242
15243 2018-02-16 Carl Love <cel@us.ibm.com>
15244
15245 * config/rs6000/altivec.h: Add builtin names vec_extract4b
15246 vec_insert4b.
15247 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
15248 definitions.
15249 * config/rs6000/rs6000-c.c: Add the definitions for
15250 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
15251 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
15252 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
15253 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
15254 definition for insert4b and define insn *insert3b_internal.
15255 * doc/extend.texi: Add documentation for vec_extract4b.
15256
15257 2018-02-16 Nathan Sidwell <nathan@acm.org>
15258
15259 * doc/extend.texi (Backwards Compatibility): Mention friend
15260 injection. Note for-scope is deprecated.
15261 * doc/invoke.texi (-ffriend-injection): Deprecate.
15262
15263 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
15264
15265 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
15266 that moved to I2, also allow destinations that are a paradoxical
15267 subreg (instead of a normal reg).
15268
15269 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
15270
15271 PR target/83831
15272 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
15273 to QImode.
15274
15275 2018-02-16 Richard Biener <rguenther@suse.de>
15276
15277 PR tree-optimization/84037
15278 PR tree-optimization/84016
15279 PR target/82862
15280 * config/i386/i386.c (ix86_builtin_vectorization_cost):
15281 Adjust vec_construct for the fact we need additional higher latency
15282 128bit inserts for AVX256 and AVX512 vector builds.
15283 (ix86_add_stmt_cost): Scale vector construction cost for
15284 elementwise loads.
15285
15286 2018-02-16 Richard Biener <rguenther@suse.de>
15287
15288 PR tree-optimization/84417
15289 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
15290 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
15291 (non_rewritable_lvalue_p): Likewise, use poly-ints.
15292
15293 2018-02-16 Martin Liska <mliska@suse.cz>
15294
15295 PR sanitizer/84307
15296 * internal-fn.def (ASAN_CHECK): Set proper flags.
15297 (ASAN_MARK): Likewise.
15298
15299 2018-02-16 Julia Koval <julia.koval@intel.com>
15300
15301 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
15302 from PTA_CANNONLAKE.
15303
15304 2018-02-16 Jakub Jelinek <jakub@redhat.com>
15305
15306 PR target/84272
15307 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
15308 Use ++iter rather than iter++ for std::list iterators.
15309 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
15310 defer deleting them until all nodes in the forest are processed. Do
15311 free even leaf nodes. Change to_process into auto_vec.
15312
15313 PR bootstrap/84405
15314 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
15315 * vec.h (vec_default_construct): Use memset instead of placement new
15316 if BROKEN_VALUE_INITIALIZATION is defined.
15317 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
15318 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
15319 is defined.
15320
15321 PR rtl-optimization/83723
15322 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
15323 * lra.c (lra_substitute_pseudo): Likewise. If true, use
15324 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
15325 recursive calls.
15326 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
15327 callers.
15328 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
15329
15330 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
15331
15332 PR rtl-optimization/81443
15333 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
15334 from inner REGs to paradoxical SUBREGs.
15335
15336 2018-02-16 Richard Biener <rguenther@suse.de>
15337
15338 PR tree-optimization/84399
15339 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15340 For operands we can analyze at their definition make sure we can
15341 analyze them at each use as well.
15342
15343 2018-02-16 Richard Biener <rguenther@suse.de>
15344
15345 PR tree-optimization/84190
15346 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
15347 volatile accesses if the decl isn't volatile.
15348
15349 2018-02-15 Jason Merrill <jason@redhat.com>
15350
15351 PR c++/84314 - ICE with templates and fastcall attribute.
15352 * attribs.c (build_type_attribute_qual_variant): Don't clobber
15353 TYPE_CANONICAL on an existing type.
15354
15355 2018-02-15 Jakub Jelinek <jakub@redhat.com>
15356
15357 PR tree-optimization/84383
15358 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
15359 dstoff nor call operand_equal_p if dstbase is NULL.
15360
15361 PR tree-optimization/84334
15362 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
15363 also a CONSTANT_CLASS_P, punt.
15364
15365 2018-02-14 Jim Wilson <jimw@sifive.com>
15366
15367 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
15368 first SMALL_OPERAND check. New local min_second_step. Move assert
15369 to where locals are set. Add TARGET_RVC support.
15370 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
15371
15372 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
15373
15374 * doc/invoke.texi: Correct -Wformat-overflow code sample.
15375
15376 2018-02-14 Martin Sebor <msebor@redhat.com>
15377
15378 PR tree-optimization/83698
15379 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
15380 arrays constrain the offset range to their bounds.
15381 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
15382 (builtin_access::overlap): Avoid setting the size of overlap if it's
15383 already been set.
15384 (maybe_diag_overlap): Also consider arrays when deciding what values
15385 of offsets to include in diagnostics.
15386
15387 2018-02-14 Martin Sebor <msebor@redhat.com>
15388
15389 PR c/84108
15390 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
15391 that correspond to the kind of a declaration.
15392
15393 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
15394
15395 PR target/83984
15396 * config/pa/pa.md: Load address of PIC label using the linkage table
15397 if the label is nonlocal.
15398
15399 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
15400
15401 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
15402 warning message if user requests -maltivec=be.
15403 * doc/invoke.texi: Document deprecation of -maltivec=be.
15404
15405 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
15406
15407 PR target/84220
15408 * config/rs6000/rs6000-c.c: Update definitions for
15409 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
15410 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
15411
15412 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15413
15414 PR target/84239
15415 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
15416 add _get_ssp intrinsics. Remove argument from
15417 __builtin_ia32_rdssp[d|q].
15418 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
15419 * config/i386/i386-builtin.def: Remove argument from
15420 __builtin_ia32_rdssp[d|q].
15421 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
15422 ix86_expand_special_args_builtin for _rdssp[d|q].
15423 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
15424 Clear register before usage.
15425 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
15426 Add documentation for new _get_ssp and _inc_ssp intrinsics.
15427
15428 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
15429
15430 PR tree-optimization/84357
15431 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
15432 operand 1 of an ARRAY_REF too.
15433
15434 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
15435
15436 PR target/83831
15437 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
15438 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15439 declarations.
15440 (set_of_reg): New struct.
15441 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
15442 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
15443 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
15444 functions.
15445 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
15446 Split into bitclr, bitset, bitinvert patterns if appropriate.
15447 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
15448 use rx_fuse_in_memory_bitop.
15449 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
15450 to named insn, correct maximum insn length.
15451
15452 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
15453
15454 PR target/79242
15455 * machmode.def: Define a complex mode for PARTIAL_INT.
15456 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
15457 MODE_PARTIAL_INT.
15458 * doc/rtl.texi: Document CSPImode.
15459 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
15460 handling.
15461 (msp430_hard_regno_nregs_with_padding): Likewise.
15462
15463 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
15464
15465 PR target/84279
15466 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
15467
15468 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
15469
15470 PR rtl-optimization/84169
15471 * combine.c (try_combine): New variable split_i2i3. Set it to true if
15472 we generated a parallel as new i3 and we split that to new i2 and i3
15473 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
15474 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
15475 those to i2, not i1. Partially rewrite this scan code.
15476
15477 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15478
15479 PR c/82210
15480 * stor-layout.c (place_field): For variable length fields, adjust
15481 offset_align afterwards not just based on the field's alignment,
15482 but also on the size.
15483
15484 PR middle-end/84309
15485 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
15486 of exps and logs in the use_exp2 case.
15487
15488 2018-02-13 Jeff Law <law@redhat.com>
15489
15490 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
15491 entry for "vector".
15492
15493 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
15494 ARGS as unused.
15495
15496 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
15497
15498 PR debug/84342
15499 PR debug/84319
15500 * common.opt (gas-loc-support, gas-locview-support): New.
15501 (ginline-points, ginternal-reset-location-views): New.
15502 * doc/invoke.texi: Document them. Use @itemx where intended.
15503 (gvariable-location-views): Adjust.
15504 * target.def (reset_location_view): New.
15505 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
15506 (TARGET_RESET_LOCATION_VIEW): New.
15507 * doc/tm.texi: Rebuilt.
15508 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
15509 (dwarf2out_default_as_locview_support): New.
15510 (output_asm_line_debug_info): Use option variables.
15511 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
15512 (output_loc_list): Likewise.
15513 (add_high_low_attributes): Check option variables.
15514 Don't output entry view attribute in strict mode.
15515 (gen_inlined_subroutine_die): Check option variables.
15516 (dwarf2out_inline_entry): Likewise.
15517 (init_sections_and_labels): Likewise.
15518 (dwarf2out_early_finish): Likewise.
15519 (maybe_reset_location_view): New, from...
15520 (dwarf2out_var_location): ... here. Call it.
15521 * debug.h (dwarf2out_default_as_loc_support): Declare.
15522 (dwarf2out_default_as_locview_support): Declare.
15523 * hooks.c (hook_int_rtx_insn_0): New.
15524 * hooks.h (hook_int_rtx_insn_0): Declare.
15525 * toplev.c (process_options): Take -gas-loc-support and
15526 -gas-locview-support from dwarf2out. Enable
15527 -gvariable-location-views by default only with locview
15528 assembler support. Enable -ginternal-reset-location-views by
15529 default only if the target defines the corresponding hook.
15530 Enable -ginline-points by default if location views are
15531 enabled; force it disabled if statement frontiers are
15532 disabled.
15533 * tree-inline.c (expand_call_inline): Check option variables.
15534 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
15535
15536 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
15537
15538 PR tree-optimization/84321
15539 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
15540 handling. Also check whether the anti-range contains any values
15541 that satisfy the mask; switch to a VR_RANGE if not.
15542
15543 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
15544
15545 PR sanitizer/84340
15546 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
15547
15548 2018-02-13 Martin Jambor <mjambor@suse.cz>
15549
15550 PR c++/83990
15551 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
15552 of call statements, also set location of a load to a temporary.
15553
15554 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
15555
15556 * config/rl78/rl78.c (add_vector_labels): New function.
15557 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
15558 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
15559 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
15560 which checks that no arguments are passed.
15561 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
15562 * doc/extend.texi: Documentation for the new attribute.
15563
15564 2018-02-13 Andreas Schwab <schwab@suse.de>
15565
15566 * config/riscv/linux.h (CPP_SPEC): Define.
15567
15568 2018-02-13 Jakub Jelinek <jakub@redhat.com>
15569
15570 PR target/84335
15571 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
15572 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
15573 OPTION_MASK_ISA_AES as first argument to def_builtin_const
15574 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
15575 instead of OPTION_MASK_ISA_PCLMUL as first argument to
15576 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
15577 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
15578 temporarily for AES and PCLMUL builtins.
15579
15580 PR tree-optimization/84339
15581 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
15582 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
15583 Formatting fixes.
15584
15585 PR middle-end/84309
15586 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
15587 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
15588 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
15589 inline function.
15590 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
15591 inline function.
15592 * omp-simd-clone.h: New file.
15593 * omp-simd-clone.c: Include omp-simd-clone.h.
15594 (expand_simd_clones): No longer static.
15595 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
15596 cgraph.h and omp-simd-clone.h.
15597 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
15598 (vect_recog_widen_shift_pattern): Formatting fix.
15599 (vect_pattern_recog_1): Don't check optab for calls.
15600
15601 PR target/84336
15602 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
15603 operands[2] into a REG before using gen_lowpart on it.
15604
15605 2018-02-12 Jeff Law <law@redhat.com>
15606
15607 PR target/83760
15608 * config/sh/sh.c (find_barrier): Consider a sibling call
15609 a barrier as well.
15610
15611 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
15612 successfully back substituting a reg.
15613
15614 2018-02-12 Richard Biener <rguenther@suse.de>
15615
15616 PR tree-optimization/84037
15617 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
15618 parameter, move visited init to caller.
15619 (vect_slp_analyze_operations): Separate cost from validity
15620 check, initialize visited once for all instances.
15621 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
15622 for all instances.
15623 * tree-vect-stmts.c (vect_model_simple_cost): Make early
15624 out an assert.
15625 (vect_model_promotion_demotion_cost): Likewise.
15626 (vectorizable_bswap): Guard cost modeling with !slp_node
15627 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
15628 SLP stmts.
15629 (vectorizable_call): Likewise.
15630 (vectorizable_conversion): Likewise.
15631 (vectorizable_assignment): Likewise.
15632 (vectorizable_shift): Likewise.
15633 (vectorizable_operation): Likewise.
15634 (vectorizable_store): Likewise.
15635 (vectorizable_load): Likewise.
15636 (vectorizable_condition): Likewise.
15637 (vectorizable_comparison): Likewise.
15638
15639 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
15640
15641 PR sanitizer/84307
15642 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15643 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15644 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15645
15646 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15647
15648 PR middle-end/83665
15649 * params.def (inline-min-speedup): Increase from 8 to 15.
15650 (max-inline-insns-auto): Decrease from 40 to 30.
15651 * ipa-split.c (consider_split): Add some buffer for function to
15652 be considered inlining candidate.
15653 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15654 default values.
15655
15656 2018-02-12 Richard Biener <rguenther@suse.de>
15657
15658 PR tree-optimization/84037
15659 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15660 matched stmts if we cannot swap the non-matched ones.
15661
15662 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15663
15664 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15665 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15666 _mm_maskz_scalef_round_ss): New intrinsics.
15667 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15668 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15669 __builtin_ia32_scalefss_round): Remove.
15670 (__builtin_ia32_scalefsd_mask_round,
15671 __builtin_ia32_scalefss_mask_round): New intrinsics.
15672 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15673 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15674 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15675 "<round_constraint>")): Changed to ...
15676 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15677 "<round_scalar_constraint>")): ... this.
15678 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15679 %0, %1, %2<round_op3>}"): Changed to ...
15680 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15681 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15682 %2<round_scalar_mask_op3>}"): ... this.
15683 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15684
15685 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15686
15687 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15688 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15689 (_mm_maskz_sqrt_round_ss): New intrinsics.
15690 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15691 (__builtin_ia32_sqrtsd_mask_round)
15692 (__builtin_ia32_sqrtss_mask_round): New builtins.
15693 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15694 (__builtin_ia32_sqrtss_round): Remove.
15695 (__builtin_ia32_sqrtsd_mask_round)
15696 (__builtin_ia32_sqrtss_mask_round): New builtins.
15697 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15698 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15699 ((match_operand:VF_128 1 "vector_operand"
15700 "xBm,<round_constraint>")): Changed to ...
15701 ((match_operand:VF_128 1 "vector_operand"
15702 "xBm,<round_scalar_constraint>")): ... this.
15703 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15704 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15705 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15706 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15707 %<iptr>1<round_scalar_mask_op3>}): ... this.
15708 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15709 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15710
15711 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15712
15713 PR target/84266
15714 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15715 Cast vec_cmpeq result to correct type.
15716 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15717 Cast vec_cmpgt result to correct type.
15718
15719 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15720
15721 * final.c (final_scan_insn_1): Renamed from...
15722 (final_scan_insn): ... this. New wrapper, to recover
15723 seen from the outermost call in recursive ones.
15724 * config/sparc/sparc.c (output_return): Drop seen from call.
15725 (output_sibcall): Likewise.
15726 * config/visium/visium.c (output_branch): Likewise.
15727
15728 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15729
15730 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15731 function label.
15732
15733 2018-02-10 Alan Modra <amodra@gmail.com>
15734
15735 PR target/84300
15736 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15737 Specify LR as an input.
15738
15739 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15740
15741 PR sanitizer/83987
15742 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15743 remove_member_access_dummy_vars): New functions.
15744 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15745 lower_omp_1, execute_lower_omp): Use them.
15746
15747 PR rtl-optimization/84308
15748 * shrink-wrap.c (spread_components): Release todo vector.
15749
15750 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15751
15752 PR rtl-optimization/57193
15753 * ira-color.c (struct allocno_color_data): Add member
15754 conflict_allocno_hard_prefs.
15755 (update_conflict_allocno_hard_prefs): New.
15756 (bucket_allocno_compare_func): Add a preference based on
15757 conflict_allocno_hard_prefs.
15758 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15759 (color_allocnos): Remove a dead code. Initiate
15760 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15761
15762 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15763
15764 PR target/84226
15765 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15766 constraint from =wa to wa. Avoid a subreg on the output operand,
15767 instead use a pseudo and subreg it in a move.
15768 (p9_xxbrd_<mode>): Changed to ...
15769 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15770 (p9_xxbrd_v2df): New expander.
15771 (p9_xxbrw_<mode>): Changed to ...
15772 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15773 (p9_xxbrw_v4sf): New expander.
15774
15775 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15776
15777 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15778
15779 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15780
15781 PR target/83926
15782 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15783 multiply in 32-bit mode.
15784 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15785 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15786 mode.
15787
15788 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15789
15790 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15791 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15792 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15793 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15794
15795 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15796
15797 PR lto/84213
15798 * dwarf2out.c (is_trivial_indirect_ref): New function.
15799 (dwarf2out_late_global_decl): Do not generate a location
15800 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15801 and that are not defined in the current unit.
15802
15803 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15804
15805 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15806 instead of a libcall for UNORDERED.
15807
15808 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15809
15810 PR target/82641
15811 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15812 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15813
15814 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15815
15816 PR target/PR84295
15817 * config/s390/s390.c (s390_set_current_function): Invoke
15818 s390_indirect_branch_settings also if fndecl didn't change.
15819
15820 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15821
15822 * config/rs6000/rs6000.md (blockage): Set length to zero.
15823
15824 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15825
15826 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15827
15828 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15829
15830 PR sanitizer/84285
15831 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15832 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15833 -static-lib*san.
15834
15835 PR debug/84252
15836 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15837 PARALLEL incoming that failed vt_get_decl_and_offset check.
15838
15839 PR middle-end/84237
15840 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15841 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15842 TREE_READONLY bit.
15843 (get_variable_section): For decls in named .bss* sections pass true as
15844 second argument to bss_initializer_p.
15845
15846 2018-02-09 Marek Polacek <polacek@redhat.com>
15847 Jakub Jelinek <jakub@redhat.com>
15848
15849 PR c++/83659
15850 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15851 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15852 Sync some changes from cxx_fold_indirect_ref.
15853
15854 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15855
15856 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15857 markers.
15858 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15859 (BLOCK_INLINE_ENTRY_LABEL): New.
15860 (dwarf2out_var_location): Disregard inline entry markers.
15861 (inline_entry_data): New struct.
15862 (inline_entry_data_hasher): New hashtable type.
15863 (inline_entry_data_hasher::hash): New.
15864 (inline_entry_data_hasher::equal): New.
15865 (inline_entry_data_table): New variable.
15866 (add_high_low_attributes): Add DW_AT_entry_pc and
15867 DW_AT_GNU_entry_view attributes if a pending entry is found
15868 in inline_entry_data_table. Add old entry_pc attribute only
15869 if debug nonbinding markers are disabled.
15870 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15871 markers are enabled.
15872 (block_within_block_p, dwarf2out_inline_entry): New.
15873 (dwarf2out_finish): Check that no entries remained in
15874 inline_entry_data_table.
15875 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15876 (final_scan_insn, notice_source_line): Likewise.
15877 (rest_of_clean_state): Skip inline entry markers.
15878 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15879 markers.
15880 * gimple.c (gimple_build_debug_inline_entry): New.
15881 * gimple.h (enum gimple_debug_subcode): Add
15882 GIMPLE_DEBUG_INLINE_ENTRY.
15883 (gimple_build_debug_inline_entry): Declare.
15884 (gimple_debug_inline_entry_p): New.
15885 (gimple_debug_nonbind_marker_p): Adjust.
15886 * insn-notes.def (INLINE_ENTRY): New.
15887 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15888 inline entry marker notes.
15889 (print_insn): Likewise.
15890 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15891 (INSN_DEBUG_MARKER_KIND): Likewise.
15892 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15893 * tree-inline.c (expand_call_inline): Build and insert
15894 debug_inline_entry stmt.
15895 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15896 inline entry blocks early, if nonbind markers are enabled.
15897 (dump_scope_block): Dump fragment info.
15898 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15899 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15900 (gimple_build_debug_inline_entry): New.
15901 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15902 Enable/disable inline entry points too.
15903 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15904 (DEBUG_INSN): Describe inline entry markers.
15905
15906 * common.opt (gvariable-location-views): New.
15907 (gvariable-location-views=incompat5): New.
15908 * config.in: Rebuilt.
15909 * configure: Rebuilt.
15910 * configure.ac: Test assembler for view support.
15911 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15912 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15913 * dwarf2out.c (var_loc_view): New typedef.
15914 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15915 (dwarf2out_locviews_in_attribute): New.
15916 (dwarf2out_locviews_in_loclist): New.
15917 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15918 (enum dw_line_info_opcode): Add LI_adv_address.
15919 (struct dw_line_info_table): Add view.
15920 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15921 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15922 (zero_view_p): New variable.
15923 (ZERO_VIEW_P): New macro.
15924 (output_asm_line_debug_info): New.
15925 (struct var_loc_node): Add view.
15926 (add_AT_view_list, AT_loc_list): New.
15927 (add_var_loc_to_decl): Add view param. Test it against last.
15928 (new_loc_list): Add view params. Record them.
15929 (AT_loc_list_ptr): Handle loc and view lists.
15930 (view_list_to_loc_list_val_node): New.
15931 (print_dw_val): Handle dw_val_class_view_list.
15932 (size_of_die): Likewise.
15933 (value_format): Likewise.
15934 (loc_list_has_views): New.
15935 (gen_llsym): Set vl_symbol too.
15936 (maybe_gen_llsym, skip_loc_list_entry): New.
15937 (dwarf2out_maybe_output_loclist_view_pair): New.
15938 (output_loc_list): Output view list or entries too.
15939 (output_view_list_offset): New.
15940 (output_die): Handle dw_val_class_view_list.
15941 (output_dwarf_version): New.
15942 (output_compilation_unit_header): Use it.
15943 (output_skeleton_debug_sections): Likewise.
15944 (output_rnglists, output_line_info): Likewise.
15945 (output_pubnames, output_aranges): Update version comments.
15946 (output_one_line_info_table): Output view numbers in asm comments.
15947 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15948 Call maybe_gen_llsym.
15949 (loc_list_from_tree_1): Adjust.
15950 (add_AT_location_description): Create view list attribute if
15951 needed, check it's absent otherwise.
15952 (convert_cfa_to_fb_loc_list): Adjust.
15953 (maybe_emit_file): Call output_asm_line_debug_info for test.
15954 (dwarf2out_var_location): Reset views as needed. Precompute
15955 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15956 attribute. Set view.
15957 (new_line_info_table): Reset next view.
15958 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15959 (dwarf2out_source_line): Likewise. Output view resets and labels to
15960 the assembler, or select appropriate line info opcodes.
15961 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15962 (optimize_string_length): Catch it. Adjust.
15963 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15964 dw_val_class_view_list, and remove it if no longer needed.
15965 (hash_loc_list): Hash view numbers.
15966 (loc_list_hasher::equal): Compare them.
15967 (optimize_location_lists): Check whether a view list symbol is
15968 needed, and whether the locview attribute is present, and
15969 whether they match. Remove the locview attribute if no longer
15970 needed.
15971 (index_location_lists): Call skip_loc_list_entry for test.
15972 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15973 Use output_dwarf_version.
15974 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15975 (struct dw_val_node): Add val_view_list.
15976 * final.c (SEEN_NEXT_VIEW): New.
15977 (set_next_view_needed): New.
15978 (clear_next_view_needed): New.
15979 (maybe_output_next_view): New.
15980 (final_start_function): Rename to...
15981 (final_start_function_1): ... this. Take pointer to FIRST,
15982 add SEEN parameter. Emit param bindings in the initial view.
15983 (final_start_function): Reintroduce SEEN-less interface.
15984 (final): Rename to...
15985 (final_1): ... this. Take SEEN parameter. Output final pending
15986 next view at the end.
15987 (final): Reintroduce seen-less interface.
15988 (final_scan_insn): Output pending next view before switching
15989 sections or ending a block. Mark the next view as needed when
15990 outputting variable locations. Notify debug backend of section
15991 changes, and of location view changes.
15992 (rest_of_handle_final): Adjust.
15993 * toplev.c (process_options): Autodetect value for debug variable
15994 location views option. Warn on incompat5 without -gdwarf-5.
15995 * doc/invoke.texi (gvariable-location-views): New.
15996 (gvariable-location-views=incompat5): New.
15997 (gno-variable-location-views): New.
15998
15999 2018-02-08 David Malcolm <dmalcolm@redhat.com>
16000
16001 PR tree-optimization/84136
16002 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16003 that the result of find_edge is non-NULL.
16004
16005 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16006
16007 PR target/83008
16008 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16009 storing integer register in SImode. Fix cost of 256 and 512
16010 byte aligned SSE register store.
16011
16012 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
16013
16014 * config/i386/i386.c (ix86_multiplication_cost): Fix
16015 multiplication cost for TARGET_AVX512DQ.
16016
16017 2018-02-08 Marek Polacek <polacek@redhat.com>
16018
16019 PR tree-optimization/84238
16020 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16021 get_range_strlen.
16022
16023 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16024
16025 PR tree-optimization/84265
16026 * tree-vect-stmts.c (vectorizable_store): Don't treat
16027 VMAT_CONTIGUOUS accesses as grouped.
16028 (vectorizable_load): Likewise.
16029
16030 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16031
16032 PR tree-optimization/81635
16033 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16034 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16035 (test_round_for_mask): New functions.
16036 (wide_int_cc_tests): Call test_round_for_mask.
16037 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16038 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16039 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16040 range returned by get_range_info.
16041
16042 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
16043
16044 PR ipa/81360
16045 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16046 * symtab.c: Include builtins.h
16047 (symtab_node::output_to_lto_symbol_table_p): Move here
16048 from lto-streamer-out.c:output_symbol_p.
16049 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16050 (output_symbol_p): Move all logic to symtab.c
16051 (produce_symtab): Update.
16052
16053 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16054
16055 * config/s390/s390-opts.h (enum indirect_branch): Define.
16056 * config/s390/s390-protos.h (s390_return_addr_from_memory)
16057 (s390_indirect_branch_via_thunk)
16058 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16059 (enum s390_indirect_branch_type): Define.
16060 * config/s390/s390.c (struct s390_frame_layout, struct
16061 machine_function): Remove.
16062 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16063 (indirect_branch_table_label_no, indirect_branch_table_name):
16064 Define variables.
16065 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16066 (enum s390_indirect_branch_option): Define.
16067 (s390_return_addr_from_memory): New function.
16068 (s390_handle_string_attribute): New function.
16069 (s390_attribute_table): Add new attribute handler.
16070 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
16071 (s390_indirect_branch_via_thunk): New function.
16072 (s390_indirect_branch_via_inline_thunk): New function.
16073 (s390_function_ok_for_sibcall): When jumping via thunk disallow
16074 sibling call optimization for non z10 compiles.
16075 (s390_emit_call): Force indirect branch target to be a single
16076 register. Add r1 clobber for non-z10 compiles.
16077 (s390_emit_epilogue): Emit return jump via return_use expander.
16078 (s390_reorg): Handle JUMP_INSNs as execute targets.
16079 (s390_option_override_internal): Perform validity checks for the
16080 new command line options.
16081 (s390_indirect_branch_attrvalue): New function.
16082 (s390_indirect_branch_settings): New function.
16083 (s390_set_current_function): Invoke s390_indirect_branch_settings.
16084 (s390_output_indirect_thunk_function): New function.
16085 (s390_code_end): Implement target hook.
16086 (s390_case_values_threshold): Implement target hook.
16087 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
16088 macros.
16089 * config/s390/s390.h (struct s390_frame_layout)
16090 (struct machine_function): Move here from s390.c.
16091 (TARGET_INDIRECT_BRANCH_NOBP_RET)
16092 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
16093 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
16094 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
16095 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
16096 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
16097 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
16098 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
16099 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
16100 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
16101 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
16102 (mnemonic attribute): Add values which aren't recognized
16103 automatically.
16104 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
16105 pattern for branch conversion. Fix mnemonic attribute.
16106 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
16107 indirect branch via thunk if requested.
16108 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
16109 ("*indirect_jump"): Disable for branch conversion using out of
16110 line thunks.
16111 ("indirect_jump_via_thunk<mode>_z10")
16112 ("indirect_jump_via_thunk<mode>")
16113 ("indirect_jump_via_inlinethunk<mode>_z10")
16114 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
16115 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
16116 ("casesi_jump_via_inlinethunk<mode>_z10")
16117 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
16118 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
16119 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
16120 ("*indirect2_jump"): Disable for branch conversion.
16121 ("casesi_jump"): Turn into expander and expand patterns for branch
16122 conversion.
16123 ("return_use"): New expander.
16124 ("*return"): Emit return via thunk and rename it to ...
16125 ("*return<mode>"): ... this one.
16126 * config/s390/s390.opt: Add new options and and enum for the
16127 option values.
16128
16129 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
16130
16131 * lra-constraints.c (match_reload): Unconditionally use
16132 gen_lowpart_SUBREG, rather than selecting between that
16133 and equivalent gen_rtx_SUBREG code.
16134
16135 2018-02-08 Richard Biener <rguenther@suse.de>
16136
16137 PR tree-optimization/84233
16138 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
16139 changed flag instead of boguously re-using phi_inserted.
16140
16141 2018-02-08 Martin Jambor <mjambor@suse.cz>
16142
16143 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
16144 static local variables.
16145
16146 2018-02-08 Richard Biener <rguenther@suse.de>
16147
16148 PR tree-optimization/84278
16149 * tree-vect-stmts.c (vectorizable_store): When looking for
16150 smaller vector types to perform grouped strided loads/stores
16151 make sure the mode is supported by the target.
16152 (vectorizable_load): Likewise.
16153
16154 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16155
16156 * config/aarch64/aarch64.c (aarch64_components_for_bb):
16157 Increase LDP/STP opportunities by adding adjacent callee-saves.
16158
16159 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
16160
16161 PR rtl-optimization/84068
16162 PR rtl-optimization/83459
16163 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
16164
16165 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
16166
16167 PR tree-optimization/84224
16168 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
16169 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
16170 non-zero arguments.
16171
16172 2018-02-07 Iain Sandoe <iain@codesourcery.com>
16173
16174 PR target/84113
16175 * config/rs6000/altivec.md (*restore_world): Remove LR use.
16176 * config/rs6000/predicates.md (restore_world_operation): Adjust op
16177 count, remove one USE.
16178
16179 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
16180
16181 * doc/install.texi (Configuration): Document the
16182 --with-long-double-format={ibm,ieee} PowerPC configuration
16183 options.
16184
16185 PR target/84154
16186 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
16187 Convert from define_expand to be define_insn_and_split. Rework
16188 float/double/_Float128 conversions to QI/HI/SImode to work with
16189 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
16190 conversions to QI/HImode types did a store and then a load to
16191 truncate the value. For conversions to VSX registers, don't split
16192 the insn, instead emit the code directly. Use the code iterator
16193 any_fix to combine signed and unsigned conversions.
16194 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
16195 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
16196 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16197 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
16198 (fix_<mode>di2_hw): Likewise.
16199 (fixuns_<mode>di2_hw): Likewise.
16200 (fix_<mode>si2_hw): Likewise.
16201 (fixuns_<mode>si2_hw): Likewise.
16202 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
16203 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
16204 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
16205 fix<uns>_trunc<SFDF:mode>si2_p8.
16206 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
16207 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
16208 (fix<uns>_<mode>_mem): Likewise.
16209 (fctiw<u>z_<mode>_mem): Likewise.
16210 (fix<uns>_<mode>_mem): Likewise.
16211 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
16212 the register allocator from doing a direct move to the GPRs to do
16213 a store, and instead use the ISA 3.0 store byte/half-word from
16214 vector register instruction. For IEEE 128-bit floating point,
16215 also optimize stores of 32-bit ints.
16216 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
16217
16218 2018-02-07 Alan Hayward <alan.hayward@arm.com>
16219
16220 * genextract.c (push_pathstr_operand): New function to support
16221 [a-zA-Z].
16222 (walk_rtx): Call push_pathstr_operand.
16223 (print_path): Support [a-zA-Z].
16224
16225 2018-02-07 Richard Biener <rguenther@suse.de>
16226
16227 PR tree-optimization/84037
16228 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
16229 (cse_and_gimplify_to_preheader): Declare.
16230 (vect_get_place_in_interleaving_chain): Likewise.
16231 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16232 ivexpr_map.
16233 (_loop_vec_info::~_loop_vec_info): Delete it.
16234 (cse_and_gimplify_to_preheader): New function.
16235 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
16236 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
16237 (vectorizable_load): Likewise. For grouped stores always base
16238 the IV on the first element.
16239 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
16240 condition before gimplifying.
16241
16242 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16243
16244 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
16245 *DIV_EXPR and *MOD_EXPR.
16246
16247 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
16248
16249 PR target/84248
16250 * config/i386/i386.c (ix86_option_override_internal): Mask out
16251 the CF_SET bit when checking -fcf-protection.
16252
16253 2018-02-07 Tom de Vries <tom@codesourcery.com>
16254
16255 PR libgomp/84217
16256 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
16257 enough.
16258
16259 2018-02-07 Richard Biener <rguenther@suse.de>
16260
16261 PR tree-optimization/84204
16262 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
16263 this place.
16264
16265 PR tree-optimization/84205
16266 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
16267 special-case isl_ast_op_zdiv_r.
16268
16269 PR tree-optimization/84223
16270 * graphite-scop-detection.c (gather_bbs::before_dom_children):
16271 Only add conditions from within the region.
16272 (gather_bbs::after_dom_children): Adjust.
16273
16274 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
16275
16276 PR target/84209
16277 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
16278 * config/avr/avr.md: Only post-reload split REG-REG moves if
16279 either register is GENERAL_REG_P.
16280
16281 2018-02-07 Jakub Jelinek <jakub@redhat.com>
16282
16283 PR tree-optimization/84235
16284 * tree-ssa-scopedtables.c
16285 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
16286 if the subtraction is performed in floating point type where NaNs are
16287 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
16288 build 1. Formatting fix.
16289
16290 2018-02-06 Jakub Jelinek <jakub@redhat.com>
16291
16292 PR target/84146
16293 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
16294 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
16295 and skip it regardless of bb boundaries. Use CALL_P macro,
16296 don't test INSN_P (insn) together with CALL_P or JUMP_P check
16297 unnecessarily, formatting fix.
16298
16299 2018-02-06 Michael Collison <michael.collison@arm.com>
16300
16301 * config/arm/thumb2.md:
16302 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
16303 (*thumb_mov_notscc): Ditto.
16304
16305 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
16306
16307 PR target/84154
16308 * config/rs6000/rs6000.md (su code attribute): Use "u" for
16309 unsigned_fix, not "s".
16310
16311 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16312
16313 * configure.ac (gcc_fn_eh_frame_ro): New function.
16314 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
16315 correct .eh_frame permissions.
16316 * configure: Regenerate.
16317
16318 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
16319
16320 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
16321 irrelevant options.
16322
16323 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16324
16325 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16326 Display warning message for -mno-speculate-indirect-jumps.
16327
16328 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
16329
16330 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
16331 Undocumented.
16332 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
16333
16334 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
16335
16336 PR tree-optimization/84225
16337 * tree-eh.c (find_trapping_overflow): Only call
16338 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
16339
16340 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16341
16342 PR target/84145
16343 * config/i386/i386.c: Reimplement the check of possible options
16344 -mibt/-mshstk conbination. Change error messages.
16345 * doc/invoke.texi: Fix a typo: remove extra '='.
16346
16347 2018-02-06 Marek Polacek <polacek@redhat.com>
16348
16349 PR tree-optimization/84228
16350 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
16351
16352 2018-02-06 Tamar Christina <tamar.christina@arm.com>
16353
16354 PR target/82641
16355 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
16356 emitted arch directives.
16357 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
16358 __ARM_FEATURE_COPROC before changing architectures.
16359
16360 2018-02-06 Richard Biener <rguenther@suse.de>
16361
16362 * config/i386/i386.c (print_reg): Fix typo.
16363 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
16364
16365 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
16366
16367 * configure: Regenerate.
16368
16369 2018-02-05 Martin Sebor <msebor@redhat.com>
16370
16371 PR tree-optimization/83369
16372 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
16373 inlining context.
16374
16375 2018-02-05 Martin Liska <mliska@suse.cz>
16376
16377 * doc/invoke.texi: Cherry-pick upstream r323995.
16378
16379 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
16380
16381 * ira.c (ira_init_register_move_cost): Adjust comment.
16382
16383 2018-02-05 Martin Liska <mliska@suse.cz>
16384
16385 PR gcov-profile/84137
16386 * doc/gcov.texi: Fix typo in documentation.
16387
16388 2018-02-05 Martin Liska <mliska@suse.cz>
16389
16390 PR gcov-profile/83879
16391 * doc/gcov.texi: Document necessity of --dynamic-list-data when
16392 using dlopen functionality.
16393
16394 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
16395
16396 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
16397 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
16398 _mm_maskz_range_ss, _mm_mask_range_round_ss,
16399 _mm_maskz_range_round_ss): New intrinsics.
16400 (__builtin_ia32_rangesd128_round)
16401 (__builtin_ia32_rangess128_round): Remove.
16402 (__builtin_ia32_rangesd128_mask_round,
16403 __builtin_ia32_rangess128_mask_round): New builtins.
16404 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
16405 __builtin_ia32_rangess128_round): Remove.
16406 (__builtin_ia32_rangesd128_mask_round,
16407 __builtin_ia32_rangess128_mask_round): New builtins.
16408 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
16409 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
16410 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
16411 "<round_saeonly_constraint>")): Changed to ...
16412 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
16413 "<round_saeonly_scalar_constraint>")): ... this.
16414 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
16415 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
16416 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
16417 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
16418 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
16419
16420 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
16421
16422 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
16423 options.
16424 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
16425 Remove all values except native, 8540 and 8548.
16426
16427 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
16428
16429 * config/i386/i386.c (ix86_output_function_return): Pass
16430 INVALID_REGNUM, instead of -1, as invalid register number to
16431 indirect_thunk_name and output_indirect_thunk.
16432
16433 2018-02-02 Julia Koval <julia.koval@intel.com>
16434
16435 * config.gcc: Add -march=icelake.
16436 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
16437 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
16438 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
16439 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
16440 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
16441 (processor_target_table): Add icelake.
16442 (ix86_option_override_internal): Handle new PTAs.
16443 (get_builtin_code_for_version): Handle icelake.
16444 (M_INTEL_COREI7_ICELAKE): New.
16445 (fold_builtin_cpu): Handle icelake.
16446 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
16447 * doc/invoke.texi: Add -march=icelake.
16448
16449 2018-02-02 Julia Koval <julia.koval@intel.com>
16450
16451 * config/i386/i386.c (ix86_option_override_internal): Change flags type
16452 to wide_int_bitmask.
16453 * wide-int-bitmask.h: New.
16454
16455 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16456
16457 PR target/84066
16458 * config/i386/i386.md: Replace Pmode with word_mode in
16459 builtin_setjmp_setup and builtin_longjmp to support x32.
16460
16461 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
16462
16463 PR target/56010
16464 PR target/83743
16465 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
16466 #include "opts.h".
16467 (rs6000_supported_cpu_names): New static variable.
16468 (linux_cpu_translation_table): Likewise.
16469 (elf_platform) <cpu>: Define new static variable and use it.
16470 Translate kernel AT_PLATFORM name to canonical name if needed.
16471 Error if platform name is unknown.
16472
16473 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
16474
16475 PR target/84089
16476 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
16477
16478 2018-02-01 Jeff Law <law@redhat.com>
16479
16480 PR target/84128
16481 * config/i386/i386.c (release_scratch_register_on_entry): Add new
16482 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
16483 the scratch if RELEASE_VIA_POP is false.
16484 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
16485 If we have to save a temporary register, decrement SIZE appropriately.
16486 Pass new arguments to release_scratch_register_on_entry.
16487 (ix86_adjust_stack_and_probe): Likewise.
16488 (ix86_emit_probe_stack_range): Pass new arguments to
16489 release_scratch_register_on_entry.
16490
16491 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
16492
16493 PR rtl-optimization/84157
16494 * combine.c (change_zero_ext): Use REG_P predicate in
16495 front of HARD_REGISTER_P predicate.
16496
16497 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
16498
16499 * config/avr/avr.c (avr_option_override): Move disabling of
16500 -fdelete-null-pointer-checks to...
16501 * common/config/avr/avr-common.c (avr_option_optimization_table):
16502 ...here.
16503
16504 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16505
16506 PR tree-optimization/81635
16507 * tree-data-ref.c (split_constant_offset_1): For types that
16508 wrap on overflow, try to use range info to prove that wrapping
16509 cannot occur.
16510
16511 2018-02-01 Renlin Li <renlin.li@arm.com>
16512
16513 PR target/83370
16514 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
16515 TAILCALL_ADDR_REGS.
16516 (aarch64_register_move_cost): Likewise.
16517 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
16518 TAILCALL_ADDR_REGS.
16519 (REG_CLASS_NAMES): Likewise.
16520 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
16521 TAILCALL_ADDR_REGS. Remove IP registers.
16522 * config/aarch64/aarch64.md (Ucs): Update register constraint.
16523
16524 2018-02-01 Richard Biener <rguenther@suse.de>
16525
16526 * domwalk.h (dom_walker::dom_walker): Add additional constructor
16527 for specifying RPO order and allow NULL for that.
16528 * domwalk.c (dom_walker::dom_walker): Likewise.
16529 (dom_walker::walk): Handle NULL RPO order.
16530 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
16531 in RPO order.
16532 (rewrite_update_dom_walker): Likewise.
16533 (mark_def_dom_walker): Likewise.
16534
16535 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16536
16537 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
16538 (aarch64_maybe_expand_sve_subreg_move): Declare.
16539 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
16540 * config/aarch64/predicates.md (aarch64_any_register_operand): New
16541 predicate.
16542 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
16543 that are semantically a reverse operation.
16544 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
16545 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
16546 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
16547 functions.
16548 (aarch64_can_change_mode_class): For big-endian, forbid changes
16549 between two SVE modes if they have different element sizes.
16550
16551 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16552
16553 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
16554 the TImode handling for big-endian targets.
16555
16556 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16557
16558 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
16559 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
16560 not just bytes.
16561 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
16562 Remove BSWAP handing for big-endian targets and use the form of
16563 LD1RQ appropariate for the mode.
16564
16565 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16566
16567 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
16568 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
16569 duplicated element.
16570
16571 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
16572
16573 PR tearget/83845
16574 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
16575 check for operands that need to go through aarch64_sve_reload_be.
16576
16577 2018-02-01 Jakub Jelinek <jakub@redhat.com>
16578
16579 PR tree-optimization/81661
16580 PR tree-optimization/84117
16581 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
16582 * tree-eh.c: Include gimplify.h.
16583 (find_trapping_overflow, replace_trapping_overflow,
16584 rewrite_to_non_trapping_overflow): New functions.
16585 * tree-vect-loop.c: Include tree-eh.h.
16586 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
16587 * tree-data-ref.c: Include tree-eh.h.
16588 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
16589
16590 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
16591
16592 PR rtl-optimization/84123
16593 * combine.c (change_zero_ext): Check if hard register satisfies
16594 can_change_dest_mode before calling gen_lowpart_SUBREG.
16595
16596 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
16597
16598 PR target/82444
16599 * ira.c (ira_init_register_move_cost): Remove assert.
16600
16601 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16602
16603 PR rtl-optimization/84071
16604 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
16605 * doc/tm.texi: Regenerate.
16606
16607 2018-01-31 Richard Biener <rguenther@suse.de>
16608
16609 PR tree-optimization/84132
16610 * tree-data-ref.c (analyze_miv_subscript): Properly
16611 check whether evolution_function_is_affine_multivariate_p
16612 before calling gcd_of_steps_may_divide_p.
16613
16614 2018-01-31 Julia Koval <julia.koval@intel.com>
16615
16616 PR target/83618
16617 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
16618 * config/i386/i386.md (rdpid_rex64) New.
16619 (rdpid): Make 32bit only.
16620
16621 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
16622
16623 PR lto/84105
16624 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
16625 an IDENTIFIER_NODE for FUNCTION_TYPE's.
16626
16627 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16628
16629 Revert
16630 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16631
16632 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16633
16634 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
16635
16636 PR rtl-optimization/84071
16637 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
16638 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
16639
16640 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16641
16642 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16643 (arc_attribute_table): Add 'aux' attribute.
16644 (arc_in_small_data_p): Consider aux like variables.
16645 (arc_is_aux_reg_p): New function.
16646 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16647 (arc_get_aux_arg): New function.
16648 (prepare_move_operands): Handle aux-register access.
16649 (arc_handle_aux_attribute): New function.
16650 * doc/extend.texi (ARC Variable attributes): Add subsection.
16651
16652 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16653
16654 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16655 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16656 (arc_attribute_table): Add 'uncached' attribute.
16657 (arc_print_operand): Print '.di' flag for uncached memory
16658 accesses.
16659 (arc_in_small_data_p): Do not consider for small data the uncached
16660 types.
16661 (arc_is_uncached_mem_p): New function.
16662 * config/arc/predicates.md (compact_store_memory_operand): Check
16663 for uncached memory accesses.
16664 (nonvol_nonimm_operand): Likewise.
16665 * doc/extend.texi (ARC Type Attribute): New subsection.
16666
16667 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16668
16669 PR c/84100
16670 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16671 falign-loops=): Add Optimization flag.
16672
16673 2018-01-30 Jeff Law <law@redhat.com>
16674
16675 PR target/84064
16676 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16677 INT_REGISTERS_SAVED. Check it prior to calling
16678 get_scratch_register_on_entry.
16679 (ix86_adjust_stack_and_probe): Similarly.
16680 (ix86_emit_probe_stack_range): Similarly.
16681 (ix86_expand_prologue): Corresponding changes.
16682
16683 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16684
16685 PR target/40411
16686 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16687 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16688
16689 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16690
16691 PR target/84112
16692 * lra-constraints.c (curr_insn_transform): Process AND in the
16693 address.
16694
16695 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16696
16697 PR rtl-optimization/83986
16698 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16699 dependence against last_pending_memory_flush in addition to
16700 pending_jump_insns.
16701
16702 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16703
16704 PR tree-optimization/81611
16705 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16706 copies.
16707
16708 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16709
16710 PR target/83758
16711 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16712 a reg rtx.
16713
16714 2018-01-30 Richard Biener <rguenther@suse.de>
16715 Jakub Jelinek <jakub@redhat.com>
16716
16717 PR tree-optimization/84111
16718 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16719 inner loops added during recursion, as they don't have up-to-date
16720 SSA form.
16721
16722 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16723
16724 PR ipa/81360
16725 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16726 (can_inline_edge_by_limits_p): ... here.
16727 (can_early_inline_edge_p, check_callers,
16728 update_caller_keys, update_callee_keys, recursive_inlining,
16729 add_new_edges_to_heap, speculation_useful_p,
16730 inline_small_functions,
16731 inline_small_functions, flatten_function,
16732 inline_to_all_callers_1): Update.
16733
16734 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16735
16736 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16737 zeros correctly.
16738
16739 2018-01-30 Richard Biener <rguenther@suse.de>
16740
16741 PR tree-optimization/83008
16742 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16743 invariant and constant vector uses in stmts when they need
16744 more than one stmt.
16745
16746 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16747
16748 PR bootstrap/84017
16749 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16750 * configure: Regenerate.
16751
16752 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16753
16754 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16755 pattern.
16756 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16757 Use gen_rtx_REG rather than gen_lowpart.
16758
16759 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16760
16761 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16762 rather than 0 when creating partial subregs.
16763
16764 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16765
16766 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16767 of usage.
16768
16769 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16770
16771 PR target/81550
16772 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16773 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16774 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16775 flags. This restores the settings used before the 2017-07-24.
16776 Turning off pre increment/decrement/modify allows IVOPTS to
16777 optimize DF/SF loops where the index is an int.
16778
16779 2018-01-29 Richard Biener <rguenther@suse.de>
16780 Kelvin Nilsen <kelvin@gcc.gnu.org>
16781
16782 PR bootstrap/80867
16783 * tree-vect-stmts.c (vectorizable_call): Don't call
16784 targetm.vectorize_builtin_md_vectorized_function if callee is
16785 NULL.
16786
16787 2018-01-22 Carl Love <cel@us.ibm.com>
16788
16789 * doc/extend.tex: Fix typo in second arg in
16790 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16791
16792 2018-01-29 Richard Biener <rguenther@suse.de>
16793
16794 PR tree-optimization/84086
16795 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16796 (flush_ssaname_freelist): When SSA names were released reset
16797 the SCEV hash table.
16798
16799 2018-01-29 Richard Biener <rguenther@suse.de>
16800
16801 PR tree-optimization/84057
16802 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16803 removed paths when removing edges.
16804
16805 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16806
16807 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16808 -mfunction-return=@var{choice}.
16809
16810 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16811
16812 PR diagnostic/84034
16813 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16814 Handle CR like TAB.
16815 (layout::print_source_line): Likewise.
16816 (test_get_line_width_without_trailing_whitespace): Add test cases.
16817
16818 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16819
16820 PR middle-end/84040
16821 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16822 debug insns.
16823
16824 2018-01-26 Jim Wilson <jimw@sifive.com>
16825
16826 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16827
16828 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16829 specified.
16830
16831 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16832
16833 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16834 and CMP + SUB-immediate -> SUBS.
16835
16836 2018-01-26 Martin Sebor <msebor@redhat.com>
16837
16838 PR tree-optimization/83896
16839 * tree-ssa-strlen.c (get_string_len): Rename...
16840 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16841 Avoid assuming length is constant.
16842 (handle_char_store): Use HOST_WIDE_INT for string length.
16843
16844 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16845
16846 PR target/81763
16847 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16848 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16849
16850 2018-01-26 Richard Biener <rguenther@suse.de>
16851
16852 PR rtl-optimization/84003
16853 * dse.c (record_store): Only record redundant stores when
16854 the earlier store aliases at least all accesses the later one does.
16855
16856 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16857
16858 PR rtl-optimization/83985
16859 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16860 REG_CFA_RESTORE insns.
16861 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16862 REG_CFA_RESTORE insns here.
16863
16864 PR c/83989
16865 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16866 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16867
16868 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16869
16870 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16871 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16872 (arc_init): Likewise.
16873 (arc_override_options): Likewise.
16874 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16875 value.
16876 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16877 support.
16878 * config/arc/arc.h (TARGET_DBNZ): Define.
16879 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16880 properly set the tune attribute.
16881 (dbnz): Use TARGET_DBNZ guard.
16882 * config/arc/arc.opt (mtune): Add core3 option.
16883
16884 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16885
16886 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16887 recognize new pic like addresses.
16888 (arc_delegitimize_address): Clean up.
16889
16890 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16891
16892 * config/arc/arc-arches.def: Option mrf16 valid for all
16893 architectures.
16894 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16895 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16896 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16897 * config/arc/arc-tables.opt: Regenerate.
16898 * config/arc/arc.c (arc_conditional_register_usage): Handle
16899 reduced register file case.
16900 (arc_file_start): Set must have build attributes.
16901 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16902 mrf16 option value.
16903 * config/arc/arc.opt (mrf16): Add new option.
16904 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16905 * config/arc/genmultilib.awk: Handle new mrf16 option.
16906 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16907 * config/arc/t-multilib: Regenerate.
16908 * doc/invoke.texi (ARC Options): Document mrf16 option.
16909
16910 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16911
16912 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16913 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16914 (arc_attribute_table): Add 'secure_call' attribute.
16915 (arc_print_operand): Print secure call operand.
16916 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16917 secure.
16918 (arc_is_secure_call_p): New function. * config/arc/arc.md
16919 (call_i): Add support for sjli instruction.
16920 (call_value_i): Likewise.
16921 * config/arc/constraints.md (Csc): New constraint.
16922
16923 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16924 John Eric Martin <John.Martin@emmicro-us.com>
16925
16926 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16927 * config/arc/arc.c (_arc_jli_section): New struct.
16928 (arc_jli_section): New type.
16929 (rc_jli_sections): New static variable.
16930 (arc_handle_jli_attribute): New function.
16931 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16932 (arc_file_end): New function.
16933 (TARGET_ASM_FILE_END): Define.
16934 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16935 (arc_add_jli_section): New function.
16936 (jli_call_scan): Likewise.
16937 (arc_reorg): Call jli_call_scan.
16938 (arc_output_addsi): Remove 'S' from printing asm operand.
16939 (arc_is_jli_call_p): New function.
16940 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16941 operand.
16942 (movhi_insn): Likewise.
16943 (movsi_insn): Likewise.
16944 (movsi_set_cc_insn): Likewise.
16945 (loadqi_update): Likewise.
16946 (load_zeroextendqisi_update): Likewise.
16947 (load_signextendqisi_update): Likewise.
16948 (loadhi_update): Likewise.
16949 (load_zeroextendhisi_update): Likewise.
16950 (load_signextendhisi_update): Likewise.
16951 (loadsi_update): Likewise.
16952 (loadsf_update): Likewise.
16953 (movsicc_insn): Likewise.
16954 (bset_insn): Likewise.
16955 (bxor_insn): Likewise.
16956 (bclr_insn): Likewise.
16957 (bmsk_insn): Likewise.
16958 (bicsi3_insn): Likewise.
16959 (cmpsi_cc_c_insn): Likewise.
16960 (movsi_ne): Likewise.
16961 (movsi_cond_exec): Likewise.
16962 (clrsbsi2): Likewise.
16963 (norm_f): Likewise.
16964 (normw): Likewise.
16965 (swap): Likewise.
16966 (divaw): Likewise.
16967 (flag): Likewise.
16968 (sr): Likewise.
16969 (kflag): Likewise.
16970 (ffs): Likewise.
16971 (ffs_f): Likewise.
16972 (fls): Likewise.
16973 (call_i): Remove 'S' asm letter, add jli instruction.
16974 (call_value_i): Likewise.
16975 * config/arc/arc.op (mjli-always): New option.
16976 * config/arc/constraints.md (Cji): New constraint.
16977 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16978 operand.
16979 (subsf3_fpx): Likewise.
16980 (mulsf3_fpx): Likewise.
16981 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16982 asm operand.
16983 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16984 function attrbutes.
16985 * doc/invoke.texi (ARC): Document mjli-always option.
16986
16987 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16988
16989 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16990 avoid addition with 0 and use incw and decw where possible.
16991
16992 2018-01-26 Richard Biener <rguenther@suse.de>
16993
16994 PR tree-optimization/81082
16995 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16996 association if it requires casting to unsigned.
16997 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16998 from fold_plusminus_mult_expr to catch important cases late when
16999 range info is available.
17000
17001 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17002
17003 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17004 * configure.ac (hidden_linkonce): New test.
17005 * configure: Regenerate.
17006 * config.in: Regenerate.
17007
17008 2018-01-26 Julia Koval <julia.koval@intel.com>
17009
17010 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17011 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17012 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17013 _mm_mask_bitshuffle_epi64_mask): Fix type.
17014 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17015 USI_FTYPE_V4DI_V4DI_USI): Remove.
17016 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17017 __builtin_ia32_vpshufbitqmb256_mask,
17018 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17019 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17020 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17021
17022 2018-01-26 Alan Modra <amodra@gmail.com>
17023
17024 PR target/84033
17025 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17026 UNSPEC_VBPERMQ. Sort other unspecs.
17027
17028 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
17029
17030 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17031
17032 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
17033
17034 PR middle-end/83055
17035 * predict.c (drop_profile): Do not push/pop cfun; update also
17036 node->count.
17037 (handle_missing_profiles): Fix logic looking for zero profiles.
17038
17039 2018-01-25 Jakub Jelinek <jakub@redhat.com>
17040
17041 PR middle-end/83977
17042 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17043 on functions with #pragma omp declare simd or functions with simd
17044 attribute.
17045 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17046 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17047 Remove trailing \n from warning_at calls.
17048
17049 2018-01-25 Tom de Vries <tom@codesourcery.com>
17050
17051 PR target/84028
17052 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17053 for neutered workers.
17054
17055 2018-01-24 Joseph Myers <joseph@codesourcery.com>
17056
17057 PR target/68467
17058 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17059 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17060
17061 2018-01-24 Jeff Law <law@redhat.com>
17062
17063 PR target/83994
17064 * i386.c (get_probe_interval): Move to earlier point.
17065 (ix86_compute_frame_layout): If -fstack-clash-protection and
17066 the frame is larger than the probe interval, then use pushes
17067 to save registers rather than reg->mem moves.
17068 (ix86_expand_prologue): Remove conditional for int_registers_saved
17069 assertion.
17070
17071 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
17072
17073 PR target/84014
17074 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
17075 min/max for never referenced object.
17076
17077 2018-01-24 Jakub Jelinek <jakub@redhat.com>
17078
17079 PR middle-end/83977
17080 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
17081 here.
17082 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
17083 attributes from DECL_ATTRIBUTES (decl) without affecting
17084 DECL_ATTRIBUTES (current_function_decl).
17085 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
17086 functions with non-NULL DECL_ABSTRACT_ORIGIN.
17087
17088 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
17089
17090 PR tree-optimization/83979
17091 * fold-const.c (fold_comparison): Use constant_boolean_node
17092 instead of boolean_{true,false}_node.
17093
17094 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
17095
17096 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
17097 with zero counts.
17098
17099 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17100
17101 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17102 Simplify the clause that sets the length attribute.
17103 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17104 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
17105 clause that sets the length attribute.
17106 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17107
17108 2018-01-24 Tom de Vries <tom@codesourcery.com>
17109
17110 PR target/83589
17111 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
17112 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
17113 Add strict parameter.
17114 (prevent_branch_around_nothing): Insert dummy insn between branch to
17115 label and label with no ptx insn inbetween.
17116 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
17117
17118 2018-01-24 Tom de Vries <tom@codesourcery.com>
17119
17120 PR target/81352
17121 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17122 for neutered threads in warp.
17123 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
17124
17125 2018-01-24 Richard Biener <rguenther@suse.de>
17126
17127 PR tree-optimization/83176
17128 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
17129 operands.
17130
17131 2018-01-24 Richard Biener <rguenther@suse.de>
17132
17133 PR tree-optimization/82819
17134 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
17135 code generating pluses that are no-ops in the target precision.
17136
17137 2018-01-24 Richard Biener <rguenther@suse.de>
17138
17139 PR middle-end/84000
17140 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
17141
17142 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17143
17144 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
17145 to merge probabilities.
17146 * predict.c (probably_never_executed): Also mark as cold functions
17147 with global 0 profile and guessed local profile.
17148 * profile-count.c (profile_probability::combine_with_count): New
17149 member function.
17150 * profile-count.h (profile_probability::operator*,
17151 profile_probability::operator*=, profile_probability::operator/,
17152 profile_probability::operator/=): Reduce precision to adjusted
17153 and set value to guessed on contradictory divisions.
17154 (profile_probability::combine_with_freq): Remove.
17155 (profile_probability::combine_wiht_count): Declare.
17156 (profile_count::force_nonzero):: Set to adjusted.
17157 (profile_count::probability_in):: Set quality to adjusted.
17158 * tree-ssa-tail-merge.c (replace_block_by): Use
17159 combine_with_count.
17160
17161 2018-01-23 Andrew Waterman <andrew@sifive.com>
17162 Jim Wilson <jimw@sifive.com>
17163
17164 * config/riscv/riscv.c (riscv_stack_boundary): New.
17165 (riscv_option_override): Set riscv_stack_boundary. Handle
17166 riscv_preferred_stack_boundary_arg.
17167 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
17168 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
17169 (STACK_BOUNDARY): Set to riscv_stack_boundary.
17170 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
17171 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
17172 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
17173
17174 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
17175
17176 PR target/83905
17177 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
17178 of struct ix86_frame.
17179 (ix86_expand_epilogue): Likewise. Add a local variable for
17180 the reg_save_offset field in struct ix86_frame.
17181
17182 2018-01-23 Bin Cheng <bin.cheng@arm.com>
17183
17184 PR tree-optimization/82604
17185 * tree-loop-distribution.c (enum partition_kind): New enum item
17186 PKIND_PARTIAL_MEMSET.
17187 (partition_builtin_p): Support above new enum item.
17188 (generate_code_for_partition): Ditto.
17189 (compute_access_range): Differentiate cases that equality can be
17190 proven at all loops, the innermost loops or no loops.
17191 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
17192 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
17193 (finalize_partitions, distribute_loop): Don't fuse partition of
17194 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
17195 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
17196 parloop is enabled.
17197
17198 2018-01-23 Martin Liska <mliska@suse.cz>
17199
17200 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
17201 order to ignore the predictor.
17202 (PRED_POLYMORPHIC_CALL): Likewise.
17203 (PRED_RECURSIVE_CALL): Likewise.
17204
17205 2018-01-23 Martin Liska <mliska@suse.cz>
17206
17207 * tree-profile.c (tree_profiling): Print function header to
17208 aware reader which function we are working on.
17209 * value-prof.c (gimple_find_values_to_profile): Do not print
17210 not interesting value histograms.
17211
17212 2018-01-23 Martin Liska <mliska@suse.cz>
17213
17214 * profile-count.h (enum profile_quality): Add
17215 profile_uninitialized as the first value. Do not number values
17216 as they are zero based.
17217 (profile_count::verify): Update sanity check.
17218 (profile_probability::verify): Likewise.
17219
17220 2018-01-23 Nathan Sidwell <nathan@acm.org>
17221
17222 * doc/invoke.texi (ffor-scope): Deprecate.
17223
17224 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17225
17226 PR tree-optimization/83510
17227 * domwalk.c (set_all_edges_as_executable): New function.
17228 (dom_walker::dom_walker): Convert bool param
17229 "skip_unreachable_blocks" to enum reachability. Move setup of
17230 edge flags to set_all_edges_as_executable and only do it when
17231 reachability is REACHABLE_BLOCKS.
17232 * domwalk.h (enum dom_walker::reachability): New enum.
17233 (dom_walker::dom_walker): Convert bool param
17234 "skip_unreachable_blocks" to enum reachability.
17235 (set_all_edges_as_executable): New decl.
17236 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
17237 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
17238 "reachability".
17239 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
17240 but converting true to REACHABLE_BLOCKS.
17241 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
17242 * tree-vrp.c
17243 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
17244 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
17245 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
17246 REACHABLE_BLOCKS.
17247 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
17248 if check_all_array_refs will be called.
17249
17250 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17251
17252 * tree.c (selftest::test_location_wrappers): Add more test
17253 coverage.
17254
17255 2018-01-23 David Malcolm <dmalcolm@redhat.com>
17256
17257 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
17258 (selftest::test_bit_in_range): Likewise.
17259
17260 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17261
17262 PR testsuite/83888
17263 * doc/sourcebuild.texi (vect_float): Say that the selector
17264 only describes the situation when -funsafe-math-optimizations is on.
17265 (vect_float_strict): Document.
17266
17267 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
17268
17269 PR tree-optimization/83965
17270 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
17271 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
17272 instead of checking only for a reduction.
17273 (vect_recog_widen_sum_pattern): Likewise.
17274
17275 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17276
17277 * predict.c (probably_never_executed): Only use precise profile info.
17278 (compute_function_frequency): Skip after inlining hack since we now
17279 have quality checking.
17280
17281 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
17282
17283 * profile-count.h (profile_probability::very_unlikely,
17284 profile_probability::unlikely, profile_probability::even): Set
17285 precision to guessed.
17286
17287 2018-01-23 Richard Biener <rguenther@suse.de>
17288
17289 PR tree-optimization/83963
17290 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
17291 Properly terminate dominator walk when crossing the exit edge not
17292 when visiting its source block.
17293
17294 2018-01-23 Jakub Jelinek <jakub@redhat.com>
17295
17296 PR c++/83918
17297 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
17298 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
17299
17300 2018-01-22 Jakub Jelinek <jakub@redhat.com>
17301
17302 PR tree-optimization/83957
17303 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
17304 semicolon after for body surrounded by braces.
17305
17306 PR tree-optimization/83081
17307 * profile-count.h (profile_probability::split): New method.
17308 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
17309 Use profile_probability::split.
17310 (do_compare_rtx_and_jump): Fix adjustment of probabilities
17311 when splitting a single conditional jump into 2.
17312
17313 2018-01-22 David Malcolm <dmalcolm@redhat.com>
17314
17315 PR tree-optimization/69452
17316 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
17317 decl.
17318
17319 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17320
17321 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
17322 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
17323 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
17324
17325 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17326
17327 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
17328 declaration.
17329 * config/rl78/rl78.md (movdi): New define_expand.
17330 * config/rl78/rl78.c (rl78_split_movdi): New function.
17331
17332 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
17333
17334 PR target/83862
17335 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
17336 no longer used.
17337 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
17338 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
17339 128-bit to produce an UNSPEC move to get the double word with the
17340 signbit and then a shift directly to do signbit.
17341 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
17342 implementation with a new version that just does either a direct
17343 move or a regular move. Move memory interface to separate insns.
17344 Move insns so they are next to the expander.
17345 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
17346 with signbit move. Split big and little endian case.
17347 (signbit<mode>2_dm_mem_le): Likewise.
17348 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
17349 (signbit<mode>2_dm2): Likewise.
17350
17351 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17352
17353 * config/rl78/rl78.md (anddi3): New define_expand.
17354
17355 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17356
17357 * config/rl78/rl78.md (umindi3): New define_expand.
17358
17359 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17360
17361 * config/rl78/rl78.md (smindi3): New define_expand.
17362
17363 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17364
17365 * config/rl78/rl78.md (smaxdi3): New define_expand.
17366
17367 2018-01-22 Carl Love <cel@us.ibm.com>
17368
17369 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
17370 LVX_V1TI): Add macro expansion.
17371 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
17372 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
17373 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
17374 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
17375 Change check to determine if the instruction is a byte reversing
17376 entry. Fix typo in comment.
17377 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
17378 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
17379 Add def_builtin calls for new builtins.
17380 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
17381 Add define_insn expansion.
17382
17383 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17384
17385 * config/rl78/rl78.md (umaxdi3): New define_expand.
17386
17387 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
17388
17389 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
17390 for non-QImode registers.
17391
17392 2018-01-22 Richard Biener <rguenther@suse.de>
17393
17394 PR tree-optimization/83963
17395 * graphite-scop-detection.c (scop_detection::get_sese): Delay
17396 including the loop exit block.
17397 (scop_detection::merge_sese): Likewise.
17398 (scop_detection::add_scop): Do it here instead.
17399
17400 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17401
17402 * doc/sourcebuild.texi (arm_softfloat): Document.
17403
17404 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
17405
17406 PR gcc/77734
17407 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
17408 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
17409 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
17410
17411 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17412 David Edelsohn <dje.gcc@gmail.com>
17413
17414 PR target/83946
17415 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17416 Change "crset eq" to "crset 2".
17417 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17418 (*call_indirect_aix<mode>_nospec): Likewise.
17419 (*call_value_indirect_aix<mode>_nospec): Likewise.
17420 (*call_indirect_elfv2<mode>_nospec): Likewise.
17421 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
17422 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
17423 change assembly output from . to $.
17424 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17425 (indirect_jump<mode>_nospec): Change assembly output from . to $.
17426 (*tablejump<mode>_internal1_nospec): Likewise.
17427
17428 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
17429
17430 PR target/80870
17431 * config/sh/sh_optimize_sett_clrt.cc:
17432 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
17433
17434 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
17435
17436 PR tree-optimization/83940
17437 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
17438 offset_dt to vect_constant_def rather than vect_unknown_def_type.
17439 (vect_check_load_store_mask): Add a mask_dt_out parameter and
17440 use it to pass back the definition type.
17441 (vect_check_store_rhs): Likewise rhs_dt_out.
17442 (vect_build_gather_load_calls): Add a mask_dt argument and use
17443 it instead of a call to vect_is_simple_use.
17444 (vectorizable_store): Update calls to vect_check_load_store_mask
17445 and vect_check_store_rhs. Use the dt returned by the latter instead
17446 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
17447 instead of calls to vect_is_simple_use. Pass the scalar rather
17448 than the vector operand to vect_is_simple_use when handling
17449 second and subsequent copies of an rhs value.
17450 (vectorizable_load): Update calls to vect_check_load_store_mask
17451 and vect_build_gather_load_calls. Use the cached mask_dt and
17452 gs_info.offset_dt instead of calls to vect_is_simple_use.
17453
17454 2018-01-20 Jakub Jelinek <jakub@redhat.com>
17455
17456 PR middle-end/83945
17457 * tree-emutls.c: Include gimplify.h.
17458 (lower_emutls_2): New function.
17459 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
17460 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
17461 it before further processing.
17462
17463 PR target/83930
17464 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
17465 UINTVAL (trueop1) instead of INTVAL (op1).
17466
17467 2018-01-19 Jakub Jelinek <jakub@redhat.com>
17468
17469 PR debug/81570
17470 PR debug/83728
17471 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
17472 INCOMING_FRAME_SP_OFFSET if not defined.
17473 (scan_trace): Add ENTRY argument. If true and
17474 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
17475 emit a note to adjust the CFA offset.
17476 (create_cfi_notes): Adjust scan_trace callers.
17477 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
17478 INCOMING_FRAME_SP_OFFSET in the CIE.
17479 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
17480 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
17481 Likewise.
17482 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
17483 * doc/tm.texi: Regenerated.
17484
17485 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17486
17487 PR rtl-optimization/83147
17488 * lra-constraints.c (remove_inheritance_pseudos): Use
17489 lra_substitute_pseudo_within_insn.
17490
17491 2018-01-19 Tom de Vries <tom@codesourcery.com>
17492 Cesar Philippidis <cesar@codesourcery.com>
17493
17494 PR target/83920
17495 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
17496
17497 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
17498
17499 PR target/83790
17500 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
17501 spaces for function labels.
17502
17503 2018-01-19 Martin Liska <mliska@suse.cz>
17504
17505 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
17506 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
17507 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
17508 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
17509 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
17510 (PRED_CONST_RETURN): Change from 69 to 65.
17511 (PRED_NULL_RETURN): Change from 91 to 71.
17512 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
17513 (PRED_LOOP_GUARD): Change from 66 to 73.
17514
17515 2018-01-19 Martin Liska <mliska@suse.cz>
17516
17517 * predict.c (predict_insn_def): Add new assert.
17518 (struct branch_predictor): Change type to signed integer.
17519 (test_prediction_value_range): Amend test to cover
17520 PROB_UNINITIALIZED.
17521 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
17522 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
17523 (PRED_LOOP_ITERATIONS_MAX): Likewise.
17524 (PRED_LOOP_IV_COMPARE): Likewise.
17525 * predict.h (PROB_UNINITIALIZED): Define new constant.
17526
17527 2018-01-19 Martin Liska <mliska@suse.cz>
17528
17529 * predict.c (dump_prediction): Add new format for
17530 analyze_brprob.py script which is enabled with -details
17531 suboption.
17532 * profile-count.h (precise_p): New function.
17533
17534 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17535
17536 PR tree-optimization/83922
17537 * tree-vect-loop.c (vect_verify_full_masking): Return false if
17538 there are no statements that need masking.
17539 (vect_active_double_reduction_p): New function.
17540 (vect_analyze_loop_operations): Use it when handling phis that
17541 are not in the loop header.
17542
17543 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
17544
17545 PR tree-optimization/83914
17546 * tree-vect-loop.c (vectorizable_induction): Don't convert
17547 init_expr or apply the peeling adjustment for inductions
17548 that are nested within the vectorized loop.
17549
17550 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17551
17552 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
17553 instead of NEG.
17554
17555 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17556
17557 PR sanitizer/81715
17558 PR testsuite/83882
17559 * function.h (gimplify_parameters): Add gimple_seq * argument.
17560 * function.c: Include gimple.h and options.h.
17561 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
17562 for the added local temporaries if needed.
17563 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
17564 if there are any parameter cleanups, wrap whole body into a
17565 try/finally with the cleanups.
17566
17567 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
17568
17569 PR target/82964
17570 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17571 Use GET_MODE_CLASS for scalar floating point.
17572
17573 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17574
17575 PR ipa/82256
17576 patch by PaX Team
17577 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
17578 Fix call of call_cgraph_insertion_hooks.
17579
17580 2018-01-18 Martin Sebor <msebor@redhat.com>
17581
17582 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
17583
17584 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
17585
17586 PR ipa/83619
17587 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
17588 frequencies.
17589
17590 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
17591
17592 PR other/70268
17593 * common.opt: (-ffile-prefix-map): New option.
17594 * opts.c (common_handle_option): Defer it.
17595 * opts-global.c (handle_common_deferred_options): Handle it.
17596 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
17597 * file-prefix-map.h: New file.
17598 (remap_debug_filename, add_debug_prefix_map): ...here.
17599 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
17600 * final.c (debug_prefix_map, add_debug_prefix_map
17601 remap_debug_filename): Move to...
17602 * file-prefix-map.c: New file.
17603 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
17604 generalize, get rid of alloca(), use strrchr() instead of strchr().
17605 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
17606 Implement in terms of add_prefix_map().
17607 (remap_macro_filename, remap_debug_filename): Implement in term of
17608 remap_filename().
17609 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
17610 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
17611 * dbxout.c: Include file-prefix-map.h.
17612 * varasm.c: Likewise.
17613 * vmsdbgout.c: Likewise.
17614 * xcoffout.c: Likewise.
17615 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
17616 * doc/cppopts.texi (-fmacro-prefix-map): Document.
17617 * doc/invoke.texi (-ffile-prefix-map): Document.
17618 (-fdebug-prefix-map): Update description.
17619
17620 2018-01-18 Martin Liska <mliska@suse.cz>
17621
17622 * config/i386/i386.c (indirect_thunk_name): Document that also
17623 lfence is emitted.
17624 (output_indirect_thunk): Document why both instructions
17625 (pause and lfence) are generated.
17626
17627 2018-01-18 Richard Biener <rguenther@suse.de>
17628
17629 PR tree-optimization/83887
17630 * graphite-scop-detection.c
17631 (scop_detection::get_nearest_dom_with_single_entry): Remove.
17632 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
17633 (scop_detection::merge_sese): Re-implement with a flood-fill
17634 algorithm that properly finds a SESE region if it exists.
17635
17636 2018-01-18 Jakub Jelinek <jakub@redhat.com>
17637
17638 PR c/61240
17639 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
17640 pointer_diff optimizations use view_convert instead of convert.
17641
17642 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17643
17644 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17645 Generate different code for -mno-speculate-indirect-jumps.
17646 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17647 (*call_indirect_aix<mode>): Disable for
17648 -mno-speculate-indirect-jumps.
17649 (*call_indirect_aix<mode>_nospec): New define_insn.
17650 (*call_value_indirect_aix<mode>): Disable for
17651 -mno-speculate-indirect-jumps.
17652 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17653 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17654 -mno-speculate-indirect-jumps.
17655 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17656
17657 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17658
17659 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17660 long double type, set the flags for noting the default long double
17661 type, even if we don't pass or return a long double type.
17662
17663 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17664
17665 PR ipa/83051
17666 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17667 failure.
17668
17669 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17670
17671 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17672 support for merge[hl].
17673 (fold_mergehl_helper): New helper function.
17674 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17675 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17676 (altivec_vmrglw_direct): Add xxmrglw insn.
17677
17678 2018-01-17 Andrew Waterman <andrew@sifive.com>
17679
17680 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17681 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17682
17683 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17684
17685 PR lto/83121
17686 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17687 call the lto_location_cache before reading the
17688 DECL_SOURCE_LOCATION of the types.
17689
17690 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17691 Richard Sandiford <richard.sandiford@linaro.org>
17692
17693 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17694 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17695 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17696 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17697 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17698 Add declaration.
17699 * config/aarch64/constraints.md (aarch64_movti_operand):
17700 Limit immediates.
17701 * config/aarch64/predicates.md (Uti): Add new constraint.
17702
17703 2018-01-17 Carl Love <cel@us.ibm.com>
17704
17705 * config/rs6000/vsx.md (define_expand xl_len_r,
17706 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17707 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17708 lxvll.
17709 (define_expand, define_insn): Move the shift left from the
17710 define_insn to the define_expand for lxvl and stxvl instructions.
17711 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17712 and XL_LEN_R definitions to PURE.
17713
17714 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17715
17716 * config/i386/i386.c (indirect_thunk_name): Declare regno
17717 as unsigned int. Compare regno with INVALID_REGNUM.
17718 (output_indirect_thunk): Ditto.
17719 (output_indirect_thunk_function): Ditto.
17720 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17721 in the call to output_indirect_thunk_function.
17722
17723 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17724
17725 PR middle-end/83884
17726 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17727 rather than the size of inner_type to determine the stack slot size
17728 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17729
17730 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17731
17732 PR target/83546
17733 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17734 to PTA_SILVERMONT.
17735
17736 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17737
17738 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17739 endian Linux systems to optionally enable multilibs for selecting
17740 the long double type if the user configured an explicit type.
17741 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17742 have no long double multilibs if not defined.
17743 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17744 warn if the user used -mabi={ieee,ibm}longdouble and we built
17745 multilibs for long double.
17746 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17747 appropriate multilib option.
17748 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17749 multilib options.
17750 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17751 for building long double multilibs.
17752 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17753
17754 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17755
17756 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17757 copies.
17758
17759 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17760 64 bits.
17761 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17762 128 bits.
17763
17764 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17765 variables.
17766
17767 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17768 return value.
17769
17770 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17771
17772 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17773 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17774
17775 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17776
17777 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17778 different rtl trees depending on TARGET_64BIT.
17779 (rs6000_gen_lvx): Likewise.
17780
17781 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17782
17783 * config/visium/visium.md (nop): Tweak comment.
17784 (hazard_nop): Likewise.
17785
17786 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17787
17788 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17789 -mspeculate-indirect-jumps.
17790 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17791 for -mno-speculate-indirect-jumps.
17792 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17793 (*call_value_indirect_elfv2<mode>): Disable for
17794 -mno-speculate-indirect-jumps.
17795 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17796 (indirect_jump): Emit different RTL for
17797 -mno-speculate-indirect-jumps.
17798 (*indirect_jump<mode>): Disable for
17799 -mno-speculate-indirect-jumps.
17800 (*indirect_jump<mode>_nospec): New define_insn.
17801 (tablejump): Emit different RTL for
17802 -mno-speculate-indirect-jumps.
17803 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17804 (tablejumpsi_nospec): New define_expand.
17805 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17806 (tablejumpdi_nospec): New define_expand.
17807 (*tablejump<mode>_internal1): Disable for
17808 -mno-speculate-indirect-jumps.
17809 (*tablejump<mode>_internal1_nospec): New define_insn.
17810 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17811 option.
17812
17813 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17814
17815 * caller-save.c (insert_save): Drop unnecessary parameter. All
17816 callers updated.
17817
17818 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17819 Richard Biener <rguenth@suse.de>
17820
17821 PR libgomp/83590
17822 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17823 return early, inline manually is_gimple_sizepos. Make sure if we
17824 call gimplify_expr we don't end up with a gimple constant.
17825 * tree.c (variably_modified_type_p): Don't return true for
17826 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17827 * gimplify.h (is_gimple_sizepos): Remove.
17828
17829 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17830
17831 PR tree-optimization/83857
17832 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17833 vectorizable_live_operation for pure SLP statements.
17834 (vectorizable_live_operation): Handle PHIs.
17835
17836 2018-01-16 Richard Biener <rguenther@suse.de>
17837
17838 PR tree-optimization/83867
17839 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17840 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17841
17842 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17843
17844 PR c/83844
17845 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17846 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17847 If off is not INTEGER_CST, issue a may not be aligned warning
17848 rather than isn't aligned. Use isn%'t rather than isn't.
17849 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17850 into MULT_EXPR.
17851 <case MULT_EXPR>: Improve the case when bottom and one of the
17852 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17853 operand, in that case check if the other operand is multiple of
17854 bottom divided by the INTEGER_CST operand.
17855
17856 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17857
17858 PR target/83858
17859 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17860 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17861 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17862 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17863 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17864 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17865 (pa_function_arg_size): New function.
17866
17867 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17868
17869 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17870 in a separate statement.
17871
17872 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17873
17874 PR tree-optimization/83847
17875 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17876 group gathers and scatters.
17877
17878 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17879
17880 PR rtl-optimization/86620
17881 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17882
17883 PR rtl-optimization/83213
17884 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17885 to last if both are JUMP_INSNs.
17886
17887 PR tree-optimization/83843
17888 * gimple-ssa-store-merging.c
17889 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17890 store_immediate_info for bswap/nop orig_stores.
17891
17892 2018-01-15 Andrew Waterman <andrew@sifive.com>
17893
17894 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17895 !TARGET_MUL.
17896 <UDIV>: Increase cost if !TARGET_DIV.
17897
17898 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17899
17900 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17901 (define_attr "cr_logical_3op"): New.
17902 (cceq_ior_compare): Adjust.
17903 (cceq_ior_compare_complement): Adjust.
17904 (*cceq_rev_compare): Adjust.
17905 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17906 (is_cracked_insn): Adjust.
17907 (insn_must_be_first_in_group): Adjust.
17908 * config/rs6000/40x.md: Adjust.
17909 * config/rs6000/440.md: Adjust.
17910 * config/rs6000/476.md: Adjust.
17911 * config/rs6000/601.md: Adjust.
17912 * config/rs6000/603.md: Adjust.
17913 * config/rs6000/6xx.md: Adjust.
17914 * config/rs6000/7450.md: Adjust.
17915 * config/rs6000/7xx.md: Adjust.
17916 * config/rs6000/8540.md: Adjust.
17917 * config/rs6000/cell.md: Adjust.
17918 * config/rs6000/e300c2c3.md: Adjust.
17919 * config/rs6000/e500mc.md: Adjust.
17920 * config/rs6000/e500mc64.md: Adjust.
17921 * config/rs6000/e5500.md: Adjust.
17922 * config/rs6000/e6500.md: Adjust.
17923 * config/rs6000/mpc.md: Adjust.
17924 * config/rs6000/power4.md: Adjust.
17925 * config/rs6000/power5.md: Adjust.
17926 * config/rs6000/power6.md: Adjust.
17927 * config/rs6000/power7.md: Adjust.
17928 * config/rs6000/power8.md: Adjust.
17929 * config/rs6000/power9.md: Adjust.
17930 * config/rs6000/rs64.md: Adjust.
17931 * config/rs6000/titan.md: Adjust.
17932
17933 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17934
17935 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17936 ix86_indirect_branch_register logic.
17937
17938 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17939
17940 * config/i386/constraints.md (Bs): Update
17941 ix86_indirect_branch_register check. Don't check
17942 ix86_indirect_branch_register with GOT_memory_operand.
17943 (Bw): Likewise.
17944 * config/i386/predicates.md (GOT_memory_operand): Don't check
17945 ix86_indirect_branch_register here.
17946 (GOT32_symbol_operand): Likewise.
17947
17948 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17949
17950 * config/i386/predicates.md (constant_call_address_operand):
17951 Rewrite ix86_indirect_branch_register logic.
17952 (sibcall_insn_operand): Likewise.
17953
17954 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17955
17956 * config/i386/constraints.md (Bs): Replace
17957 ix86_indirect_branch_thunk_register with
17958 ix86_indirect_branch_register.
17959 (Bw): Likewise.
17960 * config/i386/i386.md (indirect_jump): Likewise.
17961 (tablejump): Likewise.
17962 (*sibcall_memory): Likewise.
17963 (*sibcall_value_memory): Likewise.
17964 Peepholes of indirect call and jump via memory: Likewise.
17965 * config/i386/i386.opt: Likewise.
17966 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17967 (GOT_memory_operand): Likewise.
17968 (call_insn_operand): Likewise.
17969 (sibcall_insn_operand): Likewise.
17970 (GOT32_symbol_operand): Likewise.
17971
17972 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17973
17974 PR middle-end/83837
17975 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17976 type rather than type addr's type points to.
17977 (expand_omp_atomic_mutex): Likewise.
17978 (expand_omp_atomic): Likewise.
17979
17980 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17981
17982 PR target/83839
17983 * config/i386/i386.c (output_indirect_thunk_function): Use
17984 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17985 for __x86_return_thunk.
17986
17987 2018-01-15 Richard Biener <rguenther@suse.de>
17988
17989 PR middle-end/83850
17990 * expmed.c (extract_bit_field_1): Fix typo.
17991
17992 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17993
17994 PR target/83687
17995 * config/arm/iterators.md (VF): New mode iterator.
17996 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17997 Remove integer-related logic from pattern.
17998 (neon_vabd<mode>_3): Likewise.
17999
18000 2018-01-15 Jakub Jelinek <jakub@redhat.com>
18001
18002 PR middle-end/82694
18003 * common.opt (fstrict-overflow): No longer an alias.
18004 (fwrapv-pointer): New option.
18005 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18006 also for pointer types based on flag_wrapv_pointer.
18007 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18008 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18009 opts->x_flag_wrapv got set.
18010 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18011 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18012 POINTER_TYPE_OVERFLOW_UNDEFINED.
18013 * match.pd: Likewise in address comparison pattern.
18014 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18015
18016 2018-01-15 Richard Biener <rguenther@suse.de>
18017
18018 PR lto/83804
18019 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18020 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
18021 Reset type names to their identifier if their TYPE_DECL doesn't
18022 have linkage (and thus is used for ODR and devirt).
18023 (save_debug_info_for_decl): Remove.
18024 (save_debug_info_for_type): Likewise.
18025 (add_tree_to_fld_list): Adjust.
18026 * tree-pretty-print.c (dump_generic_node): Make dumping of
18027 type names more robust.
18028
18029 2018-01-15 Richard Biener <rguenther@suse.de>
18030
18031 * BASE-VER: Bump to 8.0.1.
18032
18033 2018-01-14 Martin Sebor <msebor@redhat.com>
18034
18035 PR other/83508
18036 * builtins.c (check_access): Avoid warning when the no-warning bit
18037 is set.
18038
18039 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
18040
18041 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18042 * ira-color (allocno_hard_regs_compare): Likewise.
18043
18044 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
18045
18046 PR target/83013
18047 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18048 Use .pushsection/.popsection.
18049
18050 2018-01-14 Martin Sebor <msebor@redhat.com>
18051
18052 PR c++/81327
18053 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18054
18055 2018-01-14 Jakub Jelinek <jakub@redhat.com>
18056
18057 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18058 entry from extra_headers.
18059 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18060 extra_headers, make the list bitwise identical to the i?86-*-* one.
18061
18062 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18063
18064 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18065 -mcmodel=large with -mindirect-branch=thunk,
18066 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
18067 -mfunction-return=thunk-extern.
18068 * doc/invoke.texi: Document -mcmodel=large is incompatible with
18069 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
18070 -mfunction-return=thunk and -mfunction-return=thunk-extern.
18071
18072 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18073
18074 * config/i386/i386.c (print_reg): Print the name of the full
18075 integer register without '%'.
18076 (ix86_print_operand): Handle 'V'.
18077 * doc/extend.texi: Document 'V' modifier.
18078
18079 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18080
18081 * config/i386/constraints.md (Bs): Disallow memory operand for
18082 -mindirect-branch-register.
18083 (Bw): Likewise.
18084 * config/i386/predicates.md (indirect_branch_operand): Likewise.
18085 (GOT_memory_operand): Likewise.
18086 (call_insn_operand): Likewise.
18087 (sibcall_insn_operand): Likewise.
18088 (GOT32_symbol_operand): Likewise.
18089 * config/i386/i386.md (indirect_jump): Call convert_memory_address
18090 for -mindirect-branch-register.
18091 (tablejump): Likewise.
18092 (*sibcall_memory): Likewise.
18093 (*sibcall_value_memory): Likewise.
18094 Disallow peepholes of indirect call and jump via memory for
18095 -mindirect-branch-register.
18096 (*call_pop): Replace m with Bw.
18097 (*call_value_pop): Likewise.
18098 (*sibcall_pop_memory): Replace m with Bs.
18099 * config/i386/i386.opt (mindirect-branch-register): New option.
18100 * doc/invoke.texi: Document -mindirect-branch-register option.
18101
18102 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18103
18104 * config/i386/i386-protos.h (ix86_output_function_return): New.
18105 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
18106 set function_return_type.
18107 (indirect_thunk_name): Add ret_p to indicate thunk for function
18108 return.
18109 (output_indirect_thunk_function): Pass false to
18110 indirect_thunk_name.
18111 (ix86_output_indirect_branch_via_reg): Likewise.
18112 (ix86_output_indirect_branch_via_push): Likewise.
18113 (output_indirect_thunk_function): Create alias for function
18114 return thunk if regno < 0.
18115 (ix86_output_function_return): New function.
18116 (ix86_handle_fndecl_attribute): Handle function_return.
18117 (ix86_attribute_table): Add function_return.
18118 * config/i386/i386.h (machine_function): Add
18119 function_return_type.
18120 * config/i386/i386.md (simple_return_internal): Use
18121 ix86_output_function_return.
18122 (simple_return_internal_long): Likewise.
18123 * config/i386/i386.opt (mfunction-return=): New option.
18124 (indirect_branch): Mention -mfunction-return=.
18125 * doc/extend.texi: Document function_return function attribute.
18126 * doc/invoke.texi: Document -mfunction-return= option.
18127
18128 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
18129
18130 * config/i386/i386-opts.h (indirect_branch): New.
18131 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
18132 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
18133 with local indirect jump when converting indirect call and jump.
18134 (ix86_set_indirect_branch_type): New.
18135 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
18136 (indirectlabelno): New.
18137 (indirect_thunk_needed): Likewise.
18138 (indirect_thunk_bnd_needed): Likewise.
18139 (indirect_thunks_used): Likewise.
18140 (indirect_thunks_bnd_used): Likewise.
18141 (INDIRECT_LABEL): Likewise.
18142 (indirect_thunk_name): Likewise.
18143 (output_indirect_thunk): Likewise.
18144 (output_indirect_thunk_function): Likewise.
18145 (ix86_output_indirect_branch_via_reg): Likewise.
18146 (ix86_output_indirect_branch_via_push): Likewise.
18147 (ix86_output_indirect_branch): Likewise.
18148 (ix86_output_indirect_jmp): Likewise.
18149 (ix86_code_end): Call output_indirect_thunk_function if needed.
18150 (ix86_output_call_insn): Call ix86_output_indirect_branch if
18151 needed.
18152 (ix86_handle_fndecl_attribute): Handle indirect_branch.
18153 (ix86_attribute_table): Add indirect_branch.
18154 * config/i386/i386.h (machine_function): Add indirect_branch_type
18155 and has_local_indirect_jump.
18156 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
18157 to true.
18158 (tablejump): Likewise.
18159 (*indirect_jump): Use ix86_output_indirect_jmp.
18160 (*tablejump_1): Likewise.
18161 (simple_return_indirect_internal): Likewise.
18162 * config/i386/i386.opt (mindirect-branch=): New option.
18163 (indirect_branch): New.
18164 (keep): Likewise.
18165 (thunk): Likewise.
18166 (thunk-inline): Likewise.
18167 (thunk-extern): Likewise.
18168 * doc/extend.texi: Document indirect_branch function attribute.
18169 * doc/invoke.texi: Document -mindirect-branch= option.
18170
18171 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
18172
18173 PR ipa/83051
18174 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
18175
18176 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
18177
18178 * ipa-inline.c (want_inline_small_function_p): Return false if
18179 inlining has already failed with CIF_FINAL_ERROR.
18180 (update_caller_keys): Call want_inline_small_function_p before
18181 can_inline_edge_p.
18182 (update_callee_keys): Likewise.
18183
18184 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
18185
18186 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
18187 New function.
18188 (rs6000_quadword_masked_address_p): Likewise.
18189 (quad_aligned_load_p): Likewise.
18190 (quad_aligned_store_p): Likewise.
18191 (const_load_sequence_p): Add comment to describe the outer-most loop.
18192 (mimic_memory_attributes_and_flags): New function.
18193 (rs6000_gen_stvx): Likewise.
18194 (replace_swapped_aligned_store): Likewise.
18195 (rs6000_gen_lvx): Likewise.
18196 (replace_swapped_aligned_load): Likewise.
18197 (replace_swapped_load_constant): Capitalize argument name in
18198 comment describing this function.
18199 (rs6000_analyze_swaps): Add a third pass to search for vector loads
18200 and stores that access quad-word aligned addresses and replace
18201 with stvx or lvx instructions when appropriate.
18202 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
18203 New function prototype.
18204 (rs6000_quadword_masked_address_p): Likewise.
18205 (rs6000_gen_lvx): Likewise.
18206 (rs6000_gen_stvx): Likewise.
18207 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
18208 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
18209 when memory address is aligned.
18210 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
18211 this split to select lvx instruction when memory address is aligned.
18212 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
18213 instruction when memory address is aligned.
18214 (*vsx_le_perm_load_v16qi): Likewise.
18215 (four unnamed splitters): Modify to select the stvx instruction
18216 when memory is aligned.
18217
18218 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
18219
18220 * predict.c (determine_unlikely_bbs): Handle correctly BBs
18221 which appears in the queue multiple times.
18222
18223 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18224 Alan Hayward <alan.hayward@arm.com>
18225 David Sherwood <david.sherwood@arm.com>
18226
18227 * tree-vectorizer.h (vec_lower_bound): New structure.
18228 (_loop_vec_info): Add check_nonzero and lower_bounds.
18229 (LOOP_VINFO_CHECK_NONZERO): New macro.
18230 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
18231 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
18232 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
18233 fields. Make seg_len the distance travelled, not including the
18234 access size.
18235 (dr_direction_indicator): Declare.
18236 (dr_zero_step_indicator): Likewise.
18237 (dr_known_forward_stride_p): Likewise.
18238 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
18239 tree-ssanames.h.
18240 (runtime_alias_check_p): Allow runtime alias checks with
18241 variable strides.
18242 (operator ==): Compare access_size and align.
18243 (prune_runtime_alias_test_list): Rework for new distinction between
18244 the access_size and seg_len.
18245 (create_intersect_range_checks_index): Likewise. Cope with polynomial
18246 segment lengths.
18247 (get_segment_min_max): New function.
18248 (create_intersect_range_checks): Use it.
18249 (dr_step_indicator): New function.
18250 (dr_direction_indicator): Likewise.
18251 (dr_zero_step_indicator): Likewise.
18252 (dr_known_forward_stride_p): Likewise.
18253 * tree-loop-distribution.c (data_ref_segment_size): Return
18254 DR_STEP * (niters - 1).
18255 (compute_alias_check_pairs): Update call to the dr_with_seg_len
18256 constructor.
18257 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
18258 (vect_preserves_scalar_order_p): New function, split out from...
18259 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
18260 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
18261 (vect_vfa_access_size): New function.
18262 (vect_vfa_align): Likewise.
18263 (vect_compile_time_alias): Take access_size_a and access_b arguments.
18264 (dump_lower_bound): New function.
18265 (vect_check_lower_bound): Likewise.
18266 (vect_small_gap_p): Likewise.
18267 (vectorizable_with_step_bound_p): Likewise.
18268 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
18269 depencies if the vectorization factor is 1. Convert the checks
18270 for nonzero steps into checks on the bounds of DR_STEP. Try using
18271 a bunds check for variable steps if the minimum required step is
18272 relatively small. Update calls to the dr_with_seg_len
18273 constructor and to vect_compile_time_alias.
18274 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
18275 function.
18276 (vect_loop_versioning): Call it.
18277 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
18278 when retrying.
18279 (vect_estimate_min_profitable_iters): Account for any bounds checks.
18280
18281 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18282 Alan Hayward <alan.hayward@arm.com>
18283 David Sherwood <david.sherwood@arm.com>
18284
18285 * doc/sourcebuild.texi (vect_scatter_store): Document.
18286 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
18287 optabs.
18288 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
18289 Document.
18290 * genopinit.c (main): Add supports_vec_scatter_store and
18291 supports_vec_scatter_store_cached to target_optabs.
18292 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
18293 IFN_MASK_SCATTER_STORE.
18294 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
18295 functions.
18296 * internal-fn.h (internal_store_fn_p): Declare.
18297 (internal_fn_stored_value_index): Likewise.
18298 * internal-fn.c (scatter_store_direct): New macro.
18299 (expand_scatter_store_optab_fn): New function.
18300 (direct_scatter_store_optab_supported_p): New macro.
18301 (internal_store_fn_p): New function.
18302 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
18303 IFN_MASK_SCATTER_STORE.
18304 (internal_fn_mask_index): Likewise.
18305 (internal_fn_stored_value_index): New function.
18306 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
18307 for scatter stores.
18308 * optabs-query.h (supports_vec_scatter_store_p): Declare.
18309 * optabs-query.c (supports_vec_scatter_store_p): New function.
18310 * tree-vectorizer.h (vect_get_store_rhs): Declare.
18311 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
18312 true for scatter stores.
18313 (vect_gather_scatter_fn_p): Handle scatter stores too.
18314 (vect_check_gather_scatter): Consider using scatter stores if
18315 supports_vec_scatter_store_p.
18316 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
18317 scatter stores too.
18318 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18319 internal_fn_stored_value_index.
18320 (check_load_store_masking): Handle scatter stores too.
18321 (vect_get_store_rhs): Make public.
18322 (vectorizable_call): Use internal_store_fn_p.
18323 (vectorizable_store): Handle scatter store internal functions.
18324 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
18325 when deciding whether the end of the group has been reached.
18326 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
18327 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
18328 (mask_scatter_store<mode>): New insns.
18329
18330 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18331 Alan Hayward <alan.hayward@arm.com>
18332 David Sherwood <david.sherwood@arm.com>
18333
18334 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
18335 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
18336 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
18337 function.
18338 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
18339 Use vect_truncate_gather_scatter_offset if we can't treat the
18340 operation as a normal gather load or scatter store.
18341 (get_group_load_store_type): Take the gather_scatter_info
18342 as argument. Try using a gather load or scatter store for
18343 single-element groups.
18344 (get_load_store_type): Update calls to get_group_load_store_type
18345 and vect_use_strided_gather_scatters_p.
18346
18347 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18348 Alan Hayward <alan.hayward@arm.com>
18349 David Sherwood <david.sherwood@arm.com>
18350
18351 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
18352 optional tree argument.
18353 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
18354 null target hooks.
18355 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
18356 but continue to use the current value as a fallback.
18357 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
18358 to compare the updates.
18359 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
18360 (get_load_store_type): Use it when handling a strided access.
18361 (vect_get_strided_load_store_ops): New function.
18362 (vect_get_data_ptr_increment): Likewise.
18363 (vectorizable_load): Handle strided gather loads. Always pass
18364 a step to vect_create_data_ref_ptr and bump_vector_ptr.
18365
18366 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18367 Alan Hayward <alan.hayward@arm.com>
18368 David Sherwood <david.sherwood@arm.com>
18369
18370 * doc/md.texi (gather_load@var{m}): Document.
18371 (mask_gather_load@var{m}): Likewise.
18372 * genopinit.c (main): Add supports_vec_gather_load and
18373 supports_vec_gather_load_cached to target_optabs.
18374 * optabs-tree.c (init_tree_optimization_optabs): Use
18375 ggc_cleared_alloc to allocate target_optabs.
18376 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
18377 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
18378 functions.
18379 * internal-fn.h (internal_load_fn_p): Declare.
18380 (internal_gather_scatter_fn_p): Likewise.
18381 (internal_fn_mask_index): Likewise.
18382 (internal_gather_scatter_fn_supported_p): Likewise.
18383 * internal-fn.c (gather_load_direct): New macro.
18384 (expand_gather_load_optab_fn): New function.
18385 (direct_gather_load_optab_supported_p): New macro.
18386 (direct_internal_fn_optab): New function.
18387 (internal_load_fn_p): Likewise.
18388 (internal_gather_scatter_fn_p): Likewise.
18389 (internal_fn_mask_index): Likewise.
18390 (internal_gather_scatter_fn_supported_p): Likewise.
18391 * optabs-query.c (supports_at_least_one_mode_p): New function.
18392 (supports_vec_gather_load_p): Likewise.
18393 * optabs-query.h (supports_vec_gather_load_p): Declare.
18394 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
18395 and memory_type field.
18396 (NUM_PATTERNS): Bump to 15.
18397 * tree-vect-data-refs.c: Include internal-fn.h.
18398 (vect_gather_scatter_fn_p): New function.
18399 (vect_describe_gather_scatter_call): Likewise.
18400 (vect_check_gather_scatter): Try using internal functions for
18401 gather loads. Recognize existing calls to a gather load function.
18402 (vect_analyze_data_refs): Consider using gather loads if
18403 supports_vec_gather_load_p.
18404 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
18405 (vect_get_gather_scatter_offset_type): Likewise.
18406 (vect_convert_mask_for_vectype): Likewise.
18407 (vect_add_conversion_to_patterm): Likewise.
18408 (vect_try_gather_scatter_pattern): Likewise.
18409 (vect_recog_gather_scatter_pattern): New pattern recognizer.
18410 (vect_vect_recog_func_ptrs): Add it.
18411 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
18412 internal_fn_mask_index and internal_gather_scatter_fn_p.
18413 (check_load_store_masking): Take the gather_scatter_info as an
18414 argument and handle gather loads.
18415 (vect_get_gather_scatter_ops): New function.
18416 (vectorizable_call): Check internal_load_fn_p.
18417 (vectorizable_load): Likewise. Handle gather load internal
18418 functions.
18419 (vectorizable_store): Update call to check_load_store_masking.
18420 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
18421 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
18422 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
18423 (aarch64_gather_scale_operand_d): New predicates.
18424 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
18425 (mask_gather_load<mode>): New insns.
18426
18427 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18428 Alan Hayward <alan.hayward@arm.com>
18429 David Sherwood <david.sherwood@arm.com>
18430
18431 * optabs.def (fold_left_plus_optab): New optab.
18432 * doc/md.texi (fold_left_plus_@var{m}): Document.
18433 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
18434 * internal-fn.c (fold_left_direct): Define.
18435 (expand_fold_left_optab_fn): Likewise.
18436 (direct_fold_left_optab_supported_p): Likewise.
18437 * fold-const-call.c (fold_const_fold_left): New function.
18438 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
18439 * tree-parloops.c (valid_reduction_p): New function.
18440 (gather_scalar_reductions): Use it.
18441 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
18442 (vect_finish_replace_stmt): Declare.
18443 * tree-vect-loop.c (fold_left_reduction_fn): New function.
18444 (needs_fold_left_reduction_p): New function, split out from...
18445 (vect_is_simple_reduction): ...here. Accept reductions that
18446 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
18447 (vect_force_simple_reduction): Also store the reduction type in
18448 the assignment's STMT_VINFO_REDUC_TYPE.
18449 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
18450 (merge_with_identity): New function.
18451 (vect_expand_fold_left): Likewise.
18452 (vectorize_fold_left_reduction): Likewise.
18453 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
18454 scalar phi in place for it. Check for target support and reject
18455 cases that would reassociate the operation. Defer the transform
18456 phase to vectorize_fold_left_reduction.
18457 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
18458 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
18459 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
18460
18461 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18462
18463 * tree-if-conv.c (predicate_mem_writes): Remove redundant
18464 call to ifc_temp_var.
18465
18466 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18467 Alan Hayward <alan.hayward@arm.com>
18468 David Sherwood <david.sherwood@arm.com>
18469
18470 * target.def (legitimize_address_displacement): Take the original
18471 offset as a poly_int.
18472 * targhooks.h (default_legitimize_address_displacement): Update
18473 accordingly.
18474 * targhooks.c (default_legitimize_address_displacement): Likewise.
18475 * doc/tm.texi: Regenerate.
18476 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
18477 as an argument, moving assert of ad->disp == ad->disp_term to...
18478 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
18479 Try calling targetm.legitimize_address_displacement before expanding
18480 the address rather than afterwards, and adjust for the new interface.
18481 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
18482 Match the new hook interface. Handle SVE addresses.
18483 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
18484 new hook interface.
18485
18486 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18487
18488 * Makefile.in (OBJS): Add early-remat.o.
18489 * target.def (select_early_remat_modes): New hook.
18490 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
18491 * doc/tm.texi: Regenerate.
18492 * targhooks.h (default_select_early_remat_modes): Declare.
18493 * targhooks.c (default_select_early_remat_modes): New function.
18494 * timevar.def (TV_EARLY_REMAT): New timevar.
18495 * passes.def (pass_early_remat): New pass.
18496 * tree-pass.h (make_pass_early_remat): Declare.
18497 * early-remat.c: New file.
18498 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
18499 function.
18500 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
18501
18502 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18503 Alan Hayward <alan.hayward@arm.com>
18504 David Sherwood <david.sherwood@arm.com>
18505
18506 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
18507 vfm1 with a bound_epilog parameter.
18508 (vect_do_peeling): Update calls accordingly, and move the prologue
18509 call earlier in the function. Treat the base bound_epilog as 0 for
18510 fully-masked loops and retain vf - 1 for other loops. Add 1 to
18511 this base when peeling for gaps.
18512 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
18513 with fully-masked loops.
18514 (vect_estimate_min_profitable_iters): Handle the single peeled
18515 iteration in that case.
18516
18517 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18518 Alan Hayward <alan.hayward@arm.com>
18519 David Sherwood <david.sherwood@arm.com>
18520
18521 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
18522 single-element interleaving even if the size is not a power of 2.
18523 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
18524 accesses for single-element interleaving if the group size is
18525 not a power of 2.
18526
18527 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18528 Alan Hayward <alan.hayward@arm.com>
18529 David Sherwood <david.sherwood@arm.com>
18530
18531 * doc/md.texi (fold_extract_last_@var{m}): Document.
18532 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
18533 * optabs.def (fold_extract_last_optab): New optab.
18534 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
18535 * internal-fn.c (fold_extract_direct): New macro.
18536 (expand_fold_extract_optab_fn): Likewise.
18537 (direct_fold_extract_optab_supported_p): Likewise.
18538 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
18539 * tree-vect-loop.c (vect_model_reduction_cost): Handle
18540 EXTRACT_LAST_REDUCTION.
18541 (get_initial_def_for_reduction): Do not create an initial vector
18542 for EXTRACT_LAST_REDUCTION reductions.
18543 (vectorizable_reduction): Leave the scalar phi in place for
18544 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
18545 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
18546 epilogue code for EXTRACT_LAST_REDUCTION and defer the
18547 transform phase to vectorizable_condition.
18548 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
18549 split out from...
18550 (vect_finish_stmt_generation): ...here.
18551 (vect_finish_replace_stmt): New function.
18552 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
18553 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
18554 pattern.
18555 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
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/md.texi (extract_last_@var{m}): Document.
18562 * optabs.def (extract_last_optab): New optab.
18563 * internal-fn.def (EXTRACT_LAST): New internal function.
18564 * internal-fn.c (cond_unary_direct): New macro.
18565 (expand_cond_unary_optab_fn): Likewise.
18566 (direct_cond_unary_optab_supported_p): Likewise.
18567 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
18568 loops using EXTRACT_LAST.
18569 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
18570 (extract_last_<mode>): ...this optab.
18571 (vec_extract<mode><Vel>): Update accordingly.
18572
18573 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18574 Alan Hayward <alan.hayward@arm.com>
18575 David Sherwood <david.sherwood@arm.com>
18576
18577 * target.def (empty_mask_is_expensive): New hook.
18578 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
18579 * doc/tm.texi: Regenerate.
18580 * targhooks.h (default_empty_mask_is_expensive): Declare.
18581 * targhooks.c (default_empty_mask_is_expensive): New function.
18582 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
18583 if the target says that empty masks are expensive.
18584 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
18585 New function.
18586 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
18587
18588 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18589 Alan Hayward <alan.hayward@arm.com>
18590 David Sherwood <david.sherwood@arm.com>
18591
18592 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
18593 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
18594 (vect_use_loop_mask_for_alignment_p): New function.
18595 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
18596 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
18597 niters_skip argument. Make sure that the first niters_skip elements
18598 of the first iteration are inactive.
18599 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
18600 Update call to vect_set_loop_masks_directly.
18601 (get_misalign_in_elems): New function, split out from...
18602 (vect_gen_prolog_loop_niters): ...here.
18603 (vect_update_init_of_dr): Take a code argument that specifies whether
18604 the adjustment should be added or subtracted.
18605 (vect_update_init_of_drs): Likewise.
18606 (vect_prepare_for_masked_peels): New function.
18607 (vect_do_peeling): Skip prologue peeling if we're using a mask
18608 instead. Update call to vect_update_inits_of_drs.
18609 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18610 mask_skip_niters.
18611 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
18612 alignment. Do not include the number of peeled iterations in
18613 the minimum threshold in that case.
18614 (vectorizable_induction): Adjust the start value down by
18615 LOOP_VINFO_MASK_SKIP_NITERS iterations.
18616 (vect_transform_loop): Call vect_prepare_for_masked_peels.
18617 Take the number of skipped iterations into account when calculating
18618 the loop bounds.
18619 * tree-vect-stmts.c (vect_gen_while_not): New function.
18620
18621 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18622 Alan Hayward <alan.hayward@arm.com>
18623 David Sherwood <david.sherwood@arm.com>
18624
18625 * doc/sourcebuild.texi (vect_fully_masked): Document.
18626 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
18627 default value to 0.
18628 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
18629 split out from...
18630 (vect_analyze_loop_2): ...here. Don't check the vectorization
18631 factor against the number of loop iterations if the loop is
18632 fully-masked.
18633
18634 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18635 Alan Hayward <alan.hayward@arm.com>
18636 David Sherwood <david.sherwood@arm.com>
18637
18638 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
18639 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
18640 (dump_groups): Update accordingly.
18641 (iv_use::mem_type): New member variable.
18642 (address_p): New function.
18643 (record_use): Add a mem_type argument and initialize the new
18644 mem_type field.
18645 (record_group_use): Add a mem_type argument. Use address_p.
18646 Remove obsolete null checks of base_object. Update call to record_use.
18647 (find_interesting_uses_op): Update call to record_group_use.
18648 (find_interesting_uses_cond): Likewise.
18649 (find_interesting_uses_address): Likewise.
18650 (get_mem_type_for_internal_fn): New function.
18651 (find_address_like_use): Likewise.
18652 (find_interesting_uses_stmt): Try find_address_like_use before
18653 calling find_interesting_uses_op.
18654 (addr_offset_valid_p): Use the iv mem_type field as the type
18655 of the addressed memory.
18656 (add_autoinc_candidates): Likewise.
18657 (get_address_cost): Likewise.
18658 (split_small_address_groups_p): Use address_p.
18659 (split_address_groups): Likewise.
18660 (add_iv_candidate_for_use): Likewise.
18661 (autoinc_possible_for_pair): Likewise.
18662 (rewrite_groups): Likewise.
18663 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18664 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18665 (get_alias_ptr_type_for_ptr_address): New function.
18666 (rewrite_use_address): Rewrite address uses in calls that were
18667 identified by find_address_like_use.
18668
18669 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18670 Alan Hayward <alan.hayward@arm.com>
18671 David Sherwood <david.sherwood@arm.com>
18672
18673 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18674 TARGET_MEM_REFs.
18675 * gimple-expr.h (is_gimple_addressable: Likewise.
18676 * gimple-expr.c (is_gimple_address): Likewise.
18677 * internal-fn.c (expand_call_mem_ref): New function.
18678 (expand_mask_load_optab_fn): Use it.
18679 (expand_mask_store_optab_fn): Likewise.
18680
18681 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18682 Alan Hayward <alan.hayward@arm.com>
18683 David Sherwood <david.sherwood@arm.com>
18684
18685 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18686 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18687 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18688 (cond_umax@var{mode}): Document.
18689 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18690 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18691 (cond_umin_optab, cond_umax_optab): New optabs.
18692 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18693 (COND_IOR, COND_XOR): New internal functions.
18694 * internal-fn.h (get_conditional_internal_fn): Declare.
18695 * internal-fn.c (cond_binary_direct): New macro.
18696 (expand_cond_binary_optab_fn): Likewise.
18697 (direct_cond_binary_optab_supported_p): Likewise.
18698 (get_conditional_internal_fn): New function.
18699 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18700 Cope with reduction statements that are vectorized as calls rather
18701 than assignments.
18702 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18703 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18704 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18705 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18706 (UNSPEC_COND_EOR): New unspecs.
18707 (optab): Add mappings for them.
18708 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18709 (sve_int_op, sve_fp_op): New int attributes.
18710
18711 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18712 Alan Hayward <alan.hayward@arm.com>
18713 David Sherwood <david.sherwood@arm.com>
18714
18715 * optabs.def (while_ult_optab): New optab.
18716 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18717 * internal-fn.def (WHILE_ULT): New internal function.
18718 * internal-fn.h (direct_internal_fn_supported_p): New override
18719 that takes two types as argument.
18720 * internal-fn.c (while_direct): New macro.
18721 (expand_while_optab_fn): New function.
18722 (convert_optab_supported_p): Likewise.
18723 (direct_while_optab_supported_p): New macro.
18724 * wide-int.h (wi::udiv_ceil): New function.
18725 * tree-vectorizer.h (rgroup_masks): New structure.
18726 (vec_loop_masks): New typedef.
18727 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18728 and fully_masked_p.
18729 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18730 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18731 (vect_max_vf): New function.
18732 (slpeel_make_loop_iterate_ntimes): Delete.
18733 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18734 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18735 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18736 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18737 internal-fn.h, stor-layout.h and optabs-query.h.
18738 (vect_set_loop_mask): New function.
18739 (add_preheader_seq): Likewise.
18740 (add_header_seq): Likewise.
18741 (interleave_supported_p): Likewise.
18742 (vect_maybe_permute_loop_masks): Likewise.
18743 (vect_set_loop_masks_directly): Likewise.
18744 (vect_set_loop_condition_masked): Likewise.
18745 (vect_set_loop_condition_unmasked): New function, split out from
18746 slpeel_make_loop_iterate_ntimes.
18747 (slpeel_make_loop_iterate_ntimes): Rename to..
18748 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18749 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18750 (vect_do_peeling): Update call accordingly.
18751 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18752 loops.
18753 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18754 mask_compare_type, can_fully_mask_p and fully_masked_p.
18755 (release_vec_loop_masks): New function.
18756 (_loop_vec_info): Use it to free the loop masks.
18757 (can_produce_all_loop_masks_p): New function.
18758 (vect_get_max_nscalars_per_iter): Likewise.
18759 (vect_verify_full_masking): Likewise.
18760 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18761 retries, and free the mask rgroups before retrying. Check loop-wide
18762 reasons for disallowing fully-masked loops. Make the final decision
18763 about whether use a fully-masked loop or not.
18764 (vect_estimate_min_profitable_iters): Do not assume that peeling
18765 for the number of iterations will be needed for fully-masked loops.
18766 (vectorizable_reduction): Disable fully-masked loops.
18767 (vectorizable_live_operation): Likewise.
18768 (vect_halve_mask_nunits): New function.
18769 (vect_double_mask_nunits): Likewise.
18770 (vect_record_loop_mask): Likewise.
18771 (vect_get_loop_mask): Likewise.
18772 (vect_transform_loop): Handle the case in which the final loop
18773 iteration might handle a partial vector. Call vect_set_loop_condition
18774 instead of slpeel_make_loop_iterate_ntimes.
18775 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18776 (check_load_store_masking): New function.
18777 (prepare_load_store_mask): Likewise.
18778 (vectorizable_store): Handle fully-masked loops.
18779 (vectorizable_load): Likewise.
18780 (supportable_widening_operation): Use vect_halve_mask_nunits for
18781 booleans.
18782 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18783 (vect_gen_while): New function.
18784 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18785 (aarch64_uqdec<mode>): New insn.
18786
18787 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18788 Alan Hayward <alan.hayward@arm.com>
18789 David Sherwood <david.sherwood@arm.com>
18790
18791 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18792 (reduc_xor_scal_optab): New optabs.
18793 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18794 (reduc_xor_scal_@var{m}): Document.
18795 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18796 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18797 internal functions.
18798 * fold-const-call.c (fold_const_call): Handle them.
18799 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18800 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18801 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18802 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18803 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18804 (UNSPEC_XORV): New unspecs.
18805 (optab): Add entries for them.
18806 (BITWISEV): New int iterator.
18807 (bit_reduc_op): New int attributes.
18808
18809 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18810 Alan Hayward <alan.hayward@arm.com>
18811 David Sherwood <david.sherwood@arm.com>
18812
18813 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18814 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18815 * optabs.def (vec_shl_insert_optab): New optab.
18816 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18817 (duplicate_and_interleave): Likewise.
18818 * tree-vect-loop.c: Include internal-fn.h.
18819 (neutral_op_for_slp_reduction): New function, split out from
18820 get_initial_defs_for_reduction.
18821 (get_initial_def_for_reduction): Handle option 2 for variable-length
18822 vectors by loading the neutral value into a vector and then shifting
18823 the initial value into element 0.
18824 (get_initial_defs_for_reduction): Replace the code argument with
18825 the neutral value calculated by neutral_op_for_slp_reduction.
18826 Use gimple_build_vector for constant-length vectors.
18827 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18828 but the first group_size elements have a neutral value.
18829 Use duplicate_and_interleave otherwise.
18830 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18831 Update call to get_initial_defs_for_reduction. Handle SLP
18832 reductions for variable-length vectors by creating one vector
18833 result for each scalar result, with the elements associated
18834 with other scalar results stubbed out with the neutral value.
18835 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18836 Require IFN_VEC_SHL_INSERT for double reductions on
18837 variable-length vectors, or SLP reductions that have
18838 a neutral value. Require can_duplicate_and_interleave_p
18839 support for variable-length unchained SLP reductions if there
18840 is no neutral value, such as for MIN/MAX reductions. Also require
18841 the number of vector elements to be a multiple of the number of
18842 SLP statements when doing variable-length unchained SLP reductions.
18843 Update call to vect_create_epilog_for_reduction.
18844 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18845 and remove initial values.
18846 (duplicate_and_interleave): Make public.
18847 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18848 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18849
18850 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18851 Alan Hayward <alan.hayward@arm.com>
18852 David Sherwood <david.sherwood@arm.com>
18853
18854 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18855 (can_duplicate_and_interleave_p): New function.
18856 (vect_get_and_check_slp_defs): Take the vector of statements
18857 rather than just the current one. Remove excess parentheses.
18858 Restriction rejectinon of vect_constant_def and vect_external_def
18859 for variable-length vectors to boolean types, or types for which
18860 can_duplicate_and_interleave_p is false.
18861 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18862 (duplicate_and_interleave): New function.
18863 (vect_get_constant_vectors): Use gimple_build_vector for
18864 constant-length vectors and suitable variable-length constant
18865 vectors. Use duplicate_and_interleave for other variable-length
18866 vectors. Don't defer the update when inserting new statements.
18867
18868 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18869 Alan Hayward <alan.hayward@arm.com>
18870 David Sherwood <david.sherwood@arm.com>
18871
18872 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18873 min_profitable_iters doesn't go negative.
18874
18875 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18876 Alan Hayward <alan.hayward@arm.com>
18877 David Sherwood <david.sherwood@arm.com>
18878
18879 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18880 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18881 * optabs.def (vec_mask_load_lanes_optab): New optab.
18882 (vec_mask_store_lanes_optab): Likewise.
18883 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18884 (MASK_STORE_LANES): Likewise.
18885 * internal-fn.c (mask_load_lanes_direct): New macro.
18886 (mask_store_lanes_direct): Likewise.
18887 (expand_mask_load_optab_fn): Handle masked operations.
18888 (expand_mask_load_lanes_optab_fn): New macro.
18889 (expand_mask_store_optab_fn): Handle masked operations.
18890 (expand_mask_store_lanes_optab_fn): New macro.
18891 (direct_mask_load_lanes_optab_supported_p): Likewise.
18892 (direct_mask_store_lanes_optab_supported_p): Likewise.
18893 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18894 parameter.
18895 (vect_load_lanes_supported): Likewise.
18896 * tree-vect-data-refs.c (strip_conversion): New function.
18897 (can_group_stmts_p): Likewise.
18898 (vect_analyze_data_ref_accesses): Use it instead of checking
18899 for a pair of assignments.
18900 (vect_store_lanes_supported): Take a masked_p parameter.
18901 (vect_load_lanes_supported): Likewise.
18902 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18903 vect_store_lanes_supported and vect_load_lanes_supported.
18904 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18905 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18906 parameter. Don't allow gaps for masked accesses.
18907 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18908 and vect_load_lanes_supported.
18909 (get_load_store_type): Take a masked_p parameter and update
18910 call to get_group_load_store_type.
18911 (vectorizable_store): Update call to get_load_store_type.
18912 Handle IFN_MASK_STORE_LANES.
18913 (vectorizable_load): Update call to get_load_store_type.
18914 Handle IFN_MASK_LOAD_LANES.
18915
18916 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18917 Alan Hayward <alan.hayward@arm.com>
18918 David Sherwood <david.sherwood@arm.com>
18919
18920 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18921 modes for SVE.
18922 * config/aarch64/aarch64-protos.h
18923 (aarch64_sve_struct_memory_operand_p): Declare.
18924 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18925 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18926 (VPRED, vpred): Handle SVE structure modes.
18927 * config/aarch64/constraints.md (Utx): New constraint.
18928 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18929 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18930 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18931 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18932 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18933 structure modes. Split into pieces after RA.
18934 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18935 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18936 New patterns.
18937 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18938 SVE structure modes.
18939 (aarch64_classify_address): Likewise.
18940 (sizetochar): Move earlier in file.
18941 (aarch64_print_operand): Handle SVE register lists.
18942 (aarch64_array_mode): New function.
18943 (aarch64_sve_struct_memory_operand_p): Likewise.
18944 (TARGET_ARRAY_MODE): Redefine.
18945
18946 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18947 Alan Hayward <alan.hayward@arm.com>
18948 David Sherwood <david.sherwood@arm.com>
18949
18950 * target.def (array_mode): New target hook.
18951 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18952 * doc/tm.texi: Regenerate.
18953 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18954 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18955 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18956 targetm.array_mode.
18957 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18958 type sizes.
18959
18960 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18961 Alan Hayward <alan.hayward@arm.com>
18962 David Sherwood <david.sherwood@arm.com>
18963
18964 * fold-const.c (fold_binary_loc): Check the argument types
18965 rather than the result type when testing for a vector operation.
18966
18967 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18968
18969 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18970 * doc/tm.texi: Regenerate.
18971
18972 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18973 Alan Hayward <alan.hayward@arm.com>
18974 David Sherwood <david.sherwood@arm.com>
18975
18976 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18977 (sve): Document new AArch64 extension.
18978 * doc/md.texi (w): Extend the description of the AArch64
18979 constraint to include SVE vectors.
18980 (Upl, Upa): Document new AArch64 predicate constraints.
18981 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18982 enum.
18983 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18984 (msve-vector-bits=): New option.
18985 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18986 SVE when these are disabled.
18987 (sve): New extension.
18988 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18989 modes. Adjust their number of units based on aarch64_sve_vg.
18990 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18991 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18992 aarch64_addr_query_type.
18993 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18994 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18995 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18996 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18997 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18998 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18999 (aarch64_simd_imm_zero_p): Delete.
19000 (aarch64_check_zero_based_sve_index_immediate): Declare.
19001 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19002 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19003 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19004 (aarch64_sve_float_mul_immediate_p): Likewise.
19005 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19006 rather than an rtx.
19007 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19008 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19009 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19010 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19011 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19012 (aarch64_regmode_natural_size): Likewise.
19013 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19014 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19015 left one place.
19016 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19017 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19018 for VG and the SVE predicate registers.
19019 (V_ALIASES): Add a "z"-prefixed alias.
19020 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19021 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19022 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19023 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19024 (REG_CLASS_NAMES): Add entries for them.
19025 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
19026 and the predicate registers.
19027 (aarch64_sve_vg): Declare.
19028 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19029 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19030 (REGMODE_NATURAL_SIZE): Define.
19031 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19032 SVE macros.
19033 * config/aarch64/aarch64.c: Include cfgrtl.h.
19034 (simd_immediate_info): Add a constructor for series vectors,
19035 and an associated step field.
19036 (aarch64_sve_vg): New variable.
19037 (aarch64_dbx_register_number): Handle VG and the predicate registers.
19038 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19039 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19040 (VEC_ANY_DATA, VEC_STRUCT): New constants.
19041 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19042 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19043 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19044 (aarch64_get_mask_mode): New functions.
19045 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19046 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19047 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
19048 predicate modes and predicate registers. Explicitly restrict
19049 GPRs to modes of 16 bytes or smaller. Only allow FP registers
19050 to store a vector mode if it is recognized by
19051 aarch64_classify_vector_mode.
19052 (aarch64_regmode_natural_size): New function.
19053 (aarch64_hard_regno_caller_save_mode): Return the original mode
19054 for predicates.
19055 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19056 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19057 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19058 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19059 functions.
19060 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
19061 does not overlap dest if the function is frame-related. Handle
19062 SVE constants.
19063 (aarch64_split_add_offset): New function.
19064 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19065 them aarch64_add_offset.
19066 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
19067 and update call to aarch64_sub_sp.
19068 (aarch64_add_cfa_expression): New function.
19069 (aarch64_expand_prologue): Pass extra temporary registers to the
19070 functions above. Handle the case in which we need to emit new
19071 DW_CFA_expressions for registers that were originally saved
19072 relative to the stack pointer, but now have to be expressed
19073 relative to the frame pointer.
19074 (aarch64_output_mi_thunk): Pass extra temporary registers to the
19075 functions above.
19076 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
19077 IP0 and IP1 values for SVE frames.
19078 (aarch64_expand_vec_series): New function.
19079 (aarch64_expand_sve_widened_duplicate): Likewise.
19080 (aarch64_expand_sve_const_vector): Likewise.
19081 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
19082 Handle SVE constants. Use emit_move_insn to move a force_const_mem
19083 into the register, rather than emitting a SET directly.
19084 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
19085 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
19086 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
19087 (offset_9bit_signed_scaled_p): New functions.
19088 (aarch64_replicate_bitmask_imm): New function.
19089 (aarch64_bitmask_imm): Use it.
19090 (aarch64_cannot_force_const_mem): Reject expressions involving
19091 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
19092 (aarch64_classify_index): Handle SVE indices, by requiring
19093 a plain register index with a scale that matches the element size.
19094 (aarch64_classify_address): Handle SVE addresses. Assert that
19095 the mode of the address is VOIDmode or an integer mode.
19096 Update call to aarch64_classify_symbol.
19097 (aarch64_classify_symbolic_expression): Update call to
19098 aarch64_classify_symbol.
19099 (aarch64_const_vec_all_in_range_p): New function.
19100 (aarch64_print_vector_float_operand): Likewise.
19101 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
19102 "vN" for FP registers with SVE modes. Handle (const ...) vectors
19103 and the FP immediates 1.0 and 0.5.
19104 (aarch64_print_address_internal): Handle SVE addresses.
19105 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
19106 (aarch64_regno_regclass): Handle predicate registers.
19107 (aarch64_secondary_reload): Handle big-endian reloads of SVE
19108 data modes.
19109 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
19110 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
19111 (aarch64_convert_sve_vector_bits): New function.
19112 (aarch64_override_options): Use it to handle -msve-vector-bits=.
19113 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19114 rather than an rtx.
19115 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
19116 Handle SVE vector and predicate modes. Accept VL-based constants
19117 that need only one temporary register, and VL offsets that require
19118 no temporary registers.
19119 (aarch64_conditional_register_usage): Mark the predicate registers
19120 as fixed if SVE isn't available.
19121 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
19122 Return true for SVE vector and predicate modes.
19123 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
19124 rather than an unsigned int. Handle SVE modes.
19125 (aarch64_preferred_simd_mode): Update call accordingly. Handle
19126 SVE modes.
19127 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
19128 if SVE is enabled.
19129 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19130 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19131 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19132 (aarch64_sve_float_mul_immediate_p): New functions.
19133 (aarch64_sve_valid_immediate): New function.
19134 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
19135 Explicitly reject structure modes. Check for INDEX constants.
19136 Handle PTRUE and PFALSE constants.
19137 (aarch64_check_zero_based_sve_index_immediate): New function.
19138 (aarch64_simd_imm_zero_p): Delete.
19139 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
19140 vector modes. Accept constants in the range of CNT[BHWD].
19141 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
19142 ask for an Advanced SIMD mode.
19143 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
19144 (aarch64_simd_vector_alignment): Handle SVE predicates.
19145 (aarch64_vectorize_preferred_vector_alignment): New function.
19146 (aarch64_simd_vector_alignment_reachable): Use it instead of
19147 the vector size.
19148 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
19149 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
19150 functions.
19151 (MAX_VECT_LEN): Delete.
19152 (expand_vec_perm_d): Add a vec_flags field.
19153 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
19154 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
19155 (aarch64_evpc_ext): Don't apply a big-endian lane correction
19156 for SVE modes.
19157 (aarch64_evpc_rev): Rename to...
19158 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
19159 (aarch64_evpc_rev_global): New function.
19160 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
19161 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
19162 MAX_VECT_LEN.
19163 (aarch64_evpc_sve_tbl): New function.
19164 (aarch64_expand_vec_perm_const_1): Update after rename of
19165 aarch64_evpc_rev. Handle SVE permutes too, trying
19166 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
19167 than aarch64_evpc_tbl.
19168 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
19169 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
19170 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
19171 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
19172 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
19173 (aarch64_expand_sve_vcond): New functions.
19174 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
19175 of aarch64_vector_mode_p.
19176 (aarch64_dwarf_poly_indeterminate_value): New function.
19177 (aarch64_compute_pressure_classes): Likewise.
19178 (aarch64_can_change_mode_class): Likewise.
19179 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
19180 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
19181 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
19182 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
19183 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
19184 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
19185 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
19186 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
19187 constraints.
19188 (Dn, Dl, Dr): Accept const as well as const_vector.
19189 (Dz): Likewise. Compare against CONST0_RTX.
19190 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
19191 of "vector" where appropriate.
19192 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
19193 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
19194 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
19195 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
19196 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
19197 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
19198 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
19199 (v_int_equiv): Extend to SVE modes.
19200 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
19201 mode attributes.
19202 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
19203 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
19204 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
19205 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
19206 (SVE_COND_FP_CMP): New int iterators.
19207 (perm_hilo): Handle the new unpack unspecs.
19208 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
19209 attributes.
19210 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
19211 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
19212 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
19213 (aarch64_equality_operator, aarch64_constant_vector_operand)
19214 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
19215 (aarch64_sve_nonimmediate_operand): Likewise.
19216 (aarch64_sve_general_operand): Likewise.
19217 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
19218 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
19219 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
19220 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
19221 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
19222 (aarch64_sve_float_arith_immediate): Likewise.
19223 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
19224 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
19225 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
19226 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
19227 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
19228 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
19229 (aarch64_sve_float_arith_operand): Likewise.
19230 (aarch64_sve_float_arith_with_sub_operand): Likewise.
19231 (aarch64_sve_float_mul_operand): Likewise.
19232 (aarch64_sve_vec_perm_operand): Likewise.
19233 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
19234 (aarch64_mov_operand): Accept const_poly_int and const_vector.
19235 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
19236 as well as const_vector.
19237 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
19238 in file. Use CONST0_RTX and CONSTM1_RTX.
19239 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
19240 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
19241 Use aarch64_simd_imm_zero.
19242 * config/aarch64/aarch64-sve.md: New file.
19243 * config/aarch64/aarch64.md: Include it.
19244 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
19245 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
19246 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
19247 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
19248 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
19249 (sve): New attribute.
19250 (enabled): Disable instructions with the sve attribute unless
19251 TARGET_SVE.
19252 (movqi, movhi): Pass CONST_POLY_INT operaneds through
19253 aarch64_expand_mov_immediate.
19254 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
19255 CNT[BHSD] immediates.
19256 (movti): Split CONST_POLY_INT moves into two halves.
19257 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
19258 Split additions that need a temporary here if the destination
19259 is the stack pointer.
19260 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
19261 (*add<mode>3_poly_1): New instruction.
19262 (set_clobber_cc): New expander.
19263
19264 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19265
19266 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
19267 parameter and use it instead of GET_MODE_SIZE (innermode). Use
19268 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
19269 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
19270 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
19271 Change innermode from fixed_mode_size to machine_mode.
19272 (simplify_subreg): Update call accordingly. Handle a constant-sized
19273 subreg of a variable-length CONST_VECTOR.
19274
19275 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19276 Alan Hayward <alan.hayward@arm.com>
19277 David Sherwood <david.sherwood@arm.com>
19278
19279 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
19280 (add_offset_to_base): New function, split out from...
19281 (create_mem_ref): ...here. When handling a scale other than 1,
19282 check first whether the address is valid without the offset.
19283 Add it into the base if so, leaving the index and scale as-is.
19284
19285 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19286
19287 PR c++/83778
19288 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
19289 fold_for_warn before checking if arg2 is INTEGER_CST.
19290
19291 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
19292
19293 * config/rs6000/predicates.md (load_multiple_operation): Delete.
19294 (store_multiple_operation): Delete.
19295 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
19296 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
19297 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
19298 guarded by TARGET_STRING.
19299 (rs6000_output_load_multiple): Delete.
19300 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19301 OPTION_MASK_STRING / TARGET_STRING handling.
19302 (print_operand) <'N', 'O'>: Add comment that these are unused now.
19303 (const rs6000_opt_masks) <"string">: Change mask to 0.
19304 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
19305 (MASK_STRING): Delete.
19306 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
19307 parts. Simplify.
19308 (load_multiple): Delete.
19309 (*ldmsi8): Delete.
19310 (*ldmsi7): Delete.
19311 (*ldmsi6): Delete.
19312 (*ldmsi5): Delete.
19313 (*ldmsi4): Delete.
19314 (*ldmsi3): Delete.
19315 (store_multiple): Delete.
19316 (*stmsi8): Delete.
19317 (*stmsi7): Delete.
19318 (*stmsi6): Delete.
19319 (*stmsi5): Delete.
19320 (*stmsi4): Delete.
19321 (*stmsi3): Delete.
19322 (movmemsi_8reg): Delete.
19323 (corresponding unnamed define_insn): Delete.
19324 (movmemsi_6reg): Delete.
19325 (corresponding unnamed define_insn): Delete.
19326 (movmemsi_4reg): Delete.
19327 (corresponding unnamed define_insn): Delete.
19328 (movmemsi_2reg): Delete.
19329 (corresponding unnamed define_insn): Delete.
19330 (movmemsi_1reg): Delete.
19331 (corresponding unnamed define_insn): Delete.
19332 * config/rs6000/rs6000.opt (mno-string): New.
19333 (mstring): Replace by deprecation warning stub.
19334 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
19335
19336 2018-01-12 Jakub Jelinek <jakub@redhat.com>
19337
19338 * regrename.c (regrename_do_replace): If replacing the same
19339 reg multiple times, try to reuse last created gen_raw_REG.
19340
19341 PR debug/81155
19342 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
19343 main to workaround a bug in GDB.
19344
19345 2018-01-12 Tom de Vries <tom@codesourcery.com>
19346
19347 PR target/83737
19348 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
19349
19350 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
19351
19352 PR rtl-optimization/80481
19353 * ira-color.c (get_cap_member): New function.
19354 (allocnos_conflict_by_live_ranges_p): Use it.
19355 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
19356 (setup_slot_coalesced_allocno_live_ranges): Ditto.
19357
19358 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
19359
19360 PR target/83628
19361 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
19362 (*saddl_se_1): Ditto.
19363 (*ssubsi_1): Ditto.
19364 (*ssubl_se_1): Ditto.
19365
19366 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19367
19368 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
19369 rather than wi::to_widest for DR_INITs.
19370 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
19371 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
19372 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
19373 INTEGER_CSTs.
19374 (vect_analyze_group_access_1): Note that here.
19375
19376 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19377
19378 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
19379 polynomial type sizes.
19380
19381 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
19382
19383 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
19384 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
19385 (gimple_add_tmp_var): Likewise.
19386
19387 2018-01-12 Martin Liska <mliska@suse.cz>
19388
19389 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
19390 (gimple_alloc_sizes): Likewise.
19391 (dump_gimple_statistics): Use PRIu64 in printf format.
19392 * gimple.h: Change uint64_t to int.
19393
19394 2018-01-12 Martin Liska <mliska@suse.cz>
19395
19396 * tree-core.h: Use uint64_t instead of int.
19397 * tree.c (tree_node_counts): Likewise.
19398 (tree_node_sizes): Likewise.
19399 (dump_tree_statistics): Use PRIu64 in printf format.
19400
19401 2018-01-12 Martin Liska <mliska@suse.cz>
19402
19403 * Makefile.in: As qsort_chk is implemented in vec.c, add
19404 vec.o to linkage of gencfn-macros.
19405 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
19406 passing the info to record_node_allocation_statistics.
19407 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
19408 and pass the info.
19409 * ggc-common.c (struct ggc_usage): Add operator== and use
19410 it in operator< and compare function.
19411 * mem-stats.h (struct mem_usage): Likewise.
19412 * vec.c (struct vec_usage): Remove operator< and compare
19413 function. Can be simply inherited.
19414
19415 2018-01-12 Martin Jambor <mjambor@suse.cz>
19416
19417 PR target/81616
19418 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
19419 * tree-ssa-math-opts.c: Include domwalk.h.
19420 (convert_mult_to_fma_1): New function.
19421 (fma_transformation_info): New type.
19422 (fma_deferring_state): Likewise.
19423 (cancel_fma_deferring): New function.
19424 (result_of_phi): Likewise.
19425 (last_fma_candidate_feeds_initial_phi): Likewise.
19426 (convert_mult_to_fma): Added deferring logic, split actual
19427 transformation to convert_mult_to_fma_1.
19428 (math_opts_dom_walker): New type.
19429 (math_opts_dom_walker::after_dom_children): New method, body moved
19430 here from pass_optimize_widening_mul::execute, added deferring logic
19431 bits.
19432 (pass_optimize_widening_mul::execute): Moved most of code to
19433 math_opts_dom_walker::after_dom_children.
19434 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
19435 * config/i386/i386.c (ix86_option_override_internal): Added
19436 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
19437
19438 2018-01-12 Richard Biener <rguenther@suse.de>
19439
19440 PR debug/83157
19441 * dwarf2out.c (gen_variable_die): Do not reset old_die for
19442 inline instance vars.
19443
19444 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
19445
19446 PR target/81819
19447 * config/rx/rx.c (rx_is_restricted_memory_address):
19448 Handle SUBREG case.
19449
19450 2018-01-12 Richard Biener <rguenther@suse.de>
19451
19452 PR tree-optimization/80846
19453 * target.def (split_reduction): New target hook.
19454 * targhooks.c (default_split_reduction): New function.
19455 * targhooks.h (default_split_reduction): Declare.
19456 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
19457 target requests first reduce vectors by combining low and high
19458 parts.
19459 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
19460 (get_vectype_for_scalar_type_and_size): Export.
19461 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
19462 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
19463 * doc/tm.texi: Regenerate.
19464 * config/i386/i386.c (ix86_split_reduction): Implement
19465 TARGET_VECTORIZE_SPLIT_REDUCTION.
19466
19467 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19468
19469 PR target/83368
19470 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
19471 in PIC mode except for TARGET_VXWORKS_RTP.
19472 * config/sparc/sparc.c: Include cfgrtl.h.
19473 (TARGET_INIT_PIC_REG): Define.
19474 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
19475 (sparc_pic_register_p): New predicate.
19476 (sparc_legitimate_address_p): Use it.
19477 (sparc_legitimize_pic_address): Likewise.
19478 (sparc_delegitimize_address): Likewise.
19479 (sparc_mode_dependent_address_p): Likewise.
19480 (gen_load_pcrel_sym): Remove 4th parameter.
19481 (load_got_register): Adjust call to above. Remove obsolete stuff.
19482 (sparc_expand_prologue): Do not call load_got_register here.
19483 (sparc_flat_expand_prologue): Likewise.
19484 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
19485 (sparc_use_pseudo_pic_reg): New function.
19486 (sparc_init_pic_reg): Likewise.
19487 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19488 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
19489
19490 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
19491
19492 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
19493 Add item for branch_cost.
19494
19495 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19496
19497 PR rtl-optimization/83565
19498 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
19499 not extend the result to a larger mode for rotate operations.
19500 (num_sign_bit_copies1): Likewise.
19501
19502 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19503
19504 PR target/40411
19505 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
19506 -symbolic.
19507 Use values-Xc.o for -pedantic.
19508 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
19509
19510 2018-01-12 Martin Liska <mliska@suse.cz>
19511
19512 PR ipa/83054
19513 * ipa-devirt.c (final_warning_record::grow_type_warnings):
19514 New function.
19515 (possible_polymorphic_call_targets): Use it.
19516 (ipa_devirt): Likewise.
19517
19518 2018-01-12 Martin Liska <mliska@suse.cz>
19519
19520 * profile-count.h (enum profile_quality): Use 0 as invalid
19521 enum value of profile_quality.
19522
19523 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
19524
19525 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
19526 -mext-string options.
19527
19528 2018-01-12 Richard Biener <rguenther@suse.de>
19529
19530 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
19531 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
19532 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19533 Likewise.
19534 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19535
19536 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19537
19538 * configure.ac (--with-long-double-format): Add support for the
19539 configuration option to change the default long double format on
19540 PowerPC systems.
19541 * config.gcc (powerpc*-linux*-*): Likewise.
19542 * configure: Regenerate.
19543 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
19544 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
19545 used without modification.
19546
19547 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19548
19549 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
19550 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
19551 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
19552 MISC_BUILTIN_SPEC_BARRIER.
19553 (rs6000_init_builtins): Likewise.
19554 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
19555 enum value.
19556 (speculation_barrier): New define_insn.
19557 * doc/extend.texi: Document __builtin_speculation_barrier.
19558
19559 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19560
19561 PR target/83203
19562 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
19563 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
19564 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
19565 iterators.
19566 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
19567 integral modes instead of "ss" and "sd".
19568 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
19569 vectors with 32-bit and 64-bit elements.
19570 (vecdupssescalarmodesuffix): New mode attribute.
19571 (vec_dup<mode>): Use it.
19572
19573 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
19574
19575 PR target/83330
19576 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
19577 frame if argument is passed on stack.
19578
19579 2018-01-11 Jakub Jelinek <jakub@redhat.com>
19580
19581 PR target/82682
19582 * ree.c (combine_reaching_defs): Optimize also
19583 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
19584 reg2=any_extend(exp); reg1=reg2;, formatting fix.
19585
19586 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19587
19588 PR middle-end/83189
19589 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
19590
19591 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
19592
19593 PR middle-end/83718
19594 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
19595 after they are computed.
19596
19597 2018-01-11 Bin Cheng <bin.cheng@arm.com>
19598
19599 PR tree-optimization/83695
19600 * gimple-loop-linterchange.cc
19601 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
19602 reset cached scev information after interchange.
19603 (pass_linterchange::execute): Remove call to scev_reset_htab.
19604
19605 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19606
19607 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
19608 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
19609 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
19610 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
19611 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
19612 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
19613 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
19614 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
19615 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
19616 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
19617 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
19618 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
19619 (V_lane_reg): Likewise.
19620 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
19621 New define_expand.
19622 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
19623 (vfmal_lane_low<mode>_intrinsic,
19624 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
19625 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
19626 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
19627 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
19628 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
19629 vfmsl_lane_high<mode>_intrinsic): New define_insns.
19630
19631 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19632
19633 * config/arm/arm-cpus.in (fp16fml): New feature.
19634 (ALL_SIMD): Add fp16fml.
19635 (armv8.2-a): Add fp16fml as an option.
19636 (armv8.3-a): Likewise.
19637 (armv8.4-a): Add fp16fml as part of fp16.
19638 * config/arm/arm.h (TARGET_FP16FML): Define.
19639 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
19640 when appropriate.
19641 * config/arm/arm-modes.def (V2HF): Define.
19642 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19643 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19644 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19645 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19646 vfmsl_low, vfmsl_high): New set of builtins.
19647 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19648 (vfml_op): New code attribute.
19649 (VFMLHALVES): New int iterator.
19650 (VFML, VFMLSEL): New mode attributes.
19651 (V_reg): Define mapping for V2HF.
19652 (V_hi, V_lo): New mode attributes.
19653 (VF_constraint): Likewise.
19654 (vfml_half, vfml_half_selector): New int attributes.
19655 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19656 define_expand.
19657 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19658 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19659 New define_insn.
19660 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19661 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19662 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19663 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19664 documentation.
19665 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19666 Document new effective target and option set.
19667
19668 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19669
19670 * config/arm/arm-cpus.in (armv8_4): New feature.
19671 (ARMv8_4a): New fgroup.
19672 (armv8.4-a): New arch.
19673 * config/arm/arm-tables.opt: Regenerate.
19674 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19675 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19676 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19677 Add matching rules for -march=armv8.4-a and extensions.
19678 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19679
19680 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19681
19682 PR target/81821
19683 * config/rx/rx.md (BW): New mode attribute.
19684 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19685
19686 2018-01-11 Richard Biener <rguenther@suse.de>
19687
19688 PR tree-optimization/83435
19689 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19690 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19691 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19692
19693 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19694 Alan Hayward <alan.hayward@arm.com>
19695 David Sherwood <david.sherwood@arm.com>
19696
19697 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19698 field.
19699 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19700 (aarch64_print_address_internal): Use it to check for a zero offset.
19701
19702 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19703 Alan Hayward <alan.hayward@arm.com>
19704 David Sherwood <david.sherwood@arm.com>
19705
19706 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19707 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19708 Return a poly_int64 rather than a HOST_WIDE_INT.
19709 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19710 rather than a HOST_WIDE_INT.
19711 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19712 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19713 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19714 final_offset from HOST_WIDE_INT to poly_int64.
19715 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19716 to_constant when getting the number of units in an Advanced SIMD
19717 mode.
19718 (aarch64_builtin_vectorized_function): Check for a constant number
19719 of units.
19720 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19721 GET_MODE_SIZE.
19722 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19723 attribute instead of GET_MODE_NUNITS.
19724 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19725 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19726 GET_MODE_SIZE for fixed-size registers.
19727 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19728 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19729 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19730 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19731 (aarch64_print_operand, aarch64_print_address_internal)
19732 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19733 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19734 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19735 Handle polynomial GET_MODE_SIZE.
19736 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19737 wider than SImode without modification.
19738 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19739 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19740 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19741 passing and returning SVE modes.
19742 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19743 rather than GEN_INT.
19744 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19745 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19746 (aarch64_allocate_and_probe_stack_space): Likewise.
19747 (aarch64_layout_frame): Cope with polynomial offsets.
19748 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19749 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19750 polynomial offsets.
19751 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19752 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19753 poly_int64 rather than a HOST_WIDE_INT.
19754 (aarch64_get_separate_components, aarch64_process_components)
19755 (aarch64_expand_prologue, aarch64_expand_epilogue)
19756 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19757 (aarch64_anchor_offset): New function, split out from...
19758 (aarch64_legitimize_address): ...here.
19759 (aarch64_builtin_vectorization_cost): Handle polynomial
19760 TYPE_VECTOR_SUBPARTS.
19761 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19762 GET_MODE_NUNITS.
19763 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19764 number of elements from the PARALLEL rather than the mode.
19765 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19766 rather than GET_MODE_BITSIZE.
19767 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19768 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19769 (aarch64_expand_vec_perm_const_1): Handle polynomial
19770 d->perm.length () and d->perm elements.
19771 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19772 Apply to_constant to d->perm elements.
19773 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19774 polynomial CONST_VECTOR_NUNITS.
19775 (aarch64_move_pointer): Take amount as a poly_int64 rather
19776 than an int.
19777 (aarch64_progress_pointer): Avoid temporary variable.
19778 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19779 the mode attribute instead of GET_MODE.
19780
19781 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19782 Alan Hayward <alan.hayward@arm.com>
19783 David Sherwood <david.sherwood@arm.com>
19784
19785 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19786 x exists before using it.
19787 (aarch64_add_constant_internal): Rename to...
19788 (aarch64_add_offset_1): ...this. Replace regnum with separate
19789 src and dest rtxes. Handle the case in which they're different,
19790 including when the offset is zero. Replace scratchreg with an rtx.
19791 Use 2 additions if there is no spare register into which we can
19792 move a 16-bit constant.
19793 (aarch64_add_constant): Delete.
19794 (aarch64_add_offset): Replace reg with separate src and dest
19795 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19796 Use aarch64_add_offset_1.
19797 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19798 an rtx rather than an int. Take the delta as a poly_int64
19799 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19800 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19801 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19802 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19803 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19804 and aarch64_add_sp.
19805 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19806 aarch64_add_constant.
19807
19808 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19809
19810 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19811 Use scalar_float_mode.
19812
19813 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19814
19815 * config/aarch64/aarch64-simd.md
19816 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19817 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19818 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19819 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19820 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19821 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19822 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19823 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19824 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19825 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19826
19827 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19828
19829 PR target/83514
19830 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19831 targ_options->x_arm_arch_string is non NULL.
19832
19833 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19834
19835 * config/aarch64/aarch64.h
19836 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19837
19838 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19839
19840 PR target/82096
19841 * expmed.c (emit_store_flag_force): Swap if const op0
19842 and change VOIDmode to mode of op0.
19843
19844 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19845
19846 PR rtl-optimization/83761
19847 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19848 than bytes to mode_for_size.
19849
19850 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19851
19852 PR middle-end/83189
19853 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19854 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19855 profile.
19856
19857 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19858
19859 PR middle-end/83575
19860 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19861 when in layout mode.
19862 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19863 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19864 partition fixup.
19865
19866 2018-01-10 Michael Collison <michael.collison@arm.com>
19867
19868 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19869 * config/aarch64/aarch64-option-extension.def: Add
19870 AARCH64_OPT_EXTENSION of 'fp16fml'.
19871 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19872 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19873 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19874 * config/aarch64/constraints.md (Ui7): New constraint.
19875 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19876 (VFMLA_SEL_W): Ditto.
19877 (f16quad): Ditto.
19878 (f16mac1): Ditto.
19879 (VFMLA16_LOW): New int iterator.
19880 (VFMLA16_HIGH): Ditto.
19881 (UNSPEC_FMLAL): New unspec.
19882 (UNSPEC_FMLSL): Ditto.
19883 (UNSPEC_FMLAL2): Ditto.
19884 (UNSPEC_FMLSL2): Ditto.
19885 (f16mac): New code attribute.
19886 * config/aarch64/aarch64-simd-builtins.def
19887 (aarch64_fmlal_lowv2sf): Ditto.
19888 (aarch64_fmlsl_lowv2sf): Ditto.
19889 (aarch64_fmlalq_lowv4sf): Ditto.
19890 (aarch64_fmlslq_lowv4sf): Ditto.
19891 (aarch64_fmlal_highv2sf): Ditto.
19892 (aarch64_fmlsl_highv2sf): Ditto.
19893 (aarch64_fmlalq_highv4sf): Ditto.
19894 (aarch64_fmlslq_highv4sf): Ditto.
19895 (aarch64_fmlal_lane_lowv2sf): Ditto.
19896 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19897 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19898 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19899 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19900 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19901 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19902 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19903 (aarch64_fmlal_lane_highv2sf): Ditto.
19904 (aarch64_fmlsl_lane_highv2sf): Ditto.
19905 (aarch64_fmlal_laneq_highv2sf): Ditto.
19906 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19907 (aarch64_fmlalq_lane_highv4sf): Ditto.
19908 (aarch64_fmlsl_lane_highv4sf): Ditto.
19909 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19910 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19911 * config/aarch64/aarch64-simd.md:
19912 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19913 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19914 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19915 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19916 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19917 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19918 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19919 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19920 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19921 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19922 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19923 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19924 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19925 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19926 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19927 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19928 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19929 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19930 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19931 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19932 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19933 (vfmlsl_low_u32): Ditto.
19934 (vfmlalq_low_u32): Ditto.
19935 (vfmlslq_low_u32): Ditto.
19936 (vfmlal_high_u32): Ditto.
19937 (vfmlsl_high_u32): Ditto.
19938 (vfmlalq_high_u32): Ditto.
19939 (vfmlslq_high_u32): Ditto.
19940 (vfmlal_lane_low_u32): Ditto.
19941 (vfmlsl_lane_low_u32): Ditto.
19942 (vfmlal_laneq_low_u32): Ditto.
19943 (vfmlsl_laneq_low_u32): Ditto.
19944 (vfmlalq_lane_low_u32): Ditto.
19945 (vfmlslq_lane_low_u32): Ditto.
19946 (vfmlalq_laneq_low_u32): Ditto.
19947 (vfmlslq_laneq_low_u32): Ditto.
19948 (vfmlal_lane_high_u32): Ditto.
19949 (vfmlsl_lane_high_u32): Ditto.
19950 (vfmlal_laneq_high_u32): Ditto.
19951 (vfmlsl_laneq_high_u32): Ditto.
19952 (vfmlalq_lane_high_u32): Ditto.
19953 (vfmlslq_lane_high_u32): Ditto.
19954 (vfmlalq_laneq_high_u32): Ditto.
19955 (vfmlslq_laneq_high_u32): Ditto.
19956 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19957 (AARCH64_FL_FOR_ARCH8_4): New.
19958 (AARCH64_ISA_F16FML): New ISA flag.
19959 (TARGET_F16FML): New feature flag for fp16fml.
19960 (doc/invoke.texi): Document new fp16fml option.
19961
19962 2018-01-10 Michael Collison <michael.collison@arm.com>
19963
19964 * config/aarch64/aarch64-builtins.c:
19965 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19966 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19967 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19968 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19969 (AARCH64_ISA_SHA3): New ISA flag.
19970 (TARGET_SHA3): New feature flag for sha3.
19971 * config/aarch64/iterators.md (sha512_op): New int attribute.
19972 (CRYPTO_SHA512): New int iterator.
19973 (UNSPEC_SHA512H): New unspec.
19974 (UNSPEC_SHA512H2): Ditto.
19975 (UNSPEC_SHA512SU0): Ditto.
19976 (UNSPEC_SHA512SU1): Ditto.
19977 * config/aarch64/aarch64-simd-builtins.def
19978 (aarch64_crypto_sha512hqv2di): New builtin.
19979 (aarch64_crypto_sha512h2qv2di): Ditto.
19980 (aarch64_crypto_sha512su0qv2di): Ditto.
19981 (aarch64_crypto_sha512su1qv2di): Ditto.
19982 (aarch64_eor3qv8hi): Ditto.
19983 (aarch64_rax1qv2di): Ditto.
19984 (aarch64_xarqv2di): Ditto.
19985 (aarch64_bcaxqv8hi): Ditto.
19986 * config/aarch64/aarch64-simd.md:
19987 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19988 (aarch64_crypto_sha512su0qv2di): Ditto.
19989 (aarch64_crypto_sha512su1qv2di): Ditto.
19990 (aarch64_eor3qv8hi): Ditto.
19991 (aarch64_rax1qv2di): Ditto.
19992 (aarch64_xarqv2di): Ditto.
19993 (aarch64_bcaxqv8hi): Ditto.
19994 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19995 (vsha512h2q_u64): Ditto.
19996 (vsha512su0q_u64): Ditto.
19997 (vsha512su1q_u64): Ditto.
19998 (veor3q_u16): Ditto.
19999 (vrax1q_u64): Ditto.
20000 (vxarq_u64): Ditto.
20001 (vbcaxq_u16): Ditto.
20002 * config/arm/types.md (crypto_sha512): New type attribute.
20003 (crypto_sha3): Ditto.
20004 (doc/invoke.texi): Document new sha3 option.
20005
20006 2018-01-10 Michael Collison <michael.collison@arm.com>
20007
20008 * config/aarch64/aarch64-builtins.c:
20009 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20010 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20011 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20012 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20013 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20014 (AARCH64_ISA_SM4): New ISA flag.
20015 (TARGET_SM4): New feature flag for sm4.
20016 * config/aarch64/aarch64-simd-builtins.def
20017 (aarch64_sm3ss1qv4si): Ditto.
20018 (aarch64_sm3tt1aq4si): Ditto.
20019 (aarch64_sm3tt1bq4si): Ditto.
20020 (aarch64_sm3tt2aq4si): Ditto.
20021 (aarch64_sm3tt2bq4si): Ditto.
20022 (aarch64_sm3partw1qv4si): Ditto.
20023 (aarch64_sm3partw2qv4si): Ditto.
20024 (aarch64_sm4eqv4si): Ditto.
20025 (aarch64_sm4ekeyqv4si): Ditto.
20026 * config/aarch64/aarch64-simd.md:
20027 (aarch64_sm3ss1qv4si): Ditto.
20028 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20029 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20030 (aarch64_sm4eqv4si): Ditto.
20031 (aarch64_sm4ekeyqv4si): Ditto.
20032 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20033 (sm3part_op): Ditto.
20034 (CRYPTO_SM3TT): Ditto.
20035 (CRYPTO_SM3PART): Ditto.
20036 (UNSPEC_SM3SS1): New unspec.
20037 (UNSPEC_SM3TT1A): Ditto.
20038 (UNSPEC_SM3TT1B): Ditto.
20039 (UNSPEC_SM3TT2A): Ditto.
20040 (UNSPEC_SM3TT2B): Ditto.
20041 (UNSPEC_SM3PARTW1): Ditto.
20042 (UNSPEC_SM3PARTW2): Ditto.
20043 (UNSPEC_SM4E): Ditto.
20044 (UNSPEC_SM4EKEY): Ditto.
20045 * config/aarch64/constraints.md (Ui2): New constraint.
20046 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20047 * config/arm/types.md (crypto_sm3): New type attribute.
20048 (crypto_sm4): Ditto.
20049 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20050 (vsm3tt1aq_u32): Ditto.
20051 (vsm3tt1bq_u32): Ditto.
20052 (vsm3tt2aq_u32): Ditto.
20053 (vsm3tt2bq_u32): Ditto.
20054 (vsm3partw1q_u32): Ditto.
20055 (vsm3partw2q_u32): Ditto.
20056 (vsm4eq_u32): Ditto.
20057 (vsm4ekeyq_u32): Ditto.
20058 (doc/invoke.texi): Document new sm4 option.
20059
20060 2018-01-10 Michael Collison <michael.collison@arm.com>
20061
20062 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20063 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20064 (AARCH64_FL_FOR_ARCH8_4): New.
20065 (AARCH64_FL_V8_4): New flag.
20066 (doc/invoke.texi): Document new armv8.4-a option.
20067
20068 2018-01-10 Michael Collison <michael.collison@arm.com>
20069
20070 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20071 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
20072 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
20073 * config/aarch64/aarch64-option-extension.def: Add
20074 AARCH64_OPT_EXTENSION of 'sha2'.
20075 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
20076 (crypto): Disable sha2 and aes if crypto disabled.
20077 (crypto): Enable aes and sha2 if enabled.
20078 (simd): Disable sha2 and aes if simd disabled.
20079 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
20080 New flags.
20081 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
20082 (TARGET_SHA2): New feature flag for sha2.
20083 (TARGET_AES): New feature flag for aes.
20084 * config/aarch64/aarch64-simd.md:
20085 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
20086 conditional on TARGET_AES.
20087 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
20088 (aarch64_crypto_sha1hsi): Make pattern conditional
20089 on TARGET_SHA2.
20090 (aarch64_crypto_sha1hv4si): Ditto.
20091 (aarch64_be_crypto_sha1hv4si): Ditto.
20092 (aarch64_crypto_sha1su1v4si): Ditto.
20093 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
20094 (aarch64_crypto_sha1su0v4si): Ditto.
20095 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
20096 (aarch64_crypto_sha256su0v4si): Ditto.
20097 (aarch64_crypto_sha256su1v4si): Ditto.
20098 (doc/invoke.texi): Document new aes and sha2 options.
20099
20100 2018-01-10 Martin Sebor <msebor@redhat.com>
20101
20102 PR tree-optimization/83781
20103 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
20104 as string arrays.
20105
20106 2018-01-11 Martin Sebor <msebor@gmail.com>
20107 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20108
20109 PR tree-optimization/83501
20110 PR tree-optimization/81703
20111
20112 * tree-ssa-strlen.c (get_string_cst): Rename...
20113 (get_string_len): ...to this. Handle global constants.
20114 (handle_char_store): Adjust.
20115
20116 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
20117 Jim Wilson <jimw@sifive.com>
20118
20119 * config/riscv/riscv-protos.h (riscv_output_return): New.
20120 * config/riscv/riscv.c (struct machine_function): New naked_p field.
20121 (riscv_attribute_table, riscv_output_return),
20122 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
20123 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
20124 (riscv_compute_frame_info): Only compute frame->mask if not a naked
20125 function.
20126 (riscv_expand_prologue): Add early return for naked function.
20127 (riscv_expand_epilogue): Likewise.
20128 (riscv_function_ok_for_sibcall): Return false for naked function.
20129 (riscv_set_current_function): New.
20130 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
20131 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
20132 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
20133 * doc/extend.texi (RISC-V Function Attributes): New.
20134
20135 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
20136
20137 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
20138 check for 128-bit long double before checking TCmode.
20139 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
20140 128-bit long doubles before checking TFmode or TCmode.
20141 (FLOAT128_IBM_P): Likewise.
20142
20143 2018-01-10 Martin Sebor <msebor@redhat.com>
20144
20145 PR tree-optimization/83671
20146 * builtins.c (c_strlen): Unconditionally return zero for the empty
20147 string.
20148 Use -Warray-bounds for warnings.
20149 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
20150 for non-constant array indices with COMPONENT_REF, arrays of
20151 arrays, and pointers to arrays.
20152 (gimple_fold_builtin_strlen): Determine and set length range for
20153 non-constant character arrays.
20154
20155 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
20156
20157 PR middle-end/81897
20158 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
20159 empty blocks.
20160
20161 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
20162
20163 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
20164
20165 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20166
20167 PR target/83399
20168 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
20169 VECTOR_MEM_ALTIVEC_OR_VSX_P.
20170 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
20171 indexed_or_indirect_operand predicate.
20172 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
20173 (*vsx_le_perm_load_v8hi): Likewise.
20174 (*vsx_le_perm_load_v16qi): Likewise.
20175 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
20176 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
20177 (*vsx_le_perm_store_v8hi): Likewise.
20178 (*vsx_le_perm_store_v16qi): Likewise.
20179 (eight unnamed splitters): Likewise.
20180
20181 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
20182
20183 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
20184 * config/rs6000/emmintrin.h: Likewise.
20185 * config/rs6000/mmintrin.h: Likewise.
20186 * config/rs6000/xmmintrin.h: Likewise.
20187
20188 2018-01-10 David Malcolm <dmalcolm@redhat.com>
20189
20190 PR c++/43486
20191 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
20192 "public_flag".
20193 * tree.c (tree_nop_conversion): Return true for location wrapper
20194 nodes.
20195 (maybe_wrap_with_location): New function.
20196 (selftest::check_strip_nops): New function.
20197 (selftest::test_location_wrappers): New function.
20198 (selftest::tree_c_tests): Call it.
20199 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
20200 (maybe_wrap_with_location): New decl.
20201 (EXPR_LOCATION_WRAPPER_P): New macro.
20202 (location_wrapper_p): New inline function.
20203 (tree_strip_any_location_wrapper): New inline function.
20204
20205 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
20206
20207 PR target/83735
20208 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
20209 stack_realign_offset for the largest alignment of stack slot
20210 actually used.
20211 (ix86_find_max_used_stack_alignment): New function.
20212 (ix86_finalize_stack_frame_flags): Use it. Set
20213 max_used_stack_alignment if we don't realign stack.
20214 * config/i386/i386.h (machine_function): Add
20215 max_used_stack_alignment.
20216
20217 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
20218
20219 * config/arm/arm.opt (-mbranch-cost): New option.
20220 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
20221 account.
20222
20223 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
20224
20225 PR target/83629
20226 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
20227 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
20228
20229 2018-01-10 Richard Biener <rguenther@suse.de>
20230
20231 PR debug/83765
20232 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
20233 early out so it also covers the case where we have a non-NULL
20234 origin.
20235
20236 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20237
20238 PR tree-optimization/83753
20239 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
20240 for non-strided grouped accesses if the number of elements is 1.
20241
20242 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
20243
20244 PR target/81616
20245 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
20246 * i386.h (TARGET_USE_GATHER): Define.
20247 * x86-tune.def (X86_TUNE_USE_GATHER): New.
20248
20249 2018-01-10 Martin Liska <mliska@suse.cz>
20250
20251 PR bootstrap/82831
20252 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
20253 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
20254 partitioning.
20255 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
20256 CLEANUP_NO_PARTITIONING is not set.
20257
20258 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
20259
20260 * doc/rtl.texi: Remove documentation of (const ...) wrappers
20261 for vectors, as a partial revert of r254296.
20262 * rtl.h (const_vec_p): Delete.
20263 (const_vec_duplicate_p): Don't test for vector CONSTs.
20264 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
20265 * expmed.c (make_tree): Likewise.
20266
20267 Revert:
20268 * common.md (E, F): Use CONSTANT_P instead of checking for
20269 CONST_VECTOR.
20270 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
20271 checking for CONST_VECTOR.
20272
20273 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20274
20275 PR middle-end/83575
20276 * predict.c (force_edge_cold): Handle in more sane way edges
20277 with no prediction.
20278
20279 2018-01-09 Carl Love <cel@us.ibm.com>
20280
20281 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
20282 V4SI, V4SF types.
20283 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
20284 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
20285 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
20286 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
20287 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
20288 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
20289 * config/rs6000/rs6000-protos.h: Add extern defition for
20290 rs6000_generate_float2_double_code.
20291 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
20292 function.
20293 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
20294 (float2_v2df): Add define_expand.
20295
20296 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
20297
20298 PR target/83628
20299 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
20300 op_mode in the force_to_mode call.
20301
20302 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20303
20304 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
20305 instead of checking each element individually.
20306 (aarch64_evpc_uzp): Likewise.
20307 (aarch64_evpc_zip): Likewise.
20308 (aarch64_evpc_ext): Likewise.
20309 (aarch64_evpc_rev): Likewise.
20310 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
20311 instead of checking each element individually. Return true without
20312 generating rtl if
20313 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
20314 whether all selected elements come from the same input, instead of
20315 checking each element individually. Remove calls to gen_rtx_REG,
20316 start_sequence and end_sequence and instead assert that no rtl is
20317 generated.
20318
20319 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20320
20321 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
20322 order of HIGH and CONST checks.
20323
20324 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
20325
20326 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
20327 if the destination isn't an SSA_NAME.
20328
20329 2018-01-09 Richard Biener <rguenther@suse.de>
20330
20331 PR tree-optimization/83668
20332 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
20333 move prologue...
20334 (canonicalize_loop_form): ... here, renamed from ...
20335 (canonicalize_loop_closed_ssa_form): ... this and amended to
20336 swap successor edges for loop exit blocks to make us use
20337 the RPO order we need for initial schedule generation.
20338
20339 2018-01-09 Joseph Myers <joseph@codesourcery.com>
20340
20341 PR tree-optimization/64811
20342 * match.pd: When optimizing comparisons with Inf, avoid
20343 introducing or losing exceptions from comparisons with NaN.
20344
20345 2018-01-09 Martin Liska <mliska@suse.cz>
20346
20347 PR sanitizer/82517
20348 * asan.c (shadow_mem_size): Add gcc_assert.
20349
20350 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
20351
20352 Don't save registers in main().
20353
20354 PR target/83738
20355 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
20356 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
20357 * config/avr/avr.c (avr_set_current_function): Don't error if
20358 naked, OS_task or OS_main are specified at the same time.
20359 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
20360 OS_main.
20361 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
20362 attribute.
20363 * common/config/avr/avr-common.c (avr_option_optimization_table):
20364 Switch on -mmain-is-OS_task for optimizing compilations.
20365
20366 2018-01-09 Richard Biener <rguenther@suse.de>
20367
20368 PR tree-optimization/83572
20369 * graphite.c: Include cfganal.h.
20370 (graphite_transform_loops): Connect infinite loops to exit
20371 and remove fake edges at the end.
20372
20373 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20374
20375 * ipa-inline.c (edge_badness): Revert accidental checkin.
20376
20377 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
20378
20379 PR ipa/80763
20380 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
20381 symbols; not inline clones.
20382
20383 2018-01-09 Jakub Jelinek <jakub@redhat.com>
20384
20385 PR target/83507
20386 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
20387 hard registers. Formatting fixes.
20388
20389 PR preprocessor/83722
20390 * gcc.c (try_generate_repro): Pass
20391 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
20392 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
20393 do_report_bug.
20394
20395 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
20396 Kito Cheng <kito.cheng@gmail.com>
20397
20398 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
20399 (riscv_leaf_function_p): Delete.
20400 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
20401
20402 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20403
20404 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
20405 function.
20406 (do_ifelse): New function.
20407 (do_isel): New function.
20408 (do_sub3): New function.
20409 (do_add3): New function.
20410 (do_load_mask_compare): New function.
20411 (do_overlap_load_compare): New function.
20412 (expand_compare_loop): New function.
20413 (expand_block_compare): Call expand_compare_loop() when appropriate.
20414 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
20415 option description.
20416 (-mblock-compare-inline-loop-limit): New option.
20417
20418 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20419
20420 PR target/83677
20421 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
20422 Reverse order of second and third operands in first alternative.
20423 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
20424 of first and second elements in UNSPEC_VPERMR vector.
20425 (altivec_expand_vec_perm_le): Likewise.
20426
20427 2018-01-08 Jeff Law <law@redhat.com>
20428
20429 PR rtl-optimizatin/81308
20430 * tree-switch-conversion.c (cfg_altered): New file scoped static.
20431 (process_switch): If group_case_labels makes a change, then set
20432 cfg_altered.
20433 (pass_convert_switch::execute): If a switch is converted, then
20434 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
20435
20436 PR rtl-optimization/81308
20437 * recog.c (split_all_insns): Conditionally cleanup the CFG after
20438 splitting insns.
20439
20440 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
20441
20442 PR target/83663 - Revert r255946
20443 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
20444 generation for cases where splatting a value is not useful.
20445 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
20446 across a vec_duplicate and a paradoxical subreg forming a vector
20447 mode to a vec_concat.
20448
20449 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20450
20451 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
20452 -march=armv8.3-a variants.
20453 * config/arm/t-multilib: Likewise.
20454 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
20455
20456 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20457
20458 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
20459 to generate rtl.
20460 (cceq_ior_compare_complement): Give it a name so I can use it, and
20461 change boolean_or_operator predicate to boolean_operator so it can
20462 be used to generate a crand.
20463 (eqne): New code iterator.
20464 (bd/bd_neg): New code_attrs.
20465 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
20466 a single define_insn.
20467 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
20468 decrement (bdnzt/bdnzf/bdzt/bdzf).
20469 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
20470 with the new names of the branch decrement patterns, and added the
20471 names of the branch decrement conditional patterns.
20472
20473 2018-01-08 Richard Biener <rguenther@suse.de>
20474
20475 PR tree-optimization/83563
20476 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
20477 cache.
20478
20479 2018-01-08 Richard Biener <rguenther@suse.de>
20480
20481 PR middle-end/83713
20482 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
20483
20484 2018-01-08 Richard Biener <rguenther@suse.de>
20485
20486 PR tree-optimization/83685
20487 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
20488 references to abnormals.
20489
20490 2018-01-08 Richard Biener <rguenther@suse.de>
20491
20492 PR lto/83719
20493 * dwarf2out.c (output_indirect_strings): Handle empty
20494 skeleton_debug_str_hash.
20495 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
20496
20497 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20498
20499 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
20500 (emit_store_direct): Likewise.
20501 (arc_trampoline_adjust_address): Likewise.
20502 (arc_asm_trampoline_template): New function.
20503 (arc_initialize_trampoline): Use asm_trampoline_template.
20504 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
20505 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
20506 * config/arc/arc.md (flush_icache): Delete pattern.
20507
20508 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
20509
20510 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
20511 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
20512 munaligned-access.
20513
20514 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20515
20516 PR target/83681
20517 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
20518 by not USED_FOR_TARGET.
20519 (make_pass_resolve_sw_modes): Likewise.
20520
20521 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
20522
20523 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
20524 USED_FOR_TARGET.
20525
20526 2018-01-08 Richard Biener <rguenther@suse.de>
20527
20528 PR middle-end/83580
20529 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
20530
20531 2018-01-08 Richard Biener <rguenther@suse.de>
20532
20533 PR middle-end/83517
20534 * match.pd ((t * 2) / 2) -> t): Add missing :c.
20535
20536 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
20537
20538 PR middle-end/81897
20539 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
20540 basic blocks with a small number of successors.
20541 (convert_control_dep_chain_into_preds): Improve handling of
20542 forwarder blocks.
20543 (dump_predicates): Split apart into...
20544 (dump_pred_chain): ...here...
20545 (dump_pred_info): ...and here.
20546 (can_one_predicate_be_invalidated_p): Add debugging printfs.
20547 (can_chain_union_be_invalidated_p): Improve check for invalidation
20548 of paths.
20549 (uninit_uses_cannot_happen): Avoid unnecessary if
20550 convert_control_dep_chain_into_preds yielded nothing.
20551
20552 2018-01-06 Martin Sebor <msebor@redhat.com>
20553
20554 PR tree-optimization/83640
20555 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
20556 subtracting negative offset from size.
20557 (builtin_access::overlap): Adjust offset bounds of the access to fall
20558 within the size of the object if possible.
20559
20560 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
20561
20562 PR rtl-optimization/83699
20563 * expmed.c (extract_bit_field_1): Restrict the vector usage of
20564 extract_bit_field_as_subreg to cases in which the extracted
20565 value is also a vector.
20566
20567 * lra-constraints.c (process_alt_operands): Test for the equivalence
20568 substitutions when detecting a possible reload cycle.
20569
20570 2018-01-06 Jakub Jelinek <jakub@redhat.com>
20571
20572 PR debug/83480
20573 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
20574 by default if flag_selective_schedling{,2}. Formatting fixes.
20575
20576 PR rtl-optimization/83682
20577 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
20578 if it has non-VECTOR_MODE element mode.
20579 (vec_duplicate_p): Likewise.
20580
20581 PR middle-end/83694
20582 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
20583 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
20584
20585 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20586
20587 PR target/83604
20588 * config/i386/i386-builtin.def
20589 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
20590 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
20591 Require also OPTION_MASK_ISA_AVX512F in addition to
20592 OPTION_MASK_ISA_GFNI.
20593 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
20594 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
20595 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
20596 to OPTION_MASK_ISA_GFNI.
20597 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
20598 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
20599 OPTION_MASK_ISA_AVX512BW.
20600 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
20601 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
20602 addition to OPTION_MASK_ISA_GFNI.
20603 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
20604 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
20605 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
20606 to OPTION_MASK_ISA_GFNI.
20607 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
20608 a requirement for all ISAs rather than any of them with a few
20609 exceptions.
20610 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
20611 processing.
20612 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
20613 bitmasks to be enabled with 3 exceptions, instead of requiring any
20614 enabled ISA with lots of exceptions.
20615 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
20616 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
20617 Change avx512bw in isa attribute to avx512f.
20618 * config/i386/sgxintrin.h: Add license boilerplate.
20619 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
20620 to __AVX512F__ and __AVX512VL to __AVX512VL__.
20621 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
20622 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
20623 defined.
20624 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
20625 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
20626 temporarily sse2 rather than sse if not enabled already.
20627
20628 PR target/83604
20629 * config/i386/sse.md (VI248_VLBW): Rename to ...
20630 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
20631 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
20632 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
20633 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
20634 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
20635 mode iterator instead of VI248_VLBW.
20636
20637 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
20638
20639 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
20640 (record_modified): Skip clobbers; add debug output.
20641 (param_change_prob): Use sreal frequencies.
20642
20643 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20644
20645 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20646 punt for user-aligned variables.
20647
20648 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20649
20650 * tree-chrec.c (chrec_contains_symbols): Return true for
20651 POLY_INT_CST.
20652
20653 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20654
20655 PR target/82439
20656 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20657 of (x|y) == x for BICS pattern.
20658
20659 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20660
20661 PR tree-optimization/83605
20662 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20663 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20664 can throw.
20665
20666 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20667
20668 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20669 * config/epiphany/rtems.h: New file.
20670
20671 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20672 Uros Bizjak <ubizjak@gmail.com>
20673
20674 PR target/83554
20675 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20676 QIreg_operand instead of register_operand predicate.
20677 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20678 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20679 comments instead of -fmitigate[-_]rop.
20680
20681 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20682
20683 PR bootstrap/81926
20684 * cgraphunit.c (symbol_table::compile): Switch to text_section
20685 before calling assembly_start debug hook.
20686 * run-rtl-passes.c (run_rtl_passes): Likewise.
20687 Include output.h.
20688
20689 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20690
20691 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20692 range_int_cst_p rather than !symbolic_range_p before calling
20693 extract_range_from_multiplicative_op_1.
20694
20695 2018-01-04 Jeff Law <law@redhat.com>
20696
20697 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20698 redundant test in assertion.
20699
20700 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20701
20702 * doc/rtl.texi: Document machine_mode wrapper classes.
20703
20704 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20705
20706 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20707 using tree_to_uhwi.
20708
20709 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20710
20711 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20712 the VEC_PERM_EXPR fold to fail.
20713
20714 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20715
20716 PR debug/83585
20717 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20718 to switched_sections.
20719
20720 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20721
20722 PR target/83680
20723 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20724 test for d.testing.
20725
20726 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20727
20728 PR target/83387
20729 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20730 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20731
20732 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20733
20734 PR debug/83666
20735 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20736 is BLKmode and bitpos not zero or mode change is needed.
20737
20738 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20739
20740 PR target/83675
20741 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20742 TARGET_VIS2.
20743
20744 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20745
20746 PR target/83628
20747 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20748 instead of MULT rtx. Update all corresponding splitters.
20749 (*saddl_se): Ditto.
20750 (*ssub<modesuffix>): Ditto.
20751 (*ssubl_se): Ditto.
20752 (*cmp_sadd_di): Update split patterns.
20753 (*cmp_sadd_si): Ditto.
20754 (*cmp_sadd_sidi): Ditto.
20755 (*cmp_ssub_di): Ditto.
20756 (*cmp_ssub_si): Ditto.
20757 (*cmp_ssub_sidi): Ditto.
20758 * config/alpha/predicates.md (const23_operand): New predicate.
20759 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20760 Look for ASHIFT, not MULT inner operand.
20761 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20762
20763 2018-01-04 Martin Liska <mliska@suse.cz>
20764
20765 PR gcov-profile/83669
20766 * gcov.c (output_intermediate_file): Add version to intermediate
20767 gcov file.
20768 * doc/gcov.texi: Document new field 'version' in intermediate
20769 file format. Fix location of '-k' option of gcov command.
20770
20771 2018-01-04 Martin Liska <mliska@suse.cz>
20772
20773 PR ipa/82352
20774 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20775
20776 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20777
20778 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20779
20780 2018-01-03 Martin Sebor <msebor@redhat.com>
20781
20782 PR tree-optimization/83655
20783 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20784 checking calls with invalid arguments.
20785
20786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20787
20788 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20789 (vectorizable_mask_load_store): Delete.
20790 (vectorizable_call): Return false for masked loads and stores.
20791 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20792 instead of gimple_assign_rhs1.
20793 (vectorizable_load): Handle IFN_MASK_LOAD.
20794 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20795
20796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20797
20798 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20799 split out from..,
20800 (vectorizable_mask_load_store): ...here.
20801 (vectorizable_load): ...and here.
20802
20803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20804
20805 * tree-vect-stmts.c (vect_build_all_ones_mask)
20806 (vect_build_zero_merge_argument): New functions, split out from...
20807 (vectorizable_load): ...here.
20808
20809 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20810
20811 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20812 split out from...
20813 (vectorizable_mask_load_store): ...here.
20814 (vectorizable_store): ...and here.
20815
20816 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20817
20818 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20819 split out from...
20820 (vectorizable_mask_load_store): ...here.
20821
20822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20823
20824 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20825 (vect_model_store_cost): Take a vec_load_store_type instead of a
20826 vect_def_type.
20827 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20828 (vect_model_store_cost): Take a vec_load_store_type instead of a
20829 vect_def_type.
20830 (vectorizable_mask_load_store): Update accordingly.
20831 (vectorizable_store): Likewise.
20832 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20833
20834 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20835
20836 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20837 IFN_MASK_LOAD calls here rather than...
20838 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20839
20840 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20841 Alan Hayward <alan.hayward@arm.com>
20842 David Sherwood <david.sherwood@arm.com>
20843
20844 * expmed.c (extract_bit_field_1): For vector extracts,
20845 fall back to extract_bit_field_as_subreg if vec_extract
20846 isn't available.
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 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20853 they are variable or constant sized.
20854 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20855 slots for constant-sized data.
20856
20857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20858 Alan Hayward <alan.hayward@arm.com>
20859 David Sherwood <david.sherwood@arm.com>
20860
20861 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20862 handling COND_EXPRs with boolean comparisons, try to find a better
20863 basis for the mask type than the boolean itself.
20864
20865 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20866
20867 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20868 is calculated and how it can be overridden.
20869 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20870 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20871 if defined.
20872 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20873 if nonzero.
20874
20875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20876 Alan Hayward <alan.hayward@arm.com>
20877 David Sherwood <david.sherwood@arm.com>
20878
20879 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20880 Remove the mode argument.
20881 (aarch64_simd_valid_immediate): Remove the mode and inverse
20882 arguments.
20883 * config/aarch64/iterators.md (bitsize): New iterator.
20884 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20885 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20886 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20887 aarch64_simd_valid_immediate.
20888 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20889 (aarch64_reg_or_bic_imm): Likewise.
20890 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20891 with an insn_type enum and msl with a modifier_type enum.
20892 Replace element_width with a scalar_mode. Change the shift
20893 to unsigned int. Add constructors for scalar_float_mode and
20894 scalar_int_mode elements.
20895 (aarch64_vect_float_const_representable_p): Delete.
20896 (aarch64_can_const_movi_rtx_p)
20897 (aarch64_simd_scalar_immediate_valid_for_move)
20898 (aarch64_simd_make_constant): Update call to
20899 aarch64_simd_valid_immediate.
20900 (aarch64_advsimd_valid_immediate_hs): New function.
20901 (aarch64_advsimd_valid_immediate): Likewise.
20902 (aarch64_simd_valid_immediate): Remove mode and inverse
20903 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20904 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20905 and aarch64_float_const_representable_p on the result.
20906 (aarch64_output_simd_mov_immediate): Remove mode argument.
20907 Update call to aarch64_simd_valid_immediate and use of
20908 simd_immediate_info.
20909 (aarch64_output_scalar_simd_mov_immediate): Update call
20910 accordingly.
20911
20912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20913 Alan Hayward <alan.hayward@arm.com>
20914 David Sherwood <david.sherwood@arm.com>
20915
20916 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20917 (mode_nunits): Likewise CONST_MODE_NUNITS.
20918 * machmode.def (ADJUST_NUNITS): Document.
20919 * genmodes.c (mode_data::need_nunits_adj): New field.
20920 (blank_mode): Update accordingly.
20921 (adj_nunits): New variable.
20922 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20923 parameter.
20924 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20925 listed in adj_nunits.
20926 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20927 listed in adj_nunits. Don't emit case statements for such modes.
20928 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20929 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20930 nothing if adj_nunits is nonnull.
20931 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20932 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20933 (emit_mode_fbit): Update use of print_maybe_const_decl.
20934 (emit_move_size): Likewise. Treat the array as non-const
20935 if adj_nunits.
20936 (emit_mode_adjustments): Handle adj_nunits.
20937
20938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20939
20940 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20941 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20942 (VECTOR_MODES): Use it.
20943 (make_vector_modes): Take the prefix as an argument.
20944
20945 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20946 Alan Hayward <alan.hayward@arm.com>
20947 David Sherwood <david.sherwood@arm.com>
20948
20949 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20950 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20951 for MODE_VECTOR_BOOL.
20952 * machmode.def (VECTOR_BOOL_MODE): Document.
20953 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20954 (make_vector_bool_mode): New function.
20955 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20956 MODE_VECTOR_BOOL.
20957 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20958 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20959 Likewise.
20960 * stor-layout.c (int_mode_for_mode): Likewise.
20961 * tree.c (build_vector_type_for_mode): Likewise.
20962 * varasm.c (output_constant_pool_2): Likewise.
20963 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20964 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20965 for MODE_VECTOR_BOOL.
20966 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20967 of mode class checks.
20968 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20969 instead of a list of mode class checks.
20970 (expand_vector_scalar_condition): Likewise.
20971 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20972
20973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20974 Alan Hayward <alan.hayward@arm.com>
20975 David Sherwood <david.sherwood@arm.com>
20976
20977 * machmode.h (mode_size): Change from unsigned short to
20978 poly_uint16_pod.
20979 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20980 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20981 or if measurement_type is not polynomial.
20982 (fixed_size_mode::includes_p): Check for constant-sized modes.
20983 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20984 return a poly_uint16 rather than an unsigned short.
20985 (emit_mode_size): Change the type of mode_size from unsigned short
20986 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20987 (emit_mode_adjustments): Cope with polynomial vector sizes.
20988 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20989 for GET_MODE_SIZE.
20990 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20991 for GET_MODE_SIZE.
20992 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20993 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20994 * caller-save.c (setup_save_areas): Likewise.
20995 (replace_reg_with_saved_mem): Likewise.
20996 * calls.c (emit_library_call_value_1): Likewise.
20997 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20998 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20999 (gen_lowpart_for_combine): Likewise.
21000 * convert.c (convert_to_integer_1): Likewise.
21001 * cse.c (equiv_constant, cse_insn): Likewise.
21002 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21003 (cselib_subst_to_values): Likewise.
21004 * dce.c (word_dce_process_block): Likewise.
21005 * df-problems.c (df_word_lr_mark_ref): Likewise.
21006 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21007 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21008 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21009 (rtl_for_decl_location): Likewise.
21010 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21011 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21012 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21013 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21014 (expand_expr_real_1): Likewise.
21015 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21016 (pad_below): Likewise.
21017 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21018 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21019 * ira.c (get_subreg_tracking_sizes): Likewise.
21020 * ira-build.c (ira_create_allocno_objects): Likewise.
21021 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21022 (ira_sort_regnos_for_alter_reg): Likewise.
21023 * ira-costs.c (record_operand_costs): Likewise.
21024 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21025 (resolve_simple_move): Likewise.
21026 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21027 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21028 (lra_constraints): Likewise.
21029 (CONST_POOL_OK_P): Reject variable-sized modes.
21030 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21031 (add_pseudo_to_slot, lra_spill): Likewise.
21032 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21033 * optabs-query.c (get_best_extraction_insn): Likewise.
21034 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21035 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21036 (expand_mult_highpart, valid_multiword_target_p): Likewise.
21037 * recog.c (offsettable_address_addr_space_p): Likewise.
21038 * regcprop.c (maybe_mode_change): Likewise.
21039 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21040 * regrename.c (build_def_use): Likewise.
21041 * regstat.c (dump_reg_info): Likewise.
21042 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21043 (find_reloads, find_reloads_subreg_address): Likewise.
21044 * reload1.c (eliminate_regs_1): Likewise.
21045 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21046 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21047 (simplify_binary_operation_1, simplify_subreg): Likewise.
21048 * targhooks.c (default_function_arg_padding): Likewise.
21049 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21050 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21051 (verify_gimple_assign_ternary): Likewise.
21052 * tree-inline.c (estimate_move_cost): Likewise.
21053 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21054 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21055 (get_address_cost_ainc): Likewise.
21056 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21057 (vect_supportable_dr_alignment): Likewise.
21058 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21059 (vectorizable_reduction): Likewise.
21060 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21061 (vectorizable_operation, vectorizable_load): Likewise.
21062 * tree.c (build_same_sized_truth_vector_type): Likewise.
21063 * valtrack.c (cleanup_auto_inc_dec): Likewise.
21064 * var-tracking.c (emit_note_insn_var_location): Likewise.
21065 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21066 (ADDR_VEC_ALIGN): Likewise.
21067
21068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21069 Alan Hayward <alan.hayward@arm.com>
21070 David Sherwood <david.sherwood@arm.com>
21071
21072 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
21073 unsigned short.
21074 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21075 or if measurement_type is polynomial.
21076 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
21077 * combine.c (make_extraction): Likewise.
21078 * dse.c (find_shift_sequence): Likewise.
21079 * dwarf2out.c (mem_loc_descriptor): Likewise.
21080 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
21081 (extract_bit_field, extract_low_bits): Likewise.
21082 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
21083 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
21084 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
21085 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
21086 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21087 * reload.c (find_reloads): Likewise.
21088 * reload1.c (alter_reg): Likewise.
21089 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
21090 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
21091 * tree-if-conv.c (predicate_mem_writes): Likewise.
21092 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
21093 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
21094 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21095 * valtrack.c (dead_debug_insert_temp): Likewise.
21096 * varasm.c (mergeable_constant_section): Likewise.
21097 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
21098
21099 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21100 Alan Hayward <alan.hayward@arm.com>
21101 David Sherwood <david.sherwood@arm.com>
21102
21103 * expr.c (expand_assignment): Cope with polynomial mode sizes
21104 when assigning to a CONCAT.
21105
21106 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21107 Alan Hayward <alan.hayward@arm.com>
21108 David Sherwood <david.sherwood@arm.com>
21109
21110 * machmode.h (mode_precision): Change from unsigned short to
21111 poly_uint16_pod.
21112 (mode_to_precision): Return a poly_uint16 rather than an unsigned
21113 short.
21114 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
21115 or if measurement_type is not polynomial.
21116 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
21117 in which the mode is already known to be a scalar_int_mode.
21118 * genmodes.c (emit_mode_precision): Change the type of mode_precision
21119 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
21120 initializer.
21121 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21122 for GET_MODE_PRECISION.
21123 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21124 for GET_MODE_PRECISION.
21125 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
21126 as polynomial.
21127 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
21128 (expand_field_assignment, make_extraction): Likewise.
21129 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
21130 (get_last_value): Likewise.
21131 * convert.c (convert_to_integer_1): Likewise.
21132 * cse.c (cse_insn): Likewise.
21133 * expr.c (expand_expr_real_1): Likewise.
21134 * lra-constraints.c (simplify_operand_subreg): Likewise.
21135 * optabs-query.c (can_atomic_load_p): Likewise.
21136 * optabs.c (expand_atomic_load): Likewise.
21137 (expand_atomic_store): Likewise.
21138 * ree.c (combine_reaching_defs): Likewise.
21139 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
21140 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
21141 * tree.h (type_has_mode_precision_p): Likewise.
21142 * ubsan.c (instrument_si_overflow): Likewise.
21143
21144 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21145 Alan Hayward <alan.hayward@arm.com>
21146 David Sherwood <david.sherwood@arm.com>
21147
21148 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
21149 polynomial numbers of units.
21150 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
21151 (valid_vector_subparts_p): New function.
21152 (build_vector_type): Remove temporary shim and take the number
21153 of units as a poly_uint64 rather than an int.
21154 (build_opaque_vector_type): Take the number of units as a
21155 poly_uint64 rather than an int.
21156 * tree.c (build_vector_from_ctor): Handle polynomial
21157 TYPE_VECTOR_SUBPARTS.
21158 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
21159 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
21160 (build_vector_from_val): If the number of units is variable,
21161 use build_vec_duplicate_cst for constant operands and
21162 VEC_DUPLICATE_EXPR otherwise.
21163 (make_vector_type): Remove temporary is_constant ().
21164 (build_vector_type, build_opaque_vector_type): Take the number of
21165 units as a poly_uint64 rather than an int.
21166 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
21167 VECTOR_CST_NELTS.
21168 * cfgexpand.c (expand_debug_expr): Likewise.
21169 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
21170 (store_constructor, expand_expr_real_1): Likewise.
21171 (const_scalar_mask_from_tree): Likewise.
21172 * fold-const-call.c (fold_const_reduction): Likewise.
21173 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
21174 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
21175 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
21176 (fold_relational_const): Likewise.
21177 (native_interpret_vector): Likewise. Change the size from an
21178 int to an unsigned int.
21179 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
21180 TYPE_VECTOR_SUBPARTS.
21181 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
21182 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
21183 duplicating a non-constant operand into a variable-length vector.
21184 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
21185 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
21186 * ipa-icf.c (sem_variable::equals): Likewise.
21187 * match.pd: Likewise.
21188 * omp-simd-clone.c (simd_clone_subparts): Likewise.
21189 * print-tree.c (print_node): Likewise.
21190 * stor-layout.c (layout_type): Likewise.
21191 * targhooks.c (default_builtin_vectorization_cost): Likewise.
21192 * tree-cfg.c (verify_gimple_comparison): Likewise.
21193 (verify_gimple_assign_binary): Likewise.
21194 (verify_gimple_assign_ternary): Likewise.
21195 (verify_gimple_assign_single): Likewise.
21196 * tree-pretty-print.c (dump_generic_node): Likewise.
21197 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21198 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
21199 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
21200 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
21201 (vect_shift_permute_load_chain): Likewise.
21202 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
21203 (expand_vector_condition, optimize_vector_constructor): Likewise.
21204 (lower_vec_perm, get_compute_type): Likewise.
21205 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21206 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
21207 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
21208 (vect_recog_mask_conversion_pattern): Likewise.
21209 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
21210 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
21211 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21212 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
21213 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
21214 (vectorizable_shift, vectorizable_operation, vectorizable_store)
21215 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
21216 (supportable_widening_operation): Likewise.
21217 (supportable_narrowing_operation): Likewise.
21218 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
21219 Likewise.
21220 * varasm.c (output_constant): Likewise.
21221
21222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21223 Alan Hayward <alan.hayward@arm.com>
21224 David Sherwood <david.sherwood@arm.com>
21225
21226 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
21227 so that both the length == 3 and length != 3 cases set up their
21228 own permute vectors. Add comments explaining why we know the
21229 number of elements is constant.
21230 (vect_permute_load_chain): Likewise.
21231
21232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21233 Alan Hayward <alan.hayward@arm.com>
21234 David Sherwood <david.sherwood@arm.com>
21235
21236 * machmode.h (mode_nunits): Change from unsigned char to
21237 poly_uint16_pod.
21238 (ONLY_FIXED_SIZE_MODES): New macro.
21239 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
21240 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
21241 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
21242 New typedefs.
21243 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
21244 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
21245 or if measurement_type is not polynomial.
21246 * genmodes.c (ZERO_COEFFS): New macro.
21247 (emit_mode_nunits_inline): Make mode_nunits_inline return a
21248 poly_uint16.
21249 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
21250 Use ZERO_COEFFS when emitting initializers.
21251 * data-streamer.h (bp_pack_poly_value): New function.
21252 (bp_unpack_poly_value): Likewise.
21253 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21254 for GET_MODE_NUNITS.
21255 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21256 for GET_MODE_NUNITS.
21257 * tree.c (make_vector_type): Remove temporary shim and make
21258 the real function take the number of units as a poly_uint64
21259 rather than an int.
21260 (build_vector_type_for_mode): Handle polynomial nunits.
21261 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
21262 * emit-rtl.c (const_vec_series_p_1): Likewise.
21263 (gen_rtx_CONST_VECTOR): Likewise.
21264 * fold-const.c (test_vec_duplicate_folding): Likewise.
21265 * genrecog.c (validate_pattern): Likewise.
21266 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
21267 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21268 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
21269 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
21270 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
21271 * rtlanal.c (subreg_get_info): Likewise.
21272 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21273 (vect_grouped_load_supported): Likewise.
21274 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
21275 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
21276 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
21277 (simplify_const_unary_operation, simplify_binary_operation_1)
21278 (simplify_const_binary_operation, simplify_ternary_operation)
21279 (test_vector_ops_duplicate, test_vector_ops): Likewise.
21280 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
21281 instead of CONST_VECTOR_NUNITS.
21282 * varasm.c (output_constant_pool_2): Likewise.
21283 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
21284 explicit-encoded elements in the XVEC for variable-length vectors.
21285
21286 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21287
21288 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
21289
21290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21291 Alan Hayward <alan.hayward@arm.com>
21292 David Sherwood <david.sherwood@arm.com>
21293
21294 * coretypes.h (fixed_size_mode): Declare.
21295 (fixed_size_mode_pod): New typedef.
21296 * builtins.h (target_builtins::x_apply_args_mode)
21297 (target_builtins::x_apply_result_mode): Change type to
21298 fixed_size_mode_pod.
21299 * builtins.c (apply_args_size, apply_result_size, result_vector)
21300 (expand_builtin_apply_args_1, expand_builtin_apply)
21301 (expand_builtin_return): Update accordingly.
21302
21303 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21304
21305 * cse.c (hash_rtx_cb): Hash only the encoded elements.
21306 * cselib.c (cselib_hash_rtx): Likewise.
21307 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
21308 CONST_VECTOR encoding.
21309
21310 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21311 Jeff Law <law@redhat.com>
21312
21313 PR target/83641
21314 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
21315 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
21316 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
21317 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
21318
21319 PR target/83641
21320 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
21321 explicitly probe *sp in a noreturn function if there were any callee
21322 register saves or frame pointer is needed.
21323
21324 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21325
21326 PR debug/83621
21327 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
21328 BLKmode for ternary, binary or unary expressions.
21329
21330 PR debug/83645
21331 * var-tracking.c (delete_vta_debug_insn): New inline function.
21332 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
21333 insns from get_insns () to NULL instead of each bb separately.
21334 Use delete_vta_debug_insn. No longer static.
21335 (vt_debug_insns_local, variable_tracking_main_1): Adjust
21336 delete_vta_debug_insns callers.
21337 * rtl.h (delete_vta_debug_insns): Declare.
21338 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
21339 instead of variable_tracking_main.
21340
21341 2018-01-03 Martin Sebor <msebor@redhat.com>
21342
21343 PR tree-optimization/83603
21344 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
21345 arguments past the endof the argument list in functions declared
21346 without a prototype.
21347 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
21348 Avoid checking when arguments are null.
21349
21350 2018-01-03 Martin Sebor <msebor@redhat.com>
21351
21352 PR c/83559
21353 * doc/extend.texi (attribute const): Fix a typo.
21354 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
21355 issuing -Wsuggest-attribute for void functions.
21356
21357 2018-01-03 Martin Sebor <msebor@redhat.com>
21358
21359 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
21360 offset_int::from instead of wide_int::to_shwi.
21361 (maybe_diag_overlap): Remove assertion.
21362 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
21363 * gimple-ssa-sprintf.c (format_directive): Same.
21364 (parse_directive): Same.
21365 (sprintf_dom_walker::compute_format_length): Same.
21366 (try_substitute_return_value): Same.
21367
21368 2018-01-03 Jeff Law <law@redhat.com>
21369
21370 PR middle-end/83654
21371 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
21372 non-constant residual for zero at runtime and avoid probing in
21373 that case. Reorganize code for trailing problem to mirror handling
21374 of the residual.
21375
21376 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21377
21378 PR tree-optimization/83501
21379 * tree-ssa-strlen.c (get_string_cst): New.
21380 (handle_char_store): Call get_string_cst.
21381
21382 2018-01-03 Martin Liska <mliska@suse.cz>
21383
21384 PR tree-optimization/83593
21385 * tree-ssa-strlen.c: Include tree-cfg.h.
21386 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
21387 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
21388 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
21389 to false.
21390 (strlen_dom_walker::before_dom_children): Call
21391 gimple_purge_dead_eh_edges. Dump tranformation with details
21392 dump flags.
21393 (strlen_dom_walker::before_dom_children): Update call by adding
21394 new argument cleanup_eh.
21395 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
21396
21397 2018-01-03 Martin Liska <mliska@suse.cz>
21398
21399 PR ipa/83549
21400 * cif-code.def (VARIADIC_THUNK): New enum value.
21401 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
21402 thunks.
21403
21404 2018-01-03 Jan Beulich <jbeulich@suse.com>
21405
21406 * sse.md (mov<mode>_internal): Tighten condition for when to use
21407 vmovdqu<ssescalarsize> for TI and OI modes.
21408
21409 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21410
21411 Update copyright years.
21412
21413 2018-01-03 Martin Liska <mliska@suse.cz>
21414
21415 PR ipa/83594
21416 * ipa-visibility.c (function_and_variable_visibility): Skip
21417 functions with noipa attribure.
21418
21419 2018-01-03 Jakub Jelinek <jakub@redhat.com>
21420
21421 * gcc.c (process_command): Update copyright notice dates.
21422 * gcov-dump.c (print_version): Ditto.
21423 * gcov.c (print_version): Ditto.
21424 * gcov-tool.c (print_version): Ditto.
21425 * gengtype.c (create_file): Ditto.
21426 * doc/cpp.texi: Bump @copying's copyright year.
21427 * doc/cppinternals.texi: Ditto.
21428 * doc/gcc.texi: Ditto.
21429 * doc/gccint.texi: Ditto.
21430 * doc/gcov.texi: Ditto.
21431 * doc/install.texi: Ditto.
21432 * doc/invoke.texi: Ditto.
21433
21434 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21435
21436 * vector-builder.h (vector_builder::m_full_nelts): Change from
21437 unsigned int to poly_uint64.
21438 (vector_builder::full_nelts): Update prototype accordingly.
21439 (vector_builder::new_vector): Likewise.
21440 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
21441 (vector_builder::operator ==): Likewise.
21442 (vector_builder::finalize): Likewise.
21443 * int-vector-builder.h (int_vector_builder::int_vector_builder):
21444 Take the number of elements as a poly_uint64 rather than an
21445 unsigned int.
21446 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
21447 from unsigned int to poly_uint64.
21448 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
21449 (vec_perm_indices::new_vector): Likewise.
21450 (vec_perm_indices::length): Likewise.
21451 (vec_perm_indices::nelts_per_input): Likewise.
21452 (vec_perm_indices::input_nelts): Likewise.
21453 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
21454 number of elements per input as a poly_uint64 rather than an
21455 unsigned int. Use the original encoding for variable-length
21456 vectors, rather than clamping each individual element.
21457 For the second and subsequent elements in each pattern,
21458 clamp the step and base before clamping their sum.
21459 (vec_perm_indices::series_p): Handle polynomial element counts.
21460 (vec_perm_indices::all_in_range_p): Likewise.
21461 (vec_perm_indices_to_tree): Likewise.
21462 (vec_perm_indices_to_rtx): Likewise.
21463 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
21464 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
21465 (tree_vector_builder::new_binary_operation): Handle polynomial
21466 element counts. Return false if we need to know the number
21467 of elements at compile time.
21468 * fold-const.c (fold_vec_perm): Punt if the number of elements
21469 isn't known at compile time.
21470
21471 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21472
21473 * vec-perm-indices.h (vec_perm_builder): Change element type
21474 from HOST_WIDE_INT to poly_int64.
21475 (vec_perm_indices::element_type): Update accordingly.
21476 (vec_perm_indices::clamp): Handle polynomial element_types.
21477 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21478 (vec_perm_indices::all_in_range_p): Likewise.
21479 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
21480 than shwi trees.
21481 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
21482 polynomial vec_perm_indices element types.
21483 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
21484 * fold-const.c (fold_vec_perm): Likewise.
21485 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
21486 * tree-vect-generic.c (lower_vec_perm): Likewise.
21487 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21488 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
21489 element type to HOST_WIDE_INT.
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 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
21496 rather than an int. Use plus_constant.
21497 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
21498 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
21499
21500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21501 Alan Hayward <alan.hayward@arm.com>
21502 David Sherwood <david.sherwood@arm.com>
21503
21504 * calls.c (emit_call_1, expand_call): Change struct_value_size from
21505 a HOST_WIDE_INT to a poly_int64.
21506
21507 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21508 Alan Hayward <alan.hayward@arm.com>
21509 David Sherwood <david.sherwood@arm.com>
21510
21511 * calls.c (load_register_parameters): Cope with polynomial
21512 mode sizes. Require a constant size for BLKmode parameters
21513 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
21514 forces a parameter to be padded at the lsb end in order to
21515 fill a complete number of words, require the parameter size
21516 to be ordered wrt UNITS_PER_WORD.
21517
21518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21519 Alan Hayward <alan.hayward@arm.com>
21520 David Sherwood <david.sherwood@arm.com>
21521
21522 * reload1.c (spill_stack_slot_width): Change element type
21523 from unsigned int to poly_uint64_pod.
21524 (alter_reg): Treat mode sizes as polynomial.
21525
21526 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21527 Alan Hayward <alan.hayward@arm.com>
21528 David Sherwood <david.sherwood@arm.com>
21529
21530 * reload.c (complex_word_subreg_p): New function.
21531 (reload_inner_reg_of_subreg, push_reload): Use it.
21532
21533 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21534 Alan Hayward <alan.hayward@arm.com>
21535 David Sherwood <david.sherwood@arm.com>
21536
21537 * lra-constraints.c (process_alt_operands): Reject matched
21538 operands whose sizes aren't ordered.
21539 (match_reload): Refer to this check here.
21540
21541 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21542 Alan Hayward <alan.hayward@arm.com>
21543 David Sherwood <david.sherwood@arm.com>
21544
21545 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
21546 that the mode size is in the set {1, 2, 4, 8, 16}.
21547
21548 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21549 Alan Hayward <alan.hayward@arm.com>
21550 David Sherwood <david.sherwood@arm.com>
21551
21552 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
21553 Use plus_constant instead of gen_rtx_PLUS.
21554
21555 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21556 Alan Hayward <alan.hayward@arm.com>
21557 David Sherwood <david.sherwood@arm.com>
21558
21559 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
21560 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
21561 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
21562 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
21563 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
21564 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
21565 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
21566 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
21567 * config/i386/i386.c (ix86_push_rounding): ...this new function.
21568 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
21569 a poly_int64.
21570 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
21571 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
21572 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
21573 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
21574 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
21575 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
21576 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
21577 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
21578 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
21579 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
21580 function.
21581 * expr.c (emit_move_resolve_push): Treat the input and result
21582 of PUSH_ROUNDING as a poly_int64.
21583 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
21584 (emit_push_insn): Likewise.
21585 * lra-eliminations.c (mark_not_eliminable): Likewise.
21586 * recog.c (push_operand): Likewise.
21587 * reload1.c (elimination_effects): Likewise.
21588 * rtlanal.c (nonzero_bits1): Likewise.
21589 * calls.c (store_one_arg): Likewise. Require the padding to be
21590 known at compile time.
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 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
21597 Use plus_constant instead of gen_rtx_PLUS.
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 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
21604 rather than an int.
21605
21606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21607 Alan Hayward <alan.hayward@arm.com>
21608 David Sherwood <david.sherwood@arm.com>
21609
21610 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
21611 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
21612 via stack temporaries. Treat the mode size as polynomial too.
21613
21614 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21615 Alan Hayward <alan.hayward@arm.com>
21616 David Sherwood <david.sherwood@arm.com>
21617
21618 * expr.c (expand_expr_real_2): When handling conversions involving
21619 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
21620 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
21621 as a poly_uint64 too.
21622
21623 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21624 Alan Hayward <alan.hayward@arm.com>
21625 David Sherwood <david.sherwood@arm.com>
21626
21627 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
21628
21629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21630 Alan Hayward <alan.hayward@arm.com>
21631 David Sherwood <david.sherwood@arm.com>
21632
21633 * combine.c (can_change_dest_mode): Handle polynomial
21634 REGMODE_NATURAL_SIZE.
21635 * expmed.c (store_bit_field_1): Likewise.
21636 * expr.c (store_constructor): Likewise.
21637 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
21638 and polynomial REGMODE_NATURAL_SIZE.
21639 (gen_lowpart_common): Likewise.
21640 * reginfo.c (record_subregs_of_mode): Likewise.
21641 * rtlanal.c (read_modify_subreg_p): Likewise.
21642
21643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21644 Alan Hayward <alan.hayward@arm.com>
21645 David Sherwood <david.sherwood@arm.com>
21646
21647 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21648 numbers of elements.
21649
21650 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21651 Alan Hayward <alan.hayward@arm.com>
21652 David Sherwood <david.sherwood@arm.com>
21653
21654 * match.pd: Cope with polynomial numbers of vector elements.
21655
21656 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21657 Alan Hayward <alan.hayward@arm.com>
21658 David Sherwood <david.sherwood@arm.com>
21659
21660 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21661 in a POINTER_PLUS_EXPR.
21662
21663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21664 Alan Hayward <alan.hayward@arm.com>
21665 David Sherwood <david.sherwood@arm.com>
21666
21667 * omp-simd-clone.c (simd_clone_subparts): New function.
21668 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21669 (ipa_simd_modify_function_body): Likewise.
21670
21671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21672 Alan Hayward <alan.hayward@arm.com>
21673 David Sherwood <david.sherwood@arm.com>
21674
21675 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21676 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21677 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21678 (expand_vector_condition, vector_element): Likewise.
21679 (subparts_gt): New function.
21680 (get_compute_type): Use subparts_gt.
21681 (count_type_subparts): Delete.
21682 (expand_vector_operations_1): Use subparts_gt instead of
21683 count_type_subparts.
21684
21685 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21686 Alan Hayward <alan.hayward@arm.com>
21687 David Sherwood <david.sherwood@arm.com>
21688
21689 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21690 (vect_compile_time_alias): ...this new function. Do the calculation
21691 on poly_ints rather than trees.
21692 (vect_prune_runtime_alias_test_list): Update call accordingly.
21693
21694 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21695 Alan Hayward <alan.hayward@arm.com>
21696 David Sherwood <david.sherwood@arm.com>
21697
21698 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21699 numbers of units.
21700 (vect_schedule_slp_instance): Likewise.
21701
21702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21703 Alan Hayward <alan.hayward@arm.com>
21704 David Sherwood <david.sherwood@arm.com>
21705
21706 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21707 constant and extern definitions for variable-length vectors.
21708 (vect_get_constant_vectors): Note that the number of units
21709 is known to be constant.
21710
21711 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21712 Alan Hayward <alan.hayward@arm.com>
21713 David Sherwood <david.sherwood@arm.com>
21714
21715 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21716 of units as polynomial. Choose between WIDE and NARROW based
21717 on multiple_p.
21718
21719 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21720 Alan Hayward <alan.hayward@arm.com>
21721 David Sherwood <david.sherwood@arm.com>
21722
21723 * tree-vect-stmts.c (simd_clone_subparts): New function.
21724 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21725
21726 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21727 Alan Hayward <alan.hayward@arm.com>
21728 David Sherwood <david.sherwood@arm.com>
21729
21730 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21731 vectors as polynomial. Use build_index_vector for
21732 IFN_GOMP_SIMD_LANE.
21733
21734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21735 Alan Hayward <alan.hayward@arm.com>
21736 David Sherwood <david.sherwood@arm.com>
21737
21738 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21739 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21740 for variable-length vectors.
21741 (vectorizable_mask_load_store): Treat the number of units as
21742 polynomial, asserting that it is constant if the condition has
21743 already been enforced.
21744 (vectorizable_store, vectorizable_load): Likewise.
21745
21746 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21747 Alan Hayward <alan.hayward@arm.com>
21748 David Sherwood <david.sherwood@arm.com>
21749
21750 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21751 of units as polynomial. Punt if we can't tell at compile time
21752 which vector contains the final result.
21753
21754 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21755 Alan Hayward <alan.hayward@arm.com>
21756 David Sherwood <david.sherwood@arm.com>
21757
21758 * tree-vect-loop.c (vectorizable_induction): Treat the number
21759 of units as polynomial. Punt on SLP inductions. Use an integer
21760 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21761 cast of such a series for variable-length floating-point
21762 reductions.
21763
21764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21765 Alan Hayward <alan.hayward@arm.com>
21766 David Sherwood <david.sherwood@arm.com>
21767
21768 * tree.h (build_index_vector): Declare.
21769 * tree.c (build_index_vector): New function.
21770 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21771 of units as polynomial, forcibly converting it to a constant if
21772 vectorizable_reduction has already enforced the condition.
21773 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21774 to create a {1,2,3,...} vector.
21775 (vectorizable_reduction): Treat the number of units as polynomial.
21776 Choose vectype_in based on the largest scalar element size rather
21777 than the smallest number of units. Enforce the restrictions
21778 relied on above.
21779
21780 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21781 Alan Hayward <alan.hayward@arm.com>
21782 David Sherwood <david.sherwood@arm.com>
21783
21784 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21785 number of units as polynomial.
21786
21787 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21788 Alan Hayward <alan.hayward@arm.com>
21789 David Sherwood <david.sherwood@arm.com>
21790
21791 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21792 * target.def (autovectorize_vector_sizes): Return the vector sizes
21793 by pointer, using vector_sizes rather than a bitmask.
21794 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21795 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21796 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21797 Likewise.
21798 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21799 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21800 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21801 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21802 * omp-general.c (omp_max_vf): Likewise.
21803 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21804 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21805 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21806 * tree-vect-slp.c (vect_slp_bb): Likewise.
21807 * doc/tm.texi: Regenerate.
21808 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21809 to a poly_uint64.
21810 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21811 the vector size as a poly_uint64 rather than an unsigned int.
21812 (current_vector_size): Change from an unsigned int to a poly_uint64.
21813 (get_vectype_for_scalar_type): Update accordingly.
21814 * tree.h (build_truth_vector_type): Take the size and number of
21815 units as a poly_uint64 rather than an unsigned int.
21816 (build_vector_type): Add a temporary overload that takes
21817 the number of units as a poly_uint64 rather than an unsigned int.
21818 * tree.c (make_vector_type): Likewise.
21819 (build_truth_vector_type): Take the number of units as a poly_uint64
21820 rather than an unsigned int.
21821
21822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21823 Alan Hayward <alan.hayward@arm.com>
21824 David Sherwood <david.sherwood@arm.com>
21825
21826 * target.def (get_mask_mode): Take the number of units and length
21827 as poly_uint64s rather than unsigned ints.
21828 * targhooks.h (default_get_mask_mode): Update accordingly.
21829 * targhooks.c (default_get_mask_mode): Likewise.
21830 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21831 * doc/tm.texi: Regenerate.
21832
21833 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21834 Alan Hayward <alan.hayward@arm.com>
21835 David Sherwood <david.sherwood@arm.com>
21836
21837 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21838 * omp-general.c (omp_max_vf): Likewise.
21839 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21840 (expand_omp_simd): Handle polynomial safelen.
21841 * omp-low.c (omplow_simd_context): Add a default constructor.
21842 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21843 (lower_rec_simd_input_clauses): Update accordingly.
21844 (lower_rec_input_clauses): Likewise.
21845
21846 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21847 Alan Hayward <alan.hayward@arm.com>
21848 David Sherwood <david.sherwood@arm.com>
21849
21850 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21851 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21852 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21853 (vect_analyze_slp_cost): Likewise.
21854 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21855 (vect_model_load_cost): Likewise.
21856
21857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21858 Alan Hayward <alan.hayward@arm.com>
21859 David Sherwood <david.sherwood@arm.com>
21860
21861 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21862 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21863 from an unsigned int * to a poly_uint64_pod *.
21864 (calculate_unrolling_factor): New function.
21865 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21866
21867 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21868 Alan Hayward <alan.hayward@arm.com>
21869 David Sherwood <david.sherwood@arm.com>
21870
21871 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21872 from an unsigned int to a poly_uint64.
21873 (_loop_vec_info::slp_unrolling_factor): Likewise.
21874 (_loop_vec_info::vectorization_factor): Change from an int
21875 to a poly_uint64.
21876 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21877 (vect_get_num_vectors): New function.
21878 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21879 (vect_get_num_copies): Use vect_get_num_vectors.
21880 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21881 to an unsigned int *.
21882 (vect_analyze_data_refs): Change min_vf from an int * to a
21883 poly_uint64 *.
21884 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21885 than an unsigned HOST_WIDE_INT.
21886 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21887 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21888 to an unsigned int *.
21889 (vect_analyze_data_ref_dependences): Likewise.
21890 (vect_compute_data_ref_alignment): Handle polynomial vf.
21891 (vect_enhance_data_refs_alignment): Likewise.
21892 (vect_prune_runtime_alias_test_list): Likewise.
21893 (vect_shift_permute_load_chain): Likewise.
21894 (vect_supportable_dr_alignment): Likewise.
21895 (dependence_distance_ge_vf): Take the vectorization factor as a
21896 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21897 (vect_analyze_data_refs): Change min_vf from an int * to a
21898 poly_uint64 *.
21899 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21900 vfm1 as a poly_uint64 rather than an int. Make the same change
21901 for the returned bound_scalar.
21902 (vect_gen_vector_loop_niters): Handle polynomial vf.
21903 (vect_do_peeling): Likewise. Update call to
21904 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21905 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21906 be constant.
21907 * tree-vect-loop.c (vect_determine_vectorization_factor)
21908 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21909 (vect_get_known_peeling_cost): Likewise.
21910 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21911 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21912 (vect_transform_loop): Likewise. Use the lowest possible VF when
21913 updating the upper bounds of the loop.
21914 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21915 rather than an int.
21916 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21917 polynomial unroll factors.
21918 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21919 (vect_make_slp_decision): Likewise.
21920 (vect_supported_load_permutation_p): Likewise, and polynomial
21921 vf too.
21922 (vect_analyze_slp_cost): Handle polynomial vf.
21923 (vect_slp_analyze_node_operations): Likewise.
21924 (vect_slp_analyze_bb_1): Likewise.
21925 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21926 than an unsigned HOST_WIDE_INT.
21927 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21928 (vectorizable_load): Handle polynomial vf.
21929 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21930 a poly_uint64.
21931 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21932
21933 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21934 Alan Hayward <alan.hayward@arm.com>
21935 David Sherwood <david.sherwood@arm.com>
21936
21937 * match.pd: Handle bit operations involving three constants
21938 and try to fold one pair.
21939
21940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21941
21942 * tree-vect-loop-manip.c: Include gimple-fold.h.
21943 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21944 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21945 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21946 Add a path that uses a step of VF instead of 1, but disable it
21947 for now.
21948 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21949 and niters_no_overflow parameters. Update calls to
21950 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21951 Create a new SSA name if the latter choses to use a ste other
21952 than zero, and return it via niters_vector_mult_vf_var.
21953 * tree-vect-loop.c (vect_transform_loop): Update calls to
21954 vect_do_peeling, vect_gen_vector_loop_niters and
21955 slpeel_make_loop_iterate_ntimes.
21956 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21957 (vect_gen_vector_loop_niters): Update declarations after above changes.
21958
21959 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21960
21961 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21962 128-bit round to integer instructions.
21963 (ceil<mode>2): Likewise.
21964 (btrunc<mode>2): Likewise.
21965 (round<mode>2): Likewise.
21966
21967 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21968
21969 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21970 unaligned VSX load/store on P8/P9.
21971 (expand_block_clear): Allow the use of unaligned VSX
21972 load/store on P8/P9.
21973
21974 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21975
21976 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21977 New function.
21978 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21979 swap associated with both a load and a store.
21980
21981 2018-01-02 Andrew Waterman <andrew@sifive.com>
21982
21983 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21984 * config/riscv/riscv.md (clear_cache): Use it.
21985
21986 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21987
21988 * web.c: Remove out-of-date comment.
21989
21990 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21991
21992 * expr.c (fixup_args_size_notes): Check that any existing
21993 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21994 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21995 (emit_single_push_insn): ...here.
21996
21997 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21998
21999 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22000 (const_vector_encoded_nelts): New function.
22001 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22002 (const_vector_int_elt, const_vector_elt): Declare.
22003 * emit-rtl.c (const_vector_int_elt_1): New function.
22004 (const_vector_elt): Likewise.
22005 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22006 of CONST_VECTOR_ELT.
22007
22008 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22009
22010 * expr.c: Include rtx-vector-builder.h.
22011 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22012 directly on the tree encoding.
22013 (const_vector_from_tree): Likewise.
22014 * optabs.c: Include rtx-vector-builder.h.
22015 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22016 sequence of "u" values.
22017 * vec-perm-indices.c: Include rtx-vector-builder.h.
22018 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22019 directly on the vec_perm_indices encoding.
22020
22021 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22022
22023 * doc/rtl.texi (const_vector): Describe new encoding scheme.
22024 * Makefile.in (OBJS): Add rtx-vector-builder.o.
22025 * rtx-vector-builder.h: New file.
22026 * rtx-vector-builder.c: Likewise.
22027 * rtl.h (rtx_def::u2): Add a const_vector field.
22028 (CONST_VECTOR_NPATTERNS): New macro.
22029 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22030 (CONST_VECTOR_DUPLICATE_P): Likewise.
22031 (CONST_VECTOR_STEPPED_P): Likewise.
22032 (CONST_VECTOR_ENCODED_ELT): Likewise.
22033 (const_vec_duplicate_p): Check for a duplicated vector encoding.
22034 (unwrap_const_vec_duplicate): Likewise.
22035 (const_vec_series_p): Check for a non-duplicated vector encoding.
22036 Say that the function only returns true for integer vectors.
22037 * emit-rtl.c: Include rtx-vector-builder.h.
22038 (gen_const_vec_duplicate_1): Delete.
22039 (gen_const_vector): Call gen_const_vec_duplicate instead of
22040 gen_const_vec_duplicate_1.
22041 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22042 (gen_const_vec_duplicate): Use rtx_vector_builder.
22043 (gen_const_vec_series): Likewise.
22044 (gen_rtx_CONST_VECTOR): Likewise.
22045 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22046 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22047 Build a new vector rather than modifying a CONST_VECTOR in-place.
22048 (handle_special_swappables): Update call accordingly.
22049 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22050 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22051 Build a new vector rather than modifying a CONST_VECTOR in-place.
22052 (handle_special_swappables): Update call accordingly.
22053
22054 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22055
22056 * simplify-rtx.c (simplify_const_binary_operation): Use
22057 CONST_VECTOR_ELT instead of XVECEXP.
22058
22059 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22060
22061 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22062 the selector elements to be different from the data elements
22063 if the selector is a VECTOR_CST.
22064 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22065 ssizetype for the selector.
22066
22067 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22068
22069 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
22070 before testing each element individually.
22071 * tree-vect-generic.c (lower_vec_perm): Likewise.
22072
22073 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22074
22075 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
22076 * selftest-run-tests.c (selftest::run_tests): Call it.
22077 * vector-builder.h (vector_builder::operator ==): New function.
22078 (vector_builder::operator !=): Likewise.
22079 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
22080 (vec_perm_indices::all_from_input_p): New function.
22081 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22082 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
22083 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
22084 instead of reading the VECTOR_CST directly. Detect whether both
22085 vector inputs are the same before constructing the vec_perm_indices,
22086 and update the number of inputs argument accordingly. Use the
22087 utility functions added above. Only construct sel2 if we need to.
22088
22089 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22090
22091 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
22092 the broadcast of the low byte.
22093 (expand_mult_highpart): Use an explicit encoding for the permutes.
22094 * optabs-query.c (can_mult_highpart_p): Likewise.
22095 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22096 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22097 (vectorizable_bswap): Likewise.
22098 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
22099 explicit encoding for the power-of-2 permutes.
22100 (vect_permute_store_chain): Likewise.
22101 (vect_grouped_load_supported): Likewise.
22102 (vect_permute_load_chain): Likewise.
22103
22104 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22105
22106 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
22107 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
22108 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
22109 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22110 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
22111 (vect_gen_perm_mask_any): Likewise.
22112
22113 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22114
22115 * int-vector-builder.h: New file.
22116 * vec-perm-indices.h: Include int-vector-builder.h.
22117 (vec_perm_indices): Redefine as an int_vector_builder.
22118 (auto_vec_perm_indices): Delete.
22119 (vec_perm_builder): Redefine as a stand-alone class.
22120 (vec_perm_indices::vec_perm_indices): New function.
22121 (vec_perm_indices::clamp): Likewise.
22122 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
22123 (vec_perm_indices::new_vector): New function.
22124 (vec_perm_indices::new_expanded_vector): Update for new
22125 vec_perm_indices class.
22126 (vec_perm_indices::rotate_inputs): New function.
22127 (vec_perm_indices::all_in_range_p): Operate directly on the
22128 encoded form, without computing elided elements.
22129 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
22130 encoding. Update for new vec_perm_indices class.
22131 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
22132 the given vec_perm_builder.
22133 (expand_vec_perm_var): Update vec_perm_builder constructor.
22134 (expand_mult_highpart): Use vec_perm_builder instead of
22135 auto_vec_perm_indices.
22136 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
22137 vec_perm_indices instead of auto_vec_perm_indices. Use a single
22138 or double series encoding as appropriate.
22139 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
22140 vec_perm_indices instead of auto_vec_perm_indices.
22141 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22142 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22143 (vect_permute_store_chain): Likewise.
22144 (vect_grouped_load_supported): Likewise.
22145 (vect_permute_load_chain): Likewise.
22146 (vect_shift_permute_load_chain): Likewise.
22147 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22148 (vect_transform_slp_perm_load): Likewise.
22149 (vect_schedule_slp_instance): Likewise.
22150 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22151 (vectorizable_mask_load_store): Likewise.
22152 (vectorizable_bswap): Likewise.
22153 (vectorizable_store): Likewise.
22154 (vectorizable_load): Likewise.
22155 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
22156 vec_perm_indices instead of auto_vec_perm_indices. Use
22157 tree_to_vec_perm_builder to read the vector from a tree.
22158 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
22159 vec_perm_builder instead of a vec_perm_indices.
22160 (have_whole_vector_shift): Use vec_perm_builder and
22161 vec_perm_indices instead of auto_vec_perm_indices. Leave the
22162 truncation to calc_vec_perm_mask_for_shift.
22163 (vect_create_epilog_for_reduction): Likewise.
22164 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
22165 from auto_vec_perm_indices to vec_perm_indices.
22166 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22167 instead of changing individual elements.
22168 (aarch64_vectorize_vec_perm_const): Use new_vector to install
22169 the vector in d.perm.
22170 * config/arm/arm.c (expand_vec_perm_d::perm): Change
22171 from auto_vec_perm_indices to vec_perm_indices.
22172 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
22173 instead of changing individual elements.
22174 (arm_vectorize_vec_perm_const): Use new_vector to install
22175 the vector in d.perm.
22176 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
22177 Update vec_perm_builder constructor.
22178 (rs6000_expand_interleave): Likewise.
22179 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
22180 (rs6000_expand_interleave): Likewise.
22181
22182 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22183
22184 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
22185 to qimode could truncate the indices.
22186 * optabs.c (expand_vec_perm_var): Likewise.
22187
22188 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22189
22190 * Makefile.in (OBJS): Add vec-perm-indices.o.
22191 * vec-perm-indices.h: New file.
22192 * vec-perm-indices.c: Likewise.
22193 * target.h (vec_perm_indices): Replace with a forward class
22194 declaration.
22195 (auto_vec_perm_indices): Move to vec-perm-indices.h.
22196 * optabs.h: Include vec-perm-indices.h.
22197 (expand_vec_perm): Delete.
22198 (selector_fits_mode_p, expand_vec_perm_var): Declare.
22199 (expand_vec_perm_const): Declare.
22200 * target.def (vec_perm_const_ok): Replace with...
22201 (vec_perm_const): ...this new hook.
22202 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
22203 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
22204 * doc/tm.texi: Regenerate.
22205 * optabs.def (vec_perm_const): Delete.
22206 * doc/md.texi (vec_perm_const): Likewise.
22207 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
22208 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
22209 expand_vec_perm for constant permutation vectors. Assert that
22210 the mode of variable permutation vectors is the integer equivalent
22211 of the mode that is being permuted.
22212 * optabs-query.h (selector_fits_mode_p): Declare.
22213 * optabs-query.c: Include vec-perm-indices.h.
22214 (selector_fits_mode_p): New function.
22215 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
22216 is defined, instead of checking whether the vec_perm_const_optab
22217 exists. Use targetm.vectorize.vec_perm_const instead of
22218 targetm.vectorize.vec_perm_const_ok. Check whether the indices
22219 fit in the vector mode before using a variable permute.
22220 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
22221 vec_perm_indices instead of an rtx.
22222 (expand_vec_perm): Replace with...
22223 (expand_vec_perm_const): ...this new function. Take the selector
22224 as a vec_perm_indices rather than an rtx. Also take the mode of
22225 the selector. Update call to shift_amt_for_vec_perm_mask.
22226 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
22227 Use vec_perm_indices::new_expanded_vector to expand the original
22228 selector into bytes. Check whether the indices fit in the vector
22229 mode before using a variable permute.
22230 (expand_vec_perm_var): Make global.
22231 (expand_mult_highpart): Use expand_vec_perm_const.
22232 * fold-const.c: Includes vec-perm-indices.h.
22233 * tree-ssa-forwprop.c: Likewise.
22234 * tree-vect-data-refs.c: Likewise.
22235 * tree-vect-generic.c: Likewise.
22236 * tree-vect-loop.c: Likewise.
22237 * tree-vect-slp.c: Likewise.
22238 * tree-vect-stmts.c: Likewise.
22239 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
22240 Delete.
22241 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
22242 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
22243 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
22244 (aarch64_vectorize_vec_perm_const): ...this new function.
22245 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22246 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22247 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
22248 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
22249 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22250 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22251 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
22252 into...
22253 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
22254 check for NEON modes.
22255 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
22256 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
22257 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
22258 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
22259 into...
22260 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
22261 the old VEC_PERM_CONST conditions.
22262 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
22263 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
22264 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
22265 (ia64_vectorize_vec_perm_const_ok): Merge into...
22266 (ia64_vectorize_vec_perm_const): ...this new function.
22267 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
22268 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
22269 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
22270 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
22271 * config/mips/mips.c (mips_expand_vec_perm_const)
22272 (mips_vectorize_vec_perm_const_ok): Merge into...
22273 (mips_vectorize_vec_perm_const): ...this new function.
22274 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
22275 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
22276 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
22277 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
22278 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
22279 (rs6000_expand_vec_perm_const): Delete.
22280 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
22281 Delete.
22282 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22283 (altivec_expand_vec_perm_const_le): Take each operand individually.
22284 Operate on constant selectors rather than rtxes.
22285 (altivec_expand_vec_perm_const): Likewise. Update call to
22286 altivec_expand_vec_perm_const_le.
22287 (rs6000_expand_vec_perm_const): Delete.
22288 (rs6000_vectorize_vec_perm_const_ok): Delete.
22289 (rs6000_vectorize_vec_perm_const): New function.
22290 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22291 an element count and rtx array.
22292 (rs6000_expand_extract_even): Update call accordingly.
22293 (rs6000_expand_interleave): Likewise.
22294 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
22295 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
22296 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
22297 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
22298 (rs6000_expand_vec_perm_const): Delete.
22299 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
22300 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22301 (altivec_expand_vec_perm_const_le): Take each operand individually.
22302 Operate on constant selectors rather than rtxes.
22303 (altivec_expand_vec_perm_const): Likewise. Update call to
22304 altivec_expand_vec_perm_const_le.
22305 (rs6000_expand_vec_perm_const): Delete.
22306 (rs6000_vectorize_vec_perm_const_ok): Delete.
22307 (rs6000_vectorize_vec_perm_const): New function. Remove stray
22308 reference to the SPE evmerge intructions.
22309 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
22310 an element count and rtx array.
22311 (rs6000_expand_extract_even): Update call accordingly.
22312 (rs6000_expand_interleave): Likewise.
22313 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
22314 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
22315 new function.
22316 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
22317
22318 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22319
22320 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
22321 vector mode and that that mode matches the mode of the data
22322 being permuted.
22323 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
22324 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
22325 directly using expand_vec_perm_1 when forcing selectors into
22326 registers.
22327 (expand_vec_perm_var): New function, split out from expand_vec_perm.
22328
22329 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22330
22331 * optabs-query.h (can_vec_perm_p): Delete.
22332 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
22333 * optabs-query.c (can_vec_perm_p): Split into...
22334 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
22335 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
22336 particular selector is valid.
22337 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22338 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22339 (vect_grouped_load_supported): Likewise.
22340 (vect_shift_permute_load_chain): Likewise.
22341 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
22342 (vect_transform_slp_perm_load): Likewise.
22343 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22344 (vectorizable_bswap): Likewise.
22345 (vect_gen_perm_mask_checked): Likewise.
22346 * fold-const.c (fold_ternary_loc): Likewise. Don't take
22347 implementations of variable permutation vectors into account
22348 when deciding which selector to use.
22349 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
22350 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
22351 with a false third argument.
22352 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
22353 to test whether the constant selector is valid and can_vec_perm_var_p
22354 to test whether a variable selector is valid.
22355
22356 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22357
22358 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
22359 * optabs-query.c (can_vec_perm_p): Likewise.
22360 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
22361 instead of vec_perm_indices.
22362 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
22363 (vect_gen_perm_mask_checked): Likewise,
22364 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
22365 (vect_gen_perm_mask_checked): Likewise,
22366
22367 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
22368
22369 * optabs-query.h (qimode_for_vec_perm): Declare.
22370 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
22371 (qimode_for_vec_perm): ...this new function.
22372 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
22373
22374 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22375
22376 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
22377 does not have a conditional at the top.
22378
22379 2018-01-02 Richard Biener <rguenther@suse.de>
22380
22381 * ipa-inline.c (big_speedup_p): Fix expression.
22382
22383 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22384
22385 PR target/81616
22386 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
22387 for generic 4->6.
22388
22389 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
22390
22391 PR target/81616
22392 Generic tuning.
22393 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
22394 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
22395 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
22396 cond_taken_branch_cost 3->4.
22397
22398 2018-01-01 Jakub Jelinek <jakub@redhat.com>
22399
22400 PR tree-optimization/83581
22401 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
22402 TODO_cleanup_cfg if any changes have been made.
22403
22404 PR middle-end/83608
22405 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
22406 convert_modes if target mode has the right side, but different mode
22407 class.
22408
22409 PR middle-end/83609
22410 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
22411 last argument when extracting from CONCAT. If either from_real or
22412 from_imag is NULL, use expansion through memory. If result is not
22413 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
22414 the parts directly to inner mode, if even that fails, use expansion
22415 through memory.
22416
22417 PR middle-end/83623
22418 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22419 check for bswap in mode rather than HImode and use that in expand_unop
22420 too.
22421 \f
22422 Copyright (C) 2018 Free Software Foundation, Inc.
22423
22424 Copying and distribution of this file, with or without modification,
22425 are permitted in any medium without royalty provided the copyright
22426 notice and this notice are preserved.